You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
24 KiB
1 lines
24 KiB
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[346],{3258:function(e,t,r){r.d(t,{Z:function(){return y}});var n=r(7462),i=r(5987),o=r(7294),a=(r(5697),r(6010)),c=r(130),u=r(5209),s=(0,u.Z)(o.createElement("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),l=(0,u.Z)(o.createElement("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),d=r(9693),f=(0,u.Z)(o.createElement("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),p=r(3871),h=r(4670),m=o.createElement(l,null),v=o.createElement(s,null),b=o.createElement(f,null),g=o.forwardRef((function(e,t){var r=e.checkedIcon,u=void 0===r?m:r,s=e.classes,l=e.color,d=void 0===l?"secondary":l,f=e.icon,h=void 0===f?v:f,g=e.indeterminate,y=void 0!==g&&g,k=e.indeterminateIcon,w=void 0===k?b:k,x=e.inputProps,C=e.size,Z=void 0===C?"medium":C,E=(0,i.Z)(e,["checkedIcon","classes","color","icon","indeterminate","indeterminateIcon","inputProps","size"]),O=y?w:h,z=y?w:u;return o.createElement(c.Z,(0,n.Z)({type:"checkbox",classes:{root:(0,a.Z)(s.root,s["color".concat((0,p.Z)(d))],y&&s.indeterminate),checked:s.checked,disabled:s.disabled},color:d,inputProps:(0,n.Z)({"data-indeterminate":y},x),icon:o.cloneElement(O,{fontSize:void 0===O.props.fontSize&&"small"===Z?Z:O.props.fontSize}),checkedIcon:o.cloneElement(z,{fontSize:void 0===z.props.fontSize&&"small"===Z?Z:z.props.fontSize}),ref:t},E))})),y=(0,h.Z)((function(e){return{root:{color:e.palette.text.secondary},checked:{},disabled:{},indeterminate:{},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,d.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,d.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:e.palette.action.disabled}}}}),{name:"MuiCheckbox"})(g)},3681:function(e,t,r){var n=r(7462),i=r(5987),o=r(7294),a=(r(5697),r(6010)),c=r(3871),u=r(4670),s=r(9693),l=r(8920),d=o.forwardRef((function(e,t){var r=e.classes,u=e.className,s=e.color,d=void 0===s?"primary":s,f=e.value,p=e.valueBuffer,h=e.variant,m=void 0===h?"indeterminate":h,v=(0,i.Z)(e,["classes","className","color","value","valueBuffer","variant"]),b=(0,l.Z)(),g={},y={bar1:{},bar2:{}};if("determinate"===m||"buffer"===m)if(void 0!==f){g["aria-valuenow"]=Math.round(f),g["aria-valuemin"]=0,g["aria-valuemax"]=100;var k=f-100;"rtl"===b.direction&&(k=-k),y.bar1.transform="translateX(".concat(k,"%)")}else 0;if("buffer"===m)if(void 0!==p){var w=(p||0)-100;"rtl"===b.direction&&(w=-w),y.bar2.transform="translateX(".concat(w,"%)")}else 0;return o.createElement("div",(0,n.Z)({className:(0,a.Z)(r.root,r["color".concat((0,c.Z)(d))],u,{determinate:r.determinate,indeterminate:r.indeterminate,buffer:r.buffer,query:r.query}[m]),role:"progressbar"},g,{ref:t},v),"buffer"===m?o.createElement("div",{className:(0,a.Z)(r.dashed,r["dashedColor".concat((0,c.Z)(d))])}):null,o.createElement("div",{className:(0,a.Z)(r.bar,r["barColor".concat((0,c.Z)(d))],("indeterminate"===m||"query"===m)&&r.bar1Indeterminate,{determinate:r.bar1Determinate,buffer:r.bar1Buffer}[m]),style:y.bar1}),"determinate"===m?null:o.createElement("div",{className:(0,a.Z)(r.bar,("indeterminate"===m||"query"===m)&&r.bar2Indeterminate,"buffer"===m?[r["color".concat((0,c.Z)(d))],r.bar2Buffer]:r["barColor".concat((0,c.Z)(d))]),style:y.bar2}))}));t.Z=(0,u.Z)((function(e){var t=function(t){return"light"===e.palette.type?(0,s.$n)(t,.62):(0,s._j)(t,.5)},r=t(e.palette.primary.main),n=t(e.palette.secondary.main);return{root:{position:"relative",overflow:"hidden",height:4,"@media print":{colorAdjust:"exact"}},colorPrimary:{backgroundColor:r},colorSecondary:{backgroundColor:n},determinate:{},indeterminate:{},buffer:{backgroundColor:"transparent"},query:{transform:"rotate(180deg)"},dashed:{position:"absolute",marginTop:0,height:"100%",width:"100%",animation:"$buffer 3s infinite linear"},dashedColorPrimary:{backgroundImage:"radial-gradient(".concat(r," 0%, ").concat(r," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},dashedColorSecondary:{backgroundImage:"radial-gradient(".concat(n," 0%, ").concat(n," 16%, transparent 42%)"),backgroundSize:"10px 10px",backgroundPosition:"0 -23px"},bar:{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left"},barColorPrimary:{backgroundColor:e.palette.primary.main},barColorSecondary:{backgroundColor:e.palette.secondary.main},bar1Indeterminate:{width:"auto",animation:"$indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite"},bar1Determinate:{transition:"transform .".concat(4,"s linear")},bar1Buffer:{zIndex:1,transition:"transform .".concat(4,"s linear")},bar2Indeterminate:{width:"auto",animation:"$indeterminate2 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite"},bar2Buffer:{transition:"transform .".concat(4,"s linear")},"@keyframes indeterminate1":{"0%":{left:"-35%",right:"100%"},"60%":{left:"100%",right:"-90%"},"100%":{left:"100%",right:"-90%"}},"@keyframes indeterminate2":{"0%":{left:"-200%",right:"100%"},"60%":{left:"107%",right:"-8%"},"100%":{left:"107%",right:"-8%"}},"@keyframes buffer":{"0%":{opacity:1,backgroundPosition:"0 -23px"},"50%":{opacity:0,backgroundPosition:"0 -23px"},"100%":{opacity:1,backgroundPosition:"-200px -23px"}}}}),{name:"MuiLinearProgress"})(d)},9570:function(e,t,r){var n=r(7462),i=r(5987),o=r(7294),a=(r(5697),r(6010)),c=r(4670),u=r(9693),s=r(3871),l=r(130),d=o.forwardRef((function(e,t){var r=e.classes,c=e.className,u=e.color,d=void 0===u?"secondary":u,f=e.edge,p=void 0!==f&&f,h=e.size,m=void 0===h?"medium":h,v=(0,i.Z)(e,["classes","className","color","edge","size"]),b=o.createElement("span",{className:r.thumb});return o.createElement("span",{className:(0,a.Z)(r.root,c,{start:r.edgeStart,end:r.edgeEnd}[p],"small"===m&&r["size".concat((0,s.Z)(m))])},o.createElement(l.Z,(0,n.Z)({type:"checkbox",icon:b,checkedIcon:b,classes:{root:(0,a.Z)(r.switchBase,r["color".concat((0,s.Z)(d))]),input:r.input,checked:r.checked,disabled:r.disabled},ref:t},v)),o.createElement("span",{className:r.track}))}));t.Z=(0,c.Z)((function(e){return{root:{display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"}},edgeStart:{marginLeft:-8},edgeEnd:{marginRight:-8},switchBase:{position:"absolute",top:0,left:0,zIndex:1,color:"light"===e.palette.type?e.palette.grey[50]:e.palette.grey[400],transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),"&$checked":{transform:"translateX(20px)"},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{opacity:.5},"&$disabled + $track":{opacity:"light"===e.palette.type?.12:.1}},colorPrimary:{"&$checked":{color:e.palette.primary.main,"&:hover":{backgroundColor:(0,u.Fq)(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.primary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},colorSecondary:{"&$checked":{color:e.palette.secondary.main,"&:hover":{backgroundColor:(0,u.Fq)(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"&$disabled":{color:"light"===e.palette.type?e.palette.grey[400]:e.palette.grey[800]},"&$checked + $track":{backgroundColor:e.palette.secondary.main},"&$disabled + $track":{backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white}},sizeSmall:{width:40,height:24,padding:7,"& $thumb":{width:16,height:16},"& $switchBase":{padding:4,"&$checked":{transform:"translateX(16px)"}}},checked:{},disabled:{},input:{left:"-100%",width:"300%"},thumb:{boxShadow:e.shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"},track:{height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:"light"===e.palette.type?e.palette.common.black:e.palette.common.white,opacity:"light"===e.palette.type?.38:.3}}}),{name:"MuiSwitch"})(d)},130:function(e,t,r){r.d(t,{Z:function(){return h}});var n=r(7462),i=r(885),o=r(5987),a=r(7294),c=(r(5697),r(6010)),u=r(2775),s=a.createContext();var l=s;var d=r(4670),f=r(7812),p=a.forwardRef((function(e,t){var r=e.autoFocus,s=e.checked,d=e.checkedIcon,p=e.classes,h=e.className,m=e.defaultChecked,v=e.disabled,b=e.icon,g=e.id,y=e.inputProps,k=e.inputRef,w=e.name,x=e.onBlur,C=e.onChange,Z=e.onFocus,E=e.readOnly,O=e.required,z=e.tabIndex,B=e.type,S=e.value,P=(0,o.Z)(e,["autoFocus","checked","checkedIcon","classes","className","defaultChecked","disabled","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"]),I=(0,u.Z)({controlled:s,default:Boolean(m),name:"SwitchBase",state:"checked"}),$=(0,i.Z)(I,2),R=$[0],M=$[1],F=a.useContext(l),T=v;F&&"undefined"===typeof T&&(T=F.disabled);var V="checkbox"===B||"radio"===B;return a.createElement(f.Z,(0,n.Z)({component:"span",className:(0,c.Z)(p.root,h,R&&p.checked,T&&p.disabled),disabled:T,tabIndex:null,role:void 0,onFocus:function(e){Z&&Z(e),F&&F.onFocus&&F.onFocus(e)},onBlur:function(e){x&&x(e),F&&F.onBlur&&F.onBlur(e)},ref:t},P),a.createElement("input",(0,n.Z)({autoFocus:r,checked:s,defaultChecked:m,className:p.input,disabled:T,id:V&&g,name:w,onChange:function(e){var t=e.target.checked;M(t),C&&C(e,t)},readOnly:E,ref:k,required:O,tabIndex:z,type:B,value:S},y)),R?d:b)})),h=(0,d.Z)({root:{padding:9},checked:{},disabled:{},input:{cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}},{name:"PrivateSwitchBase"})(p)},1959:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check");t.Z=a},9067:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"}),"Edit");t.Z=a},8513:function(e,t,r){var n=r(5318),i=r(862);t.Z=void 0;var o=i(r(7294)),a=(0,n(r(2108)).default)(o.createElement("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert");t.Z=a},8600:function(e){const t=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],r=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],n=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],i=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],o=(e,t,r)=>{let n=e;return"string"===typeof t||Array.isArray(t)?n=e.toLocaleString(t,r):!0!==t&&void 0===r||(n=e.toLocaleString(void 0,r)),n};e.exports=(e,a)=>{if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const c=(a=Object.assign({bits:!1,binary:!1},a)).bits?a.binary?i:n:a.binary?r:t;if(a.signed&&0===e)return` 0 ${c[0]}`;const u=e<0,s=u?"-":a.signed?"+":"";let l;if(u&&(e=-e),void 0!==a.minimumFractionDigits&&(l={minimumFractionDigits:a.minimumFractionDigits}),void 0!==a.maximumFractionDigits&&(l=Object.assign({maximumFractionDigits:a.maximumFractionDigits},l)),e<1){return s+o(e,a.locale,l)+" "+c[0]}const d=Math.min(Math.floor(a.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),c.length-1);e/=Math.pow(a.binary?1024:1e3,d),l||(e=e.toPrecision(3));return s+o(Number(e),a.locale,l)+" "+c[d]}},8575:function(e,t,r){r.d(t,{ZP:function(){return R}});var n=r(7294),i=Object.prototype.hasOwnProperty;var o=new WeakMap,a=0;var c=function(){function e(e){void 0===e&&(e={}),this.cache=new Map(Object.entries(e)),this.subs=[]}return e.prototype.get=function(e){var t=this.serializeKey(e)[0];return this.cache.get(t)},e.prototype.set=function(e,t){var r=this.serializeKey(e)[0];this.cache.set(r,t),this.notify()},e.prototype.keys=function(){return Array.from(this.cache.keys())},e.prototype.has=function(e){var t=this.serializeKey(e)[0];return this.cache.has(t)},e.prototype.clear=function(){this.cache.clear(),this.notify()},e.prototype.delete=function(e){var t=this.serializeKey(e)[0];this.cache.delete(t),this.notify()},e.prototype.serializeKey=function(e){var t=null;if("function"===typeof e)try{e=e()}catch(r){e=""}return Array.isArray(e)?(t=e,e=function(e){if(!e.length)return"";for(var t="arg",r=0;r<e.length;++r)if(null!==e[r]){var n=void 0;"object"!==typeof e[r]&&"function"!==typeof e[r]?n="string"===typeof e[r]?'"'+e[r]+'"':String(e[r]):o.has(e[r])?n=o.get(e[r]):(n=a,o.set(e[r],a++)),t+="@"+n}else t+="@null";return t}(e)):e=String(e||""),[e,t,e?"err@"+e:"",e?"validating@"+e:""]},e.prototype.subscribe=function(e){var t=this;if("function"!==typeof e)throw new Error("Expected the listener to be a function.");var r=!0;return this.subs.push(e),function(){if(r){r=!1;var n=t.subs.indexOf(e);n>-1&&(t.subs[n]=t.subs[t.subs.length-1],t.subs.length--)}}},e.prototype.notify=function(){for(var e=0,t=this.subs;e<t.length;e++){(0,t[e])()}},e}(),u=!0,s={isOnline:function(){return u},isDocumentVisible:function(){return"undefined"===typeof document||void 0===document.visibilityState||"hidden"!==document.visibilityState},fetcher:function(e){return fetch(e).then((function(e){return e.json()}))},registerOnFocus:function(e){"undefined"!==typeof window&&void 0!==window.addEventListener&&"undefined"!==typeof document&&void 0!==document.addEventListener&&(document.addEventListener("visibilitychange",(function(){return e()}),!1),window.addEventListener("focus",(function(){return e()}),!1))},registerOnReconnect:function(e){"undefined"!==typeof window&&void 0!==window.addEventListener&&(window.addEventListener("online",(function(){u=!0,e()}),!1),window.addEventListener("offline",(function(){return u=!1}),!1))}},l=function(){return(l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},d=new c;var f="undefined"!==typeof window&&navigator.connection&&-1!==["slow-2g","2g"].indexOf(navigator.connection.effectiveType),p=l({onLoadingSlow:function(){},onSuccess:function(){},onError:function(){},onErrorRetry:function(e,t,r,n,i){if(r.isDocumentVisible()&&!("number"===typeof r.errorRetryCount&&i.retryCount>r.errorRetryCount)){var o=Math.min(i.retryCount,8),a=~~((Math.random()+.5)*(1<<o))*r.errorRetryInterval;setTimeout(n,a,i)}},errorRetryInterval:1e3*(f?10:5),focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:1e3*(f?5:3),refreshInterval:0,revalidateOnFocus:!0,revalidateOnReconnect:!0,refreshWhenHidden:!1,refreshWhenOffline:!1,shouldRetryOnError:!0,suspense:!1,compare:function e(t,r){var n,o;if(t===r)return!0;if(t&&r&&(n=t.constructor)===r.constructor){if(n===Date)return t.getTime()===r.getTime();if(n===RegExp)return t.toString()===r.toString();if(n===Array){if((o=t.length)===r.length)for(;o--&&e(t[o],r[o]););return-1===o}if(!n||"object"===typeof t){for(n in o=0,t){if(i.call(t,n)&&++o&&!i.call(r,n))return!1;if(!(n in r)||!e(t[n],r[n]))return!1}return Object.keys(r).length===o}}return t!==t&&r!==r},isPaused:function(){return!1}},s),h="undefined"===typeof window||!!("undefined"!==typeof Deno&&Deno&&Deno.version&&Deno.version.deno),m=h?null:window.requestAnimationFrame?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout(e,1)},v=h?n.useEffect:n.useLayoutEffect,b=(0,n.createContext)({});b.displayName="SWRConfigContext";var g=b,y=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(t){o(t)}}function c(e){try{u(n.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}u((n=n.apply(e,t||[])).next())}))},k=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(c){o=[6,c],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}},w={},x={},C={},Z={},E={},O={},z={},B=function(){var e=0;return function(){return++e}}();if(!h){var S=function(e){if(p.isDocumentVisible()&&p.isOnline())for(var t in e)e[t][0]&&e[t][0]()};"function"===typeof p.registerOnFocus&&p.registerOnFocus((function(){return S(C)})),"function"===typeof p.registerOnReconnect&&p.registerOnReconnect((function(){return S(Z)}))}var P=function(e,t){void 0===t&&(t=!0);var r=d.serializeKey(e),n=r[0],i=r[2],o=r[3];if(!n)return Promise.resolve();var a=E[n];if(n&&a){for(var c=d.get(n),u=d.get(i),s=d.get(o),l=[],f=0;f<a.length;++f)l.push(a[f](t,c,u,s,f>0));return Promise.all(l).then((function(){return d.get(n)}))}return Promise.resolve(d.get(n))},I=function(e,t,r,n){var i=E[e];if(e&&i)for(var o=0;o<i.length;++o)i[o](!1,t,r,n)},$=function(e,t,r){return void 0===r&&(r=!0),y(void 0,void 0,void 0,(function(){var n,i,o,a,c,u,s,l,f,p,h,m,v;return k(this,(function(b){switch(b.label){case 0:if(n=d.serializeKey(e),i=n[0],o=n[2],!i)return[2];if("undefined"===typeof t)return[2,P(e,r)];if(O[i]=B()-1,z[i]=0,a=O[i],c=x[i],l=!1,t&&"function"===typeof t)try{t=t(d.get(i))}catch(g){t=void 0,s=g}if(!t||"function"!==typeof t.then)return[3,5];l=!0,b.label=1;case 1:return b.trys.push([1,3,,4]),[4,t];case 2:return u=b.sent(),[3,4];case 3:return f=b.sent(),s=f,[3,4];case 4:return[3,6];case 5:u=t,b.label=6;case 6:if((p=function(){if(a!==O[i]||c!==x[i]){if(s)throw s;return!0}})())return[2,u];if("undefined"!==typeof u&&d.set(i,u),d.set(o,s),z[i]=B()-1,!l&&p())return[2,u];if(h=E[i]){for(m=[],v=0;v<h.length;++v)m.push(h[v](!!r,u,s,void 0,v>0));return[2,Promise.all(m).then((function(){if(s)throw s;return d.get(i)}))]}if(s)throw s;return[2,u]}}))}))};Object.defineProperty(g.Provider,"default",{value:p});g.Provider;var R=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0],o=Object.assign({},p,(0,n.useContext)(g),t.length>2?t[2]:2===t.length&&"object"===typeof t[1]?t[1]:{}),a=t.length>2||2===t.length&&"function"===typeof t[1]||null===t[1]?t[1]:o.fetcher,c=d.serializeKey(i),u=c[0],s=c[1],l=c[2],f=c[3],b=(0,n.useRef)(o);v((function(){b.current=o}));var S=function(){return o.revalidateOnMount||!o.initialData&&void 0===o.revalidateOnMount},P=function(){var e=d.get(u);return"undefined"===typeof e?o.initialData:e},R=function(){return!!d.get(f)||u&&S()},M=P(),F=d.get(l),T=R(),V=(0,n.useRef)({data:!1,error:!1,isValidating:!1}),D=(0,n.useRef)({data:M,error:F,isValidating:T});(0,n.useDebugValue)(D.current.data);var L,N,j=(0,n.useState)({})[1],q=(0,n.useCallback)((function(e){var t=!1;for(var r in e)D.current[r]!==e[r]&&(D.current[r]=e[r],V.current[r]&&(t=!0));if(t){if(A.current||!K.current)return;j({})}}),[]),A=(0,n.useRef)(!1),H=(0,n.useRef)(u),K=(0,n.useRef)(!1),W=(0,n.useCallback)((function(e){for(var t,r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];A.current||K.current&&u===H.current&&(t=b.current)[e].apply(t,r)}),[u]),G=(0,n.useCallback)((function(e,t){return $(H.current,e,t)}),[]),_=function(e,t){return e[u]?e[u].push(t):e[u]=[t],function(){var r=e[u],n=r.indexOf(t);n>=0&&(r[n]=r[r.length-1],r.pop())}},X=(0,n.useCallback)((function(t){return void 0===t&&(t={}),y(e,void 0,void 0,(function(){var e,r,n,i,c,p,h,m,v,g;return k(this,(function(y){switch(y.label){case 0:if(!u||!a)return[2,!1];if(A.current)return[2,!1];if(b.current.isPaused())return[2,!1];e=t.retryCount,r=void 0===e?0:e,n=t.dedupe,i=void 0!==n&&n,c=!0,p="undefined"!==typeof w[u]&&i,y.label=1;case 1:return y.trys.push([1,6,,7]),q({isValidating:!0}),d.set(f,!0),p||I(u,D.current.data,D.current.error,!0),h=void 0,m=void 0,p?(m=x[u],[4,w[u]]):[3,3];case 2:return h=y.sent(),[3,5];case 3:return o.loadingTimeout&&!d.get(u)&&setTimeout((function(){c&&W("onLoadingSlow",u,o)}),o.loadingTimeout),w[u]=null!==s?a.apply(void 0,s):a(u),x[u]=m=B(),[4,w[u]];case 4:h=y.sent(),setTimeout((function(){delete w[u],delete x[u]}),o.dedupingInterval),W("onSuccess",h,u,o),y.label=5;case 5:return x[u]>m?[2,!1]:O[u]&&(m<=O[u]||m<=z[u]||0===z[u])?(q({isValidating:!1}),[2,!1]):(d.set(l,void 0),d.set(f,!1),v={isValidating:!1},"undefined"!==typeof D.current.error&&(v.error=void 0),o.compare(D.current.data,h)||(v.data=h),o.compare(d.get(u),h)||d.set(u,h),q(v),p||I(u,h,v.error,!1),[3,7]);case 6:return g=y.sent(),delete w[u],delete x[u],b.current.isPaused()?(q({isValidating:!1}),[2,!1]):(d.set(l,g),D.current.error!==g&&(q({isValidating:!1,error:g}),p||I(u,void 0,g,!1)),W("onError",g,u,o),o.shouldRetryOnError&&W("onErrorRetry",g,u,o,X,{retryCount:r+1,dedupe:!0}),[3,7]);case 7:return c=!1,[2,!0]}}))}))}),[u]);if(v((function(){if(u){A.current=!1;var e=K.current;K.current=!0;var t=D.current.data,r=P();H.current=u,o.compare(t,r)||q({data:r});var n=function(){return X({dedupe:!0})};(e||S())&&("undefined"===typeof r||h?n():m(n));var i=!1,a=_(C,(function(){!i&&b.current.revalidateOnFocus&&(i=!0,n(),setTimeout((function(){return i=!1}),b.current.focusThrottleInterval))})),c=_(Z,(function(){b.current.revalidateOnReconnect&&n()})),s=_(E,(function(e,t,r,i,a){void 0===e&&(e=!0),void 0===a&&(a=!0);var c={},u=!1;return"undefined"===typeof t||o.compare(D.current.data,t)||(c.data=t,u=!0),D.current.error!==r&&(c.error=r,u=!0),"undefined"!==typeof i&&D.current.isValidating!==i&&(c.isValidating=i,u=!0),u&&q(c),!!e&&(a?n():X())}));return function(){q=function(){return null},A.current=!0,a(),c(),s()}}}),[u,X]),v((function(){var t=null,r=function(){return y(e,void 0,void 0,(function(){return k(this,(function(e){switch(e.label){case 0:return D.current.error||!b.current.refreshWhenHidden&&!b.current.isDocumentVisible()||!b.current.refreshWhenOffline&&!b.current.isOnline()?[3,2]:[4,X({dedupe:!0})];case 1:e.sent(),e.label=2;case 2:return b.current.refreshInterval&&t&&(t=setTimeout(r,b.current.refreshInterval)),[2]}}))}))};return b.current.refreshInterval&&(t=setTimeout(r,b.current.refreshInterval)),function(){t&&(clearTimeout(t),t=null)}}),[o.refreshInterval,o.refreshWhenHidden,o.refreshWhenOffline,X]),o.suspense){if(L=d.get(u),N=d.get(l),"undefined"===typeof L&&(L=M),"undefined"===typeof N&&(N=F),"undefined"===typeof L&&"undefined"===typeof N){if(w[u]||X(),w[u]&&"function"===typeof w[u].then)throw w[u];L=w[u]}if("undefined"===typeof L&&N)throw N}var Y=(0,n.useMemo)((function(){var e={revalidate:X,mutate:G};return Object.defineProperties(e,{error:{get:function(){return V.current.error=!0,o.suspense?N:H.current===u?D.current.error:F},enumerable:!0},data:{get:function(){return V.current.data=!0,o.suspense?L:H.current===u?D.current.data:M},enumerable:!0},isValidating:{get:function(){return V.current.isValidating=!0,!!u&&D.current.isValidating},enumerable:!0}}),e}),[X,M,F,G,u,o.suspense,N,L]);return Y}}}]); |