{"version":3,"file":"ready-state.es-D4ZvSmmL.js","sources":["../../../app/assets/javascripts/plugins/request-animation-frame-polyfill/index.ts","../../../node_modules/ready-state/dist/ready-state.es.js"],"sourcesContent":["\nexport interface RequestIdleCallbackPayload {\n didTimeout: boolean\n timeRemaining: () => number\n}\n\n// Doc for `requestAnimationFrame` & `cancelAnimationFrame`\n// https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame\n// https://developer.mozilla.org/en-US/docs/Web/API/Window/cancelAnimationFrame\ndeclare global {\n interface Window {\n requestIdleCallback?: (callback: (payload: RequestIdleCallbackPayload) => void) => number\n cancelIdleCallback?: (id: number) => void\n }\n}\n\n// Polyfill copied & modified from\n// https://developers.google.com/web/updates/2015/08/using-requestidlecallback\nconst requestIdleCallback =\n window.requestIdleCallback || ((callback: (payload: RequestIdleCallbackPayload) => void) => {\n const start = Date.now()\n return setTimeout(() => {\n callback({\n didTimeout: false,\n timeRemaining: () => {\n return Math.max(0, 50 - (Date.now() - start))\n },\n })\n }, 1)\n })\n\nconst cancelIdleCallback =\n window.cancelIdleCallback || ((id: number) => {\n clearTimeout(id)\n })\n\nexport {\n requestIdleCallback,\n cancelIdleCallback,\n}\n","var e={capture:!0,once:!0,passive:!0},t=function(){return\"interactive\"===document.readyState||\"complete\"===document.readyState},n=function(e,n){return!(!function(e){return document.readyState===e}(e)&&!t())&&(n(e),!0)},r=function(){return new Promise(function(t){n(\"loading\",t)||document.addEventListener(\"readystatechange\",function(){\"loading\"===document.readyState&&t(\"loading\")},e)})},o=function(){return new Promise(function(t){n(\"interactive\",t)||document.addEventListener(\"readystatechange\",function(){\"interactive\"===document.readyState&&t(\"interactive\")},e)})},u=function(){return new Promise(function(t){n(\"complete\",t)||document.addEventListener(\"readystatechange\",function(){\"complete\"===document.readyState&&t(\"complete\")},e)})},i=function(){return new Promise(function(t){n(\"domready\",t)||document.addEventListener(\"DOMContentLoaded\",function(){t(\"domready\")},e)})},c=function(){return new Promise(function(t){n(\"load\",t)||window.addEventListener(\"load\",function(){t(\"load\")},e)})},d={};Object.defineProperties(d,{state:{get:function(){return document.readyState}},loading:{get:function(){return r()}},interactive:{get:function(){return o()}},complete:{get:function(){return u()}},window:{get:function(){return c()}},load:{get:function(){return c()}},domready:{get:function(){return i()}},dom:{get:function(){return i()}},ready:{get:function(){return t()}}});export default d;export{r as loading,o as interactive,u as complete,i as domready,c as load};\n//# sourceMappingURL=ready-state.es.js.map\n"],"names":["requestIdleCallback","callback","start","e","t","n","r","o","u","i","c","d"],"mappings":"AAkBA,MAAMA,EACJ,OAAO,sBAAyBC,GAA4D,CACpF,MAAAC,EAAQ,KAAK,IAAI,EACvB,OAAO,WAAW,IAAM,CACbD,EAAA,CACP,WAAgB,GAChB,cAAgB,IACP,KAAK,IAAI,EAAG,IAAM,KAAK,IAAA,EAAQC,EAAM,CAC9C,CACD,GACA,CAAC,CACN,GC7BC,IAACC,EAAE,CAAC,QAAQ,GAAG,KAAK,GAAG,QAAQ,EAAE,EAAEC,EAAE,UAAU,CAAC,OAAsB,SAAS,aAAzB,eAAkD,SAAS,aAAtB,UAAgC,EAAE,EAAE,SAAS,EAAEC,EAAE,CAAC,MAAM,EAAE,CAAC,SAASF,EAAE,CAAC,OAAO,SAAS,aAAaA,CAAC,EAAE,CAAC,GAAG,CAACC,EAAC,KAAMC,EAAE,CAAC,EAAE,GAAG,EAAEC,EAAE,UAAU,CAAC,OAAO,IAAI,QAAQ,SAASF,EAAE,CAAC,EAAE,UAAUA,CAAC,GAAG,SAAS,iBAAiB,mBAAmB,UAAU,CAAa,SAAS,aAArB,WAAiCA,EAAE,SAAS,CAAC,EAAED,CAAC,CAAC,CAAC,CAAC,EAAEI,EAAE,UAAU,CAAC,OAAO,IAAI,QAAQ,SAASH,EAAE,CAAC,EAAE,cAAcA,CAAC,GAAG,SAAS,iBAAiB,mBAAmB,UAAU,CAAiB,SAAS,aAAzB,eAAqCA,EAAE,aAAa,CAAC,EAAED,CAAC,CAAC,CAAC,CAAC,EAA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