?AlkantarClanX12
| Current Path : /home/r/a/n/rankinh/numerik/wp-content/plugins/image-optimization/assets/build/ |
| Current File : /home/r/a/n/rankinh/numerik/wp-content/plugins/image-optimization/assets/build/admin.js |
!function(){var t={998:function(t,e,r){"use strict";r(196),e.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMCIgaGVpZ2h0PSIzMCIgZmlsbD0ibm9uZSI+CiAgICA8ZyBmaWxsPSIjQkFCRkM1IiBjbGlwLXBhdGg9InVybCgjYSkiPgogICAgICAgIDxwYXRoIGQ9Im0xNS43NTUgMTEuMzM1LTIuMDgtMi4wOGEzLjc1IDMuNzUgMCAwIDAtNS4zMDQgNS4zMDJsMi42NTIgMi42NTJhMy43NSAzLjc1IDAgMCAwIDYuMDM2LTEuMDM0bC0uNzMzLS43MzRhMS4yMzUgMS4yMzUgMCAwIDAtLjI0OS0uMTkzIDIuNSAyLjUgMCAwIDEtNC4xNyAxLjA3N2wtMi42NTItMi42NTFhMi41IDIuNSAwIDEgMSAzLjUzNS0zLjUzNmwxLjM1NyAxLjM1N2E1LjAyIDUuMDIgMCAwIDEgMS42MDktLjE2aC0uMDAxWiIvPgogICAgICAgIDxwYXRoIGQ9Im0xNS4yMzMgMTIuNTgxLjIwOS4yMDljLjMyMi4zMjIuNTM4LjcxLjY0NyAxLjEyLjQyNC4xMTQuODEuMzM3IDEuMTIuNjQ4bC4yMS4yMDhhMy43NTYgMy43NTYgMCAwIDAtLjM2LTEuODI2IDMuNzUgMy43NSAwIDAgMC0xLjgyNi0uMzU5WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0xOC4wOTMgMTMuNjc0YTMuNzUgMy43NSAwIDAgMC02LjAzNyAxLjAzNGwuOTcxLjk3YTIuNSAyLjUgMCAwIDEgNC4xODMtMS4xMmwyLjY1MSAyLjY1MWEyLjUgMi41IDAgMSAxLTMuNTM1IDMuNTM2bC0xLjM1Ny0xLjM1N2E1LjAyNSA1LjAyNSAwIDAgMS0xLjYwOS4xNTlsMi4wODIgMi4wODFhMy43NSAzLjc1IDAgMCAwIDUuMzAzLTUuMzAzbC0yLjY1Mi0yLjY1MVoiLz4KICAgICAgICA8cGF0aCBkPSJNMTIuMDU2IDE3Ljk0M2MuNTcuMjcgMS4xOTguMzk0IDEuODI3LjM1OWwtLjIwOS0uMjA5YTIuNDg3IDIuNDg3IDAgMCAxLS42NDctMS4xMiAyLjQ4NyAyLjQ4NyAwIDAgMS0xLjEyLS42NDhsLS4yMS0uMjA4YTMuNzYyIDMuNzYyIDAgMCAwIC4zNiAxLjgyNloiLz4KICAgIDwvZz4KICAgIDxkZWZzPgogICAgICAgIDxjbGlwUGF0aCBpZD0iYSI+CiAgICAgICAgICAgIDxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik0xNSAuODU3IDI5LjE0MiAxNSAxNSAyOS4xNDIuODU4IDE1eiIvPgogICAgICAgIDwvY2xpcFBhdGg+CiAgICA8L2RlZnM+Cjwvc3ZnPgo="},679:function(t,e,r){"use strict";var n=r(296),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(t){return n.isMemo(t)?a:u[t.$$typeof]||o}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[n.Memo]=a;var l=Object.defineProperty,s=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,h=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(h){var o=d(r);o&&o!==h&&t(e,o,n)}var a=s(r);f&&(a=a.concat(f(r)));for(var u=c(e),m=c(r),g=0;g<a.length;++g){var v=a[g];if(!(i[v]||n&&n[v]||m&&m[v]||u&&u[v])){var y=p(r,v);try{l(e,v,y)}catch(t){}}}}return e}},103:function(t,e){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,s=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,d=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,g=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function x(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case s:case f:case i:case u:case a:case d:return t;default:switch(t=t&&t.$$typeof){case l:case p:case g:case m:case c:return t;default:return e}}case o:return e}}}function S(t){return x(t)===f}e.AsyncMode=s,e.ConcurrentMode=f,e.ContextConsumer=l,e.ContextProvider=c,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=g,e.Memo=m,e.Portal=o,e.Profiler=u,e.StrictMode=a,e.Suspense=d,e.isAsyncMode=function(t){return S(t)||x(t)===s},e.isConcurrentMode=S,e.isContextConsumer=function(t){return x(t)===l},e.isContextProvider=function(t){return x(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return x(t)===p},e.isFragment=function(t){return x(t)===i},e.isLazy=function(t){return x(t)===g},e.isMemo=function(t){return x(t)===m},e.isPortal=function(t){return x(t)===o},e.isProfiler=function(t){return x(t)===u},e.isStrictMode=function(t){return x(t)===a},e.isSuspense=function(t){return x(t)===d},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===f||t===u||t===a||t===d||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===g||t.$$typeof===m||t.$$typeof===c||t.$$typeof===l||t.$$typeof===p||t.$$typeof===y||t.$$typeof===b||t.$$typeof===w||t.$$typeof===v)},e.typeOf=x},296:function(t,e,r){"use strict";t.exports=r(103)},703:function(t,e,r){"use strict";var n=r(414);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,r,o,i,a){if(a!==n){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}function e(){return t}t.isRequired=t;var r={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},697:function(t,e,r){t.exports=r(703)()},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},217:function(t,e,r){!function(t,e){"use strict";function r(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function u(t){r(a,o,i,u,c,"next",t)}function c(t){r(a,o,i,u,c,"throw",t)}u(void 0)}))}}function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function i(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;var u={init:"init"},c=function(t){var e=t.value;return void 0===e?"":e},l=function(){return e.createElement(e.Fragment,null," ")},s={Cell:c,width:150,minWidth:0,maxWidth:Number.MAX_SAFE_INTEGER};function f(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.reduce((function(t,e){var r=e.style,n=e.className;return t=o({},t,{},i(e,["style","className"])),r&&(t.style=t.style?o({},t.style||{},{},r||{}):r),n&&(t.className=t.className?t.className+" "+n:n),""===t.className&&delete t.className,t}),{})}var p=function(t,e){return void 0===e&&(e={}),function(r){return void 0===r&&(r={}),[].concat(t,[r]).reduce((function(t,n){return function t(e,r,n){return"function"==typeof r?t({},r(e,n)):Array.isArray(r)?f.apply(void 0,[e].concat(r)):f(e,r)}(t,n,o({},e,{userProps:r}))}),{})}},d=function(t,e,r,n){return void 0===r&&(r={}),t.reduce((function(t,e){return e(t,r)}),e)},h=function(t,e,r){return void 0===r&&(r={}),t.forEach((function(t){t(e,r)}))};function m(t,e,r,n){t.findIndex((function(t){return t.pluginName===r})),e.forEach((function(e){t.findIndex((function(t){return t.pluginName===e}))}))}function g(t,e){return"function"==typeof t?t(e):t}function v(t){var r=e.useRef();return r.current=t,e.useCallback((function(){return r.current}),[])}var y="undefined"!=typeof document?e.useLayoutEffect:e.useEffect;function b(t,r){var n=e.useRef(!1);y((function(){n.current&&t(),n.current=!0}),r)}function w(t,e,r){return void 0===r&&(r={}),function(n,i){void 0===i&&(i={});var a="string"==typeof n?e[n]:n;if(void 0===a)throw console.info(e),new Error("Renderer Error ☝️");return x(a,o({},t,{column:e},r,{},i))}}function x(t,r){return function(t){return"function"==typeof t&&(e=Object.getPrototypeOf(t)).prototype&&e.prototype.isReactComponent;var e}(n=t)||"function"==typeof n||function(t){return"object"==typeof t&&"symbol"==typeof t.$$typeof&&["react.memo","react.forward_ref"].includes(t.$$typeof.description)}(n)?e.createElement(t,r):t;var n}function S(t,e,r){return void 0===r&&(r=0),t.map((function(t){return O(t=o({},t,{parent:e,depth:r})),t.columns&&(t.columns=S(t.columns,t,r+1)),t}))}function _(t){return L(t,"columns")}function O(t){var e=t.id,r=t.accessor,n=t.Header;if("string"==typeof r){e=e||r;var o=r.split(".");r=function(t){return function(t,e,r){if(!e)return t;var n,o="function"==typeof e?e:JSON.stringify(e),i=E.get(o)||function(){var t=function(t){return function t(e,r){if(void 0===r&&(r=[]),Array.isArray(e))for(var n=0;n<e.length;n+=1)t(e[n],r);else r.push(e);return r}(t).map((function(t){return String(t).replace(".","_")})).join(".").replace(I,".").replace(N,"").split(".")}(e);return E.set(o,t),t}();try{n=i.reduce((function(t,e){return t[e]}),t)}catch(t){}return void 0!==n?n:void 0}(t,o)}}if(!e&&"string"==typeof n&&n&&(e=n),!e&&t.columns)throw console.error(t),new Error('A column ID (or unique "Header" value) is required!');if(!e)throw console.error(t),new Error("A column ID (or string accessor) is required!");return Object.assign(t,{id:e,accessor:r}),t}function k(t,e){if(!e)throw new Error;return Object.assign(t,o({Header:l,Footer:l},s,{},e,{},t)),Object.assign(t,{originalWidth:t.width}),t}var E=new Map;function R(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0;n<e.length;n+=1)if(void 0!==e[n])return e[n]}function C(t){if("function"==typeof t)return t}function L(t,e){var r=[];return function t(n){n.forEach((function(n){n[e]?t(n[e]):r.push(n)}))}(t),r}function j(t,e){var r=e.manualExpandedKey,n=e.expanded,o=e.expandSubRows,i=void 0===o||o,a=[];return t.forEach((function(t){return function t(e,o){void 0===o&&(o=!0),e.isExpanded=e.original&&e.original[r]||n[e.id],e.canExpand=e.subRows&&!!e.subRows.length,o&&a.push(e),e.subRows&&e.subRows.length&&e.isExpanded&&e.subRows.forEach((function(e){return t(e,i)}))}(t)})),a}function z(t,e,r){return C(t)||e[t]||r[t]||r.text}function P(t,e,r){return t?t(e,r):void 0===e}function T(){throw new Error("React-Table: You have not called prepareRow(row) one or more rows you are attempting to render.")}var A=null,I=/\[/g,N=/\]/g,G=function(t){return o({role:"table"},t)},D=function(t){return o({role:"rowgroup"},t)},M=function(t,e){var r=e.column;return o({key:"header_"+r.id,colSpan:r.totalVisibleHeaderCount,role:"columnheader"},t)},F=function(t,e){var r=e.column;return o({key:"footer_"+r.id,colSpan:r.totalVisibleHeaderCount},t)},B=function(t,e){return o({key:"headerGroup_"+e.index,role:"row"},t)},H=function(t,e){return o({key:"footerGroup_"+e.index},t)},W=function(t,e){return o({key:"row_"+e.row.id,role:"row"},t)},U=function(t,e){var r=e.cell;return o({key:"cell_"+r.row.id+"_"+r.column.id,role:"cell"},t)};function Z(){return{useOptions:[],stateReducers:[],useControlledState:[],columns:[],columnsDeps:[],allColumns:[],allColumnsDeps:[],accessValue:[],materializedColumns:[],materializedColumnsDeps:[],useInstanceAfterData:[],visibleColumns:[],visibleColumnsDeps:[],headerGroups:[],headerGroupsDeps:[],useInstanceBeforeDimensions:[],useInstance:[],prepareRow:[],getTableProps:[G],getTableBodyProps:[D],getHeaderGroupProps:[B],getFooterGroupProps:[H],getHeaderProps:[M],getFooterProps:[F],getRowProps:[W],getCellProps:[U],useFinalInstance:[]}}u.resetHiddenColumns="resetHiddenColumns",u.toggleHideColumn="toggleHideColumn",u.setHiddenColumns="setHiddenColumns",u.toggleHideAllColumns="toggleHideAllColumns";var q=function(t){t.getToggleHiddenProps=[$],t.getToggleHideAllColumnsProps=[V],t.stateReducers.push(Y),t.useInstanceBeforeDimensions.push(X),t.headerGroupsDeps.push((function(t,e){var r=e.instance;return[].concat(t,[r.state.hiddenColumns])})),t.useInstance.push(K)};q.pluginName="useColumnVisibility";var $=function(t,e){var r=e.column;return[t,{onChange:function(t){r.toggleHidden(!t.target.checked)},style:{cursor:"pointer"},checked:r.isVisible,title:"Toggle Column Visible"}]},V=function(t,e){var r=e.instance;return[t,{onChange:function(t){r.toggleHideAllColumns(!t.target.checked)},style:{cursor:"pointer"},checked:!r.allColumnsHidden&&!r.state.hiddenColumns.length,title:"Toggle All Columns Hidden",indeterminate:!r.allColumnsHidden&&r.state.hiddenColumns.length}]};function Y(t,e,r,n){if(e.type===u.init)return o({hiddenColumns:[]},t);if(e.type===u.resetHiddenColumns)return o({},t,{hiddenColumns:n.initialState.hiddenColumns||[]});if(e.type===u.toggleHideColumn){var i=(void 0!==e.value?e.value:!t.hiddenColumns.includes(e.columnId))?[].concat(t.hiddenColumns,[e.columnId]):t.hiddenColumns.filter((function(t){return t!==e.columnId}));return o({},t,{hiddenColumns:i})}return e.type===u.setHiddenColumns?o({},t,{hiddenColumns:g(e.value,t.hiddenColumns)}):e.type===u.toggleHideAllColumns?o({},t,{hiddenColumns:(void 0!==e.value?e.value:!t.hiddenColumns.length)?n.allColumns.map((function(t){return t.id})):[]}):void 0}function X(t){var r=t.headers,n=t.state.hiddenColumns;e.useRef(!1).current;var o=0;r.forEach((function(t){return o+=function t(e,r){e.isVisible=r&&!n.includes(e.id);var o=0;return e.headers&&e.headers.length?e.headers.forEach((function(r){return o+=t(r,e.isVisible)})):o=e.isVisible?1:0,e.totalVisibleHeaderCount=o,o}(t,!0)}))}function K(t){var r=t.columns,n=t.flatHeaders,o=t.dispatch,i=t.allColumns,a=t.getHooks,c=t.state.hiddenColumns,l=t.autoResetHiddenColumns,s=void 0===l||l,f=v(t),d=i.length===c.length,h=e.useCallback((function(t,e){return o({type:u.toggleHideColumn,columnId:t,value:e})}),[o]),m=e.useCallback((function(t){return o({type:u.setHiddenColumns,value:t})}),[o]),g=e.useCallback((function(t){return o({type:u.toggleHideAllColumns,value:t})}),[o]),y=p(a().getToggleHideAllColumnsProps,{instance:f()});n.forEach((function(t){t.toggleHidden=function(e){o({type:u.toggleHideColumn,columnId:t.id,value:e})},t.getToggleHiddenProps=p(a().getToggleHiddenProps,{instance:f(),column:t})}));var w=v(s);b((function(){w()&&o({type:u.resetHiddenColumns})}),[o,r]),Object.assign(t,{allColumnsHidden:d,toggleHideColumn:h,setHiddenColumns:m,toggleHideAllColumns:g,getToggleHideAllColumnsProps:y})}var Q={},J={},tt=function(t,e,r){return t},et=function(t,e){return t.subRows||[]},rt=function(t,e,r){return""+(r?[r.id,e].join("."):e)},nt=function(t){return t};function ot(t){var e=t.initialState,r=void 0===e?Q:e,n=t.defaultColumn,a=void 0===n?J:n,u=t.getSubRows,c=void 0===u?et:u,l=t.getRowId,s=void 0===l?rt:l,f=t.stateReducer,p=void 0===f?tt:f,d=t.useControlledState,h=void 0===d?nt:d;return o({},i(t,["initialState","defaultColumn","getSubRows","getRowId","stateReducer","useControlledState"]),{initialState:r,defaultColumn:a,getSubRows:c,getRowId:s,stateReducer:p,useControlledState:h})}function it(t,e){void 0===e&&(e=0);var r=0,n=0,o=0,i=0;return t.forEach((function(t){var a=t.headers;if(t.totalLeft=e,a&&a.length){var u=it(a,e),c=u[0],l=u[1],s=u[2],f=u[3];t.totalMinWidth=c,t.totalWidth=l,t.totalMaxWidth=s,t.totalFlexWidth=f}else t.totalMinWidth=t.minWidth,t.totalWidth=Math.min(Math.max(t.minWidth,t.width),t.maxWidth),t.totalMaxWidth=t.maxWidth,t.totalFlexWidth=t.canResize?t.totalWidth:0;t.isVisible&&(e+=t.totalWidth,r+=t.totalMinWidth,n+=t.totalWidth,o+=t.totalMaxWidth,i+=t.totalFlexWidth)})),[r,n,o,i]}function at(t){var e=t.data,r=t.rows,n=t.flatRows,o=t.rowsById,i=t.column,a=t.getRowId,u=t.getSubRows,c=t.accessValueHooks,l=t.getInstance;e.forEach((function(t,s){return function t(r,s,f,p,h){void 0===f&&(f=0);var m=r,g=a(r,s,p),v=o[g];if(v)v.subRows&&v.originalSubRows.forEach((function(e,r){return t(e,r,f+1,v)}));else if((v={id:g,original:m,index:s,depth:f,cells:[{}]}).cells.map=T,v.cells.filter=T,v.cells.forEach=T,v.cells[0].getCellProps=T,v.values={},h.push(v),n.push(v),o[g]=v,v.originalSubRows=u(r,s),v.originalSubRows){var y=[];v.originalSubRows.forEach((function(e,r){return t(e,r,f+1,v,y)})),v.subRows=y}i.accessor&&(v.values[i.id]=i.accessor(r,s,v,h,e)),v.values[i.id]=d(c,v.values[i.id],{row:v,column:i,instance:l()})}(t,s,0,void 0,r)}))}u.resetExpanded="resetExpanded",u.toggleRowExpanded="toggleRowExpanded",u.toggleAllRowsExpanded="toggleAllRowsExpanded";var ut=function(t){t.getToggleAllRowsExpandedProps=[ct],t.getToggleRowExpandedProps=[lt],t.stateReducers.push(st),t.useInstance.push(ft),t.prepareRow.push(pt)};ut.pluginName="useExpanded";var ct=function(t,e){var r=e.instance;return[t,{onClick:function(t){r.toggleAllRowsExpanded()},style:{cursor:"pointer"},title:"Toggle All Rows Expanded"}]},lt=function(t,e){var r=e.row;return[t,{onClick:function(){r.toggleRowExpanded()},style:{cursor:"pointer"},title:"Toggle Row Expanded"}]};function st(t,e,r,n){if(e.type===u.init)return o({expanded:{}},t);if(e.type===u.resetExpanded)return o({},t,{expanded:n.initialState.expanded||{}});if(e.type===u.toggleAllRowsExpanded){var c=e.value,l=n.rowsById,s=Object.keys(l).length===Object.keys(t.expanded).length;if(void 0!==c?c:!s){var f={};return Object.keys(l).forEach((function(t){f[t]=!0})),o({},t,{expanded:f})}return o({},t,{expanded:{}})}if(e.type===u.toggleRowExpanded){var p,d=e.id,h=e.value,m=t.expanded[d],g=void 0!==h?h:!m;if(!m&&g)return o({},t,{expanded:o({},t.expanded,(p={},p[d]=!0,p))});if(m&&!g){var v=t.expanded;return v[d],o({},t,{expanded:i(v,[d].map(a))})}return t}}function ft(t){var r=t.data,n=t.rows,o=t.rowsById,i=t.manualExpandedKey,a=void 0===i?"expanded":i,c=t.paginateExpandedRows,l=void 0===c||c,s=t.expandSubRows,f=void 0===s||s,d=t.autoResetExpanded,h=void 0===d||d,g=t.getHooks,y=t.plugins,w=t.state.expanded,x=t.dispatch;m(y,["useSortBy","useGroupBy","usePivotColumns","useGlobalFilter"],"useExpanded");var S=v(h),_=Boolean(Object.keys(o).length&&Object.keys(w).length);_&&Object.keys(o).some((function(t){return!w[t]}))&&(_=!1),b((function(){S()&&x({type:u.resetExpanded})}),[x,r]);var O=e.useCallback((function(t,e){x({type:u.toggleRowExpanded,id:t,value:e})}),[x]),k=e.useCallback((function(t){return x({type:u.toggleAllRowsExpanded,value:t})}),[x]),E=e.useMemo((function(){return l?j(n,{manualExpandedKey:a,expanded:w,expandSubRows:f}):n}),[l,n,a,w,f]),R=e.useMemo((function(){return function(t){var e=0;return Object.keys(t).forEach((function(t){var r=t.split(".");e=Math.max(e,r.length)})),e}(w)}),[w]),C=v(t),L=p(g().getToggleAllRowsExpandedProps,{instance:C()});Object.assign(t,{preExpandedRows:n,expandedRows:E,rows:E,expandedDepth:R,isAllRowsExpanded:_,toggleRowExpanded:O,toggleAllRowsExpanded:k,getToggleAllRowsExpandedProps:L})}function pt(t,e){var r=e.instance.getHooks,n=e.instance;t.toggleRowExpanded=function(e){return n.toggleRowExpanded(t.id,e)},t.getToggleRowExpandedProps=p(r().getToggleRowExpandedProps,{instance:n,row:t})}var dt=function(t,e,r){return t.filter((function(t){return e.some((function(e){var n=t.values[e];return String(n).toLowerCase().includes(String(r).toLowerCase())}))}))};dt.autoRemove=function(t){return!t};var ht=function(t,e,r){return t.filter((function(t){return e.some((function(e){var n=t.values[e];return void 0===n||String(n).toLowerCase()===String(r).toLowerCase()}))}))};ht.autoRemove=function(t){return!t};var mt=function(t,e,r){return t.filter((function(t){return e.some((function(e){var n=t.values[e];return void 0===n||String(n)===String(r)}))}))};mt.autoRemove=function(t){return!t};var gt=function(t,e,r){return t.filter((function(t){return e.some((function(e){return t.values[e].includes(r)}))}))};gt.autoRemove=function(t){return!t||!t.length};var vt=function(t,e,r){return t.filter((function(t){return e.some((function(e){var n=t.values[e];return n&&n.length&&r.every((function(t){return n.includes(t)}))}))}))};vt.autoRemove=function(t){return!t||!t.length};var yt=function(t,e,r){return t.filter((function(t){return e.some((function(e){var n=t.values[e];return n&&n.length&&r.some((function(t){return n.includes(t)}))}))}))};yt.autoRemove=function(t){return!t||!t.length};var bt=function(t,e,r){return t.filter((function(t){return e.some((function(e){var n=t.values[e];return r.includes(n)}))}))};bt.autoRemove=function(t){return!t||!t.length};var wt=function(t,e,r){return t.filter((function(t){return e.some((function(e){return t.values[e]===r}))}))};wt.autoRemove=function(t){return void 0===t};var xt=function(t,e,r){return t.filter((function(t){return e.some((function(e){return t.values[e]==r}))}))};xt.autoRemove=function(t){return null==t};var St=function(t,e,r){var n=r||[],o=n[0],i=n[1];if((o="number"==typeof o?o:-1/0)>(i="number"==typeof i?i:1/0)){var a=o;o=i,i=a}return t.filter((function(t){return e.some((function(e){var r=t.values[e];return r>=o&&r<=i}))}))};St.autoRemove=function(t){return!t||"number"!=typeof t[0]&&"number"!=typeof t[1]};var _t=Object.freeze({__proto__:null,text:dt,exactText:ht,exactTextCase:mt,includes:gt,includesAll:vt,includesSome:yt,includesValue:bt,exact:wt,equals:xt,between:St});u.resetFilters="resetFilters",u.setFilter="setFilter",u.setAllFilters="setAllFilters";var Ot=function(t){t.stateReducers.push(kt),t.useInstance.push(Et)};function kt(t,e,r,n){if(e.type===u.init)return o({filters:[]},t);if(e.type===u.resetFilters)return o({},t,{filters:n.initialState.filters||[]});if(e.type===u.setFilter){var i=e.columnId,a=e.filterValue,c=n.allColumns,l=n.filterTypes,s=c.find((function(t){return t.id===i}));if(!s)throw new Error("React-Table: Could not find a column with id: "+i);var f=z(s.filter,l||{},_t),p=t.filters.find((function(t){return t.id===i})),d=g(a,p&&p.value);return P(f.autoRemove,d,s)?o({},t,{filters:t.filters.filter((function(t){return t.id!==i}))}):o({},t,p?{filters:t.filters.map((function(t){return t.id===i?{id:i,value:d}:t}))}:{filters:[].concat(t.filters,[{id:i,value:d}])})}if(e.type===u.setAllFilters){var h=e.filters,m=n.allColumns,v=n.filterTypes;return o({},t,{filters:g(h,t.filters).filter((function(t){var e=m.find((function(e){return e.id===t.id}));return!P(z(e.filter,v||{},_t).autoRemove,t.value,e)}))})}}function Et(t){var r=t.data,n=t.rows,o=t.flatRows,i=t.rowsById,a=t.allColumns,c=t.filterTypes,l=t.manualFilters,s=t.defaultCanFilter,f=void 0!==s&&s,p=t.disableFilters,d=t.state.filters,h=t.dispatch,m=t.autoResetFilters,g=void 0===m||m,y=e.useCallback((function(t,e){h({type:u.setFilter,columnId:t,filterValue:e})}),[h]),w=e.useCallback((function(t){h({type:u.setAllFilters,filters:t})}),[h]);a.forEach((function(t){var e=t.id,r=t.accessor,n=t.defaultCanFilter,o=t.disableFilters;t.canFilter=r?R(!0!==o&&void 0,!0!==p&&void 0,!0):R(n,f,!1),t.setFilter=function(e){return y(t.id,e)};var i=d.find((function(t){return t.id===e}));t.filterValue=i&&i.value}));var x=e.useMemo((function(){if(l||!d.length)return[n,o,i];var t=[],e={};return[function r(n,o){void 0===o&&(o=0);var i=n;return(i=d.reduce((function(t,e){var r=e.id,n=e.value,i=a.find((function(t){return t.id===r}));if(!i)return t;0===o&&(i.preFilteredRows=t);var u=z(i.filter,c||{},_t);return u?(i.filteredRows=u(t,[r],n),i.filteredRows):(console.warn("Could not find a valid 'column.filter' for column with the ID: "+i.id+"."),t)}),n)).forEach((function(n){t.push(n),e[n.id]=n,n.subRows&&(n.subRows=n.subRows&&n.subRows.length>0?r(n.subRows,o+1):n.subRows)})),i}(n),t,e]}),[l,d,n,o,i,a,c]),S=x[0],_=x[1],O=x[2];e.useMemo((function(){a.filter((function(t){return!d.find((function(e){return e.id===t.id}))})).forEach((function(t){t.preFilteredRows=S,t.filteredRows=S}))}),[S,d,a]);var k=v(g);b((function(){k()&&h({type:u.resetFilters})}),[h,l?null:r]),Object.assign(t,{preFilteredRows:n,preFilteredFlatRows:o,preFilteredRowsById:i,filteredRows:S,filteredFlatRows:_,filteredRowsById:O,rows:S,flatRows:_,rowsById:O,setFilter:y,setAllFilters:w})}Ot.pluginName="useFilters",u.resetGlobalFilter="resetGlobalFilter",u.setGlobalFilter="setGlobalFilter";var Rt=function(t){t.stateReducers.push(Ct),t.useInstance.push(Lt)};function Ct(t,e,r,n){if(e.type===u.resetGlobalFilter)return o({},t,{globalFilter:n.initialState.globalFilter||void 0});if(e.type===u.setGlobalFilter){var a=e.filterValue,c=n.userFilterTypes,l=z(n.globalFilter,c||{},_t),s=g(a,t.globalFilter);return P(l.autoRemove,s)?(t.globalFilter,i(t,["globalFilter"])):o({},t,{globalFilter:s})}}function Lt(t){var r=t.data,n=t.rows,o=t.flatRows,i=t.rowsById,a=t.allColumns,c=t.filterTypes,l=t.globalFilter,s=t.manualGlobalFilter,f=t.state.globalFilter,p=t.dispatch,d=t.autoResetGlobalFilter,h=void 0===d||d,m=t.disableGlobalFilter,g=e.useCallback((function(t){p({type:u.setGlobalFilter,filterValue:t})}),[p]),y=e.useMemo((function(){if(s||void 0===f)return[n,o,i];var t=[],e={},r=z(l,c||{},_t);if(!r)return console.warn("Could not find a valid 'globalFilter' option."),n;a.forEach((function(t){var e=t.disableGlobalFilter;t.canFilter=R(!0!==e&&void 0,!0!==m&&void 0,!0)}));var u=a.filter((function(t){return!0===t.canFilter}));return[function n(o){return(o=r(o,u.map((function(t){return t.id})),f)).forEach((function(r){t.push(r),e[r.id]=r,r.subRows=r.subRows&&r.subRows.length?n(r.subRows):r.subRows})),o}(n),t,e]}),[s,f,l,c,a,n,o,i,m]),w=y[0],x=y[1],S=y[2],_=v(h);b((function(){_()&&p({type:u.resetGlobalFilter})}),[p,s?null:r]),Object.assign(t,{preGlobalFilteredRows:n,preGlobalFilteredFlatRows:o,preGlobalFilteredRowsById:i,globalFilteredRows:w,globalFilteredFlatRows:x,globalFilteredRowsById:S,rows:w,flatRows:x,rowsById:S,setGlobalFilter:g,disableGlobalFilter:m})}function jt(t,e){return e.reduce((function(t,e){return t+("number"==typeof e?e:0)}),0)}Rt.pluginName="useGlobalFilter";var zt=Object.freeze({__proto__:null,sum:jt,min:function(t){var e=t[0]||0;return t.forEach((function(t){"number"==typeof t&&(e=Math.min(e,t))})),e},max:function(t){var e=t[0]||0;return t.forEach((function(t){"number"==typeof t&&(e=Math.max(e,t))})),e},minMax:function(t){var e=t[0]||0,r=t[0]||0;return t.forEach((function(t){"number"==typeof t&&(e=Math.min(e,t),r=Math.max(r,t))})),e+".."+r},average:function(t){return jt(0,t)/t.length},median:function(t){if(!t.length)return null;var e=Math.floor(t.length/2),r=[].concat(t).sort((function(t,e){return t-e}));return t.length%2!=0?r[e]:(r[e-1]+r[e])/2},unique:function(t){return Array.from(new Set(t).values())},uniqueCount:function(t){return new Set(t).size},count:function(t){return t.length}}),Pt=[],Tt={};u.resetGroupBy="resetGroupBy",u.setGroupBy="setGroupBy",u.toggleGroupBy="toggleGroupBy";var At=function(t){t.getGroupByToggleProps=[It],t.stateReducers.push(Nt),t.visibleColumnsDeps.push((function(t,e){var r=e.instance;return[].concat(t,[r.state.groupBy])})),t.visibleColumns.push(Gt),t.useInstance.push(Mt),t.prepareRow.push(Ft)};At.pluginName="useGroupBy";var It=function(t,e){var r=e.header;return[t,{onClick:r.canGroupBy?function(t){t.persist(),r.toggleGroupBy()}:void 0,style:{cursor:r.canGroupBy?"pointer":void 0},title:"Toggle GroupBy"}]};function Nt(t,e,r,n){if(e.type===u.init)return o({groupBy:[]},t);if(e.type===u.resetGroupBy)return o({},t,{groupBy:n.initialState.groupBy||[]});if(e.type===u.setGroupBy)return o({},t,{groupBy:e.value});if(e.type===u.toggleGroupBy){var i=e.columnId,a=e.value,c=void 0!==a?a:!t.groupBy.includes(i);return o({},t,c?{groupBy:[].concat(t.groupBy,[i])}:{groupBy:t.groupBy.filter((function(t){return t!==i}))})}}function Gt(t,e){var r=e.instance.state.groupBy,n=r.map((function(e){return t.find((function(t){return t.id===e}))})).filter(Boolean),o=t.filter((function(t){return!r.includes(t.id)}));return(t=[].concat(n,o)).forEach((function(t){t.isGrouped=r.includes(t.id),t.groupedIndex=r.indexOf(t.id)})),t}var Dt={};function Mt(t){var r=t.data,n=t.rows,i=t.flatRows,a=t.rowsById,c=t.allColumns,l=t.flatHeaders,s=t.groupByFn,f=void 0===s?Bt:s,d=t.manualGroupBy,h=t.aggregations,g=void 0===h?Dt:h,y=t.plugins,w=t.state.groupBy,x=t.dispatch,S=t.autoResetGroupBy,_=void 0===S||S,O=t.disableGroupBy,k=t.defaultCanGroupBy,E=t.getHooks;m(y,["useColumnOrder","useFilters"],"useGroupBy");var C=v(t);c.forEach((function(e){var r=e.accessor,n=e.defaultGroupBy,o=e.disableGroupBy;e.canGroupBy=r?R(e.canGroupBy,!0!==o&&void 0,!0!==O&&void 0,!0):R(e.canGroupBy,n,k,!1),e.canGroupBy&&(e.toggleGroupBy=function(){return t.toggleGroupBy(e.id)}),e.Aggregated=e.Aggregated||e.Cell}));var j=e.useCallback((function(t,e){x({type:u.toggleGroupBy,columnId:t,value:e})}),[x]),z=e.useCallback((function(t){x({type:u.setGroupBy,value:t})}),[x]);l.forEach((function(t){t.getGroupByToggleProps=p(E().getGroupByToggleProps,{instance:C(),header:t})}));var P=e.useMemo((function(){if(d||!w.length)return[n,i,a,Pt,Tt,i,a];var t=w.filter((function(t){return c.find((function(e){return e.id===t}))})),e=[],r={},u=[],l={},s=[],p={},h=function n(i,a,d){if(void 0===a&&(a=0),a===t.length)return i.map((function(t){return o({},t,{depth:a})}));var h=t[a],m=f(i,h);return Object.entries(m).map((function(o,i){var f=o[0],m=o[1],v=h+":"+f,y=n(m,a+1,v=d?d+">"+v:v),b=a?L(m,"leafRows"):m,w=function(e,r,n){var o={};return c.forEach((function(i){if(t.includes(i.id))o[i.id]=r[0]?r[0].values[i.id]:null;else{var a="function"==typeof i.aggregate?i.aggregate:g[i.aggregate]||zt[i.aggregate];if(a){var u=r.map((function(t){return t.values[i.id]})),c=e.map((function(t){var e=t.values[i.id];if(!n&&i.aggregateValue){var r="function"==typeof i.aggregateValue?i.aggregateValue:g[i.aggregateValue]||zt[i.aggregateValue];if(!r)throw console.info({column:i}),new Error("React Table: Invalid column.aggregateValue option for column listed above");e=r(e,t,i)}return e}));o[i.id]=a(c,u)}else{if(i.aggregate)throw console.info({column:i}),new Error("React Table: Invalid column.aggregate option for column listed above");o[i.id]=null}}})),o}(b,m,a),x={id:v,isGrouped:!0,groupByID:h,groupByVal:f,values:w,subRows:y,leafRows:b,depth:a,index:i};return y.forEach((function(t){e.push(t),r[t.id]=t,t.isGrouped?(u.push(t),l[t.id]=t):(s.push(t),p[t.id]=t)})),x}))}(n);return h.forEach((function(t){e.push(t),r[t.id]=t,t.isGrouped?(u.push(t),l[t.id]=t):(s.push(t),p[t.id]=t)})),[h,e,r,u,l,s,p]}),[d,w,n,i,a,c,g,f]),T=P[0],A=P[1],I=P[2],N=P[3],G=P[4],D=P[5],M=P[6],F=v(_);b((function(){F()&&x({type:u.resetGroupBy})}),[x,d?null:r]),Object.assign(t,{preGroupedRows:n,preGroupedFlatRow:i,preGroupedRowsById:a,groupedRows:T,groupedFlatRows:A,groupedRowsById:I,onlyGroupedFlatRows:N,onlyGroupedRowsById:G,nonGroupedFlatRows:D,nonGroupedRowsById:M,rows:T,flatRows:A,rowsById:I,toggleGroupBy:j,setGroupBy:z})}function Ft(t){t.allCells.forEach((function(e){var r;e.isGrouped=e.column.isGrouped&&e.column.id===t.groupByID,e.isPlaceholder=!e.isGrouped&&e.column.isGrouped,e.isAggregated=!e.isGrouped&&!e.isPlaceholder&&(null==(r=t.subRows)?void 0:r.length)}))}function Bt(t,e){return t.reduce((function(t,r,n){var o=""+r.values[e];return t[o]=Array.isArray(t[o])?t[o]:[],t[o].push(r),t}),{})}var Ht=/([0-9]+)/gm;function Wt(t,e){return t===e?0:t>e?1:-1}function Ut(t,e,r){return[t.values[r],e.values[r]]}function Zt(t){return"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?"":String(t):"string"==typeof t?t:""}var qt=Object.freeze({__proto__:null,alphanumeric:function(t,e,r){var n=Ut(t,e,r),o=n[0],i=n[1];for(o=Zt(o),i=Zt(i),o=o.split(Ht).filter(Boolean),i=i.split(Ht).filter(Boolean);o.length&&i.length;){var a=o.shift(),u=i.shift(),c=parseInt(a,10),l=parseInt(u,10),s=[c,l].sort();if(isNaN(s[0])){if(a>u)return 1;if(u>a)return-1}else{if(isNaN(s[1]))return isNaN(c)?-1:1;if(c>l)return 1;if(l>c)return-1}}return o.length-i.length},datetime:function(t,e,r){var n=Ut(t,e,r),o=n[0],i=n[1];return Wt(o=o.getTime(),i=i.getTime())},basic:function(t,e,r){var n=Ut(t,e,r);return Wt(n[0],n[1])},string:function(t,e,r){var n=Ut(t,e,r),o=n[0],i=n[1];for(o=o.split("").filter(Boolean),i=i.split("").filter(Boolean);o.length&&i.length;){var a=o.shift(),u=i.shift(),c=a.toLowerCase(),l=u.toLowerCase();if(c>l)return 1;if(l>c)return-1;if(a>u)return 1;if(u>a)return-1}return o.length-i.length},number:function(t,e,r){var n=Ut(t,e,r),o=n[0],i=n[1],a=/[^0-9.]/gi;return Wt(o=Number(String(o).replace(a,"")),i=Number(String(i).replace(a,"")))}});u.resetSortBy="resetSortBy",u.setSortBy="setSortBy",u.toggleSortBy="toggleSortBy",u.clearSortBy="clearSortBy",s.sortType="alphanumeric",s.sortDescFirst=!1;var $t=function(t){t.getSortByToggleProps=[Vt],t.stateReducers.push(Yt),t.useInstance.push(Xt)};$t.pluginName="useSortBy";var Vt=function(t,e){var r=e.instance,n=e.column,o=r.isMultiSortEvent,i=void 0===o?function(t){return t.shiftKey}:o;return[t,{onClick:n.canSort?function(t){t.persist(),n.toggleSortBy(void 0,!r.disableMultiSort&&i(t))}:void 0,style:{cursor:n.canSort?"pointer":void 0},title:n.canSort?"Toggle SortBy":void 0}]};function Yt(t,e,r,n){if(e.type===u.init)return o({sortBy:[]},t);if(e.type===u.resetSortBy)return o({},t,{sortBy:n.initialState.sortBy||[]});if(e.type===u.clearSortBy)return o({},t,{sortBy:t.sortBy.filter((function(t){return t.id!==e.columnId}))});if(e.type===u.setSortBy)return o({},t,{sortBy:e.sortBy});if(e.type===u.toggleSortBy){var i,a=e.columnId,c=e.desc,l=e.multi,s=n.allColumns,f=n.disableMultiSort,p=n.disableSortRemove,d=n.disableMultiRemove,h=n.maxMultiSortColCount,m=void 0===h?Number.MAX_SAFE_INTEGER:h,g=t.sortBy,v=s.find((function(t){return t.id===a})).sortDescFirst,y=g.find((function(t){return t.id===a})),b=g.findIndex((function(t){return t.id===a})),w=null!=c,x=[];return"toggle"!=(i=!f&&l?y?"toggle":"add":b!==g.length-1||1!==g.length?"replace":y?"toggle":"replace")||p||w||l&&d||!(y&&y.desc&&!v||!y.desc&&v)||(i="remove"),"replace"===i?x=[{id:a,desc:w?c:v}]:"add"===i?(x=[].concat(g,[{id:a,desc:w?c:v}])).splice(0,x.length-m):"toggle"===i?x=g.map((function(t){return t.id===a?o({},t,{desc:w?c:!y.desc}):t})):"remove"===i&&(x=g.filter((function(t){return t.id!==a}))),o({},t,{sortBy:x})}}function Xt(t){var r=t.data,n=t.rows,o=t.flatRows,i=t.allColumns,a=t.orderByFn,c=void 0===a?Kt:a,l=t.sortTypes,s=t.manualSortBy,f=t.defaultCanSort,d=t.disableSortBy,h=t.flatHeaders,g=t.state.sortBy,y=t.dispatch,w=t.plugins,x=t.getHooks,S=t.autoResetSortBy,_=void 0===S||S;m(w,["useFilters","useGlobalFilter","useGroupBy","usePivotColumns"],"useSortBy");var O=e.useCallback((function(t){y({type:u.setSortBy,sortBy:t})}),[y]),k=e.useCallback((function(t,e,r){y({type:u.toggleSortBy,columnId:t,desc:e,multi:r})}),[y]),E=v(t);h.forEach((function(t){var e=t.accessor,r=t.canSort,n=t.disableSortBy,o=t.id,i=e?R(!0!==n&&void 0,!0!==d&&void 0,!0):R(f,r,!1);t.canSort=i,t.canSort&&(t.toggleSortBy=function(e,r){return k(t.id,e,r)},t.clearSortBy=function(){y({type:u.clearSortBy,columnId:t.id})}),t.getSortByToggleProps=p(x().getSortByToggleProps,{instance:E(),column:t});var a=g.find((function(t){return t.id===o}));t.isSorted=!!a,t.sortedIndex=g.findIndex((function(t){return t.id===o})),t.isSortedDesc=t.isSorted?a.desc:void 0}));var L=e.useMemo((function(){if(s||!g.length)return[n,o];var t=[],e=g.filter((function(t){return i.find((function(e){return e.id===t.id}))}));return[function r(n){var o=c(n,e.map((function(t){var e=i.find((function(e){return e.id===t.id}));if(!e)throw new Error("React-Table: Could not find a column with id: "+t.id+" while sorting");var r=e.sortType,n=C(r)||(l||{})[r]||qt[r];if(!n)throw new Error("React-Table: Could not find a valid sortType of '"+r+"' for column '"+t.id+"'.");return function(e,r){return n(e,r,t.id,t.desc)}})),e.map((function(t){var e=i.find((function(e){return e.id===t.id}));return e&&e.sortInverted?t.desc:!t.desc})));return o.forEach((function(e){t.push(e),e.subRows&&0!==e.subRows.length&&(e.subRows=r(e.subRows))})),o}(n),t]}),[s,g,n,o,i,c,l]),j=L[0],z=L[1],P=v(_);b((function(){P()&&y({type:u.resetSortBy})}),[s?null:r]),Object.assign(t,{preSortedRows:n,preSortedFlatRows:o,sortedRows:j,sortedFlatRows:z,rows:j,flatRows:z,setSortBy:O,toggleSortBy:k})}function Kt(t,e,r){return[].concat(t).sort((function(t,n){for(var o=0;o<e.length;o+=1){var i=e[o],a=!1===r[o]||"desc"===r[o],u=i(t,n);if(0!==u)return a?-u:u}return r[0]?t.index-n.index:n.index-t.index}))}u.resetPage="resetPage",u.gotoPage="gotoPage",u.setPageSize="setPageSize";var Qt=function(t){t.stateReducers.push(Jt),t.useInstance.push(te)};function Jt(t,e,r,n){if(e.type===u.init)return o({pageSize:10,pageIndex:0},t);if(e.type===u.resetPage)return o({},t,{pageIndex:n.initialState.pageIndex||0});if(e.type===u.gotoPage){var i=n.pageCount,a=n.page,c=g(e.pageIndex,t.pageIndex),l=!1;return c>t.pageIndex?l=-1===i?a.length>=t.pageSize:c<i:c<t.pageIndex&&(l=c>-1),l?o({},t,{pageIndex:c}):t}if(e.type===u.setPageSize){var s=e.pageSize,f=t.pageSize*t.pageIndex;return o({},t,{pageIndex:Math.floor(f/s),pageSize:s})}}function te(t){var r=t.rows,n=t.autoResetPage,o=void 0===n||n,i=t.manualExpandedKey,a=void 0===i?"expanded":i,c=t.plugins,l=t.pageCount,s=t.paginateExpandedRows,f=void 0===s||s,p=t.expandSubRows,d=void 0===p||p,h=t.state,g=h.pageSize,y=h.pageIndex,w=h.expanded,x=h.globalFilter,S=h.filters,_=h.groupBy,O=h.sortBy,k=t.dispatch,E=t.data,R=t.manualPagination;m(c,["useGlobalFilter","useFilters","useGroupBy","useSortBy","useExpanded"],"usePagination");var C=v(o);b((function(){C()&&k({type:u.resetPage})}),[k,R?null:E,x,S,_,O]);var L=R?l:Math.ceil(r.length/g),z=e.useMemo((function(){return L>0?[].concat(new Array(L)).fill(null).map((function(t,e){return e})):[]}),[L]),P=e.useMemo((function(){var t;if(R)t=r;else{var e=g*y,n=e+g;t=r.slice(e,n)}return f?t:j(t,{manualExpandedKey:a,expanded:w,expandSubRows:d})}),[d,w,a,R,y,g,f,r]),T=y>0,A=-1===L?P.length>=g:y<L-1,I=e.useCallback((function(t){k({type:u.gotoPage,pageIndex:t})}),[k]),N=e.useCallback((function(){return I((function(t){return t-1}))}),[I]),G=e.useCallback((function(){return I((function(t){return t+1}))}),[I]),D=e.useCallback((function(t){k({type:u.setPageSize,pageSize:t})}),[k]);Object.assign(t,{pageOptions:z,pageCount:L,page:P,canPreviousPage:T,canNextPage:A,gotoPage:I,previousPage:N,nextPage:G,setPageSize:D})}Qt.pluginName="usePagination",u.resetPivot="resetPivot",u.togglePivot="togglePivot";var ee=function(t){t.getPivotToggleProps=[ne],t.stateReducers.push(oe),t.useInstanceAfterData.push(ie),t.allColumns.push(ae),t.accessValue.push(ue),t.materializedColumns.push(ce),t.materializedColumnsDeps.push(le),t.visibleColumns.push(se),t.visibleColumnsDeps.push(fe),t.useInstance.push(pe),t.prepareRow.push(de)};ee.pluginName="usePivotColumns";var re=[],ne=function(t,e){var r=e.header;return[t,{onClick:r.canPivot?function(t){t.persist(),r.togglePivot()}:void 0,style:{cursor:r.canPivot?"pointer":void 0},title:"Toggle Pivot"}]};function oe(t,e,r,n){if(e.type===u.init)return o({pivotColumns:re},t);if(e.type===u.resetPivot)return o({},t,{pivotColumns:n.initialState.pivotColumns||re});if(e.type===u.togglePivot){var i=e.columnId,a=e.value,c=void 0!==a?a:!t.pivotColumns.includes(i);return o({},t,c?{pivotColumns:[].concat(t.pivotColumns,[i])}:{pivotColumns:t.pivotColumns.filter((function(t){return t!==i}))})}}function ie(t){t.allColumns.forEach((function(e){e.isPivotSource=t.state.pivotColumns.includes(e.id)}))}function ae(t,e){var r=e.instance;return t.forEach((function(t){t.isPivotSource=r.state.pivotColumns.includes(t.id),t.uniqueValues=new Set})),t}function ue(t,e){var r=e.column;return r.uniqueValues&&void 0!==t&&r.uniqueValues.add(t),t}function ce(t,e){var r=e.instance,n=r.allColumns,i=r.state;if(!i.pivotColumns.length||!i.groupBy||!i.groupBy.length)return t;var a=i.pivotColumns.map((function(t){return n.find((function(e){return e.id===t}))})).filter(Boolean),u=n.filter((function(t){return!t.isPivotSource&&!i.groupBy.includes(t.id)&&!i.pivotColumns.includes(t.id)})),c=_(function t(e,r,n){void 0===e&&(e=0),void 0===n&&(n=[]);var i=a[e];return i?Array.from(i.uniqueValues).sort().map((function(a){var u=o({},i,{Header:i.PivotHeader||"string"==typeof i.header?i.Header+": "+a:a,isPivotGroup:!0,parent:r,depth:e,id:r?r.id+"."+i.id+"."+a:i.id+"."+a,pivotValue:a});return u.columns=t(e+1,u,[].concat(n,[function(t){return t.values[i.id]===a}])),u})):u.map((function(t){return o({},t,{canPivot:!1,isPivoted:!0,parent:r,depth:e,id:""+(r?r.id+"."+t.id:t.id),accessor:function(e,r,o){if(n.every((function(t){return t(o)})))return o.values[t.id]}})}))}());return[].concat(t,c)}function le(t,e){var r=e.instance.state,n=r.pivotColumns,o=r.groupBy;return[].concat(t,[n,o])}function se(t,e){var r=e.instance.state;return t=t.filter((function(t){return!t.isPivotSource})),r.pivotColumns.length&&r.groupBy&&r.groupBy.length&&(t=t.filter((function(t){return t.isGrouped||t.isPivoted}))),t}function fe(t,e){var r=e.instance;return[].concat(t,[r.state.pivotColumns,r.state.groupBy])}function pe(t){var e=t.columns,r=t.allColumns,n=t.flatHeaders,o=t.getHooks,i=t.plugins,a=t.dispatch,c=t.autoResetPivot,l=void 0===c||c,s=t.manaulPivot,f=t.disablePivot,d=t.defaultCanPivot;m(i,["useGroupBy"],"usePivotColumns");var h=v(t);r.forEach((function(e){var r=e.accessor,n=e.defaultPivot,o=e.disablePivot;e.canPivot=r?R(e.canPivot,!0!==o&&void 0,!0!==f&&void 0,!0):R(e.canPivot,n,d,!1),e.canPivot&&(e.togglePivot=function(){return t.togglePivot(e.id)}),e.Aggregated=e.Aggregated||e.Cell})),n.forEach((function(t){t.getPivotToggleProps=p(o().getPivotToggleProps,{instance:h(),header:t})}));var g=v(l);b((function(){g()&&a({type:u.resetPivot})}),[a,s?null:e]),Object.assign(t,{togglePivot:function(t,e){a({type:u.togglePivot,columnId:t,value:e})}})}function de(t){t.allCells.forEach((function(t){t.isPivoted=t.column.isPivoted}))}u.resetSelectedRows="resetSelectedRows",u.toggleAllRowsSelected="toggleAllRowsSelected",u.toggleRowSelected="toggleRowSelected",u.toggleAllPageRowsSelected="toggleAllPageRowsSelected";var he=function(t){t.getToggleRowSelectedProps=[me],t.getToggleAllRowsSelectedProps=[ge],t.getToggleAllPageRowsSelectedProps=[ve],t.stateReducers.push(ye),t.useInstance.push(be),t.prepareRow.push(we)};he.pluginName="useRowSelect";var me=function(t,e){var r=e.instance,n=e.row,o=r.manualRowSelectedKey,i=void 0===o?"isSelected":o;return[t,{onChange:function(t){n.toggleRowSelected(t.target.checked)},style:{cursor:"pointer"},checked:!(!n.original||!n.original[i])||n.isSelected,title:"Toggle Row Selected",indeterminate:n.isSomeSelected}]},ge=function(t,e){var r=e.instance;return[t,{onChange:function(t){r.toggleAllRowsSelected(t.target.checked)},style:{cursor:"pointer"},checked:r.isAllRowsSelected,title:"Toggle All Rows Selected",indeterminate:Boolean(!r.isAllRowsSelected&&Object.keys(r.state.selectedRowIds).length)}]},ve=function(t,e){var r=e.instance;return[t,{onChange:function(t){r.toggleAllPageRowsSelected(t.target.checked)},style:{cursor:"pointer"},checked:r.isAllPageRowsSelected,title:"Toggle All Current Page Rows Selected",indeterminate:Boolean(!r.isAllPageRowsSelected&&r.page.some((function(t){var e=t.id;return r.state.selectedRowIds[e]})))}]};function ye(t,e,r,n){if(e.type===u.init)return o({selectedRowIds:{}},t);if(e.type===u.resetSelectedRows)return o({},t,{selectedRowIds:n.initialState.selectedRowIds||{}});if(e.type===u.toggleAllRowsSelected){var i=e.value,a=n.isAllRowsSelected,c=n.rowsById,l=n.nonGroupedRowsById,s=void 0===l?c:l,f=void 0!==i?i:!a,p=Object.assign({},t.selectedRowIds);return f?Object.keys(s).forEach((function(t){p[t]=!0})):Object.keys(s).forEach((function(t){delete p[t]})),o({},t,{selectedRowIds:p})}if(e.type===u.toggleRowSelected){var d=e.id,h=e.value,m=n.rowsById,g=n.selectSubRows,v=void 0===g||g,y=n.getSubRows,b=t.selectedRowIds[d],w=void 0!==h?h:!b;if(b===w)return t;var x=o({},t.selectedRowIds);return function t(e){var r=m[e];if(r&&(r.isGrouped||(w?x[e]=!0:delete x[e]),v&&y(r)))return y(r).forEach((function(e){return t(e.id)}))}(d),o({},t,{selectedRowIds:x})}if(e.type===u.toggleAllPageRowsSelected){var S=e.value,_=n.page,O=n.rowsById,k=n.selectSubRows,E=void 0===k||k,R=n.isAllPageRowsSelected,C=n.getSubRows,L=void 0!==S?S:!R,j=o({},t.selectedRowIds);return _.forEach((function(t){return function t(e){var r=O[e];if(r.isGrouped||(L?j[e]=!0:delete j[e]),E&&C(r))return C(r).forEach((function(e){return t(e.id)}))}(t.id)})),o({},t,{selectedRowIds:j})}return t}function be(t){var r=t.data,n=t.rows,o=t.getHooks,i=t.plugins,a=t.rowsById,c=t.nonGroupedRowsById,l=void 0===c?a:c,s=t.autoResetSelectedRows,f=void 0===s||s,d=t.state.selectedRowIds,h=t.selectSubRows,g=void 0===h||h,y=t.dispatch,w=t.page,x=t.getSubRows;m(i,["useFilters","useGroupBy","useSortBy","useExpanded","usePagination"],"useRowSelect");var S=e.useMemo((function(){var t=[];return n.forEach((function(e){var r=g?function t(e,r,n){if(r[e.id])return!0;var o=n(e);if(o&&o.length){var i=!0,a=!1;return o.forEach((function(e){a&&!i||(t(e,r,n)?a=!0:i=!1)})),!!i||!!a&&null}return!1}(e,d,x):!!d[e.id];e.isSelected=!!r,e.isSomeSelected=null===r,r&&t.push(e)})),t}),[n,g,d,x]),_=Boolean(Object.keys(l).length&&Object.keys(d).length),O=_;_&&Object.keys(l).some((function(t){return!d[t]}))&&(_=!1),_||w&&w.length&&w.some((function(t){var e=t.id;return!d[e]}))&&(O=!1);var k=v(f);b((function(){k()&&y({type:u.resetSelectedRows})}),[y,r]);var E=e.useCallback((function(t){return y({type:u.toggleAllRowsSelected,value:t})}),[y]),R=e.useCallback((function(t){return y({type:u.toggleAllPageRowsSelected,value:t})}),[y]),C=e.useCallback((function(t,e){return y({type:u.toggleRowSelected,id:t,value:e})}),[y]),L=v(t),j=p(o().getToggleAllRowsSelectedProps,{instance:L()}),z=p(o().getToggleAllPageRowsSelectedProps,{instance:L()});Object.assign(t,{selectedFlatRows:S,isAllRowsSelected:_,isAllPageRowsSelected:O,toggleRowSelected:C,toggleAllRowsSelected:E,getToggleAllRowsSelectedProps:j,getToggleAllPageRowsSelectedProps:z,toggleAllPageRowsSelected:R})}function we(t,e){var r=e.instance;t.toggleRowSelected=function(e){return r.toggleRowSelected(t.id,e)},t.getToggleRowSelectedProps=p(r.getHooks().getToggleRowSelectedProps,{instance:r,row:t})}var xe=function(t){return{}},Se=function(t){return{}};u.setRowState="setRowState",u.setCellState="setCellState",u.resetRowState="resetRowState";var _e=function(t){t.stateReducers.push(Oe),t.useInstance.push(ke),t.prepareRow.push(Ee)};function Oe(t,e,r,n){var i=n.initialRowStateAccessor,a=void 0===i?xe:i,c=n.initialCellStateAccessor,l=void 0===c?Se:c,s=n.rowsById;if(e.type===u.init)return o({rowState:{}},t);if(e.type===u.resetRowState)return o({},t,{rowState:n.initialState.rowState||{}});if(e.type===u.setRowState){var f,p=e.rowId,d=e.value,h=void 0!==t.rowState[p]?t.rowState[p]:a(s[p]);return o({},t,{rowState:o({},t.rowState,(f={},f[p]=g(d,h),f))})}if(e.type===u.setCellState){var m,v,y,b,w,x=e.rowId,S=e.columnId,_=e.value,O=void 0!==t.rowState[x]?t.rowState[x]:a(s[x]),k=void 0!==(null==O||null==(m=O.cellState)?void 0:m[S])?O.cellState[S]:l(null==(v=s[x])||null==(y=v.cells)?void 0:y.find((function(t){return t.column.id===S})));return o({},t,{rowState:o({},t.rowState,(w={},w[x]=o({},O,{cellState:o({},O.cellState||{},(b={},b[S]=g(_,k),b))}),w))})}}function ke(t){var r=t.autoResetRowState,n=void 0===r||r,o=t.data,i=t.dispatch,a=e.useCallback((function(t,e){return i({type:u.setRowState,rowId:t,value:e})}),[i]),c=e.useCallback((function(t,e,r){return i({type:u.setCellState,rowId:t,columnId:e,value:r})}),[i]),l=v(n);b((function(){l()&&i({type:u.resetRowState})}),[o]),Object.assign(t,{setRowState:a,setCellState:c})}function Ee(t,e){var r=e.instance,n=r.initialRowStateAccessor,o=void 0===n?xe:n,i=r.initialCellStateAccessor,a=void 0===i?Se:i,u=r.state.rowState;t&&(t.state=void 0!==u[t.id]?u[t.id]:o(t),t.setState=function(e){return r.setRowState(t.id,e)},t.cells.forEach((function(e){t.state.cellState||(t.state.cellState={}),e.state=void 0!==t.state.cellState[e.column.id]?t.state.cellState[e.column.id]:a(e),e.setState=function(n){return r.setCellState(t.id,e.column.id,n)}})))}_e.pluginName="useRowState",u.resetColumnOrder="resetColumnOrder",u.setColumnOrder="setColumnOrder";var Re=function(t){t.stateReducers.push(Ce),t.visibleColumnsDeps.push((function(t,e){var r=e.instance;return[].concat(t,[r.state.columnOrder])})),t.visibleColumns.push(Le),t.useInstance.push(je)};function Ce(t,e,r,n){return e.type===u.init?o({columnOrder:[]},t):e.type===u.resetColumnOrder?o({},t,{columnOrder:n.initialState.columnOrder||[]}):e.type===u.setColumnOrder?o({},t,{columnOrder:g(e.columnOrder,t.columnOrder)}):void 0}function Le(t,e){var r=e.instance.state.columnOrder;if(!r||!r.length)return t;for(var n=[].concat(r),o=[].concat(t),i=[],a=function(){var t=n.shift(),e=o.findIndex((function(e){return e.id===t}));e>-1&&i.push(o.splice(e,1)[0])};o.length&&n.length;)a();return[].concat(i,o)}function je(t){var r=t.dispatch;t.setColumnOrder=e.useCallback((function(t){return r({type:u.setColumnOrder,columnOrder:t})}),[r])}Re.pluginName="useColumnOrder",s.canResize=!0,u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize";var ze=function(t){t.getResizerProps=[Pe],t.getHeaderProps.push({style:{position:"relative"}}),t.stateReducers.push(Te),t.useInstance.push(Ie),t.useInstanceBeforeDimensions.push(Ae)},Pe=function(t,e){var r=e.instance,n=e.header,o=r.dispatch,i=function(t,e){var r=!1;if("touchstart"===t.type){if(t.touches&&t.touches.length>1)return;r=!0}var n,i,a=function(t){var e=[];return function t(r){r.columns&&r.columns.length&&r.columns.map(t),e.push(r)}(t),e}(e).map((function(t){return[t.id,t.totalWidth]})),c=r?Math.round(t.touches[0].clientX):t.clientX,l=function(){window.cancelAnimationFrame(n),n=null,o({type:u.columnDoneResizing})},s=function(){window.cancelAnimationFrame(n),n=null,o({type:u.columnResizing,clientX:i})},f=function(t){i=t,n||(n=window.requestAnimationFrame(s))},p={mouse:{moveEvent:"mousemove",moveHandler:function(t){return f(t.clientX)},upEvent:"mouseup",upHandler:function(t){document.removeEventListener("mousemove",p.mouse.moveHandler),document.removeEventListener("mouseup",p.mouse.upHandler),l()}},touch:{moveEvent:"touchmove",moveHandler:function(t){return t.cancelable&&(t.preventDefault(),t.stopPropagation()),f(t.touches[0].clientX),!1},upEvent:"touchend",upHandler:function(t){document.removeEventListener(p.touch.moveEvent,p.touch.moveHandler),document.removeEventListener(p.touch.upEvent,p.touch.moveHandler),l()}}},d=r?p.touch:p.mouse,h=!!function(){if("boolean"==typeof A)return A;var t=!1;try{var e={get passive(){return t=!0,!1}};window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return A=t}()&&{passive:!1};document.addEventListener(d.moveEvent,d.moveHandler,h),document.addEventListener(d.upEvent,d.upHandler,h),o({type:u.columnStartResizing,columnId:e.id,columnWidth:e.totalWidth,headerIdWidths:a,clientX:c})};return[t,{onMouseDown:function(t){return t.persist()||i(t,n)},onTouchStart:function(t){return t.persist()||i(t,n)},style:{cursor:"col-resize"},draggable:!1,role:"separator"}]};function Te(t,e){if(e.type===u.init)return o({columnResizing:{columnWidths:{}}},t);if(e.type===u.resetResize)return o({},t,{columnResizing:{columnWidths:{}}});if(e.type===u.columnStartResizing){var r=e.clientX,n=e.columnId,i=e.columnWidth,a=e.headerIdWidths;return o({},t,{columnResizing:o({},t.columnResizing,{startX:r,headerIdWidths:a,columnWidth:i,isResizingColumn:n})})}if(e.type===u.columnResizing){var c=e.clientX,l=t.columnResizing,s=l.startX,f=l.columnWidth,p=l.headerIdWidths,d=(c-s)/f,h={};return(void 0===p?[]:p).forEach((function(t){var e=t[0],r=t[1];h[e]=Math.max(r+r*d,0)})),o({},t,{columnResizing:o({},t.columnResizing,{columnWidths:o({},t.columnResizing.columnWidths,{},h)})})}return e.type===u.columnDoneResizing?o({},t,{columnResizing:o({},t.columnResizing,{startX:null,isResizingColumn:null})}):void 0}ze.pluginName="useResizeColumns";var Ae=function(t){var e=t.flatHeaders,r=t.disableResizing,n=t.getHooks,o=t.state.columnResizing,i=v(t);e.forEach((function(t){var e=R(!0!==t.disableResizing&&void 0,!0!==r&&void 0,!0);t.canResize=e,t.width=o.columnWidths[t.id]||t.originalWidth||t.width,t.isResizing=o.isResizingColumn===t.id,e&&(t.getResizerProps=p(n().getResizerProps,{instance:i(),header:t}))}))};function Ie(t){var r=t.plugins,n=t.dispatch,o=t.autoResetResize,i=void 0===o||o,a=t.columns;m(r,["useAbsoluteLayout"],"useResizeColumns");var c=v(i);b((function(){c()&&n({type:u.resetResize})}),[a]);var l=e.useCallback((function(){return n({type:u.resetResize})}),[n]);Object.assign(t,{resetResizing:l})}var Ne={position:"absolute",top:0},Ge=function(t){t.getTableBodyProps.push(De),t.getRowProps.push(De),t.getHeaderGroupProps.push(De),t.getFooterGroupProps.push(De),t.getHeaderProps.push((function(t,e){var r=e.column;return[t,{style:o({},Ne,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]})),t.getCellProps.push((function(t,e){var r=e.cell;return[t,{style:o({},Ne,{left:r.column.totalLeft+"px",width:r.column.totalWidth+"px"})}]})),t.getFooterProps.push((function(t,e){var r=e.column;return[t,{style:o({},Ne,{left:r.totalLeft+"px",width:r.totalWidth+"px"})}]}))};Ge.pluginName="useAbsoluteLayout";var De=function(t,e){return[t,{style:{position:"relative",width:e.instance.totalColumnsWidth+"px"}}]},Me={display:"inline-block",boxSizing:"border-box"},Fe=function(t,e){return[t,{style:{display:"flex",width:e.instance.totalColumnsWidth+"px"}}]},Be=function(t){t.getRowProps.push(Fe),t.getHeaderGroupProps.push(Fe),t.getFooterGroupProps.push(Fe),t.getHeaderProps.push((function(t,e){var r=e.column;return[t,{style:o({},Me,{width:r.totalWidth+"px"})}]})),t.getCellProps.push((function(t,e){var r=e.cell;return[t,{style:o({},Me,{width:r.column.totalWidth+"px"})}]})),t.getFooterProps.push((function(t,e){var r=e.column;return[t,{style:o({},Me,{width:r.totalWidth+"px"})}]}))};function He(t){t.getTableProps.push(We),t.getRowProps.push(Ue),t.getHeaderGroupProps.push(Ue),t.getFooterGroupProps.push(Ue),t.getHeaderProps.push(Ze),t.getCellProps.push(qe),t.getFooterProps.push($e)}Be.pluginName="useBlockLayout",He.pluginName="useFlexLayout";var We=function(t,e){return[t,{style:{minWidth:e.instance.totalColumnsMinWidth+"px"}}]},Ue=function(t,e){return[t,{style:{display:"flex",flex:"1 0 auto",minWidth:e.instance.totalColumnsMinWidth+"px"}}]},Ze=function(t,e){var r=e.column;return[t,{style:{boxSizing:"border-box",flex:r.totalFlexWidth?r.totalFlexWidth+" 0 auto":void 0,minWidth:r.totalMinWidth+"px",width:r.totalWidth+"px"}}]},qe=function(t,e){var r=e.cell;return[t,{style:{boxSizing:"border-box",flex:r.column.totalFlexWidth+" 0 auto",minWidth:r.column.totalMinWidth+"px",width:r.column.totalWidth+"px"}}]},$e=function(t,e){var r=e.column;return[t,{style:{boxSizing:"border-box",flex:r.totalFlexWidth?r.totalFlexWidth+" 0 auto":void 0,minWidth:r.totalMinWidth+"px",width:r.totalWidth+"px"}}]};function Ve(t){t.stateReducers.push(Qe),t.getTableProps.push(Ye),t.getHeaderProps.push(Xe),t.getRowProps.push(Ke)}u.columnStartResizing="columnStartResizing",u.columnResizing="columnResizing",u.columnDoneResizing="columnDoneResizing",u.resetResize="resetResize",Ve.pluginName="useGridLayout";var Ye=function(t,e){var r=e.instance;return[t,{style:{display:"grid",gridTemplateColumns:r.visibleColumns.map((function(t){var e;return r.state.gridLayout.columnWidths[t.id]?r.state.gridLayout.columnWidths[t.id]+"px":(null==(e=r.state.columnResizing)?void 0:e.isResizingColumn)?r.state.gridLayout.startWidths[t.id]+"px":"number"==typeof t.width?t.width+"px":t.width})).join(" ")}}]},Xe=function(t,e){var r=e.column;return[t,{id:"header-cell-"+r.id,style:{position:"sticky",gridColumn:"span "+r.totalVisibleHeaderCount}}]},Ke=function(t,e){var r=e.row;return r.isExpanded?[t,{style:{gridColumn:"1 / "+(r.cells.length+1)}}]:[t,{}]};function Qe(t,e,r,n){if(e.type===u.init)return o({gridLayout:{columnWidths:{}}},t);if(e.type===u.resetResize)return o({},t,{gridLayout:{columnWidths:{}}});if(e.type===u.columnStartResizing){var i=e.columnId,a=e.headerIdWidths,c=Je(i);if(void 0!==c){var l=n.visibleColumns.reduce((function(t,e){var r;return o({},t,((r={})[e.id]=Je(e.id),r))}),{}),s=n.visibleColumns.reduce((function(t,e){var r;return o({},t,((r={})[e.id]=e.minWidth,r))}),{}),f=n.visibleColumns.reduce((function(t,e){var r;return o({},t,((r={})[e.id]=e.maxWidth,r))}),{}),p=a.map((function(t){var e=t[0];return[e,Je(e)]}));return o({},t,{gridLayout:o({},t.gridLayout,{startWidths:l,minWidths:s,maxWidths:f,headerIdGridWidths:p,columnWidth:c})})}return t}if(e.type===u.columnResizing){var d=e.clientX,h=t.columnResizing.startX,m=t.gridLayout,g=m.columnWidth,v=m.minWidths,y=m.maxWidths,b=m.headerIdGridWidths,w=(d-h)/g,x={};return(void 0===b?[]:b).forEach((function(t){var e=t[0],r=t[1];x[e]=Math.min(Math.max(v[e],r+r*w),y[e])})),o({},t,{gridLayout:o({},t.gridLayout,{columnWidths:o({},t.gridLayout.columnWidths,{},x)})})}return e.type===u.columnDoneResizing?o({},t,{gridLayout:o({},t.gridLayout,{startWidths:{},minWidths:{},maxWidths:{}})}):void 0}function Je(t){var e,r=null==(e=document.getElementById("header-cell-"+t))?void 0:e.offsetWidth;if(void 0!==r)return r}t._UNSTABLE_usePivotColumns=ee,t.actions=u,t.defaultColumn=s,t.defaultGroupByFn=Bt,t.defaultOrderByFn=Kt,t.defaultRenderer=c,t.emptyRenderer=l,t.ensurePluginOrder=m,t.flexRender=x,t.functionalUpdate=g,t.loopHooks=h,t.makePropGetter=p,t.makeRenderer=w,t.reduceHooks=d,t.safeUseLayoutEffect=y,t.useAbsoluteLayout=Ge,t.useAsyncDebounce=function(t,r){void 0===r&&(r=0);var o=e.useRef({}),i=v(t),a=v(r);return e.useCallback(function(){var t=n(regeneratorRuntime.mark((function t(){var e,r,u,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=c.length,r=new Array(e),u=0;u<e;u++)r[u]=c[u];return o.current.promise||(o.current.promise=new Promise((function(t,e){o.current.resolve=t,o.current.reject=e}))),o.current.timeout&&clearTimeout(o.current.timeout),o.current.timeout=setTimeout(n(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return delete o.current.timeout,t.prev=1,t.t0=o.current,t.next=5,i().apply(void 0,r);case 5:t.t1=t.sent,t.t0.resolve.call(t.t0,t.t1),t.next=12;break;case 9:t.prev=9,t.t2=t.catch(1),o.current.reject(t.t2);case 12:return t.prev=12,delete o.current.promise,t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[1,9,12,15]])}))),a()),t.abrupt("return",o.current.promise);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),[i,a])},t.useBlockLayout=Be,t.useColumnOrder=Re,t.useExpanded=ut,t.useFilters=Ot,t.useFlexLayout=He,t.useGetLatest=v,t.useGlobalFilter=Rt,t.useGridLayout=Ve,t.useGroupBy=At,t.useMountedLayoutEffect=b,t.usePagination=Qt,t.useResizeColumns=ze,t.useRowSelect=he,t.useRowState=_e,t.useSortBy=$t,t.useTable=function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];t=ot(t),n=[q].concat(n);var a=v(e.useRef({}).current);Object.assign(a(),o({},t,{plugins:n,hooks:Z()})),n.filter(Boolean).forEach((function(t){t(a().hooks)}));var c=v(a().hooks);a().getHooks=c,delete a().hooks,Object.assign(a(),d(c().useOptions,ot(t)));var l=a(),s=l.data,f=l.columns,m=l.initialState,g=l.defaultColumn,y=l.getSubRows,b=l.getRowId,x=l.stateReducer,E=l.useControlledState,R=v(x),C=e.useCallback((function(t,e){if(!e.type)throw console.info({action:e}),new Error("Unknown Action 👆");return[].concat(c().stateReducers,Array.isArray(R())?R():[R()]).reduce((function(r,n){return n(r,e,t,a())||r}),t)}),[c,R,a]),L=e.useReducer(C,void 0,(function(){return C(m,{type:u.init})})),j=L[0],z=L[1],P=d([].concat(c().useControlledState,[E]),j,{instance:a()});Object.assign(a(),{state:P,dispatch:z});var T=e.useMemo((function(){return S(d(c().columns,f,{instance:a()}))}),[c,a,f].concat(d(c().columnsDeps,[],{instance:a()})));a().columns=T;var A=e.useMemo((function(){return d(c().allColumns,_(T),{instance:a()}).map(O)}),[T,c,a].concat(d(c().allColumnsDeps,[],{instance:a()})));a().allColumns=A;var I=e.useMemo((function(){for(var t=[],e=[],r={},n=[].concat(A);n.length;){var o=n.shift();at({data:s,rows:t,flatRows:e,rowsById:r,column:o,getRowId:b,getSubRows:y,accessValueHooks:c().accessValue,getInstance:a})}return[t,e,r]}),[A,s,b,y,c,a]),N=I[0],G=I[1],D=I[2];Object.assign(a(),{rows:N,initialRows:[].concat(N),flatRows:G,rowsById:D}),h(c().useInstanceAfterData,a());var M=e.useMemo((function(){return d(c().visibleColumns,A,{instance:a()}).map((function(t){return k(t,g)}))}),[c,A,a,g].concat(d(c().visibleColumnsDeps,[],{instance:a()})));A=e.useMemo((function(){var t=[].concat(M);return A.forEach((function(e){t.find((function(t){return t.id===e.id}))||t.push(e)})),t}),[A,M]),a().allColumns=A;var F=e.useMemo((function(){return d(c().headerGroups,function(t,e,r){void 0===r&&(r=function(){return{}});for(var n=[],i=t,a=0,u=function(){return a++},c=function(){var t={headers:[]},a=[],c=i.some((function(t){return t.parent}));i.forEach((function(n){var i,l=[].concat(a).reverse()[0];c&&(i=n.parent?o({},n.parent,{originalId:n.parent.id,id:n.parent.id+"_"+u(),headers:[n]},r(n)):k(o({originalId:n.id+"_placeholder",id:n.id+"_placeholder_"+u(),placeholderOf:n,headers:[n]},r(n)),e),l&&l.originalId===i.originalId?l.headers.push(n):a.push(i)),t.headers.push(n)})),n.push(t),i=a};i.length;)c();return n.reverse()}(M,g),a())}),[c,M,g,a].concat(d(c().headerGroupsDeps,[],{instance:a()})));a().headerGroups=F;var B=e.useMemo((function(){return F.length?F[0].headers:[]}),[F]);a().headers=B,a().flatHeaders=F.reduce((function(t,e){return[].concat(t,e.headers)}),[]),h(c().useInstanceBeforeDimensions,a());var H=M.filter((function(t){return t.isVisible})).map((function(t){return t.id})).sort().join("_");M=e.useMemo((function(){return M.filter((function(t){return t.isVisible}))}),[M,H]),a().visibleColumns=M;var W=it(B),U=W[0],$=W[1],V=W[2];return a().totalColumnsMinWidth=U,a().totalColumnsWidth=$,a().totalColumnsMaxWidth=V,h(c().useInstance,a()),[].concat(a().flatHeaders,a().allColumns).forEach((function(t){t.render=w(a(),t),t.getHeaderProps=p(c().getHeaderProps,{instance:a(),column:t}),t.getFooterProps=p(c().getFooterProps,{instance:a(),column:t})})),a().headerGroups=e.useMemo((function(){return F.filter((function(t,e){return t.headers=t.headers.filter((function(t){return t.headers?function t(e){return e.filter((function(e){return e.headers?t(e.headers):e.isVisible})).length}(t.headers):t.isVisible})),!!t.headers.length&&(t.getHeaderGroupProps=p(c().getHeaderGroupProps,{instance:a(),headerGroup:t,index:e}),t.getFooterGroupProps=p(c().getFooterGroupProps,{instance:a(),headerGroup:t,index:e}),!0)}))}),[F,a,c]),a().footerGroups=[].concat(a().headerGroups).reverse(),a().prepareRow=e.useCallback((function(t){t.getRowProps=p(c().getRowProps,{instance:a(),row:t}),t.allCells=A.map((function(e){var r=t.values[e.id],n={column:e,row:t,value:r};return n.getCellProps=p(c().getCellProps,{instance:a(),cell:n}),n.render=w(a(),e,{row:t,cell:n,value:r}),n})),t.cells=M.map((function(e){return t.allCells.find((function(t){return t.column.id===e.id}))})),h(c().prepareRow,t,{instance:a()})}),[c,a,A,M]),a().getTableProps=p(c().getTableProps,{instance:a()}),a().getTableBodyProps=p(c().getTableBodyProps,{instance:a()}),h(c().useFinalInstance,a()),a()},Object.defineProperty(t,"__esModule",{value:!0})}(e,r(196))},521:function(t,e,r){t.exports=r(217)},196:function(t){"use strict";t.exports=window.React}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n].call(i.exports,i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},function(){"use strict";var t=window.wp.element,e=r(196),n=function(){function t(t){var e=this;this._insertTag=function(t){var r;r=0===e.tags.length?e.insertionPoint?e.insertionPoint.nextSibling:e.prepend?e.container.firstChild:e.before:e.tags[e.tags.length-1].nextSibling,e.container.insertBefore(t,r),e.tags.push(t)},this.isSpeedy=void 0===t.speedy||t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.prepend=t.prepend,this.insertionPoint=t.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(t){t.forEach(this._insertTag)},e.insert=function(t){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),void 0!==t.nonce&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}(this));var e=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}(e);try{r.insertRule(t,r.cssRules.length)}catch(t){}}else e.appendChild(document.createTextNode(t));this.ctr++},e.flush=function(){this.tags.forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),this.tags=[],this.ctr=0},t}(),o=Math.abs,i=String.fromCharCode,a=Object.assign;function u(t){return t.trim()}function c(t,e,r){return t.replace(e,r)}function l(t,e){return t.indexOf(e)}function s(t,e){return 0|t.charCodeAt(e)}function f(t,e,r){return t.slice(e,r)}function p(t){return t.length}function d(t){return t.length}function h(t,e){return e.push(t),t}var m=1,g=1,v=0,y=0,b=0,w="";function x(t,e,r,n,o,i,a){return{value:t,root:e,parent:r,type:n,props:o,children:i,line:m,column:g,length:a,return:""}}function S(t,e){return a(x("",null,null,"",null,null,0),t,{length:-t.length},e)}function _(){return b=y>0?s(w,--y):0,g--,10===b&&(g=1,m--),b}function O(){return b=y<v?s(w,y++):0,g++,10===b&&(g=1,m++),b}function k(){return s(w,y)}function E(){return y}function R(t,e){return f(w,t,e)}function C(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function L(t){return m=g=1,v=p(w=t),y=0,[]}function j(t){return w="",t}function z(t){return u(R(y-1,A(91===t?t+2:40===t?t+1:t)))}function P(t){for(;(b=k())&&b<33;)O();return C(t)>2||C(b)>3?"":" "}function T(t,e){for(;--e&&O()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return R(t,E()+(e<6&&32==k()&&32==O()))}function A(t){for(;O();)switch(b){case t:return y;case 34:case 39:34!==t&&39!==t&&A(b);break;case 40:41===t&&A(t);break;case 92:O()}return y}function I(t,e){for(;O()&&t+b!==57&&(t+b!==84||47!==k()););return"/*"+R(e,y-1)+"*"+i(47===t?t:O())}function N(t){for(;!C(k());)O();return R(t,y)}var G="-ms-",D="-moz-",M="-webkit-",F="comm",B="rule",H="decl",W="@keyframes";function U(t,e){for(var r="",n=d(t),o=0;o<n;o++)r+=e(t[o],o,t,e)||"";return r}function Z(t,e,r,n){switch(t.type){case"@layer":if(t.children.length)break;case"@import":case H:return t.return=t.return||t.value;case F:return"";case W:return t.return=t.value+"{"+U(t.children,n)+"}";case B:t.value=t.props.join(",")}return p(r=U(t.children,n))?t.return=t.value+"{"+r+"}":""}function q(t){return j($("",null,null,null,[""],t=L(t),0,[0],t))}function $(t,e,r,n,o,a,u,f,d){for(var m=0,g=0,v=u,y=0,b=0,w=0,x=1,S=1,R=1,C=0,L="",j=o,A=a,G=n,D=L;S;)switch(w=C,C=O()){case 40:if(108!=w&&58==s(D,v-1)){-1!=l(D+=c(z(C),"&","&\f"),"&\f")&&(R=-1);break}case 34:case 39:case 91:D+=z(C);break;case 9:case 10:case 13:case 32:D+=P(w);break;case 92:D+=T(E()-1,7);continue;case 47:switch(k()){case 42:case 47:h(Y(I(O(),E()),e,r),d);break;default:D+="/"}break;case 123*x:f[m++]=p(D)*R;case 125*x:case 59:case 0:switch(C){case 0:case 125:S=0;case 59+g:-1==R&&(D=c(D,/\f/g,"")),b>0&&p(D)-v&&h(b>32?X(D+";",n,r,v-1):X(c(D," ","")+";",n,r,v-2),d);break;case 59:D+=";";default:if(h(G=V(D,e,r,m,g,o,f,L,j=[],A=[],v),a),123===C)if(0===g)$(D,e,G,G,j,a,v,f,A);else switch(99===y&&110===s(D,3)?100:y){case 100:case 108:case 109:case 115:$(t,G,G,n&&h(V(t,G,G,0,0,o,f,L,o,j=[],v),A),o,A,v,f,n?j:A);break;default:$(D,G,G,G,[""],A,0,f,A)}}m=g=b=0,x=R=1,L=D="",v=u;break;case 58:v=1+p(D),b=w;default:if(x<1)if(123==C)--x;else if(125==C&&0==x++&&125==_())continue;switch(D+=i(C),C*x){case 38:R=g>0?1:(D+="\f",-1);break;case 44:f[m++]=(p(D)-1)*R,R=1;break;case 64:45===k()&&(D+=z(O())),y=k(),g=v=p(L=D+=N(E())),C++;break;case 45:45===w&&2==p(D)&&(x=0)}}return a}function V(t,e,r,n,i,a,l,s,p,h,m){for(var g=i-1,v=0===i?a:[""],y=d(v),b=0,w=0,S=0;b<n;++b)for(var _=0,O=f(t,g+1,g=o(w=l[b])),k=t;_<y;++_)(k=u(w>0?v[_]+" "+O:c(O,/&\f/g,v[_])))&&(p[S++]=k);return x(t,e,r,0===i?B:s,p,h,m)}function Y(t,e,r){return x(t,e,r,F,i(b),f(t,2,-2),0)}function X(t,e,r,n){return x(t,e,r,H,f(t,0,n),f(t,n+1,-1),n)}var K=function(t,e,r){for(var n=0,o=0;n=o,o=k(),38===n&&12===o&&(e[r]=1),!C(o);)O();return R(t,y)},Q=new WeakMap,J=function(t){if("rule"===t.type&&t.parent&&!(t.length<1)){for(var e=t.value,r=t.parent,n=t.column===r.column&&t.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==t.props.length||58===e.charCodeAt(0)||Q.get(r))&&!n){Q.set(t,!0);for(var o=[],a=function(t,e){return j(function(t,e){var r=-1,n=44;do{switch(C(n)){case 0:38===n&&12===k()&&(e[r]=1),t[r]+=K(y-1,e,r);break;case 2:t[r]+=z(n);break;case 4:if(44===n){t[++r]=58===k()?"&\f":"",e[r]=t[r].length;break}default:t[r]+=i(n)}}while(n=O());return t}(L(t),e))}(e,o),u=r.props,c=0,l=0;c<a.length;c++)for(var s=0;s<u.length;s++,l++)t.props[l]=o[c]?a[c].replace(/&\f/g,u[s]):u[s]+" "+a[c]}}},tt=function(t){if("decl"===t.type){var e=t.value;108===e.charCodeAt(0)&&98===e.charCodeAt(2)&&(t.return="",t.value="")}};function et(t,e){switch(function(t,e){return 45^s(t,0)?(((e<<2^s(t,0))<<2^s(t,1))<<2^s(t,2))<<2^s(t,3):0}(t,e)){case 5103:return M+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return M+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return M+t+D+t+G+t+t;case 6828:case 4268:return M+t+G+t+t;case 6165:return M+t+G+"flex-"+t+t;case 5187:return M+t+c(t,/(\w+).+(:[^]+)/,M+"box-$1$2"+G+"flex-$1$2")+t;case 5443:return M+t+G+"flex-item-"+c(t,/flex-|-self/,"")+t;case 4675:return M+t+G+"flex-line-pack"+c(t,/align-content|flex-|-self/,"")+t;case 5548:return M+t+G+c(t,"shrink","negative")+t;case 5292:return M+t+G+c(t,"basis","preferred-size")+t;case 6060:return M+"box-"+c(t,"-grow","")+M+t+G+c(t,"grow","positive")+t;case 4554:return M+c(t,/([^-])(transform)/g,"$1"+M+"$2")+t;case 6187:return c(c(c(t,/(zoom-|grab)/,M+"$1"),/(image-set)/,M+"$1"),t,"")+t;case 5495:case 3959:return c(t,/(image-set\([^]*)/,M+"$1$`$1");case 4968:return c(c(t,/(.+:)(flex-)?(.*)/,M+"box-pack:$3"+G+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+M+t+t;case 4095:case 3583:case 4068:case 2532:return c(t,/(.+)-inline(.+)/,M+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(p(t)-1-e>6)switch(s(t,e+1)){case 109:if(45!==s(t,e+4))break;case 102:return c(t,/(.+:)(.+)-([^]+)/,"$1"+M+"$2-$3$1"+D+(108==s(t,e+3)?"$3":"$2-$3"))+t;case 115:return~l(t,"stretch")?et(c(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(115!==s(t,e+1))break;case 6444:switch(s(t,p(t)-3-(~l(t,"!important")&&10))){case 107:return c(t,":",":"+M)+t;case 101:return c(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+M+(45===s(t,14)?"inline-":"")+"box$3$1"+M+"$2$3$1"+G+"$2box$3")+t}break;case 5936:switch(s(t,e+11)){case 114:return M+t+G+c(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return M+t+G+c(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return M+t+G+c(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return M+t+G+t+t}return t}var rt=[function(t,e,r,n){if(t.length>-1&&!t.return)switch(t.type){case H:t.return=et(t.value,t.length);break;case W:return U([S(t,{value:c(t.value,"@","@"+M)})],n);case B:if(t.length)return function(t,e){return t.map(e).join("")}(t.props,(function(e){switch(function(t,e){return(t=/(::plac\w+|:read-\w+)/.exec(t))?t[0]:t}(e)){case":read-only":case":read-write":return U([S(t,{props:[c(e,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return U([S(t,{props:[c(e,/:(plac\w+)/,":"+M+"input-$1")]}),S(t,{props:[c(e,/:(plac\w+)/,":-moz-$1")]}),S(t,{props:[c(e,/:(plac\w+)/,G+"input-$1")]})],n)}return""}))}}],nt=function(t){var e=t.key;if("css"===e){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(t){-1!==t.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(t),t.setAttribute("data-s",""))}))}var o,i,a=t.stylisPlugins||rt,u={},c=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+e+' "]'),(function(t){for(var e=t.getAttribute("data-emotion").split(" "),r=1;r<e.length;r++)u[e[r]]=!0;c.push(t)}));var l,s,f,p,h=[Z,(p=function(t){l.insert(t)},function(t){t.root||(t=t.return)&&p(t)})],m=(s=[J,tt].concat(a,h),f=d(s),function(t,e,r,n){for(var o="",i=0;i<f;i++)o+=s[i](t,e,r,n)||"";return o});i=function(t,e,r,n){l=r,U(q(t?t+"{"+e.styles+"}":e.styles),m),n&&(g.inserted[e.name]=!0)};var g={key:e,sheet:new n({key:e,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:u,registered:{},insert:i};return g.sheet.hydrate(c),g};function ot(){return ot=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ot.apply(this,arguments)}var it=function(t){var e=new WeakMap;return function(r){if(e.has(r))return e.get(r);var n=t(r);return e.set(r,n),n}};function at(t,e,r){var n="";return r.split(" ").forEach((function(r){void 0!==t[r]?e.push(t[r]+";"):n+=r+" "})),n}var ut=function(t,e,r){var n=t.key+"-"+e.name;!1===r&&void 0===t.registered[n]&&(t.registered[n]=e.styles)},ct=function(t,e,r){ut(t,e,r);var n=t.key+"-"+e.name;if(void 0===t.inserted[e.name]){var o=e;do{t.insert(e===o?"."+n:"",o,t.sheet,!0),o=o.next}while(void 0!==o)}},lt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function st(t){var e=Object.create(null);return function(r){return void 0===e[r]&&(e[r]=t(r)),e[r]}}var ft=/[A-Z]|^ms/g,pt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,dt=function(t){return 45===t.charCodeAt(1)},ht=function(t){return null!=t&&"boolean"!=typeof t},mt=st((function(t){return dt(t)?t:t.replace(ft,"-$&").toLowerCase()})),gt=function(t,e){switch(t){case"animation":case"animationName":if("string"==typeof e)return e.replace(pt,(function(t,e,r){return yt={name:e,styles:r,next:yt},e}))}return 1===lt[t]||dt(t)||"number"!=typeof e||0===e?e:e+"px"};function vt(t,e,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return yt={name:r.name,styles:r.styles,next:yt},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)yt={name:n.name,styles:n.styles,next:yt},n=n.next;return r.styles+";"}return function(t,e,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=vt(t,e,r[o])+";";else for(var i in r){var a=r[i];if("object"!=typeof a)null!=e&&void 0!==e[a]?n+=i+"{"+e[a]+"}":ht(a)&&(n+=mt(i)+":"+gt(i,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=e&&void 0!==e[a[0]]){var u=vt(t,e,a);switch(i){case"animation":case"animationName":n+=mt(i)+":"+u+";";break;default:n+=i+"{"+u+"}"}}else for(var c=0;c<a.length;c++)ht(a[c])&&(n+=mt(i)+":"+gt(i,a[c])+";")}return n}(t,e,r);case"function":if(void 0!==t){var o=yt,i=r(t);return yt=o,vt(t,e,i)}}if(null==e)return r;var a=e[r];return void 0!==a?a:r}var yt,bt=/label:\s*([^\s;\n{]+)\s*(;|$)/g,wt=function(t,e,r){if(1===t.length&&"object"==typeof t[0]&&null!==t[0]&&void 0!==t[0].styles)return t[0];var n=!0,o="";yt=void 0;var i=t[0];null==i||void 0===i.raw?(n=!1,o+=vt(r,e,i)):o+=i[0];for(var a=1;a<t.length;a++)o+=vt(r,e,t[a]),n&&(o+=i[a]);bt.lastIndex=0;for(var u,c="";null!==(u=bt.exec(o));)c+="-"+u[1];var l=function(t){for(var e,r=0,n=0,o=t.length;o>=4;++n,o-=4)e=1540483477*(65535&(e=255&t.charCodeAt(n)|(255&t.charCodeAt(++n))<<8|(255&t.charCodeAt(++n))<<16|(255&t.charCodeAt(++n))<<24))+(59797*(e>>>16)<<16),r=1540483477*(65535&(e^=e>>>24))+(59797*(e>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&t.charCodeAt(n+2))<<16;case 2:r^=(255&t.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&t.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+c;return{name:l,styles:o,next:yt}},xt=!!e.useInsertionEffect&&e.useInsertionEffect,St=xt||function(t){return t()},_t=(xt||e.useLayoutEffect,{}.hasOwnProperty),Ot=e.createContext("undefined"!=typeof HTMLElement?nt({key:"css"}):null);Ot.Provider;var kt=function(t){return(0,e.forwardRef)((function(r,n){var o=(0,e.useContext)(Ot);return t(r,o,n)}))},Et=e.createContext({}),Rt=function(){return e.useContext(Et)},Ct=it((function(t){return it((function(e){return function(t,e){return"function"==typeof e?e(t):ot({},t,e)}(t,e)}))})),Lt=function(t){var r=e.useContext(Et);return t.theme!==r&&(r=Ct(r)(t.theme)),e.createElement(Et.Provider,{value:r},t.children)},jt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",zt=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return ut(e,r,n),St((function(){return ct(e,r,n)})),null},Pt=kt((function(t,r,n){var o=t.css;"string"==typeof o&&void 0!==r.registered[o]&&(o=r.registered[o]);var i=t[jt],a=[o],u="";"string"==typeof t.className?u=at(r.registered,a,t.className):null!=t.className&&(u=t.className+" ");var c=wt(a,void 0,e.useContext(Et));u+=r.key+"-"+c.name;var l={};for(var s in t)_t.call(t,s)&&"css"!==s&&s!==jt&&(l[s]=t[s]);return l.ref=n,l.className=u,e.createElement(e.Fragment,null,e.createElement(zt,{cache:r,serialized:c,isStringTag:"string"==typeof i}),e.createElement(i,l))})),Tt={palette:{native:{blue:"#2271b1",blueActive:"#135e96"},primary:{main:"#F0ABFC",light:"#5EEAD4",accent:"#524CFF"},text:{default:"#3A3F45",white:"#FFFFFF",primary:"#0C0D0E",secondary:"#2271B1",tertiary:"#69727D",lightGrey:"#535961",dark:"#26292C",darkGrey:"#64666A",disabled:"#DDDDDD",toast:"#D5DADF",noticeInfo:"#1E1E1E",link:"#040080",brand:"#45f2b6"},background:{default:"#FFFFFF",lightGrey:"#F6F7F7",grey:"#D9D9D9",toast:"#2D2D2D",noticeInfo:"#F1F6FB",brand:"#040080",disabled:"#D5D8DC"},border:{default:"#E6E8EA",lightest:"#D5DADF",grey:"#D9D9D9",grey600:"#949494"},info:{notice:"#0288D1"},success:{main:"#5EEAD4"},warning:{},error:{main:"#DC2626"},badge:{background:{success:"#E9FCF2",danger:"#FDE8EB",warning:"#FFF6E6"},text:{success:"#0F6737",danger:"#B21027",warning:"#8D5E01"}}},fonts:{default:"Roboto, sans-serif"}},At=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,It=st((function(t){return At.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91})),Nt=function(t){return"theme"!==t},Gt=function(t){return"string"==typeof t&&t.charCodeAt(0)>96?It:Nt},Dt=function(t,e,r){var n;if(e){var o=e.shouldForwardProp;n=t.__emotion_forwardProp&&o?function(e){return t.__emotion_forwardProp(e)&&o(e)}:o}return"function"!=typeof n&&r&&(n=t.__emotion_forwardProp),n},Mt=function(t){var e=t.cache,r=t.serialized,n=t.isStringTag;return ut(e,r,n),St((function(){return ct(e,r,n)})),null},Ft=function t(r,n){var o,i,a=r.__emotion_real===r,u=a&&r.__emotion_base||r;void 0!==n&&(o=n.label,i=n.target);var c=Dt(r,n,a),l=c||Gt(u),s=!l("as");return function(){var f=arguments,p=a&&void 0!==r.__emotion_styles?r.__emotion_styles.slice(0):[];if(void 0!==o&&p.push("label:"+o+";"),null==f[0]||void 0===f[0].raw)p.push.apply(p,f);else{p.push(f[0][0]);for(var d=f.length,h=1;h<d;h++)p.push(f[h],f[0][h])}var m=kt((function(t,r,n){var o=s&&t.as||u,a="",f=[],d=t;if(null==t.theme){for(var h in d={},t)d[h]=t[h];d.theme=e.useContext(Et)}"string"==typeof t.className?a=at(r.registered,f,t.className):null!=t.className&&(a=t.className+" ");var m=wt(p.concat(f),r.registered,d);a+=r.key+"-"+m.name,void 0!==i&&(a+=" "+i);var g=s&&void 0===c?Gt(o):l,v={};for(var y in t)s&&"as"===y||g(y)&&(v[y]=t[y]);return v.className=a,v.ref=n,e.createElement(e.Fragment,null,e.createElement(Mt,{cache:r,serialized:m,isStringTag:"string"==typeof o}),e.createElement(o,v))}));return m.displayName=void 0!==o?o:"Styled("+("string"==typeof u?u:u.displayName||u.name||"Component")+")",m.defaultProps=r.defaultProps,m.__emotion_real=m,m.__emotion_base=u,m.__emotion_styles=p,m.__emotion_forwardProp=c,Object.defineProperty(m,"toString",{value:function(){return"."+i}}),m.withComponent=function(e,r){return t(e,ot({},n,r,{shouldForwardProp:Dt(m,r,!0)})).apply(void 0,p)},m}},Bt=r(697),Ht=r.n(Bt),Wt=function(t){return t.children};Wt.propTypes={children:Ht().node},Wt.__name="Header";var Ut=Wt,Zt=(r(679),function(t,r){var n=arguments;if(null==r||!_t.call(r,"css"))return e.createElement.apply(void 0,n);var o=n.length,i=new Array(o);i[0]=Pt,i[1]=function(t,e){var r={};for(var n in e)_t.call(e,n)&&(r[n]=e[n]);return r[jt]=t,r}(t,r);for(var a=2;a<o;a++)i[a]=n[a];return e.createElement.apply(null,i)});function qt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return wt(e)}var $t=Ft("div",{target:"e1rzp46j0"})("width:",(function(t){return t.fullWidth?"100vw":"calc(100% - 16px - 225px)"}),";"),Vt=function(t){var e=t.fullWidth,r=t.children;return Zt($t,{fullWidth:e},r)};Vt.propTypes={fullWidth:Ht().bool,children:Ht().node},Vt.__name="Content";var Yt=Vt,Xt=Ft("aside",{target:"e8eburd0"})({name:"1i30uc2",styles:"width:225px"}),Kt=function(t){var e=t.children;return Zt(Xt,null,e)};Kt.propTypes={children:Ht().node},Kt.__name="Sidebar";var Qt=Kt,Jt=Ft("main",{target:"e1a4qo6a0"})({name:"1ink2ld",styles:"display:flex;justify-content:space-between;margin-top:16px"}),te=function(t){var e,r,n;return t.children.forEach((function(t){var o,i,a;"Header"===(null==t||null===(o=t.type)||void 0===o?void 0:o.__name)&&(e=t),"Content"===(null==t||null===(i=t.type)||void 0===i?void 0:i.__name)&&(r=t),"Sidebar"===(null==t||null===(a=t.type)||void 0===a?void 0:a.__name)&&(n=t)})),Zt(React.Fragment,null,e,n?Zt(Jt,{className:"wrap"},r,n):Zt(Jt,{className:"wrap"},r))};te.propTypes={children:Ht().node},te.Header=Ut,te.Content=Yt,te.Sidebar=Qt;var ee=te,re=window.wp.i18n,ne=window.wp.apiFetch,oe=r.n(ne),ie=window.wp.url;function ae(t){return ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ae(t)}function ue(t){var e="function"==typeof Map?new Map:void 0;return ue=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return ce(t,arguments,fe(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),se(n,t)},ue(t)}function ce(t,e,r){return ce=le()?Reflect.construct.bind():function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&se(o,r.prototype),o},ce.apply(null,arguments)}function le(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function se(t,e){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},se(t,e)}function fe(t){return fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},fe(t)}var pe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&se(t,e)}(i,t);var e,r,n,o=(r=i,n=le(),function(){var t,e=fe(r);if(n){var o=fe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ae(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,t)).name="APIError",e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(ue(Error));function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function he(){he=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==de(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(de(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function me(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function ge(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){me(i,n,o,a,u,"next",t)}function u(t){me(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ve(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==de(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==de(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===de(o)?o:String(o)),n)}var o}var ye,be="/wp/v2",we="/image-optimizer/v1",xe=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,n,o,i,a,u,c,l,s,f,p,d,h,m,g,v;return e=t,null,r=[{key:"request",value:(v=ge(he().mark((function t(e){var r,n,o,i,a;return he().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=e.path,n=e.data,o=e.method,i=void 0===o?"POST":o,t.prev=1,t.next=4,oe()({path:r,method:i,data:n});case 4:if(a=t.sent,!r.startsWith(be)){t.next=7;break}return t.abrupt("return",a);case 7:if(a.success){t.next=9;break}throw new pe(a.data.message);case 9:return t.abrupt("return",a.data);case 12:if(t.prev=12,t.t0=t.catch(1),!(t.t0 instanceof pe)){t.next=18;break}throw t.t0;case 18:throw new pe(t.t0.message);case 19:case"end":return t.stop()}}),t,null,[[1,12]])}))),function(_x){return v.apply(this,arguments)})},{key:"initConnect",value:(g=ge(he().mark((function e(){var r,n,o;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={action:"image_optimizer_connect",wp_rest:null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.wpRestNonce,"image-optimizer-connect":null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.authInitNonce},e.abrupt("return",t.request({method:"GET",path:(0,ie.addQueryArgs)("".concat(we,"/connect/init"),o)}));case 2:case"end":return e.stop()}}),e)}))),function(){return g.apply(this,arguments)})},{key:"disconnect",value:(m=ge(he().mark((function e(){var r,n;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"POST",path:"".concat(we,"/connect/disconnect"),data:{wp_rest:null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.wpRestNonce,"image-optimizer-disconnect":null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.authDisconnectNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return m.apply(this,arguments)})},{key:"deactivate",value:(h=ge(he().mark((function e(r){var n,o;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"POST",path:"".concat(we,"/connect/deactivate"),data:{license_key:r,wp_rest:null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.wpRestNonce,"image-optimizer-deactivate-subscription":null===(o=window)||void 0===o||null===(o=o.imageOptimizerUserData)||void 0===o?void 0:o.authDeactivateNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(t){return h.apply(this,arguments)})},{key:"activateSubscription",value:(d=ge(he().mark((function e(r){var n,o;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"POST",path:"".concat(we,"/connect/activate"),data:{license_key:r,wp_rest:null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.wpRestNonce,"image-optimizer-activate-subscription":null===(o=window)||void 0===o||null===(o=o.imageOptimizerUserData)||void 0===o?void 0:o.authActivateNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(t){return d.apply(this,arguments)})},{key:"fetchSubscriptions",value:(p=ge(he().mark((function e(){var r,n;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"POST",path:"".concat(we,"/connect/get-subscriptions"),data:{wp_rest:null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.wpRestNonce,"image-optimizer-get-subscription":null===(n=window)||void 0===n||null===(n=n.imageOptimizerUserData)||void 0===n?void 0:n.authGetSubscriptionsNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return p.apply(this,arguments)})},{key:"getSettings",value:(f=ge(he().mark((function e(){return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"GET",path:"".concat(be,"/settings")}));case 1:case"end":return e.stop()}}),e)}))),function(){return f.apply(this,arguments)})},{key:"updateSettings",value:(s=ge(he().mark((function e(r){return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"PUT",path:"".concat(be,"/settings"),data:r}));case 1:case"end":return e.stop()}}),e)}))),function(t){return s.apply(this,arguments)})},{key:"getStats",value:(l=ge(he().mark((function e(){return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"GET",path:"".concat(we,"/stats")}));case 1:case"end":return e.stop()}}),e)}))),function(){return l.apply(this,arguments)})},{key:"removeAllImageBackups",value:(c=ge(he().mark((function e(){var r;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"DELETE",path:"".concat(we,"/backups"),data:{"image-optimizer-remove-backups":null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.removeBackupsNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})},{key:"restoreAllImages",value:(u=ge(he().mark((function e(){var r;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({path:"".concat(we,"/backups/restore"),data:{"image-optimizer-restore-all":null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.restoreAllImagesNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return u.apply(this,arguments)})},{key:"runBulkOptimization",value:(a=ge(he().mark((function e(){var r,n,o=arguments;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=o.length>0&&void 0!==o[0]&&o[0],e.abrupt("return",t.request({path:"".concat(we,"/optimize/bulk"),data:{reoptimize:n,"image-optimizer-optimize-bulk":null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.optimizeBulkNonce}}));case 2:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})},{key:"cancelBulkOptimization",value:(i=ge(he().mark((function e(){var r;return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({path:"".concat(we,"/optimize/bulk/cancel"),data:{"image-optimizer-cancel-bulk-optimization":null===(r=window)||void 0===r||null===(r=r.imageOptimizerUserData)||void 0===r?void 0:r.cancelBulkOptimizationNonce}}));case 1:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})},{key:"getBulkOptimizationStatus",value:(o=ge(he().mark((function e(){return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"GET",path:"".concat(we,"/optimize/bulk/status")}));case 1:case"end":return e.stop()}}),e)}))),function(){return o.apply(this,arguments)})},{key:"getBulkOptimizationOperations",value:(n=ge(he().mark((function e(){return he().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.request({method:"GET",path:"".concat(we,"/optimize/bulk/operations")}));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})}],r&&ve(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Se=xe;function _e(t){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_e(t)}function Oe(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==_e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==_e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===_e(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ke=Object.freeze({NOT_STARTED:"not-started",OPTIMIZED:"optimized",PENDING:"pending",IN_PROGRESS:"in-progress",FAILED:"optimization-failed",CANCELLED:"canceled"}),Ee=Object.freeze((Oe(ye={},ke.NOT_STARTED,(0,re.__)("Not started","image-optimizer")),Oe(ye,ke.OPTIMIZED,(0,re.__)("Optimized","image-optimizer")),Oe(ye,ke.PENDING,(0,re.__)("Pending","image-optimizer")),Oe(ye,ke.IN_PROGRESS,(0,re.__)("In progress","image-optimizer")),Oe(ye,ke.FAILED,(0,re.__)("Failed","image-optimizer")),Oe(ye,ke.CANCELLED,(0,re.__)("Cancelled","image-optimizer")),ye));function Re(t){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(t)}function Ce(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==Re(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Re(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Re(o)?o:String(o)),n)}var o}function Le(t,e,r){return e&&Ce(t.prototype,e),r&&Ce(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var je=Le((function t(e){var r=e.id,n=e.level,o=e.message,i=e.actions;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=r,this.level=n,this.message=o,this.actions=i}));function ze(t){return function(t){if(Array.isArray(t))return Ae(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Te(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Pe(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||Te(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(t,e){if(t){if("string"==typeof t)return Ae(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ae(t,e):void 0}}function Ae(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Ie=(0,t.createContext)({}),Ne=function(e){var r=e.children,n=(0,t.useState)([]),o=(0,t.useState)([]);return Zt(Ie.Provider,{value:{toastNotificationsState:n,generalNotificationsState:o}},r)};Ne.propTypes={children:Ht().node};var Ge=function(){var e=Pe((0,t.useContext)(Ie).toastNotificationsState,2),r=e[0],n=e[1];return{toastNotifications:r,showToastNotification:function(t){var e=ze(r);t.id=r.length+1,e.push(t),n(e)},hideToastNotification:function(t){var e=ze(r),o=e.findIndex((function(e){return e.id===t}));-1!==o&&(e.splice(o,1),n(e))}}},De=function(){var e=Pe((0,t.useContext)(Ie).generalNotificationsState,2),r=e[0],n=e[1];return{generalNotifications:r,showGeneralNotification:function(t){var e=ze(r);if(t.id){if(-1!==e.findIndex((function(e){return e.id===t.id})))return}else t.id=r.length+1;e.push(t),window.scrollTo({top:0,behavior:"smooth"}),n(e)},hideGeneralNotification:function(t){var e=ze(r),o=e.findIndex((function(e){return e.id===t}));-1!==o&&(e.splice(o,1),n(e))}}};function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Fe(){Fe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Me(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Me(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Be(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function He(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Be(i,n,o,a,u,"next",t)}function u(t){Be(i,n,o,a,u,"throw",t)}a(void 0)}))}}function We(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||Ue(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ue(t,e){if(t){if("string"==typeof t)return Ze(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ze(t,e):void 0}}function Ze(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var qe=(0,t.createContext)({}),$e=function(e){var r=e.children,n=(0,t.useState)(!1),o=(0,t.useState)(!1),i=(0,t.useState)({}),a=(0,t.useState)(ke.NOT_STARTED),u=(0,t.useState)(ke.NOT_STARTED),c=(0,t.useState)(ke.NOT_STARTED),l=(0,t.useState)(!1),s=(0,t.useState)([]),f=(0,t.useState)(""),p=(0,t.useState)("");return Zt(qe.Provider,{value:{statsLoadingState:n,bulkOperationsLoadingState:o,statsDataState:i,bulkStatusState:a,bulkRestoringState:u,bulkBackupRemovingState:c,backupsExistState:l,bulkOperationsState:s,errorState:f,bulkOperationsErrorState:p}},r)};$e.propTypes={children:Ht().node};var Ve=function(){var e=(0,t.useContext)(qe),r=e.statsLoadingState,n=e.bulkOperationsLoadingState,o=e.statsDataState,i=e.bulkStatusState,a=e.bulkOperationsState,u=e.bulkRestoringState,c=e.bulkBackupRemovingState,l=e.backupsExistState,s=e.errorState,f=e.bulkOperationsErrorState,p=We(o,2),d=p[0],h=p[1],m=We(i,2),g=m[0],v=m[1],y=We(a,2),b=y[0],w=y[1],x=We(u,2),S=x[0],_=x[1],O=We(c,2),k=O[0],E=O[1],R=We(n,2),C=R[0],L=R[1],j=We(l,2),z=j[0],P=j[1],T=We(r,2),A=T[0],I=T[1],N=We(s,2),G=N[0],D=N[1],M=We(f,2),F=M[0],B=M[1],H=function(){var t=He(Fe().mark((function t(){var e;return Fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return I(!0),D(""),t.prev=2,t.next=5,Se.getStats();case 5:e=t.sent,h(e.optimization_stats),v(e.bulk_optimization_status),_(e.bulk_restoring_status),E(e.bulk_backup_removing_status),P(e.backups_exist),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(2),D(t.t0.message);case 16:I(!1);case 17:case"end":return t.stop()}}),t,null,[[2,13]])})));return function(){return t.apply(this,arguments)}}(),W=function(){var t=He(Fe().mark((function t(){var e;return Fe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return L(!0),B(""),t.prev=2,t.next=5,Se.getBulkOptimizationOperations();case 5:e=t.sent,w((function(t){if(!t.length)return e.operations;var r,n=function(t){if(Array.isArray(t))return Ze(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||Ue(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();return e.operations.forEach((function(t){var e=n.findIndex((function(e){return e.operation_id===t.operation_id}));n[e]=t})),n})),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),B(t.t0.message);case 12:L(!1);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(){return t.apply(this,arguments)}}();return{statsIsLoading:A,bulkOperationsLoading:C,bulkOperationsError:F,error:G,stats:d,bulkStatus:g,setBulkStatus:v,bulkOperations:b,bulkRestoringStatus:S,bulkBackupRemovingStatus:k,backupsExist:z,fetchStats:H,fetchBulkOperations:W,setBulkRestoringStatus:_,setBulkBackupRemovingStatus:E}};function Ye(t){return Ye="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(t)}function Xe(){Xe=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Ye(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ye(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ke(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Qe(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ke(i,n,o,a,u,"next",t)}function u(t){Ke(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Je(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return tr(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function tr(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var er=function(){var e=Ve().setBulkStatus,r=Ge().showToastNotification,n=Je((0,t.useState)(!1),2),o=n[0],i=n[1],a=Je((0,t.useState)(null),2),u=a[0],c=a[1],l=function(){var t=Qe(Xe().mark((function t(){return Xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i(!0),c(null),t.prev=2,t.next=5,Se.runBulkOptimization(!1);case 5:e(ke.IN_PROGRESS),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),c(t.t0.message);case 11:i(!1);case 12:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(){return t.apply(this,arguments)}}(),s=function(){var t=Qe(Xe().mark((function t(){return Xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Se.runBulkOptimization(!0);case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),r(new je({level:"error",message:(0,re.__)("Reoptimization failed","image-optimizer"),actions:[{label:(0,re.__)("Try again","image-optimizer"),onClick:s}]}));case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),f=function(){var t=Qe(Xe().mark((function t(){return Xe().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i(!0),c(null),t.prev=2,t.next=5,Se.cancelBulkOptimization();case 5:e(ke.CANCELLED),t.next=11;break;case 8:t.prev=8,t.t0=t.catch(2),c(t.t0.message);case 11:i(!1);case 12:case"end":return t.stop()}}),t,null,[[2,8]])})));return function(){return t.apply(this,arguments)}}();return{loading:o,error:u,runOptimization:l,runReoptimization:s,cancelOptimization:f}},rr=function(){var t=window.imageOptimizerUserData;return"isConnected"in t&&(t.isConnected=Boolean(t.isConnected)),"isActivated"in t&&(t.isActivated=Boolean(t.isActivated)),"imagesLeft"in t&&(t.imagesLeft=Number(t.imagesLeft)),"isOwner"in t&&(t.isOwner=Boolean(t.isOwner)),t},nr=Object.freeze({SETTINGS:"image-optimizer-settings",BULK_OPTIMIZATION:"image-optimizer-bulk-optimization"}),or=Object.freeze({SPEED:2,FOREGROUND_COLOR:"#D9D9D9"}),ir="https://go.elementor.com/io-panel-upgrade/",ar=["as","children","variant"];function ur(){return ur=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ur.apply(this,arguments)}var cr=function(t){return qt("color:",t.palette.text.default,";font-family:",t.fonts.default,";font-size:14px;font-style:normal;font-weight:400;line-height:150%;","","")},lr={h4:{name:"18b6qqh",styles:"font-size:24px;font-weight:700;line-height:130%"},h6:{name:"bfkuon",styles:"font-size:18px;font-weight:700;line-height:130%"},subtitle1:{name:"jfk0b9",styles:"font-weight:700;line-height:130%"}},sr=function(t){var e=t.as,r=t.children,n=t.variant,o=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,ar),i=Rt(),a=e||"span",u=n?lr[n]:[],c=[cr(i).styles,(null==u?void 0:u.styles)||""].join(" ");return Zt(a,ur({css:qt(c,";","","")},o),r)};sr.propTypes={as:Ht().oneOf(["span","p","h1","h2","h3","h4","h5","h6"]),variant:Ht().oneOf(["h4","h6","subtitle1"]),children:Ht().node.isRequired};var fr=sr,pr=window.wp.components,dr=function(t){var e=t.size,r=t.props;return Zt(pr.Icon,{icon:Zt("svg",r,Zt("path",{d:"M7.333 4.667h1.333V6H7.333V4.667Zm0 2.667h1.333v4H7.333v-4Zm.667-6A6.67 6.67 0 0 0 1.333 8 6.669 6.669 0 0 0 8 14.667 6.669 6.669 0 0 0 14.666 8 6.669 6.669 0 0 0 8 1.333Zm0 12A5.34 5.34 0 0 1 2.666 8 5.34 5.34 0 0 1 8 2.667 5.34 5.34 0 0 1 13.333 8 5.34 5.34 0 0 1 8 13.334Z"})),size:e})},hr=["children"];function mr(){return mr=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},mr.apply(this,arguments)}var gr=function(t){var e=t.children,r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,hr);return Zt(pr.Tooltip,mr({children:e},r))},vr=Ft("div",{target:"ezdwp1g4"})("width:100px;height:100px;display:flex;justify-content:center;align-items:center;margin-bottom:10px;border-radius:50%;background:radial-gradient(closest-side, white 79%, transparent 80% 100%),conic-gradient(",(function(t){return t.theme.palette.native.blue})," ",(function(t){return t.percentage}),"%, ",(function(t){return t.theme.palette.border.default})," 0);&>span{color:",(function(t){return t.theme.palette.native.blue}),";}"),yr=Ft("div",{target:"ezdwp1g3"})("width:123px;height:11px;margin-bottom:10px;background-color:",(function(t){return t.theme.palette.background.grey}),";"),br=Ft("div",{target:"ezdwp1g2"})("width:",(function(t){return t.percentage}),"%;height:11px;background-color:",(function(t){return t.theme.palette.native.blue}),";"),wr=Ft("div",{target:"ezdwp1g1"})("width:123px;margin-bottom:17px;display:flex;justify-content:space-between;color:",(function(t){return t.theme.palette.text.tertiary}),";"),xr=Ft(fr,{target:"ezdwp1g0"})("color:",(function(t){return t.theme.palette.text.tertiary}),";"),Sr=function(t){var e=t.type,r=t.value,n=t.min,o=t.max;return"relative"===e?Zt(vr,{percentage:r},Zt(fr,{variant:"h4"},"".concat(r,"%"))):Zt(React.Fragment,null,Zt(yr,null,Zt(br,{percentage:r})),Zt(wr,null,Zt(xr,null,n||0),o&&Zt(xr,null,o)))};Sr.propTypes={type:Ht().oneOf(["absolute","relative"]),value:Ht().number.isRequired,min:Ht().number,max:Ht().number};var _r=Sr,Or=Ft("div",{target:"e1j90i5h5"})("display:flex;padding:15px 11px 16px 5px;border:1px solid ",(function(t){return t.theme.palette.border.lightest}),";width:calc(100% / ",(function(t){return t.columns}),");&:not(:last-child){border-right:none;}"),kr=Ft("div",{target:"e1j90i5h4"})({name:"1u6n871",styles:"display:flex;flex-direction:column;justify-content:center;align-items:flex-start"}),Er=Ft(kr,{target:"e1j90i5h3"})("width:50%;align-items:center;justify-content:",(function(t){return"absolute"===t.type?"flex-end":"center"}),";"),Rr=Ft(fr,{target:"e1j90i5h2"})("display:flex;justify-content:center;align-items:center;margin-left:20px;& span{display:flex;margin-left:4.5px;}& svg{fill:",(function(t){return t.theme.palette.text.tertiary}),";}"),Cr=Ft(kr,{target:"e1j90i5h1"})("width:45%;margin-left:10px;",(function(t){return t.isButtonShown&&"\n\t\t& div {\n\t\t\tmargin-top: auto;\n\t\t}\n\n\t\t& button,\n\t\t& a {\n\t\t\tmargin-top: 6px;\n\t\t}\n\t"}),";"),Lr=Ft("hr",{target:"e1j90i5h0"})("border:0.5px solid ",(function(t){return t.theme.palette.border.grey}),";width:100%;"),jr=(0,t.memo)((function(t){var e=t.title,r=t.tooltipText,n=t.type,o=t.value,i=t.min,a=t.max,u=t.firstRow,c=t.secondRow,l=t.actionButton,s=t.columns;return Zt(Or,{columns:s},Zt(Er,{type:n},Zt(_r,{type:n,value:o,max:a,min:i}),Zt(Rr,{variant:"subtitle1"},e,r&&Zt(gr,{text:r,placement:"top"},Zt("span",null,Zt(dr,{size:16}))))),Zt(Cr,{isButtonShown:!!l},Zt("div",null,Zt(fr,null,u),Zt(Lr,null),Zt(fr,null,c)),l))}));jr.propTypes={title:Ht().string.isRequired,type:Ht().oneOf(["absolute","relative"]),value:Ht().number.isRequired,min:Ht().number,max:Ht().number,firstRow:Ht().node.isRequired,secondRow:Ht().node,actionButton:Ht().node};var zr=jr,Pr=["isNative","isPink"];var Tr=Ft(pr.Button,{target:"es8xivs2"})("&.components-button.is-primary{background:",(function(t){return t.theme.palette.native.blue}),";border-color:",(function(t){return t.theme.palette.native.blue}),";border-radius:4px;color:",(function(t){return t.theme.palette.text.white}),";font-size:13px;line-height:2.15;height:revert;min-height:30px;padding:0 10px;}&.components-button:disabled{opacity:0.4;cursor:not-allowed;}&.components-button.is-primary:not(:disabled):hover{background:",(function(t){return t.theme.palette.native.blueActive}),";border-color:",(function(t){return t.theme.palette.native.blueActive}),";color:",(function(t){return t.theme.palette.text.white}),";}"),Ar=Ft(Tr,{target:"es8xivs1"})("background-color:",(function(t){return t.theme.palette.primary.main}),"!important;color:",(function(t){return t.theme.palette.text.primary}),"!important;font-weight:500!important;"),Ir=Ft(pr.Button,{target:"es8xivs0"})("border-radius:4px;&.components-button.is-primary:not(.is-destructive){background:",(function(t){return t.theme.palette.native.blue}),";border-color:",(function(t){return t.theme.palette.native.blue}),";color:",(function(t){return t.theme.palette.text.white}),";}&.components-button.is-primary:not(.is-destructive):not(:disabled):hover{background:",(function(t){return t.theme.palette.native.blueActive}),";border-color:",(function(t){return t.theme.palette.native.blueActive}),";color:",(function(t){return t.theme.palette.text.white}),";}&.components-button.is-secondary:not(.is-destructive){background:",(function(t){return t.theme.palette.background.default}),";box-shadow:inset 0 0 0 1px ",(function(t){return t.theme.palette.native.blue}),";color:",(function(t){return t.theme.palette.native.blue}),";}&.components-button.is-secondary:not(.is-destructive):not(:disabled):hover{background:",(function(t){return t.theme.palette.background.default}),";box-shadow:inset 0 0 0 1px ",(function(t){return t.theme.palette.native.blueActive}),";color:",(function(t){return t.theme.palette.native.blueActive}),";}&.components-button:disabled{opacity:0.4;cursor:not-allowed;}&.components-button.is-primary.is-destructive{background-color:",(function(t){return t.theme.palette.error.main}),";}"),Nr=function(t){var e=t.isNative,r=t.isPink,n=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,Pr);return Zt(r?Ar:e?Tr:Ir,n)},Gr=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,r=[
// translators: %s: file size in bytes
(0,re.__)("%s Bytes","image-optimizer"),
// translators: %s: file size in kilobytes
(0,re.__)("%s Kb","image-optimizer"),
// translators: %s: file size in megabytes
(0,re.__)("%s Mb","image-optimizer"),
// translators: %s: file size in gigabytes
(0,re.__)("%s Gb","image-optimizer")];if(!t)
// translators: %s: file size in bytes
return(0,re.sprintf)((0,re.__)("%s Bytes","image-optimizer"),0);var n=Math.floor(Math.log(t)/Math.log(1024)),o=parseFloat((t/Math.pow(1024,n)).toFixed(e));return(0,re.sprintf)(r[n],o)};function Dr(t){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(t)}function Mr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==Dr(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Dr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===Dr(o)?o:String(o)),n)}var o}var Fr="image-optimizer/auth/activation-modal/open",Br=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r;return e=t,r=[{key:"dispatch",value:function(t){var e=new Event(t);document.dispatchEvent(e)}},{key:"listen",value:function(t,e){document.addEventListener(t,(function(){return e.apply(void 0,arguments)}))}}],null&&Mr(e.prototype,null),r&&Mr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Hr=Br;function Wr(t){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(t)}function Ur(){Ur=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Wr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Wr(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Zr(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function qr(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Zr(i,n,o,a,u,"next",t)}function u(t){Zr(i,n,o,a,u,"throw",t)}a(void 0)}))}}var $r=function(){var t=rr(),e=t.isActivated,r=t.licenseKey,n=function(){var t=qr(Ur().mark((function t(){var e;return Ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o();case 2:e=t.sent,window.open(e,"_self").focus();case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),o=function(){var t=qr(Ur().mark((function t(){return Ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",Se.initConnect());case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),i=function(){var t=qr(Ur().mark((function t(){return Ur().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e){t.next=3;break}return t.next=3,Se.deactivate(r);case 3:return t.next=5,Se.disconnect();case 5:return t.next=7,n();case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return{redirectToConnect:n,sendActivationEvent:function(){Hr.dispatch(Fr)},getConnectLink:o,switchUser:i}},Vr="active",Yr="expired",Xr="exceeded",Kr="not_connected",Qr="not_activated",Jr=function(){var t=rr(),e=t.isConnected,r=t.isActivated,n=t.planData,o=$r(),i=o.redirectToConnect,a=o.sendActivationEvent;return e?r?n?n.status===Yr?Zt(Nr,{type:"button",variant:"primary",href:ir,isNative:!0,isPink:!0,target:"_blank",rel:"noopener noreferrer"},(0,re.__)("Renew Plan","image-optimizer")):Zt(Nr,{type:"button",variant:"primary",href:ir,isNative:!0,isPink:!0,target:"_blank",rel:"noopener noreferrer"},(0,re.__)("Upgrade Plan","image-optimizer")):Zt("div",null):Zt(Nr,{type:"button",variant:"primary",onClick:a,isNative:!0,isPink:!0},(0,re.__)("Activate to start","image-optimizer")):Zt(Nr,{type:"button",className:"image-optimizer-stats-connect-button",variant:"primary",onClick:i,isNative:!0,isPink:!0},(0,re.__)("Connect to start","image-optimizer"))},tn=function(){return tn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},tn.apply(this,arguments)},en=function(t){var r=t.animate,n=void 0===r||r,o=t.animateBegin,i=t.backgroundColor,a=void 0===i?"#f5f6f7":i,u=t.backgroundOpacity,c=void 0===u?1:u,l=t.baseUrl,s=void 0===l?"":l,f=t.children,p=t.foregroundColor,d=void 0===p?"#eee":p,h=t.foregroundOpacity,m=void 0===h?1:h,g=t.gradientRatio,v=void 0===g?2:g,y=t.gradientDirection,b=void 0===y?"left-right":y,w=t.uniqueKey,x=t.interval,S=void 0===x?.25:x,_=t.rtl,O=void 0!==_&&_,k=t.speed,E=void 0===k?1.2:k,R=t.style,C=void 0===R?{}:R,L=t.title,j=void 0===L?"Loading...":L,z=t.beforeMask,P=void 0===z?null:z,T=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]])}return r}(t,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),A=w||Math.random().toString(36).substring(6),I=A+"-diff",N=A+"-animated-diff",G=A+"-aria",D=O?{transform:"scaleX(-1)"}:null,M="0; "+S+"; 1",F=E+"s",B="top-bottom"===b?"rotate(90)":void 0;return(0,e.createElement)("svg",tn({"aria-labelledby":G,role:"img",style:tn(tn({},C),D)},T),j?(0,e.createElement)("title",{id:G},j):null,P&&(0,e.isValidElement)(P)?P:null,(0,e.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+s+"#"+I+")",style:{fill:"url("+s+"#"+N+")"}}),(0,e.createElement)("defs",null,(0,e.createElement)("clipPath",{id:I},f),(0,e.createElement)("linearGradient",{id:N,gradientTransform:B},(0,e.createElement)("stop",{offset:"0%",stopColor:a,stopOpacity:c},n&&(0,e.createElement)("animate",{attributeName:"offset",values:-v+"; "+-v+"; 1",keyTimes:M,dur:F,repeatCount:"indefinite",begin:o})),(0,e.createElement)("stop",{offset:"50%",stopColor:d,stopOpacity:m},n&&(0,e.createElement)("animate",{attributeName:"offset",values:-v/2+"; "+-v/2+"; "+(1+v/2),keyTimes:M,dur:F,repeatCount:"indefinite",begin:o})),(0,e.createElement)("stop",{offset:"100%",stopColor:a,stopOpacity:c},n&&(0,e.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+v),keyTimes:M,dur:F,repeatCount:"indefinite",begin:o})))))},rn=function(t){return t.children?(0,e.createElement)(en,tn({},t)):(0,e.createElement)(nn,tn({},t))},nn=function(t){return(0,e.createElement)(rn,tn({viewBox:"0 0 476 124"},t),(0,e.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,e.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,e.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,e.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,e.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,e.createElement)("circle",{cx:"20",cy:"20",r:"20"}))},on=rn,an=Ft("div",{target:"euwrywo0"})("display:flex;justify-content:center;align-items:center;padding:15px 11px 16px 5px;border:1px solid ",(function(t){return t.theme.palette.border.lightest}),";width:calc(100% / ",(function(t){return t.columns}),");&:not(:last-child){border-right:none;}"),un=(0,t.memo)((function(){return Zt(on,{speed:or.SPEED,foregroundColor:or.FOREGROUND_COLOR,height:127},Zt("path",{d:"M34 42a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h32a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H34Z"}),Zt("path",{fillRule:"evenodd",d:"M100 50c0 27.614-22.386 50-50 50S0 77.614 0 50 22.386 0 50 0s50 22.386 50 50Zm-90 0c0 22.091 17.909 40 40 40s40-17.909 40-40-17.909-40-40-40-40 17.909-40 40Z",clipRule:"evenodd"}),Zt("path",{d:"M157 37a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h104a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H157ZM157 75a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h120a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H157ZM14 111a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h72a4 4 0 0 0 4-4v-8a4 4 0 0 0-4-4H14ZM366 63H137v1h229v-1Z"}))})),cn=(0,t.memo)((function(){return Zt(on,{speed:or.SPEED,foregroundColor:or.FOREGROUND_COLOR,height:90},Zt("path",{d:"M171 4a4 4 0 0 1 4-4h104a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H175a4 4 0 0 1-4-4V4ZM123 19v11H0V19h123ZM379 26H150v1h229v-1ZM22 78a4 4 0 0 1 4-4h72a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H26a4 4 0 0 1-4-4v-8ZM171 42a4 4 0 0 1 4-4h120a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H175a4 4 0 0 1-4-4v-8Z"}))})),ln=(0,t.memo)((function(t){var e=t.isOwner,r=e?3:2;return Zt(React.Fragment,null,Zt(an,{columns:r},Zt(un,null)),Zt(an,{columns:r},Zt(un,null)),e&&Zt(an,{columns:r},Zt(cn,null)))}));ln.propTypes={isOwner:Ht().bool.isRequired};var sn=ln,fn=Ft("div",{target:"e1jh6p8s2"})("display:flex;justify-content:center;align-items:center;flex-direction:column;background-color:",(function(t){return t.theme.palette.background.default}),";position:absolute;top:0;right:0;left:0;bottom:0;"),pn=Ft(fr,{target:"e1jh6p8s1"})({name:"99zu37",styles:"margin-bottom:9px"}),dn=Ft(fr,{target:"e1jh6p8s0"})({name:"1i9vogi",styles:"margin-top:0"}),hn=function(t){var e=t.onTryAgainClick;return Zt(fn,null,Zt(pn,{variant:"subtitle1",as:"h2"},(0,re.__)("We couldn't load your stats.","image-optimizer")),Zt(dn,{as:"p"},(0,re.__)("It's probably a temporary glitch.","image-optimizer")),Zt(Nr,{variant:"secondary",onClick:e},(0,re.__)("Try again","image-optimizer")))};hn.propTypes={onTryAgainClick:Ht().func.isRequired};var mn=hn;function gn(t){return gn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gn(t)}function vn(){return vn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},vn.apply(this,arguments)}function yn(){yn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==gn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(gn(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function bn(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var wn=Ft("div",{target:"erstgas0"})("display:flex;background-color:",(function(t){return t.theme.palette.background.default}),";position:relative;height:161px;"),xn=function(t){var e=t.isOwner;return Zt(wn,null,Zt(sn,{isOwner:e}))},Sn=function(e){var r,n,o,i=e.page,a=rr(),u=a.subscriptionEmail,c=a.isOwner,l=er().runOptimization,s=Ve(),f=s.stats,p=s.bulkStatus,d=s.statsIsLoading,h=s.error,m=s.fetchStats,g=function(){var t=rr(),e=t.isConnected,r=t.isActivated,n=t.planData;return e&&r&&n?{type:"absolute",value:100-n.used_quota/n.quota*100,min:0,max:n.quota,title:(0,re.__)("Images in your plan","image-optimizer"),tooltipText:(0,re.__)("This refers to the amount of credits in your plan that you've already used.","image-optimizer"),firstRow:Zt(fr,null,(0,re.sprintf)(
// translators: %s: Subscription plan title
(0,re.__)("Current plan: %s","image-optimizer"),n.subscription_plan.title)),secondRow:Zt(fr,null,(0,re.sprintf)(
// translators: %s: Images left in a plan
(0,re.__)("Images left: %s","image-optimizer"),"".concat(n.quota-n.used_quota,"/").concat(n.quota))),actionButton:Zt(Jr,null)}:{type:"absolute",value:0,min:0,max:1e3,title:(0,re.__)("Images in your plan","image-optimizer"),tooltipText:(0,re.__)("This refers to the amount of credits in your plan that you've already used.","image-optimizer"),firstRow:Zt(fr,null,(0,re.sprintf)(
// translators: %s: Subscription plan title
(0,re.__)("Current plan: %s","image-optimizer"),(0,re.__)("N/A","image-optimizer"))),secondRow:Zt(fr,null,(0,re.sprintf)(
// translators: %s: Images left in a plan
(0,re.__)("Images left: %s","image-optimizer"),(0,re.__)("N/A","image-optimizer"))),actionButton:Zt(Jr,null)}}(),v=function(){var t,e=(t=yn().mark((function t(){return yn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l();case 2:i!==nr.BULK_OPTIMIZATION&&(location.href="/wp-admin/upload.php?page=image-optimizer-bulk-optimization");case 3:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){bn(i,n,o,a,u,"next",t)}function u(t){bn(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),y=t.useDeferredValue?(0,t.useDeferredValue)(f):f,b=(r=y.initial_image_size,n=y.current_image_size,o=Math.round(100-n/r*100),Number.isNaN(o)&&(o=0),{type:"relative",value:o,title:(0,re.__)("Space saved","image-optimizer"),tooltipText:(0,re.__)("This refers to the percentage of storage space saved by optimizing your images.","image-optimizer"),firstRow:(0,re.sprintf)(
// translators: %s: File size
(0,re.__)("Initial size: %s","image-optimizer"),Gr(r)),secondRow:(0,re.sprintf)(
// translators: %s: File size
(0,re.__)("Current size: %s","image-optimizer"),Gr(n))}),w=function(t,e,r,n){var o=t-e,i=Math.round(e/t*100),a=rr(),u=a.isActivated,c=a.imagesLeft;return Number.isNaN(i)&&(i=0),{type:"relative",value:i,title:(0,re.__)("Images optimized","image-optimizer"),tooltipText:(0,re.__)("This refers to the amount of images you've optimized out of your whole library.","image-optimizer"),firstRow:(0,re.sprintf)(
// translators: %s: Images count
(0,re.__)("Total: %s","image-optimizer"),t),secondRow:(0,re.sprintf)(
// translators: %s: Images count
(0,re.__)("Unoptimized: %s","image-optimizer"),o),actionButton:u&&o>0&&c>0&&Zt(Nr,{type:"button",variant:"primary",disabled:[ke.IN_PROGRESS,ke.CANCELLED].includes(r),onClick:n,isNative:!0},(0,re.sprintf)(
// Translators: %s: Images count
(0,re.__)("Optimize All (%s)","image-optimizer"),o))}}(y.total_image_count,y.optimized_image_count,p,v);if(!Object.keys(y).length&&d)return Zt(xn,{isOwner:c});if(h)return Zt(wn,null,Zt(sn,{isOwner:c}),Zt(mn,{onTryAgainClick:m}));var x=[b,w];return(!u||u&&c)&&x.push(g),Zt(t.Suspense,{fallback:Zt(xn,{isOwner:c})},Zt(wn,null,x.map((function(t,e){return Zt(zr,vn({key:"optimization-stats-item-".concat(e),columns:x.length},t))}))))};Sn.propTypes={page:Ht().string};var On=Sn;function kn(t){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(t)}function En(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Rn(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Rn(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Cn=(0,t.createContext)({}),Ln=function(e){var r=e.children,n=(0,t.useState)({}),o=(0,t.useState)({});return Zt(Cn.Provider,{value:{formDataState:n,lastUpdateState:o}},r)};Ln.propTypes={children:Ht().node};var jn=function(){var e=(0,t.useContext)(Cn),r=e.formDataState,n=e.lastUpdateState,o=En(r,2),i=o[0],a=o[1],u=En(n,2)[1];return{getControlData:function(t){return i&&t in i?i[t]:null},setControlData:function(t,e){var r=JSON.parse(JSON.stringify(i));r[t]=e,u(function(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==kn(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==kn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===kn(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},t,e)),a(r)}}},zn=["title","subtitle","children","error","showDivider"];function Pn(){return Pn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pn.apply(this,arguments)}var Tn=Ft(pr.PanelRow,{target:"e9cgl2n4"})("justify-content:flex-start;margin-top:16px;padding-left:7px;padding-right:7px;padding-bottom:16px;",(function(t){var e=t.showDivider,r=t.theme;return e&&"\n\t\tborder-bottom: 1px solid ".concat(r.palette.border.grey,";\n\t")})," &.components-panel__row--advanced-action{padding-left:21px;padding-right:21px;}"),An=Ft("div",{target:"e9cgl2n3"})({name:"1mxol98",styles:"display:flex;flex-direction:column;align-self:flex-start;width:300px;margin-right:50px"}),In=Ft(fr,{target:"e9cgl2n2"})("color:",(function(t){return t.theme.palette.text.primary}),";&:not(:disabled){margin-bottom:9px;}"),Nn=Ft(fr,{target:"e9cgl2n1"})("color:",(function(t){return t.theme.palette.text.tertiary}),";"),Gn=Ft(fr,{target:"e9cgl2n0"})("color:",(function(t){return t.theme.palette.error.main}),";margin-left:16px;"),Dn=function(t){var e=t.title,r=t.subtitle,n=t.children,o=t.error,i=t.showDivider,a=void 0===i||i,u=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,zn);return Zt(Tn,Pn({showDivider:a},u),Zt(An,null,e&&Zt(In,{variant:"subtitle1",as:"h3"},e),Zt(Nn,null,r)),Zt("div",null,n),o&&Zt(Gn,null,o))};Dn.propTypes={title:Ht().string,subtitle:Ht().oneOfType([Ht().string,Ht().node]).isRequired,children:Ht().node.isRequired,error:Ht().string,showDivider:Ht().bool};var Mn=Dn,Fn=function(t){var e=t.message,r=t.supportiveText;return Zt("p",null,Zt("b",null,e)," ",Zt("span",null,r))},Bn=Ft(pr.PanelBody,{target:"ewizrb40"})({name:"1doyeyc",styles:'.components-panel__row:last-of-type{padding-bottom:0;}& .components-panel__body-toggle .components-panel__arrow{position:relative;top:1px;right:0;transform:rotate(-90deg);width:16px;height:16px;margin-right:4px;}& .components-panel__body-toggle[aria-expanded="true"] .components-panel__arrow{transform:rotate(180deg);}'}),Hn=function(t){var e=t.title,r=t.children,n=t.initialOpen,o=void 0===n||n,i=e?Zt(fr,{variant:"subtitle1"},e):void 0;return Zt(Bn,{title:i,initialOpen:o},r)};Hn.propTypes={title:Ht().string,children:Ht().node,initialOpen:Ht().bool};var Wn=Hn,Un=Ft(pr.Disabled,{target:"eh6ujwg0"})({name:"o9ww1u",styles:"opacity:0.5"}),Zn=function(t){var e=t.isDisabled,r=t.children;return Zt(Un,{isDisabled:e},r)},qn=Ft(pr.Panel,{target:"e1qcnw6b0"})("margin-top:16px;min-height:50vh;& .components-panel__header{height:67px;padding:0 23px;}& .components-panel__header h2{color:",(function(t){return t.theme.palette.text.primary}),";}.components-panel__body.is-opened{padding:16px;}"),$n=function(t){var e=t.header,r=t.children,n=Zt(fr,{variant:"h6"},e);return Zt(qn,{header:n},r)};$n.propTypes={header:Ht().string.isRequired,children:Ht().node};var Vn=$n,Yn=function(t){var e=t.children;return Zt(Vn,{header:(0,re.__)("Settings","image-optimizer")},e)};Yn.propTypes={children:Ht().node};var Xn=Yn,Kn=Ft("span",{target:"eaeb95l0"})({name:"1lc6m8i",styles:"display:flex;padding:4px 8px;align-items:center;border-radius:4px;&>svg{margin-right:4px;}"}),Qn=function(t){return qt("color:",t.palette.badge.text.success,";background-color:",t.palette.badge.background.success,";&>svg{fill:",t.palette.badge.text.success,";}","","")},Jn={success:Qn,error:function(t){return qt("color:",t.palette.badge.text.danger,";background-color:",t.palette.badge.background.danger,";&>svg{fill:",t.palette.badge.text.danger,";}","","")},warning:function(t){return qt("color:",t.palette.badge.text.warning,";background-color:",t.palette.badge.background.warning,";&>svg{fill:",t.palette.badge.text.warning,";}","","")}},to=function(t){var e=t.icon,r=t.text,n=t.variant,o=Rt();return Zt(Kn,{css:qt((n?Jn[n]:Qn)(o).styles,";","","")},e||"",r)};to.propTypes={icon:Ht().node,text:Ht().string.isRequired,variant:Ht().oneOf(["success","warning","error"])};var eo=to;function ro(){return ro=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},ro.apply(this,arguments)}var no,oo,io=function(t){var e=t.size,r=t.props;return Zt(pr.Icon,{icon:Zt("svg",ro({width:"8",height:"8"},r),Zt("circle",{cx:"4",cy:"4",r:"4"})),size:e})};function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(t)}function uo(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==ao(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==ao(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===ao(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var co=Object.freeze((uo(no={},Vr,"success"),uo(no,Kr,"warning"),uo(no,Qr,"warning"),uo(no,Yr,"error"),uo(no,Xr,"error"),no)),lo=Object.freeze((uo(oo={},Vr,(0,re.__)("Active","image-optimizer")),uo(oo,Kr,(0,re.__)("Not Connected","image-optimizer")),uo(oo,Qr,(0,re.__)("Not Activated","image-optimizer")),uo(oo,Yr,(0,re.__)("Expired","image-optimizer")),uo(oo,Xr,(0,re.__)("Quota reached","image-optimizer")),oo)),so=function(t){var e=t.status;return Zt(eo,{variant:co[e],text:lo[e],icon:Zt(io,{size:"8"})})};so.propTypes={status:Ht().oneOf(Object.keys(co))};var fo=so,po=Ft("div",{target:"e13w2yn11"})({name:"9i6j11",styles:"display:flex;align-items:center;&>:first-of-type{margin-right:16px;}"}),ho=Ft(fr,{target:"e13w2yn10"})("color:",(function(t){return t.theme.palette.text.primary}),";"),mo=function(){var t=rr(),e=t.isConnected,r=t.isActivated,n=t.planData,o=t.imagesLeft;if(!e)return Zt(po,null,Zt(fo,{status:Kr}));if(e&&!r||!n)return Zt(po,null,Zt(fo,{status:Qr}));var i=n.subscription_plan.title,a=n.status;return Zt(po,null,Zt(ho,null,i),Zt(fo,0===o?{status:Xr}:{status:"active"===a?Vr:Yr}))},go=Ft("div",{target:"e91321y0"})('& [data-wp-component="ToggleGroupControl"]{border-radius:2px;border:1px solid ',(function(t){return t.theme.palette.border.grey600}),';}& button[aria-checked="true"],& div[role="presentation"]{background-color:',(function(t){return t.theme.palette.text.secondary}),";}& .components-base-control__field>:first-of-type{display:",(function(t){return t.hasLabel?"flex":"none"}),";}"),vo=function(t){var e=t.id,r=t.options,n=t.label,o=void 0===n?"":n,i=jn(),a=i.getControlData,u=i.setControlData,c=a(e)||"";if(c)return Zt(go,{hasLabel:!!o},Zt(pr.__experimentalToggleGroupControl,{id:e,value:c,label:o,isAdaptiveWidth:!0,onChange:function(t){return function(t){c!==t&&u(e,t)}(t)}},r.map((function(t){var e=t.label,r=t.value,n=t.tooltip;return Zt(pr.__experimentalToggleGroupControlOption,{key:r,label:e,value:r,showTooltip:Boolean(n),"aria-label":Boolean(n)?n:""})}))))};vo.propTypes={id:Ht().string.isRequired,options:Ht().array.isRequired,label:Ht().string};var yo=vo,bo=Ft(pr.CheckboxControl,{target:"e1e41gkh0"})("& .components-checkbox-control__label{color:",(function(t){return t.theme.palette.text.primary}),';}& .components-checkbox-control__input[type="checkbox"]:checked,& .components-checkbox-control__input[type="checkbox"]:indeterminate{background-color:',(function(t){return t.theme.palette.native.blue}),";}"),wo=function(t){var e=t.id,r=t.label,n=jn(),o=n.getControlData,i=n.setControlData,a=o(e)||!1;return Zt(bo,{id:e,checked:a,label:r,onChange:function(){i(e,!a)}})};wo.propTypes={id:Ht().string.isRequired,label:Ht().string.isRequired};var xo=wo,So=Ft(pr.TextControl,{target:"e1y4z3ff0"})({name:"l0gpp6",styles:"& ::-webkit-outer-spin-button,& ::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}& input{-moz-appearance:textfield;}"}),_o=function(t){var e=t.id,r=t.type,n=void 0===r?"text":r,o=t.label,i=jn(),a=i.getControlData,u=i.setControlData,c=a(e)||"";return Zt(So,{id:e,defaultValue:c,type:n,label:o,onChange:function(){},onBlur:function(t){return r=t.target.value,void(c!==r&&u(e,r));var r}})};_o.propTypes={id:Ht().string.isRequired,type:Ht().oneOf(["number","text","search","email","password","tel","url"]),label:Ht().string};var Oo=_o,ko=Ft("div",{target:"e168z9020"})("display:flex;align-items:center;margin-top:13px;margin-left:32px;color:",(function(t){return t.theme.palette.text.primary}),';input[id*="resize_larger_images_size"]{width:64px;margin:0 8px;}'),Eo=function(){var t=(0,jn().getControlData)(yi);return Zt(React.Fragment,null,Zt(xo,{id:yi,label:(0,re.__)("Allow large image resizing","image-optimizer")}),t&&Zt(ko,null,(0,re.__)("to maximum","image-optimizer"),Zt(Oo,{id:bi,type:"number"}),(0,re.__)("pixels width/height","image-optimizer")))},Ro=Ft(pr.ToggleControl,{target:"e472ku70"})("margin-bottom:0!important;& .components-toggle-control__label{color:",(function(t){return t.theme.palette.text.primary}),";}& .components-form-toggle.is-checked .components-form-toggle__track{background-color:",(function(t){return t.theme.palette.native.blue}),";}"),Co=function(t){var e=t.id,r=t.label,n=jn(),o=n.getControlData,i=n.setControlData,a=o(e)||!1;return Zt(Ro,{id:e,checked:a,label:r,onChange:function(){i(e,!a)}})};Co.propTypes={id:Ht().string.isRequired,label:Ht().string.isRequired};var Lo=Co;function jo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var zo=function(){var e,r,n=(e=(0,t.useState)(!1),r=2,function(t){if(Array.isArray(t))return t}(e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,r)||function(t,e){if(t){if("string"==typeof t)return jo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jo(t,e):void 0}}(e,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return{isOpen:o,open:function(){i(!0)},close:function(){i(!1)}}},Po=["title","isDestructive","onCancel","onClose","onApprove","approveText","children"];function To(){return To=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},To.apply(this,arguments)}var Ao=Ft(pr.Modal,{target:"e13lgbaf1"})("font-family:",(function(t){return t.theme.fonts.default}),";"),Io=Ft("div",{target:"e13lgbaf0"})("display:flex;justify-content:flex-end;margin-top:40px;& button:first-of-type{margin-right:13px;color:",(function(t){return t.theme.palette.text.secondary}),";}"),No=function(t){var e=t.title,r=t.isDestructive,n=void 0!==r&&r,o=t.onCancel,i=t.onClose,a=t.onApprove,u=t.approveText,c=void 0===u?(0,re.__)("Submit","image-optimizer"):u,l=t.children,s=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,Po);return Zt(Ao,To({title:e,onRequestClose:i},s),Zt("div",null,l),Zt(Io,null,Zt(Nr,{onClick:o},(0,re.__)("Cancel","image-optimizer")),Zt(Nr,{isDestructive:n,variant:"primary",onClick:a},c)))};No.propTypes={title:Ht().string.isRequired,isDestructive:Ht().bool,onCancel:Ht().func.isRequired,onClose:Ht().func.isRequired,onApprove:Ht().func.isRequired,approveText:Ht().string,children:Ht().node};var Go=No;function Do(t){return Do="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Do(t)}function Mo(){Mo=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Do(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Do(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Fo(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Bo=function(){var t=zo(),e=t.isOpen,r=t.open,n=t.close,o=Ve(),i=o.backupsExist,a=o.bulkRestoringStatus,u=o.setBulkRestoringStatus,c=Ge().showToastNotification,l=function(){var t,e=(t=Mo().mark((function t(){return Mo().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Se.restoreAllImages();case 3:u(ke.IN_PROGRESS),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),c(new je({level:"error",message:(0,re.__)("An error occurred while restoring your original images.","image-optimizer"),actions:[{label:(0,re.__)("Retry","image-optimizer"),onClick:l}]}));case 9:n();case 10:case"end":return t.stop()}}),t,null,[[0,6]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fo(i,n,o,a,u,"next",t)}function u(t){Fo(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),s=ke.IN_PROGRESS===a?(0,re.__)("Restoring…","image-optimizer"):(0,re.__)("Restore originals","image-optimizer"),f=!i||ke.IN_PROGRESS===a;return Zt(React.Fragment,null,Zt(Nr,{variant:"primary",isDestructive:!0,onClick:e?n:r,disabled:f},s),e&&Zt(Go,{isDestructive:!0,onClose:n,onCancel:n,title:(0,re.__)("Restore all original images?","image-optimizer"),approveText:(0,re.__)("Restore","image-optimizer"),onApprove:l,style:{width:"335px"}},Zt(fr,{as:"p"},(0,re.__)("This will remove all optimized images and may cause performance issues.","image-optimizer"))))},Ho=function(){return imageOptimizerAppSettings};function Wo(){return Wo=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Wo.apply(this,arguments)}var Uo=function(t){var e=t.size,r=t.props;return Zt(pr.Icon,{icon:Zt("svg",Wo({width:"20",height:"24"},r),Zt("path",{fillRule:"evenodd",d:"m13.99 10.889-3.988 3.418-3.988-3.418.976-1.139 3.012 2.582 3.012-2.582.976 1.139Z",clipRule:"evenodd"})),size:e})},Zo=Ft("button",{target:"e10dfukw1"})("display:flex;align-items:center;background-color:transparent;border:none;color:",(function(t){return t.theme.palette.text.primary}),";& svg{transform:",(function(t){return t.isOpen?"initial":"rotate(-90deg);"})," margin-right:6px;}&:disabled{color:",(function(t){return t.theme.palette.text.disabled}),";}&:disabled svg{fill:",(function(t){return t.theme.palette.text.disabled}),";}"),qo=Ft("div",{target:"e10dfukw0"})("height:",(function(t){return t.isOpen?"initial":"0"}),";overflow:hidden;margin-top:10px;margin-left:29px;"),$o=function(t){var e=t.isOpen,r=t.onOpen,n=t.onClose,o=t.title,i=t.disabled,a=t.children;return Zt(React.Fragment,null,Zt(Zo,{onClick:function(){if(!i)return e?n():r()},isOpen:e,disabled:i},Zt(Uo,null),o),Zt(qo,{isOpen:e},a))};$o.propTypes={isOpen:Ht().bool.isRequired,onOpen:Ht().func.isRequired,onClose:Ht().func.isRequired,title:Ht().string.isRequired,disabled:Ht().bool,children:Ht().node};var Vo=$o;function Yo(t){return Yo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yo(t)}var Xo=["getControlData","setControlData"];function Ko(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var Qo=function(t){var e=t.getControlData,r=t.setControlData;return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ko(Object(r),!0).forEach((function(e){var n,o,i;n=t,o=e,i=r[e],(o=function(t){var e=function(t,e){if("object"!==Yo(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==Yo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Yo(e)?e:String(e)}(o))in n?Object.defineProperty(n,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[o]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ko(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({getControlData:function(){return(t=e.apply(void 0,arguments))&&"all"!==t?t.split(","):t;var t},setControlData:function(t,e){return r(t,function(t){return Array.isArray(t)?t.join():t}(e))}},function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,Xo))};function Jo(t){return function(t){if(Array.isArray(t))return ri(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ei(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ti(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||ei(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ei(t,e){if(t){if("string"==typeof t)return ri(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ri(t,e):void 0}}function ri(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var ni=Ft("div",{target:"e1ez27z30"})('margin-top:15px;margin-left:15px;& .components-checkbox-control__input[type="checkbox"]:checked,& .components-checkbox-control__input[type="checkbox"]:indeterminate{background-color:',(function(t){return t.theme.palette.native.blue}),";}& .components-checkbox-control:not(:last-of-type){margin-bottom:12px;}"),oi="all",ii="custom",ai=[{label:(0,re.__)("All Sizes","image-optimizer"),value:oi},{label:(0,re.__)("Custom","image-optimizer"),value:ii}],ui=function(){var e,r=Ho().thumbnailSizes,n=ti((0,t.useState)(!1),2),o=n[0],i=n[1],a=Qo(jn()),u=a.getControlData,c=a.setControlData,l=u(_i);return(0,t.useEffect)((function(){l===oi||o||i(!0),l===oi&&o&&i(!1)}),[]),Zt(React.Fragment,null,Zt(pr.SelectControl,{id:yi,options:ai,value:o?ii:oi,onChange:function(t){return function(t){if(t===oi)return l!==oi&&c(_i,oi),void i(!1);i(!0)}(t)}}),Zt(ni,null,Zt(Vo,{title:(0,re.__)("Custom sizes","image-optimizer"),disabled:!o,isOpen:o,onOpen:function(){i(!0)},onClose:function(){i(!1),c(_i,oi)}},null===(e=Object.entries(r))||void 0===e?void 0:e.map((function(t){var e,n,o=ti(t,2),i=o[0],a=o[1],u=a.width,s=a.height;return Zt(bo,{key:i,id:i,checked:l===oi||(null==l?void 0:l.includes(i)),label:(e=i,n="".concat(u,"x").concat(s),e=(e=e.charAt(0).toUpperCase()+e.slice(1)).replaceAll("_"," "),"".concat(e," (").concat(n,")")),onChange:function(t){return function(t,e){if(l!==oi){var n=Jo(l);e?n.push(t):n.splice(n.findIndex((function(e){return e===t})),1),c(_i,n)}else{var o=Jo(Object.keys(r));c(_i,o.filter((function(e){return e!==t})))}}(i,t)}})})))))};function ci(t){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(t)}function li(){li=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ci(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ci(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function si(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var fi=function(){var t=zo(),e=t.isOpen,r=t.open,n=t.close,o=Ve(),i=o.backupsExist,a=o.bulkBackupRemovingStatus,u=o.setBulkBackupRemovingStatus,c=o.bulkRestoringStatus,l=Ge().showToastNotification,s=function(){var t,e=(t=li().mark((function t(){return li().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Se.removeAllImageBackups();case 3:u(ke.IN_PROGRESS),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),l(new je({level:"error",message:(0,re.__)("An error occurred while deleting your backups.","image-optimizer"),actions:[{label:(0,re.__)("Retry","image-optimizer"),onClick:s}]}));case 9:n();case 10:case"end":return t.stop()}}),t,null,[[0,6]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){si(i,n,o,a,u,"next",t)}function u(t){si(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}(),f=ke.IN_PROGRESS===a?(0,re.__)("Deleting…","image-optimizer"):(0,re.__)("Delete backups","image-optimizer"),p=!i||[a,c].includes(ke.IN_PROGRESS);return Zt(React.Fragment,null,Zt(Nr,{variant:"primary",isDestructive:!0,onClick:e?n:r,disabled:p},f),e&&Zt(Go,{isDestructive:!0,onClose:n,onCancel:n,title:(0,re.__)("Delete all original images?","image-optimizer"),approveText:(0,re.__)("Delete","image-optimizer"),onApprove:s,style:{width:"335px"}},Zt(fr,{as:"p"},(0,re.__)("This action can’t be undone and your library will only contain the new, optimized versions.","image-optimizer"))))};function pi(t){return pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pi(t)}function di(){di=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==pi(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(pi(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function hi(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function mi(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){hi(i,n,o,a,u,"next",t)}function u(t){hi(i,n,o,a,u,"throw",t)}a(void 0)}))}}var gi="image_optimizer_compression_level",vi="image_optimizer_optimize_on_upload",yi="image_optimizer_resize_larger_images",bi="image_optimizer_resize_larger_images_size",wi="image_optimizer_exif_metadata",xi="image_optimizer_original_images",Si="image_optimizer_convert_to_webp",_i="image_optimizer_custom_sizes",Oi=[gi,yi,bi,wi,Si,_i],ki=[{label:(0,re.__)("Lossless","image-optimizer"),value:"lossless",tooltip:(0,re.__)("Reduces image file sizes without compromising the integrity or quality of your images.","image-optimizer")},{label:(0,re.__)("Lossy","image-optimizer"),value:"lossy",tooltip:(0,re.__)("Maximizes compression to produce lightweight images with smaller file sizes","image-optimizer")}];function Ei(t){return Ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(t)}function Ri(){Ri=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Ei(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ei(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ci(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Li(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ci(i,n,o,a,u,"next",t)}function u(t){Ci(i,n,o,a,u,"throw",t)}a(void 0)}))}}function ji(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return zi(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zi(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Pi=function(t){return Object.keys(t).forEach((function(e){e.startsWith("image_optimizer_")||delete t[e]})),t},Ti=Ft(pr.Panel,{target:"e16rh7n90"})({name:"2x78uz",styles:"margin-top:16px;min-height:50vh;padding:23px"}),Ai=(0,t.memo)((function(){return Zt(on,{speed:or.SPEED,foregroundColor:or.FOREGROUND_COLOR,height:222,width:595},Zt("path",{d:"M4 0a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4H4ZM4 60a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 162a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h168a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 88a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h272a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 190a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h272a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 108a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h208a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM4 210a4 4 0 0 0-4 4v4a4 4 0 0 0 4 4h208a4 4 0 0 0 4-4v-4a4 4 0 0 0-4-4H4ZM439 81a4 4 0 0 0-4 4v16a4 4 0 0 0 4 4h112a4 4 0 0 0 4-4V85a4 4 0 0 0-4-4H439ZM439 178a4 4 0 0 0-4 4v24a4 4 0 0 0 4 4h152a4 4 0 0 0 4-4v-24a4 4 0 0 0-4-4H439Z"}))})),Ii=(0,t.memo)((function(t){var e=t.children;return Zt(Ti,null,Zt(Ai,null),e)}));Ii.propTypes={children:Ht().node};var Ni=Ii,Gi=Ft("div",{target:"e183rcsj2"})({name:"x9820t",styles:"display:flex;justify-content:center;align-items:center;flex-direction:column;margin-top:92px"}),Di=Ft(fr,{target:"e183rcsj1"})({name:"99zu37",styles:"margin-bottom:9px"}),Mi=Ft(fr,{target:"e183rcsj0"})({name:"1i9vogi",styles:"margin-top:0"}),Fi=(0,t.memo)((function(t){var e=t.onTryAgainClick;return Zt(Gi,null,Zt(Di,{variant:"subtitle1",as:"h2"},(0,re.__)("Oh! There was a temporary glitch.","image-optimizer")),Zt(Mi,{as:"p"},(0,re.__)("No big deal. Wait a moment then try again.","image-optimizer")),Zt(Nr,{variant:"secondary",onClick:e},(0,re.__)("Try again","image-optimizer")))}));Fi.propTypes={onTryAgainClick:Ht().func.isRequired};var Bi=Fi,Hi=["key","component","alwaysVisible"],Wi=["key","component"];function Ui(){return Ui=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Ui.apply(this,arguments)}function Zi(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var qi=function(){var e,r,n,o,i,a,u=(r=(e=(0,t.useContext)(Cn)).formDataState,n=e.lastUpdateState,{formData:(o=En(r,2))[0],setFormData:o[1],lastUpdate:En(n,1)[0]}),c=u.formData,l=u.setFormData,s=u.lastUpdate,f=rr(),p=f.isConnected,d=f.isActivated,h=function(){var e=ji((0,t.useState)(null),2),r=e[0],n=e[1],o=ji((0,t.useState)(!1),2),i=o[0],a=o[1],u=ji((0,t.useState)(null),2),c=u[0],l=u[1],s=ji((0,t.useState)({}),2),f=s[0],p=s[1],d=function(){var t=Li(Ri().mark((function t(){var e;return Ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a(!0),l(null),t.prev=2,t.next=5,Se.getSettings();case 5:e=t.sent,n(Pi(e)),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(2),l(t.t0.message);case 12:a(!1);case 13:case"end":return t.stop()}}),t,null,[[2,9]])})));return function(){return t.apply(this,arguments)}}(),h=function(){var t=Li(Ri().mark((function t(e){var r;return Ri().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a(!0),p({}),t.prev=2,t.next=5,Se.updateSettings(e);case 5:t.next=12;break;case 7:t.prev=7,t.t0=t.catch(2),r={},Object.keys(e).forEach((function(e){return r[e]=t.t0.message})),p(r);case 12:a(!1);case 13:case"end":return t.stop()}}),t,null,[[2,7]])})));return function(_x){return t.apply(this,arguments)}}();return{isLoading:i,data:r,fetchingError:c,updatingError:f,hideUpdatingErrors:function(){p({})},fetchSettings:d,pushSettings:h}}(),m=h.data,g=h.isLoading,v=h.fetchingError,y=h.updatingError,b=h.fetchSettings,w=h.pushSettings,x=h.hideUpdatingErrors,S=De().showGeneralNotification,_=er().runReoptimization,O=Ve().backupsExist,k=(i=rr().isOwner,a=[{key:gi,title:(0,re.__)("Compression level","image-optimizer"),subtitle:(0,re.__)("This refers to the amount of data preserved in the image file.","image-optimizer"),component:Zt(yo,{id:gi,options:ki})},{key:vi,title:(0,re.__)("Optimize new uploads","image-optimizer"),subtitle:(0,re.__)("This will automatically apply your optimization settings to all new uploads.","image-optimizer"),component:Zt(Lo,{id:vi,label:(0,re.__)("Optimize new uploads","image-optimizer")})},{key:yi,title:(0,re.__)("Resize larger images","image-optimizer"),subtitle:(0,re.__)("This uses one additional credit per image.","image-optimizer"),component:Zt(Eo,null)},{key:wi,title:(0,re.__)("Clear EXIF Metadata","image-optimizer"),subtitle:(0,re.__)("This refers to date, time, location, etc.","image-optimizer"),component:Zt(Lo,{id:wi,label:(0,re.__)("Clear metadata","image-optimizer")})},{key:xi,title:(0,re.__)("Backup original images","image-optimizer"),subtitle:(0,re.__)("This takes up additional space in your library.","image-optimizer"),component:Zt(Lo,{id:xi,label:(0,re.__)("Backup originals","image-optimizer")})},{key:Si,title:(0,re.__)("Convert to WebP","image-optimizer"),subtitle:(0,re.__)("Automatically create WebP versions of your JPEG uploads - if your server supports WebP.","image-optimizer"),component:Zt(Lo,{id:Si,label:(0,re.__)("Convert to WebP","image-optimizer")})},{key:"files_optimization",title:(0,re.__)("File optimization","image-optimizer"),subtitle:(0,re.__)("In addition to your original upload, you can optimize the versions resized by WordPress. Each additional size counts as one credit.","image-optimizer"),component:Zt(ui,null),showDivider:!1}],i&&a.unshift({key:"subscription_status",title:(0,re.__)("Subscription status","image-optimizer"),subtitle:(0,re.__)("To use Image Optimizer, first you need to connect an Elementor account.","image-optimizer"),component:Zt(mo,null),alwaysVisible:!0}),{fields:a}).fields,E=function(){var t=rr(),e=t.isConnected,r=t.isActivated,n=t.subscriptionEmail,o=t.licenseKey,i=$r().switchUser,a=Ge().showToastNotification,u=function(){var t=mi(di().mark((function t(){return di().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,i();case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),a(new je({level:"error",message:(0,re.__)("Error while disconnecting","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]}));case 8:case"end":return t.stop()}}),t,null,[[0,5]])})));return function(){return t.apply(this,arguments)}}(),c=function(){var t=mi(di().mark((function t(){return di().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Se.deactivate(o);case 3:location.reload(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),a(new je({level:"error",message:(0,re.__)("Error while deactivating","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]}));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}();return{fields:[{key:"restore_originals",title:(0,re.__)("Restore original images","image-optimizer"),subtitle:"",component:Zt(Bo,null),showDivider:!1},{key:"remove_backups",title:(0,re.__)("Remove backups permanently","image-optimizer"),subtitle:"",component:Zt(fi,null),showDivider:!1},{key:"subscription_settings",title:(0,re.__)("Subscription settings","image-optimizer"),subtitle:n?(0,re.sprintf)(
// translators: %s: User email
(0,re.__)("You're connected as %s. Want to switch this subscription to a different account?","image-optimizer"),n):(0,re.__)("Want to switch this subscription to a different account?","image-optimizer"),component:Zt(Nr,{variant:"primary",disabled:!e,onClick:u},(0,re.__)("Switch account","image-optimizer")),showDivider:!1},{key:"deactivate",subtitle:(0,re.__)("Want to deactivate the subscription for any reason?","image-optimizer"),component:Zt(Nr,{variant:"secondary",disabled:!e||!r,onClick:c},(0,re.__)("Deactivate","image-optimizer")),showDivider:!1}]}}(),R=E.fields,C=Object.keys(y).length,L=new je({id:"settings_changed",level:"info",message:Zt(Fn,{message:(0,re.__)("You’ve updated your optimization settings.","image-optimizer"),supportiveText:(0,re.__)("These new settings apply to future uploads, but you can apply them to the existing content in your library.","image-optimizer")}),actions:[{label:(0,re.__)("Apply them now","image-optimizer"),onClick:_,variant:"link",noDefaultClasses:!0}]});return(0,t.useEffect)((function(){b()}),[]),(0,t.useEffect)((function(){m&&l(m)}),[m]),(0,t.useEffect)((function(){Object.keys(s).length&&(w(s),!C&&O&&Oi.includes(Object.keys(s)[0])&&S(L))}),[s]),(0,t.useEffect)((function(){if(C){l(m);var t=setTimeout((function(){x()}),2e3);return function(){return clearTimeout(t)}}}),[y]),!m&&g?Zt(Ni,null):v?Zt(Ni,null,Zt(Bi,{onTryAgainClick:b})):Zt(t.Suspense,{fallback:Zt(Ni,null)},Zt(Xn,null,0!==Object.keys(c).length&&Zt(React.Fragment,null,Zt(Wn,null,k.map((function(t){var e=t.key,r=t.component,n=t.alwaysVisible,o=Zi(t,Hi);return Zt(Mn,Ui({key:e,error:e in y?y[e]:""},o),p&&d||n?r:Zt(Zn,null,r))}))),Zt(Wn,{title:(0,re.__)("Advanced actions","image-optimizer"),initialOpen:!1},R.map((function(t){var e=t.key,r=t.component,n=Zi(t,Wi);return Zt(Mn,Ui({className:"components-panel__row--advanced-action",key:e},n),r)}))))))},$i=Ft("div",{target:"e1ms4xp73"})("width:100%;height:8px;margin-bottom:10px;background-color:",(function(t){return t.theme.palette.background.grey}),";"),Vi=Ft("div",{target:"e1ms4xp72"})("width:",(function(t){return t.percentage}),"%;height:8px;background-color:",(function(t){return t.theme.palette.primary.light}),";"),Yi=Ft("div",{target:"e1ms4xp71"})({name:"13lxevn",styles:"width:100%;margin-bottom:12px;display:flex;justify-content:space-between"}),Xi=Ft(fr,{target:"e1ms4xp70"})("color:",(function(t){return t.theme.palette.text.dark}),";"),Ki=function(t){var e=t.percentage,r=t.min,n=t.max,o=void 0!==r&&void 0!==n;return Zt(React.Fragment,null,Zt($i,null,Zt(Vi,{percentage:e})),o&&Zt(Yi,null,Zt(Xi,{variant:"subtitle1"},r),Zt(Xi,{variant:"h6"},"".concat(e,"%")),Zt(Xi,{variant:"subtitle1"},n)))};Ki.propTypes={percentage:Ht().number.isRequired,min:Ht().string,max:Ht().string};var Qi=Ki,Ji=["isNative"];var ta=function(t){var e=t.isNative,r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,Ji),n=Rt();return e?Zt("span",{className:"spinner is-active",style:{margin:"0 10px 0 0",backgroundColor:n.palette.background.default,borderRadius:"100%"}}):Zt(pr.Spinner,r)},ea=function(t){var e=t.disabled,r=t.optimizationStatus,n=t.onCancelOptimization,o=t.onStartOptimization;return[ke.CANCELLED,ke.IN_PROGRESS].includes(r)?Zt(React.Fragment,null,Zt(Nr,{variant:"secondary",onClick:n,disabled:ke.CANCELLED===r},(0,re.__)("Cancel","image-optimizer")),Zt(Nr,{variant:"primary",disabled:!0},Zt(ta,{isNative:!0}),(0,re.__)("In progress…","image-optimizer"))):Zt(Nr,{variant:"primary",onClick:o,disabled:e},(0,re.__)("Start","image-optimizer"))};ea.propTypes={disabled:Ht().bool.isRequired,optimizationStatus:Ht().oneOf(Object.values(ke)).isRequired,onCancelOptimization:Ht().func.isRequired,onStartOptimization:Ht().func.isRequired};var ra=ea,na=Ft("div",{target:"edn6n454"})("background-color:",(function(t){return t.theme.palette.background.default}),";border:0.5px solid ",(function(t){return t.theme.palette.border.grey}),";margin:16px 0;padding:24px;text-align:center;"),oa=Ft("div",{target:"edn6n453"})({name:"1v91bu0",styles:"display:flex;justify-content:flex-end;align-items:center;position:relative"}),ia=Ft(fr,{target:"edn6n452"})("position:absolute;right:0;left:0;color:",(function(t){return t.theme.palette.error.main}),";font-weight:700;"),aa=Ft("div",{target:"edn6n451"})({name:"1wwvbl2",styles:"display:flex;align-items:center;z-index:10;& :not(:last-of-type){margin-right:24px;}"}),ua=Ft(fr,{target:"edn6n450"})("color:",(function(t){return t.theme.palette.text.darkGrey}),";margin:0;&:last-of-type{margin-bottom:31px;}"),ca=function(t){var e=t.error,r=t.optimizationStatus,n=t.totalImages,o=t.progressPercentage,i=t.onCancelOptimization,a=t.onStartOptimization;return Zt(na,null,Zt(ua,{as:"p"},(0,re.__)("Optimize all the images left in your library in one go.","image-optimizer")),Zt(Qi,{percentage:o||0,min:"0%",max:"100%"}),Zt(oa,null,e&&Zt(ia,null,(0,re.__)("There was a snag with the bulk optimization.","image-optimizer")),Zt(aa,null,Zt(ra,{disabled:100===o||!n,onCancelOptimization:i,onStartOptimization:a,optimizationStatus:r}))))};ca.propTypes={error:Ht().string,optimizationStatus:Ht().oneOf(Object.values(ke)).isRequired,totalImages:Ht().number,progressPercentage:Ht().number.isRequired,onCancelOptimization:Ht().func.isRequired,onStartOptimization:Ht().func.isRequired};var la=ca,sa=r(521),fa=[{Header:"",accessor:"thumbnail"},{Header:(0,re.__)("File name","image-optimizer"),accessor:"fileName"},{Header:(0,re.__)("Original size","image-optimizer"),accessor:"originalSize"},{Header:(0,re.__)("Current size","image-optimizer"),accessor:"currentSize"},{Header:(0,re.__)("Optimization level","image-optimizer"),accessor:"optimizationLevel"},{Header:(0,re.__)("Status","image-optimizer"),accessor:"status"}];function pa(){return pa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},pa.apply(this,arguments)}var da=Ft("table",{target:"e1194x742"})("width:100%;background-color:",(function(t){return t.theme.palette.background.default}),";margin:16px 0;padding:24px;border-spacing:0;& img{width:40px;height:40px;}& th{color:",(function(t){return t.theme.palette.text.dark}),";}& td{height:40px;}"),ha=Ft("thead",{target:"e1194x741"})({name:"1flj9lk",styles:"text-align:left"}),ma=Ft("tr",{target:"e1194x740"})("background-color:",(function(t){var e=t.index,r=t.theme;return e%2==0?r.palette.background.default:r.palette.background.lightGrey}),";"),ga="optimization-table-bulk",va=function(e){var r=e.operations,n=(0,t.useMemo)((function(){return fa}),[]),o=(0,t.useMemo)((function(){return function(t){return t.map((function(t){var e,r=null==t?void 0:t.current_file_size,n=null!=t&&t.original_file_size?null==t?void 0:t.original_file_size:r,o=Math.round(100-r/n*100);return{thumbnail:Zt("img",{src:t.thumbnail_url,alt:""}),fileName:t.image_name,originalSize:"".concat(Gr(n)),currentSize:"".concat(Gr(r)),optimizationLevel:"".concat(o,"%"),status:null!==(e=Ee[t.status])&&void 0!==e?e:Ee[ke.NOT_STARTED]}}))}(r)}),[r]),i=(0,sa.useTable)({autoResetExpanded:!1,columns:n,data:o}),a=i.getTableProps,u=i.getTableBodyProps,c=i.headerGroups,l=i.rows,s=i.prepareRow;return Zt(da,a(),Zt(ha,null,c.map((function(t,e){return Zt("tr",pa({},t.getHeaderGroupProps(),{key:"".concat(ga,"-header-group-").concat(e)}),t.headers.map((function(t,e){return Zt("th",pa({},t.getHeaderProps(),{key:"".concat(ga,"-header-cell-").concat(e)}),Zt(fr,{variant:"subtitle1"},t.render("Header")))})))}))),Zt("tbody",u(),l.map((function(t,e){return s(t),Zt(ma,pa({index:parseInt(t.id)},t.getRowProps(),{key:"".concat(ga,"-row-").concat(e)}),t.cells.map((function(t,e){return Zt("td",pa({},t.getCellProps(),{key:"".concat(ga,"-cell-").concat(e)}),t.render("Cell"))})))}))))};va.propTypes={operations:Ht().array.isRequired};var ya=va,ba=function(){var t=Ve(),e=t.stats,r=t.bulkStatus,n=t.bulkOperations,o=rr(),i=o.isConnected,a=o.isActivated,u=o.imagesLeft,c=er(),l=c.error,s=c.cancelOptimization,f=c.runOptimization,p=0===e.total_image_count?0:Math.round(e.optimized_image_count/e.total_image_count*100);return Zt(Zn,{isDisabled:!i||!a||0===u},Zt(la,{error:l,optimizationStatus:r,totalImages:e.total_image_count,progressPercentage:p,onCancelOptimization:s,onStartOptimization:f}),Zt(ya,{operations:n}))},wa=function(t){var e=t.page;return e===nr.SETTINGS?Zt(Ln,null,Zt(qi,null)):e===nr.BULK_OPTIMIZATION?Zt(ba,null):null};wa.propTypes={page:Ht().string};var xa=wa,Sa=function(t){var e=t.size,r=t.props;return Zt(pr.Icon,{icon:Zt("svg",r,Zt("path",{d:"M8 .333A6.67 6.67 0 0 0 1.333 7 6.669 6.669 0 0 0 8 13.666 6.669 6.669 0 0 0 14.667 7 6.669 6.669 0 0 0 8 .333Zm.667 10H7.334V9h1.333v1.333Zm0-2.667H7.334v-4h1.333v4Z"})),size:e})},_a=function(t){var e=t.size,r=t.props;return Zt(pr.Icon,{icon:Zt("svg",r,Zt("path",{d:"M8 1.333A6.67 6.67 0 0 0 1.333 8 6.669 6.669 0 0 0 8 14.666 6.669 6.669 0 0 0 14.667 8 6.669 6.669 0 0 0 8 1.333Zm-1.333 10L3.334 8l.94-.94 2.393 2.386 5.06-5.06.94.947-6 6Z"})),size:e})},Oa=function(t){var e=t.level,r=Rt();return"error"===e?Zt(Sa,{size:16,props:{fill:r.palette.error.main}}):Zt(_a,{size:16,props:{fill:r.palette.success.main}})};Oa.propTypes={level:Ht().string.isRequired};var ka=Oa,Ea=Ft(pr.SnackbarList,{target:"esjtdhj0"})("width:98%;position:fixed;right:20px;bottom:15px;& .components-snackbar{border-radius:3px;color:",(function(t){return t.theme.palette.text.toast}),";background-color:",(function(t){return t.theme.palette.background.toast}),";font-family:",(function(t){return t.theme.fonts.default}),';font-weight:500;padding:20px 6px;}& .components-snackbar-list__notice-container{display:flex;justify-content:flex-end;}& .components-snackbar__content{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;}& .components-snackbar__content .components-snackbar__custom-message{display:flex;align-items:flex-start;max-width:280px;margin-top:0;margin-bottom:17px;}& .components-snackbar__content .components-snackbar__custom-message span{max-width:260px;}& .components-snackbar__content .components-snackbar__custom-message svg{margin-right:4px;position:relative;top:2px;}& .components-snackbar__content .components-snackbar__action:not(:disabled):not([aria-disabled="true"]):not(.is-secondary){font-weight:500;text-decoration:none;text-transform:uppercase;}& .components-snackbar__content .components-snackbar__action svg{margin-right:4px;position:relative;top:-1px;}'),Ra=function(){var t=Ge(),e=t.toastNotifications,r=t.hideToastNotification,n=e.map((function(t){return{actions:t.actions,id:t.id,content:Zt("p",{className:"components-snackbar__custom-message"},Zt(ka,{level:t.level}),Zt("span",null,t.message)),spokenMessage:t.message,status:t.level,politeness:"assertive"}}));return Zt(Ea,{notices:n,onRemove:function(t){return r(t)}})},Ca=Ft(pr.NoticeList,{target:"eqwe4wf0"})("margin:16px 0;& .components-notice{margin:0;}& .components-notice:not(:last-of-type){margin-bottom:16px;}& .components-notice.is-info{background-color:",(function(t){return t.theme.palette.background.noticeInfo}),";color:",(function(t){return t.theme.palette.text.noticeInfo}),";border-left:4px solid ",(function(t){return t.theme.palette.info.notice}),";}& .components-notice__content,& .components-notice__content p{margin:0 15px 0 0;}& .components-notice__content p,& .components-notice__content .components-notice__actions{display:inline-block;}& .components-notice__dismiss svg{color:",(function(t){return t.theme.palette.text.noticeInfo}),";}"),La=function(){var t=De(),e=t.generalNotifications,r=t.hideGeneralNotification,n=e.map((function(t){return{actions:t.actions.map((function(e){if("onClick"in e){var n=e.onClick;e.onClick=function(){r(t.id),n()}}return e})),id:t.id,content:t.message,spokenMessage:t.message,status:t.level,politeness:"assertive"}}));return Zt("div",{className:"wrap"},Zt(Ca,{notices:n,onRemove:function(t){return r(t)}}))},ja=window.wp.date,za=["options"];function Pa(){return Pa=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pa.apply(this,arguments)}var Ta=function(t){var e=t.options,r=function(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}(t,za);return Zt(pr.CustomSelectControl,Pa({options:e,label:"",size:"__unstable-large"},r))};Ta.propTypes={options:Ht().array.isRequired};var Aa=Ta,Ia=Ft("div",{target:"e1eue0uo3"})({name:"1azakc",styles:"text-align:center"}),Na=Ft("hr",{target:"e1eue0uo2"})({name:"19miswd",styles:"max-width:560px;margin:12px auto"}),Ga=Ft(fr,{target:"e1eue0uo1"})("color:",(function(t){return t.theme.palette.text.primary}),";font-size:16px;"),Da=Ft(Aa,{target:"e1eue0uo0"})({name:"f8a4yy",styles:"max-width:560px;margin:0 auto"}),Ma=function(t){var e=t.subscriptions,r=t.onLicenseSelect;if(!e.length)return Zt(Ia,null,Zt(Ga,{as:"p",style:{marginBottom:"12px"}},(0,re.__)("No available license","image-optimizer")),Zt(Na,null));if(1===e.length){var n=e[0];return Zt(Ia,null,Zt(Ga,{as:"p",style:{marginBottom:"45px"}},(0,re.sprintf)(
// translators: %s: Subscription plan name, %s: expiration date
(0,re.__)("Image Optimizer - %1$s license, Expiration Date: %2$s","image-optimizer"),n.plan.title,(0,ja.dateI18n)("M Y",n.date_next_payment,void 0))))}var o=null==e?void 0:e.map((function(t){return{name:(0,re.sprintf)(
// translators: %s: Subscription plan name, %s: expiration date
(0,re.__)("Image Optimizer - %1$s license, Expiration Date: %2$s","image-optimizer"),t.plan.title,(0,ja.dateI18n)("M Y",t.date_next_payment,void 0)),key:t.license_key,style:{fontSize:"100%"}}}));return o.unshift({name:(0,re.__)("Select","image-optimizer"),key:"",style:{fontSize:"100%"}}),Zt(React.Fragment,null,Zt(Da,{id:"subscription_list",options:o,onChange:function(t){return r(t)}}),Zt(Na,null))};Ma.propTypes={subscriptions:Ht().array.isRequired};var Fa=Ma,Ba=Ft("div",{target:"e1lvh8062"})({name:"1azakc",styles:"text-align:center"}),Ha=Ft(fr,{target:"e1lvh8061"})("margin:0 0 20px 0;font-size:36px;font-style:normal;font-weight:700;line-height:normal;letter-spacing:-0.72px;color:",(function(t){return t.theme.palette.text.primary}),";"),Wa=Ft(fr,{target:"e1lvh8060"})("font-size:16px;font-weight:400;line-height:150%;max-width:386px;margin:0 auto 45px;color:",(function(t){return t.theme.palette.text.tertiary}),";"),Ua=function(){return Zt(Ba,null,Zt(Ha,{as:"h1",variant:"h4"},(0,re.__)("Ready to use Image Optimizer?","image-optimizer")),Zt(Wa,{as:"p",variant:"subtitle1"},(0,re.__)("Connect your WordPress site and activate your license to use all of of the features in Image Optimizer.","image-optimizer")))},Za=function(t){var e=t.size,r=void 0===e?60:e,n=t.props;return Zt(pr.Icon,{icon:Zt("svg",n,Zt("rect",{width:"60",height:"60",fill:"#FF7BE5",rx:"30"}),Zt("path",{fill:"#fff",d:"M19.702 7.754a.234.234 0 0 0-.443 0l-2.217 6.413a.234.234 0 0 1-.146.146L10.412 16.5a.234.234 0 0 0 0 .444l6.484 2.187a.234.234 0 0 1 .146.146l2.217 6.413c.073.21.37.21.443 0l2.217-6.413a.234.234 0 0 1 .147-.146l6.483-2.187a.234.234 0 0 0 0-.444l-6.483-2.187a.234.234 0 0 1-.147-.146l-2.217-6.413ZM32.672 23.884v6.907l-7.638 8.59L49.68 17.996a.234.234 0 0 1 .388.177V46.02c0 .13-.105.234-.235.234H11.014a.234.234 0 0 1-.168-.397L32.27 23.72a.234.234 0 0 1 .402.163Z"})),size:r})},qa=function(t){var e=t.size,r=void 0===e?60:e,n=t.props;return Zt(pr.Icon,{icon:Zt("svg",n,Zt("circle",{cx:"30",cy:"30",r:"30",fill:"#F1F2F3"}),Zt("path",{fill:"#69727D",fillRule:"evenodd",d:"M34.2 31.5c-1.345 0-1.992.75-4.2.75s-2.85-.75-4.2-.75a6.302 6.302 0 0 0-6.3 6.3v1.95A2.25 2.25 0 0 0 21.75 42h16.5a2.25 2.25 0 0 0 2.25-2.25V37.8c0-3.478-2.822-6.3-6.3-6.3Zm4.8 8.25c0 .413-.337.75-.75.75h-16.5a.752.752 0 0 1-.75-.75V37.8c0-2.648 2.152-4.8 4.8-4.8.919 0 1.833.75 4.2.75 2.362 0 3.281-.75 4.2-.75 2.648 0 4.8 2.152 4.8 4.8v1.95ZM30 30a6 6 0 1 0 0-12 6 6 0 1 0 0 12Zm0-10.5c2.48 0 4.5 2.02 4.5 4.5s-2.02 4.5-4.5 4.5-4.5-2.02-4.5-4.5 2.02-4.5 4.5-4.5Z",clipRule:"evenodd"}),Zt("path",{fill:"#69727D",d:"M34.2 31.4c-.691 0-1.206.194-1.806.38-.6.185-1.303.37-2.394.37v.2c1.117 0 1.841-.19 2.453-.38.612-.189 1.093-.37 1.747-.37v-.2Zm-4.2.75a7.45 7.45 0 0 1-2.392-.37c-.6-.186-1.114-.38-1.808-.38v.2c.656 0 1.138.181 1.749.37.61.19 1.334.38 2.451.38v-.2Zm-4.2-.75a6.402 6.402 0 0 0-6.4 6.4h.2c0-3.423 2.777-6.2 6.2-6.2v-.2Zm-6.4 6.4v1.95h.2V37.8h-.2Zm0 1.95a2.35 2.35 0 0 0 2.35 2.35v-.2a2.15 2.15 0 0 1-2.15-2.15h-.2Zm2.35 2.35h16.5v-.2h-16.5v.2Zm16.5 0a2.35 2.35 0 0 0 2.35-2.35h-.2a2.15 2.15 0 0 1-2.15 2.15v.2Zm2.35-2.35V37.8h-.2v1.95h.2Zm0-1.95c0-3.533-2.867-6.4-6.4-6.4v.2c3.423 0 6.2 2.777 6.2 6.2h.2Zm-1.7 1.95c0 .357-.293.65-.65.65v.2c.468 0 .85-.382.85-.85h-.2Zm-.65.65h-16.5v.2h16.5v-.2Zm-16.5 0a.652.652 0 0 1-.65-.65h-.2c0 .468.382.85.85.85v-.2Zm-.65-.65V37.8h-.2v1.95h.2Zm0-1.95c0-2.593 2.107-4.7 4.7-4.7v-.2a4.903 4.903 0 0 0-4.9 4.9h.2Zm4.7-4.7c.216 0 .436.044.684.114.255.07.516.16.845.257.646.19 1.476.379 2.671.379v-.2a8.825 8.825 0 0 1-2.615-.371c-.31-.091-.598-.189-.847-.258a2.736 2.736 0 0 0-.738-.121v.2Zm4.2.75a9.03 9.03 0 0 0 2.67-.379c.328-.096.59-.186.845-.257a2.55 2.55 0 0 1 .685-.114v-.2c-.243 0-.483.05-.739.12-.25.07-.537.168-.848.259A8.829 8.829 0 0 1 30 33.65v.2Zm4.2-.75c2.593 0 4.7 2.107 4.7 4.7h.2c0-2.704-2.196-4.9-4.9-4.9v.2Zm4.7 4.7v1.95h.2V37.8h-.2ZM30 30.1a6.1 6.1 0 0 0 6.1-6.1h-.2a5.9 5.9 0 0 1-5.9 5.9v.2Zm6.1-6.1a6.1 6.1 0 0 0-6.1-6.1v.2a5.9 5.9 0 0 1 5.9 5.9h.2ZM30 17.9a6.1 6.1 0 0 0-6.1 6.1h.2a5.9 5.9 0 0 1 5.9-5.9v-.2ZM23.9 24a6.1 6.1 0 0 0 6.1 6.1v-.2a5.9 5.9 0 0 1-5.9-5.9h-.2Zm6.1-4.4c2.425 0 4.4 1.976 4.4 4.4h.2c0-2.535-2.065-4.6-4.6-4.6v.2Zm4.4 4.4c0 2.424-1.975 4.4-4.4 4.4v.2c2.535 0 4.6-2.065 4.6-4.6h-.2ZM30 28.4a4.407 4.407 0 0 1-4.4-4.4h-.2c0 2.535 2.065 4.6 4.6 4.6v-.2ZM25.6 24c0-2.424 1.976-4.4 4.4-4.4v-.2a4.607 4.607 0 0 0-4.6 4.6h.2Z"})),size:r})};function $a(t){return $a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$a(t)}function Va(){Va=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==$a(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError($a(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function Ya(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Xa=Ft("div",{target:"e10yy5423"})("display:flex;justify-content:space-between;align-items:baseline;max-width:420px;margin:0 auto 40px;position:relative;& svg{margin-bottom:14px;}&::before{content:'';position:absolute;top:22px;right:20px;left:0;margin:auto;border:2px dashed ",(function(t){return t.theme.palette.background.grey}),";width:48%;}&::after{content:url(",r(998).Z,");display:flex;justify-content:center;align-items:center;position:absolute;top:7px;left:0;right:20px;width:32px;height:32px;margin:auto;border:1px solid ",(function(t){return t.theme.palette.background.grey}),";border-radius:100%;background-color:",(function(t){return t.theme.palette.background.default}),";}"),Ka=Ft("div",{target:"e10yy5422"})({name:"zigog8",styles:"display:flex;flex-direction:column;align-items:center"}),Qa=Ft(fr,{target:"e10yy5421"})("color:",(function(t){return t.theme.palette.text.tertiary}),";margin-bottom:8px;"),Ja=Ft(Nr,{target:"e10yy5420"})("&.is-link{color:",(function(t){return t.theme.palette.text.tertiary}),";font-size:14px;font-style:normal;font-weight:500;line-height:100%;text-decoration:none;}"),tu=function(){var t=Ho().siteUrl,e=rr().subscriptionEmail,r=$r().switchUser,n=Ge().showToastNotification,o=function(){var t,e=(t=Va().mark((function t(){return Va().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r();case 3:close(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),n(new je({level:"error",message:(0,re.__)("Error while disconnecting","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]}));case 9:case"end":return t.stop()}}),t,null,[[0,6]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Ya(i,n,o,a,u,"next",t)}function u(t){Ya(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();return Zt(Xa,null,Zt(Ka,null,Zt(Za,null),Zt(Qa,null,t)),Zt(Ka,null,Zt(qa,null),Zt(Qa,null,e),Zt(Ja,{variant:"link",onClick:o},(0,re.__)("Switch User","image-optimizer"))))},eu=Ft("div",{target:"ehua4802"})({name:"1ny6g06",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;margin-bottom:35px;& p{margin:0;}"}),ru=Ft(fr,{target:"ehua4801"})("color:",(function(t){return t.theme.palette.text.tertiary}),";"),nu=Ft(Nr,{target:"ehua4800"})("&.is-link{color:",(function(t){return t.theme.palette.text.link}),";font-size:14px;line-height:normal;}"),ou=function(){return Zt(eu,null,Zt(ru,{as:"p"},(0,re.sprintf)(
// translators: %s: Full year
(0,re.__)("© %s All Rights Reserved.","image-optimizer"),(0,ja.dateI18n)("Y",new Date,void 0))),Zt("p",null,Zt(nu,{variant:"link",href:"https://elementor.com/terms/",target:"_blank",rel:"noopener noreferrer"},(0,re.__)("Terms of Service","image-optimizer")),Zt("span",null,", "),Zt(nu,{variant:"link",href:"https://elementor.com/about/privacy/",target:"_blank",rel:"noopener noreferrer"},(0,re.__)("Privacy Policy","image-optimizer"))))};function iu(t){return iu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iu(t)}function au(){au=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==iu(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(iu(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function uu(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function cu(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){uu(i,n,o,a,u,"next",t)}function u(t){uu(i,n,o,a,u,"throw",t)}a(void 0)}))}}function lu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return su(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?su(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function su(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var fu=Ft(pr.Modal,{target:"e1j6tusj2"})("font-family:",(function(t){return t.theme.fonts.default}),";width:900px;max-height:80%;border-radius:0;.components-modal__header{padding:0 23px 8px;}.components-modal__content{padding:0;margin-top:55px;}"),pu=Ft("div",{target:"e1j6tusj1"})({name:"lhj7k3",styles:"display:flex;flex-direction:column;justify-content:center;align-items:center;max-width:560px;margin:0 auto 56px"}),du=Ft(Nr,{target:"e1j6tusj0"})("display:flex;justify-content:center;align-items:center;background-color:",(function(t){return t.theme.palette.background.brand}),"!important;width:100%;letter-spacing:-.02em;color:",(function(t){return t.theme.palette.text.brand}),"!important;font-size:15px;font-weight:500;user-select:none;max-width:560px;border-radius:0;height:48px;&:not(:last-of-type){margin-bottom:20px;}&:disabled{color:#9DA5AE!important;background:",(function(t){return t.theme.palette.background.disabled}),"!important;}"),hu=function(e){var r=e.page,n=rr(),o=n.isConnected,i=n.isActivated,a=zo(),u=a.isOpen,c=a.close,l=a.open,s=Ge().showToastNotification,f=lu((0,t.useState)([]),2),p=f[0],d=f[1],h=lu((0,t.useState)(null),2),m=h[0],g=h[1],v=function(){var t=cu(au().mark((function t(){var e;return au().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Se.fetchSubscriptions();case 2:1===(e=t.sent).length&&g(e[0].license_key),d(e),l();case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,t.useEffect)((function(){r===nr.SETTINGS&&o&&!i&&v(),Hr.listen(Fr,v)}),[]),u?Zt(fu,{onRequestClose:c,value:m,title:""},Zt(Ua,null),Zt(tu,null),Zt(Fa,{subscriptions:p,onLicenseSelect:function(t){g(t.selectedItem.key)}}),Zt(pu,null,null!=p&&p.length?Zt(du,{variant:"primary",disabled:!m,onClick:function(){var t=function(){var t=cu(au().mark((function t(){return au().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Se.activateSubscription(m);case 3:location.reload(),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),s(new je({level:"error",message:(0,re.__)("Activation error","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]}));case 9:c();case 10:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(){return t.apply(this,arguments)}}();t()}},(0,re.__)("Activate my license","image-optimizer")):Zt(du,{variant:"primary",href:"https://go.elementor.com/io-panel-get-free/",target:"_blank",rel:"noopener noreferrer",onClick:c},(0,re.__)("Get a new subscription","image-optimizer"))),Zt(ou,null)):""};hu.propTypes={page:Ht().string};var mu=hu;function gu(t){return gu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gu(t)}function vu(){vu=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),u=new j(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",g={};function v(){}function y(){}function b(){}var w={};l(w,a,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(z([])));S&&S!==r&&n.call(S,a)&&(w=S);var _=b.prototype=v.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==gu(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function R(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,R(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function j(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function z(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(gu(e)+" is not iterable")}return y.prototype=b,o(_,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:y,configurable:!0}),y.displayName=l(b,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===y||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,c,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},O(k.prototype),l(k.prototype,u,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(_),l(_,c,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=z,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:z(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function yu(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var bu=function(){var e=function(){var t=window.location;return new URLSearchParams(t.search).get("page")||null}();return function(){var e=Ve(),r=e.fetchStats,n=e.bulkRestoringStatus,o=e.bulkBackupRemovingStatus,i=e.bulkStatus,a=e.fetchBulkOperations,u=Ge().showToastNotification,c=(0,t.useRef)(n),l=(0,t.useRef)(o),s=(0,t.useRef)(i);(0,t.useEffect)((function(){r();var t=setInterval(r,5e3);return function(){return clearInterval(t)}}),[]),(0,t.useEffect)((function(){ke.NOT_STARTED===n&&ke.IN_PROGRESS===c.current&&u(new je({level:"success",message:(0,re.__)("Restoring your original images was completed successfully.","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]})),c.current=n}),[n]),(0,t.useEffect)((function(){ke.NOT_STARTED===o&&ke.IN_PROGRESS===l.current&&u(new je({level:"success",message:(0,re.__)("Deleting your backups was completed successfully.","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]})),l.current=o}),[o]),(0,t.useEffect)((function(){ke.NOT_STARTED===i&&ke.IN_PROGRESS===s.current&&u(new je({level:"success",message:(0,re.__)("Bulk optimization is completed.","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]})),s.current=i}),[i]);var f=(0,t.useRef)(null);(0,t.useEffect)((function(){if(i===ke.NOT_STARTED&&f.current&&(clearInterval(f.current),f.current=null,a()),i===ke.IN_PROGRESS&&!f.current)return a(),f.current=setInterval(a,5e3),function(){return clearInterval(f.current)}}),[i])}(),function(e){var r=$r().redirectToConnect,n=Ge().showToastNotification,o=function(){var t,e=(t=vu().mark((function t(){return vu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r();case 3:t.next=8;break;case 5:t.prev=5,t.t0=t.catch(0),n(new je({level:"error",message:(0,re.__)("Error while connecting","image-optimizer"),actions:[{label:(0,re.__)("Got it","image-optimizer"),onClick:function(){}}]}));case 8:case"end":return t.stop()}}),t,null,[[0,5]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){yu(i,n,o,a,u,"next",t)}function u(t){yu(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return e.apply(this,arguments)}}();(0,t.useEffect)((function(){e===nr.SETTINGS&&"connect"===new URLSearchParams(location.search).get("action")&&o()}),[])}(e),Zt(ee,null,Zt(ee.Header,null,Zt(La,null)),Zt(ee.Content,{fullWidth:!0},Zt(mu,{page:e}),Zt(On,{page:e}),Zt(xa,{page:e}),Zt(Ra,null)))},wu=function(){return Zt(Lt,{theme:Tt},Zt($e,null,Zt(Ne,null,Zt(bu,null))))};function xu(){return xu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},xu.apply(this,arguments)}var Su=function(t){var e=t.size,r=t.props;return Zt(pr.Icon,{icon:Zt("svg",xu({width:"32",height:"32",fill:"none"},r),Zt("path",{fill:"#000",fillRule:"evenodd",d:"M2.696 24.89A16 16 0 1 1 29.304 7.11 16 16 0 0 1 2.696 24.89Zm9.305-15.557H9.334v13.333h2.667V9.333Zm10.665 0h-8v2.666h8V9.333Zm0 5.332h-8v2.667h8v-2.667Zm0 5.335h-8v2.666h8V20Z",clipRule:"evenodd"})),size:e})},_u=Ft("div",{target:"eoryb1i1"})({name:"s5xdrg",styles:"display:flex;align-items:center"}),Ou=Ft("span",{target:"eoryb1i0"})("margin-left:8px;color:",(function(t){return t.theme.palette.text.lightGrey}),";font-feature-settings:'clig' off,'liga' off;font-family:",(function(t){return t.theme.fonts.default}),";font-size:15px;font-style:normal;font-weight:700;line-height:130%;user-select:none;"),ku=function(){return Zt(_u,null,Zt(Su,{size:32}),Zt(Ou,null,function(){var t=window.location;return t.href.endsWith("/upload.php")&&!t.search}()?(0,re.__)("Media Library","image-optimizer"):(0,re.__)("Image Optimizer","image-optimizer")))},Eu=function(t){var e=t.size,r=t.props;return Zt(pr.Icon,{icon:Zt("svg",r,Zt("path",{fillRule:"evenodd",d:"M8 2.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM1.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Zm6.123-3.793a1.984 1.984 0 0 1 1.316.186h.002c.404.214.724.558.91.976.188.418.232.886.126 1.332a2.061 2.061 0 0 1-.71 1.13c-.225.181-.482.31-.756.382v.454a.5.5 0 0 1-1 0v-.89a.5.5 0 0 1 .498-.5c.227 0 .45-.078.63-.224.18-.146.31-.35.365-.583a1.086 1.086 0 0 0-.065-.693 1.045 1.045 0 0 0-.464-.498.984.984 0 0 0-.652-.093 1.005 1.005 0 0 0-.572.345.5.5 0 0 1-.769-.639 2.004 2.004 0 0 1 1.141-.685ZM8 10.167a.5.5 0 0 1 .5.5v.026a.5.5 0 1 1-1 0v-.026a.5.5 0 0 1 .5-.5Z",clipRule:"evenodd"})),size:e})},Ru=Ft(pr.Button,{target:"e1lvgzs50"})("border-radius:4px;&.is-primary,&.is-primary:hover:not(:disabled){background-color:",(function(t){return t.theme.palette.primary.main}),";color:",(function(t){return t.theme.palette.text.primary}),";font-weight:500;}&.is-secondary{box-shadow:inset 0 0 0 1px ",(function(t){return t.theme.palette.primary.main}),";color:",(function(t){return t.theme.palette.text.primary}),";font-weight:500;}"),Cu=Object.freeze({STATUS_NOT_CONNECTED:"not-connected",STATUS_NOT_ACTIVATED:"not-activated",STATUS_PLAN_DATA_UNAVAILABLE:"plan-data-unavailable",STATUS_PLAN_EXPIRED:"plan-expired"}),Lu=function(t){var e=t.state,r=$r(),n=r.redirectToConnect,o=r.sendActivationEvent;return Cu.STATUS_NOT_CONNECTED===e?Zt(Ru,{variant:"secondary",onClick:n},(0,re.__)("Connect to start","image-optimizer")):Cu.STATUS_NOT_ACTIVATED===e?Zt(Ru,{variant:"secondary",onClick:o},(0,re.__)("Activate to start","image-optimizer")):Cu.STATUS_PLAN_EXPIRED===e?Zt(Ru,{variant:"primary",href:ir,target:"_blank",rel:"noopener noreferrer"},(0,re.__)("Renew Plan","image-optimizer")):Cu.STATUS_PLAN_DATA_UNAVAILABLE!==e&&Zt(Ru,{variant:"primary",href:ir,target:"_blank",rel:"noopener noreferrer"},(0,re.__)("Upgrade Plan","image-optimizer"))};Lu.propTypes={state:Ht().oneOf(Object.values(Cu))};var ju=Lu,zu=Ft("ul",{target:"ecb3hix2"})({name:"1ktpmw2",styles:"display:flex;align-items:center;margin:0;@media screen and (max-width: 782px){flex-wrap:wrap;}"}),Pu=Ft("li",{target:"ecb3hix1"})({name:"1vkvgcp",styles:"margin:0;&:not(:last-child){margin-right:40px;@media screen and (max-width: 960px){margin-right:10px;}}"}),Tu=Ft(Nr,{target:"ecb3hix0"})("&.is-link{color:",(function(t){return t.theme.palette.text.lightGrey}),";text-decoration:none;font-family:",(function(t){return t.theme.fonts.default}),";font-weight:500;line-height:150%;&>svg{margin-right:6px;}}"),Au=function(){var t=rr(),e=t.isConnected,r=t.isActivated,n=t.planData,o=null;return e||(o=Cu.STATUS_NOT_CONNECTED),e&&!r&&(o=Cu.STATUS_NOT_ACTIVATED),e&&r&&!n&&(o=Cu.STATUS_PLAN_DATA_UNAVAILABLE),e&&r&&n&&n.status===Yr&&(o=Cu.STATUS_PLAN_EXPIRED),Zt("nav",null,Zt(zu,null,Zt(Pu,{role:"menuitem"},Zt(Tu,{href:"https://go.elementor.com/io-panel-learn-more/",variant:"link",target:"_blank",rel:"noopener noreferrer"},Zt(Eu,{size:16}),(0,re.__)("Help","image-optimizer"))),Zt(Pu,null,Zt(ju,{state:o}))))},Iu=Ft("div",{target:"e12u6fnq0"})("padding:10px 20px;position:relative;left:-20px;width:calc(100vw - 160px - 40px);box-shadow:0 3px 16px 0 rgba(35, 38, 42, 0.20);background-color:",(function(t){return t.theme.palette.background.default}),";display:flex;justify-content:space-between;align-items:center;@media screen and (max-width: 960px){width:calc(100vw - 36px - 32px);}@media screen and (max-width: 782px){left:-10px;width:calc(100vw - 32px);}"),Nu=function(){return Zt(Iu,{role:"navigation"},Zt(ku,null),Zt(Au,null))},Gu=(0,t.createContext)({}),Du=function(t){var e=t.children,r=zo();return Zt(Gu.Provider,{value:{activationModalState:r}},e)};Du.propTypes={children:Ht().node};var Mu,Fu=function(){return Zt(Lt,{theme:Tt},Zt(Du,null,Zt(Nu,null)))},Bu=document.getElementById("image-optimizer-top-bar"),Hu=document.getElementById("image-optimizer-app"),Wu=(null===(Mu=window)||void 0===Mu||null===(Mu=Mu.imageOptimizerAppSettings)||void 0===Mu?void 0:Mu.isDevelopment)?t.Fragment:t.StrictMode;if(t.createRoot){var Uu=(0,t.createRoot)(Bu),Zu=(0,t.createRoot)(Hu);Uu.render(Zt(Wu,null,Zt(Fu,null))),Zu.render(Zt(Wu,null,Zt(wu,null)))}else t.render&&((0,t.render)(Zt(Wu,null,Zt(Fu,null)),Bu),(0,t.render)(Zt(Wu,null,Zt(wu,null)),Hu))}()}();