This commit is contained in:
Yusuf İpek
2021-01-25 15:10:03 +03:00
commit 13da7b071c
17 changed files with 125 additions and 0 deletions
File diff suppressed because one or more lines are too long
+47
View File
@@ -0,0 +1,47 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
Copyright (c) 2017 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/** @license React v0.20.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
(this["webpackJsonpquote-machine"]=this["webpackJsonpquote-machine"]||[]).push([[3],{23:function(t,n,e){"use strict";e.r(n),e.d(n,"getCLS",(function(){return m})),e.d(n,"getFCP",(function(){return g})),e.d(n,"getFID",(function(){return h})),e.d(n,"getLCP",(function(){return y})),e.d(n,"getTTFB",(function(){return F}));var i,a,r=function(){return"".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)},o=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return{name:t,value:n,delta:0,entries:[],id:r(),isFinal:!1}},u=function(t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var e=new PerformanceObserver((function(t){return t.getEntries().map(n)}));return e.observe({type:t,buffered:!0}),e}}catch(t){}},c=!1,s=!1,d=function(t){c=!t.persisted},f=function(){addEventListener("pagehide",d),addEventListener("beforeunload",(function(){}))},p=function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s||(f(),s=!0),addEventListener("visibilitychange",(function(n){var e=n.timeStamp;"hidden"===document.visibilityState&&t({timeStamp:e,isUnloading:c})}),{capture:!0,once:n})},l=function(t,n,e,i){var a;return function(){e&&n.isFinal&&e.disconnect(),n.value>=0&&(i||n.isFinal||"hidden"===document.visibilityState)&&(n.delta=n.value-(a||0),(n.delta||n.isFinal||void 0===a)&&(t(n),a=n.value))}},m=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=o("CLS",0),a=function(t){t.hadRecentInput||(i.value+=t.value,i.entries.push(t),n())},r=u("layout-shift",a);r&&(n=l(t,i,r,e),p((function(t){var e=t.isUnloading;r.takeRecords().map(a),e&&(i.isFinal=!0),n()})))},v=function(){return void 0===i&&(i="hidden"===document.visibilityState?0:1/0,p((function(t){var n=t.timeStamp;return i=n}),!0)),{get timeStamp(){return i}}},g=function(t){var n,e=o("FCP"),i=v(),a=u("paint",(function(t){"first-contentful-paint"===t.name&&t.startTime<i.timeStamp&&(e.value=t.startTime,e.isFinal=!0,e.entries.push(t),n())}));a&&(n=l(t,e,a))},h=function(t){var n=o("FID"),e=v(),i=function(t){t.startTime<e.timeStamp&&(n.value=t.processingStart-t.startTime,n.entries.push(t),n.isFinal=!0,r())},a=u("first-input",i),r=l(t,n,a);a?p((function(){a.takeRecords().map(i),a.disconnect()}),!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay((function(t,i){i.timeStamp<e.timeStamp&&(n.value=t,n.isFinal=!0,n.entries=[{entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+t}],r())}))},S=function(){return a||(a=new Promise((function(t){return["scroll","keydown","pointerdown"].map((function(n){addEventListener(n,t,{once:!0,passive:!0,capture:!0})}))}))),a},y=function(t){var n,e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=o("LCP"),a=v(),r=function(t){var e=t.startTime;e<a.timeStamp?(i.value=e,i.entries.push(t)):i.isFinal=!0,n()},c=u("largest-contentful-paint",r);if(c){n=l(t,i,c,e);var s=function(){i.isFinal||(c.takeRecords().map(r),i.isFinal=!0,n())};S().then(s),p(s,!0)}},F=function(t){var n,e=o("TTFB");n=function(){try{var n=performance.getEntriesByType("navigation")[0]||function(){var t=performance.timing,n={entryType:"navigation",startTime:0};for(var e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n}();e.value=e.delta=n.responseStart,e.entries=[n],e.isFinal=!0,t(e)}catch(t){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("pageshow",n)}}}]);
//# sourceMappingURL=3.5113abf0.chunk.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
(this["webpackJsonpquote-machine"]=this["webpackJsonpquote-machine"]||[]).push([[0],{17:function(t,e,n){},18:function(t,e,n){},21:function(t,e,n){},22:function(t,e,n){"use strict";n.r(e);var a=n(1),r=n(0),s=n.n(r),c=n(9),i=n.n(c),o=(n(17),n(2)),u=n(3),h=n(5),d=n(4),l=(n(18),n(7)),f=n.n(l),b=n(10),j=n(11),p=(n(20),function(t){return Object(a.jsx)(j.a,{variant:t.variant,target:t.target,onClick:t.click,children:t.text})}),x=(n(21),function(t){Object(h.a)(n,t);var e=Object(d.a)(n);function n(t){var a;return Object(o.a)(this,n),(a=e.call(this,t)).random=function(){return Math.floor(1600*Math.random())},a.random2=function(){return Math.floor(4*Math.random())},a.handleChange=function(){var t=a.random();a.setState({displayQuote:a.state.quotes[t].text,displayAuthor:a.state.quotes[t].author}),a.props.handler(a.state.backGroundApp[a.random2()])},a.state={quotes:null,displayQuote:null,displayAuthor:null,color:["#264653","#2a9d8f","#e76f51","#e63946","#bc6c25"],backGroundApp:["#ffadad","#ffd6a5","#caffbf","#9bf6ff","#a0c4ff","#ffc6ff"]},a}return Object(u.a)(n,[{key:"componentDidMount",value:function(){var t=Object(b.a)(f.a.mark((function t(){var e,n,a;return f.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,fetch("https://type.fit/api/quotes");case 2:return e=t.sent,t.next=5,e.json();case 5:n=t.sent,this.setState({quotes:n}),a=this.random(),this.setState({displayQuote:this.state.quotes[a].text,displayAuthor:this.state.quotes[a].author});case 9:case"end":return t.stop()}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"render",value:function(){return this.state.quotes?Object(a.jsx)("div",{className:"wrapper",children:Object(a.jsxs)("div",{id:"quote-box",style:{transition:"background-color 0.3s ease",backgroundColor:this.state.color[this.random2()]},children:[Object(a.jsxs)("div",{className:"writing",children:[Object(a.jsx)("h3",{id:"text",children:this.state.displayQuote}),Object(a.jsx)("p",{id:"author",children:this.state.displayAuthor})]}),Object(a.jsx)("div",{id:"new-quote",children:Object(a.jsx)(p,{click:this.handleChange,text:"New Quote",variant:"success"})}),Object(a.jsx)("div",{id:"tweet",children:Object(a.jsx)(p,{href:"https://twitter.com/intent/tweet?text=".concat(this.state.displayQuote," \n \n ").concat(this.state.displayAuthor),text:Object(a.jsx)("a",{id:"tweet-quote",target:"_blank",rel:"noreferrer",href:"https://twitter.com/intent/tweet?text=".concat(this.state.displayQuote," \n \n ").concat(this.state.displayAuthor),children:"Tweet"}),variant:"primary"})})]})}):Object(a.jsx)("div",{children:Object(a.jsx)("h1",{style:{textAlign:"center"},children:"Loading..."})})}}]),n}(s.a.Component)),O=function(t){Object(h.a)(n,t);var e=Object(d.a)(n);function n(){var t;return Object(o.a)(this,n),(t=e.call(this)).bgChange=function(e){t.setState({backG:e})},t.state={backG:"#2a9d8f"},t}return Object(u.a)(n,[{key:"render",value:function(){return Object(a.jsx)("div",{className:"App",style:{transition:"background-color 0.3s ease",backgroundColor:this.state.backG},children:Object(a.jsx)(x,{id:"quote",handler:this.bgChange})})}}]),n}(r.Component),v=function(t){t&&t instanceof Function&&n.e(3).then(n.bind(null,23)).then((function(e){var n=e.getCLS,a=e.getFID,r=e.getFCP,s=e.getLCP,c=e.getTTFB;n(t),a(t),r(t),s(t),c(t)}))};i.a.render(Object(a.jsx)(s.a.StrictMode,{children:Object(a.jsx)(O,{})}),document.getElementById("root")),v()}},[[22,1,2]]]);
//# sourceMappingURL=main.5bb52aac.chunk.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
!function(e){function t(t){for(var n,a,i=t[0],c=t[1],l=t[2],s=0,p=[];s<i.length;s++)a=i[s],Object.prototype.hasOwnProperty.call(o,a)&&o[a]&&p.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(f&&f(t);p.length;)p.shift()();return u.push.apply(u,l||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,i=1;i<r.length;i++){var c=r[i];0!==o[c]&&(n=!1)}n&&(u.splice(t--,1),e=a(a.s=r[0]))}return e}var n={},o={1:0},u=[];function a(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],r=o[e];if(0!==r)if(r)t.push(r[2]);else{var n=new Promise((function(t,n){r=o[e]=[t,n]}));t.push(r[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+"static/js/"+({}[e]||e)+"."+{3:"5113abf0"}[e]+".chunk.js"}(e);var c=new Error;u=function(t){i.onerror=i.onload=null,clearTimeout(l);var r=o[e];if(0!==r){if(r){var n=t&&("load"===t.type?"missing":t.type),u=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,r[1](c)}o[e]=void 0}};var l=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(t)},a.m=e,a.c=n,a.d=function(e,t,r){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(a.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(r,n,function(t){return e[t]}.bind(null,n));return r},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="/quote-machine/",a.oe=function(e){throw console.error(e),e};var i=this["webpackJsonpquote-machine"]=this["webpackJsonpquote-machine"]||[],c=i.push.bind(i);i.push=t,i=i.slice();for(var l=0;l<i.length;l++)t(i[l]);var f=c;r()}([]);
//# sourceMappingURL=runtime-main.d0d4c421.js.map
File diff suppressed because one or more lines are too long