forked from bombastictranz/awesome
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
held-runs-banner-cae2ea66cef6f8be.js.download
Stock control supervisors
- Loading branch information
1 parent
12b43c0
commit dd907da
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1600],{86402:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});var r=n(43219)._(n(2784)).default.createContext({})},70703:function(e,t){"use strict";function isInAmpMode(e){var t=void 0===e?{}:e,n=t.ampFirst,r=t.hybrid,a=t.hasQuery;return void 0!==n&&n||void 0!==r&&r&&void 0!==a&&a}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return isInAmpMode}})},81066:function(e,t,n){"use strict";var r=n(63782);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{defaultHead:function(){return _defaultHead},default:function(){return _default2}});var a=n(43219),u=n(16794)._(n(2784)),o=a._(n(64275)),i=n(86402),c=n(16392),s=n(70703);function _defaultHead(e){void 0===e&&(e=!1);var t=[u.default.createElement("meta",{charSet:"utf-8"})];return e||t.push(u.default.createElement("meta",{name:"viewport",content:"width=device-width"})),t}function onlyReactElement(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===u.default.Fragment?e.concat(u.default.Children.toArray(t.props.children).reduce(function(e,t){return"string"==typeof t||"number"==typeof t?e:e.concat(t)},[])):e.concat(t)}n(27918);var d=["name","httpEquiv","charSet","itemProp"];function reduceComponents(e,t){var n,a,o,i,c=t.inAmpMode;return e.reduce(onlyReactElement,[]).reverse().concat(_defaultHead(c).reverse()).filter((n=new Set,a=new Set,o=new Set,i={},function(e){var t=!0,r=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){r=!0;var u=e.key.slice(e.key.indexOf("$")+1);n.has(u)?t=!1:n.add(u)}switch(e.type){case"title":case"base":a.has(e.type)?t=!1:a.add(e.type);break;case"meta":for(var c=0,s=d.length;c<s;c++){var l=d[c];if(e.props.hasOwnProperty(l)){if("charSet"===l)o.has(l)?t=!1:o.add(l);else{var f=e.props[l],p=i[l]||new Set;("name"!==l||!r)&&p.has(f)?t=!1:(p.add(f),i[l]=p)}}}}return t})).reverse().map(function(e,t){var n=e.key||t;if(!c&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(function(t){return e.props.href.startsWith(t)})){var a=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(n),!0).forEach(function(t){r(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e.props||{});return a["data-href"]=a.href,a.href=void 0,a["data-optimized-fonts"]=!0,u.default.cloneElement(e,a)}return u.default.cloneElement(e,{key:n})})}var _default2=function(e){var t=e.children,n=(0,u.useContext)(i.AmpStateContext),r=(0,u.useContext)(c.HeadManagerContext);return u.default.createElement(o.default,{reduceComponentsToState:reduceComponents,headManager:r,inAmpMode:(0,s.isInAmpMode)(n)},t)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},64275:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return SideEffect}});var r=n(2784),a=r.useLayoutEffect,u=r.useEffect;function SideEffect(e){var t=e.headManager,n=e.reduceComponentsToState;function emitChange(){if(t&&t.mountedInstances){var a=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(a,e))}}return a(function(){var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),function(){var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),a(function(){return t&&(t._pendingUpdate=emitChange),function(){t&&(t._pendingUpdate=emitChange)}}),u(function(){return t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),function(){t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)}}),null}},27918:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return warnOnce}});var warnOnce=function(e){}},72304:function(e,t,n){"use strict";n.d(t,{p:function(){return HeldRunsBanner}});var r=n(25237),a=n.n(r),u=n(38716),o=n(20406),i=n(28526),c=n.n(i),s=n(92642),d=n(2784),l=n(49857),f={heldCount:0,startsExpiring:void 0,stepCount:0};function fetchHeldRunsSummary(e){return _fetchHeldRunsSummary.apply(this,arguments)}function _fetchHeldRunsSummary(){return(_fetchHeldRunsSummary=(0,o.Z)(c().mark(function _callee(e){var t,n;return c().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return t=new URLSearchParams({account_id:e,group_by:"reason",include_shared_with:"false"}),r.prev=1,r.next=4,fetch("/api/zap-history/v2/runs/held-count?".concat(t.toString()));case 4:if(!(n=r.sent).ok){r.next=7;break}return r.abrupt("return",n.json());case 7:s.n_({data:{message:"Got bad server response: ".concat(n.statusText," (").concat(n.status,")"),status:n.status,statusText:n.statusText,text:n.text()},level:"warning"}),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(1),s.n_({message:"A network error occurred: ".concat(r.t0),level:"warning"});case 13:return r.abrupt("return");case 14:case"end":return r.stop()}},_callee,null,[[1,10]])}))).apply(this,arguments)}var p=n(52903),h=a()(function(){return Promise.all([n.e(6314),n.e(4413)]).then(n.bind(n,4413)).then(function(e){return e.Banner})},{ssr:!1,loadableGenerated:{webpack:function(){return[4413]}}});function HeldRunsBanner(){var e,t,n,r=(0,u.X8)(),a=(t=d.useRef(0),(n=(0,l.ZP)(null==r?void 0:r.toString(),{errorRetryInterval:15e3,fetcher:fetchHeldRunsSummary,refreshInterval:function(){return Math.min(12e4,Math.round(15e3*Math.pow(1.2,t.current)))},onSuccess:function(){return t.current++}}).data)?{heldCount:null!==(e=n.total)&&void 0!==e?e:0,startsExpiring:function(e){if(e){var t=new Date(e);return isNaN(t.getTime())?void 0:t}}(n.starts_expiring),stepCount:n.reasons.length+1}:f);return r&&0!==a.heldCount?(0,p.tZ)(h,{accountId:r,heldCount:a.heldCount,startsExpiringOn:a.startsExpiring,stepCount:a.stepCount}):null}},81593:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return HeldRunsBannerEmbed}});var r=n(28165),a=n(97729),u=n.n(a),o=n(72304),i=n(79411),c=n(38716),s=n(52903),d={name:"8jdeqg-held-runs-banner--marginToPaddingOffset",styles:"html{padding-bottom:30px;};label:held-runs-banner--marginToPaddingOffset;"},l={name:"1fnbff1-held-runs-banner--mainStyle",styles:"position:relative;label:held-runs-banner--mainStyle;"};function HeldRunsBannerEmbed(){var e=(0,c.X8)(),t=(0,i.e6)();return e&&t?(0,s.BX)("div",{id:"heldRunsBannerEmbed",children:[(0,s.tZ)(u(),{children:(0,s.tZ)("base",{target:"_parent"})}),(0,s.tZ)(r.xB,{styles:d}),(0,s.tZ)("main",{css:l,children:(0,s.tZ)(o.p,{})})]}):null}},82184:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/embed/reporting/held-runs-banner",function(){return n(81593)}])},97729:function(e,t,n){e.exports=n(81066)}},function(e){e.O(0,[9716,6409,9411,9774,2888,179],function(){return e(e.s=82184)}),_N_E=e.O()}]); |