From 3f780647b2be5ef72c328776e81846f16c692489 Mon Sep 17 00:00:00 2001 From: Rizky Date: Fri, 3 May 2024 15:34:53 +0700 Subject: [PATCH] check point --- app/srv/core/main.js | 66 ++-- app/srv/ws/sync/code/parts/init/frontend.ts | 72 +++- app/srv/ws/sync/code/parts/internal.ts | 2 +- app/web/src/base/page/editor.tsx | 150 ------- app/web/src/base/page/live.tsx | 34 -- app/web/src/base/pages.ts | 8 - app/web/src/index.tsx | 2 - .../ed/panel/tree/node/item/action/clone.tsx | 2 +- .../ed/panel/tree/node/item/action/detach.tsx | 2 +- .../ed/panel/tree/node/item/action/paste.tsx | 2 +- app/web/src/render/live/dev-loader.tsx | 121 ------ app/web/src/render/live/elements/l-item.tsx | 37 -- app/web/src/render/live/elements/l-page.tsx | 73 ---- app/web/src/render/live/elements/l-render.tsx | 243 ------------ .../src/render/live/elements/l-section.tsx | 15 - app/web/src/render/live/elements/l-text.tsx | 34 -- app/web/src/render/live/live.tsx | 83 ---- app/web/src/render/live/logic/comp.ts | 139 ------- app/web/src/render/live/logic/global.ts | 135 ------- app/web/src/render/live/logic/init.tsx | 153 -------- app/web/src/render/live/logic/layout.tsx | 36 -- app/web/src/render/live/logic/mobile.ts | 164 -------- app/web/src/render/live/logic/route.ts | 169 -------- app/web/src/render/live/logic/tree-logic.tsx | 189 --------- app/web/src/render/live/logic/tree-prop.tsx | 106 ----- app/web/src/render/live/logic/tree-scope.tsx | 369 ------------------ app/web/src/render/site/mobile-loader.tsx | 66 ---- app/web/src/render/site/site-loader.tsx | 59 --- app/web/src/render/site/site.tsx | 55 --- app/web/src/utils/types/general.ts | 2 +- 30 files changed, 101 insertions(+), 2487 deletions(-) delete mode 100644 app/web/src/base/page/editor.tsx delete mode 100644 app/web/src/base/page/live.tsx delete mode 100644 app/web/src/render/live/dev-loader.tsx delete mode 100644 app/web/src/render/live/elements/l-item.tsx delete mode 100644 app/web/src/render/live/elements/l-page.tsx delete mode 100644 app/web/src/render/live/elements/l-render.tsx delete mode 100644 app/web/src/render/live/elements/l-section.tsx delete mode 100644 app/web/src/render/live/elements/l-text.tsx delete mode 100644 app/web/src/render/live/live.tsx delete mode 100644 app/web/src/render/live/logic/comp.ts delete mode 100644 app/web/src/render/live/logic/global.ts delete mode 100644 app/web/src/render/live/logic/init.tsx delete mode 100644 app/web/src/render/live/logic/layout.tsx delete mode 100644 app/web/src/render/live/logic/mobile.ts delete mode 100644 app/web/src/render/live/logic/route.ts delete mode 100644 app/web/src/render/live/logic/tree-logic.tsx delete mode 100644 app/web/src/render/live/logic/tree-prop.tsx delete mode 100644 app/web/src/render/live/logic/tree-scope.tsx delete mode 100644 app/web/src/render/site/mobile-loader.tsx delete mode 100644 app/web/src/render/site/site-loader.tsx delete mode 100644 app/web/src/render/site/site.tsx diff --git a/app/srv/core/main.js b/app/srv/core/main.js index 29712fe7..798d0dd5 100644 --- a/app/srv/core/main.js +++ b/app/srv/core/main.js @@ -1,11 +1,11 @@ -var Pv=Object.create;var Aa=Object.defineProperty;var Lv=Object.getOwnPropertyDescriptor;var Mv=Object.getOwnPropertyNames;var zv=Object.getPrototypeOf,Dv=Object.prototype.hasOwnProperty;var J=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),jv=(e,t)=>{for(var n in t)Aa(e,n,{get:t[n],enumerable:!0})},Fv=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Mv(t))!Dv.call(e,i)&&i!==n&&Aa(e,i,{get:()=>t[i],enumerable:!(r=Lv(t,i))||r.enumerable});return e};var A=(e,t,n)=>(n=e!=null?Pv(zv(e)):{},Fv(t||!e||!e.__esModule?Aa(n,"default",{value:e,enumerable:!0}):n,e));var ip=J(j=>{"use strict";var ki=Symbol.for("react.element"),Uv=Symbol.for("react.portal"),Bv=Symbol.for("react.fragment"),$v=Symbol.for("react.strict_mode"),Hv=Symbol.for("react.profiler"),Vv=Symbol.for("react.provider"),Wv=Symbol.for("react.context"),Zv=Symbol.for("react.forward_ref"),Gv=Symbol.for("react.suspense"),Kv=Symbol.for("react.memo"),Qv=Symbol.for("react.lazy"),Kd=Symbol.iterator;function Xv(e){return e===null||typeof e!="object"?null:(e=Kd&&e[Kd]||e["@@iterator"],typeof e=="function"?e:null)}var qd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Yd=Object.assign,Jd={};function vr(e,t,n){this.props=e,this.context=t,this.refs=Jd,this.updater=n||qd}vr.prototype.isReactComponent={};vr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};vr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ep(){}ep.prototype=vr.prototype;function La(e,t,n){this.props=e,this.context=t,this.refs=Jd,this.updater=n||qd}var Ma=La.prototype=new ep;Ma.constructor=La;Yd(Ma,vr.prototype);Ma.isPureReactComponent=!0;var Qd=Array.isArray,tp=Object.prototype.hasOwnProperty,za={current:null},np={key:!0,ref:!0,__self:!0,__source:!0};function rp(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)tp.call(t,r)&&!np.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1{"use strict";op.exports=ip()});var hp=J(K=>{"use strict";function Ba(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rdl(s,n))cdl(a,s)?(e[r]=a,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else if(cdl(a,n))e[r]=a,e[c]=n,r=c;else break e}}return t}function dl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(lp=performance,K.unstable_now=function(){return lp.now()}):(ja=Date,sp=ja.now(),K.unstable_now=function(){return ja.now()-sp});var lp,ja,sp,St=[],ln=[],tw=1,et=null,ke=3,hl=!1,Hn=!1,Ei=!1,cp=typeof setTimeout=="function"?setTimeout:null,fp=typeof clearTimeout=="function"?clearTimeout:null,ap=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function $a(e){for(var t=pt(ln);t!==null;){if(t.callback===null)ml(ln);else if(t.startTime<=e)ml(ln),t.sortIndex=t.expirationTime,Ba(St,t);else break;t=pt(ln)}}function Ha(e){if(Ei=!1,$a(e),!Hn)if(pt(St)!==null)Hn=!0,Wa(Va);else{var t=pt(ln);t!==null&&Za(Ha,t.startTime-e)}}function Va(e,t){Hn=!1,Ei&&(Ei=!1,fp(bi),bi=-1),hl=!0;var n=ke;try{for($a(t),et=pt(St);et!==null&&(!(et.expirationTime>t)||e&&!mp());){var r=et.callback;if(typeof r=="function"){et.callback=null,ke=et.priorityLevel;var i=r(et.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?et.callback=i:et===pt(St)&&ml(St),$a(t)}else ml(St);et=pt(St)}if(et!==null)var o=!0;else{var l=pt(ln);l!==null&&Za(Ha,l.startTime-t),o=!1}return o}finally{et=null,ke=n,hl=!1}}var gl=!1,pl=null,bi=-1,dp=5,pp=-1;function mp(){return!(K.unstable_now()-ppe||125r?(e.sortIndex=n,Ba(ln,e),pt(St)===null&&e===pt(ln)&&(Ei?(fp(bi),bi=-1):Ei=!0,Za(Ha,n-r))):(e.sortIndex=i,Ba(St,e),Hn||hl||(Hn=!0,Wa(Va))),e};K.unstable_shouldYield=mp;K.unstable_wrapCallback=function(e){var t=ke;return function(){var n=ke;ke=t;try{return e.apply(this,arguments)}finally{ke=n}}}});var yp=J((qC,gp)=>{"use strict";gp.exports=hp()});var S0=J(qe=>{"use strict";var Em=ge(),Qe=yp();function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hu=Object.prototype.hasOwnProperty,nw=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,_p={},vp={};function rw(e){return hu.call(vp,e)?!0:hu.call(_p,e)?!1:nw.test(e)?vp[e]=!0:(_p[e]=!0,!1)}function iw(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ow(e,t,n,r){if(t===null||typeof t>"u"||iw(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ae(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new Ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new Ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Ae(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ve[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var sc=/[\-:]([a-z])/g;function ac(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(sc,ac);ve[t]=new Ae(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(sc,ac);ve[t]=new Ae(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(sc,ac);ve[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function uc(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(i!==null?i.type!==0:r||!(2()=>(t||e((t={exports:{}}).exports,t),t.exports),Ev=(e,t)=>{for(var n in t)Na(e,n,{get:t[n],enumerable:!0})},bv=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of xv(t))!Sv.call(e,i)&&i!==n&&Na(e,i,{get:()=>t[i],enumerable:!(r=wv(t,i))||r.enumerable});return e};var A=(e,t,n)=>(n=e!=null?vv(kv(e)):{},bv(t||!e||!e.__esModule?Na(n,"default",{value:e,enumerable:!0}):n,e));var Jd=ie(j=>{"use strict";var xi=Symbol.for("react.element"),Rv=Symbol.for("react.portal"),Cv=Symbol.for("react.fragment"),Tv=Symbol.for("react.strict_mode"),Nv=Symbol.for("react.profiler"),Ov=Symbol.for("react.provider"),Iv=Symbol.for("react.context"),Av=Symbol.for("react.forward_ref"),Pv=Symbol.for("react.suspense"),Lv=Symbol.for("react.memo"),zv=Symbol.for("react.lazy"),Hd=Symbol.iterator;function Dv(e){return e===null||typeof e!="object"?null:(e=Hd&&e[Hd]||e["@@iterator"],typeof e=="function"?e:null)}var Zd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Gd=Object.assign,Kd={};function _r(e,t,n){this.props=e,this.context=t,this.refs=Kd,this.updater=n||Zd}_r.prototype.isReactComponent={};_r.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_r.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qd(){}Qd.prototype=_r.prototype;function Ia(e,t,n){this.props=e,this.context=t,this.refs=Kd,this.updater=n||Zd}var Aa=Ia.prototype=new Qd;Aa.constructor=Ia;Gd(Aa,_r.prototype);Aa.isPureReactComponent=!0;var Vd=Array.isArray,Xd=Object.prototype.hasOwnProperty,Pa={current:null},qd={key:!0,ref:!0,__self:!0,__source:!0};function Yd(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)Xd.call(t,r)&&!qd.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1{"use strict";ep.exports=Jd()});var cp=ie(K=>{"use strict";function ja(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rul(s,n))cul(a,s)?(e[r]=a,e[c]=n,r=c):(e[r]=s,e[l]=n,r=l);else if(cul(a,n))e[r]=a,e[c]=n,r=c;else break e}}return t}function ul(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(tp=performance,K.unstable_now=function(){return tp.now()}):(za=Date,np=za.now(),K.unstable_now=function(){return za.now()-np});var tp,za,np,St=[],ln=[],Bv=1,et=null,ke=3,dl=!1,$n=!1,Si=!1,op=typeof setTimeout=="function"?setTimeout:null,lp=typeof clearTimeout=="function"?clearTimeout:null,rp=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Fa(e){for(var t=pt(ln);t!==null;){if(t.callback===null)fl(ln);else if(t.startTime<=e)fl(ln),t.sortIndex=t.expirationTime,ja(St,t);else break;t=pt(ln)}}function Ua(e){if(Si=!1,Fa(e),!$n)if(pt(St)!==null)$n=!0,$a(Ba);else{var t=pt(ln);t!==null&&Ha(Ua,t.startTime-e)}}function Ba(e,t){$n=!1,Si&&(Si=!1,lp(Ei),Ei=-1),dl=!0;var n=ke;try{for(Fa(t),et=pt(St);et!==null&&(!(et.expirationTime>t)||e&&!up());){var r=et.callback;if(typeof r=="function"){et.callback=null,ke=et.priorityLevel;var i=r(et.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?et.callback=i:et===pt(St)&&fl(St),Fa(t)}else fl(St);et=pt(St)}if(et!==null)var o=!0;else{var l=pt(ln);l!==null&&Ha(Ua,l.startTime-t),o=!1}return o}finally{et=null,ke=n,dl=!1}}var pl=!1,cl=null,Ei=-1,sp=5,ap=-1;function up(){return!(K.unstable_now()-ape||125r?(e.sortIndex=n,ja(ln,e),pt(St)===null&&e===pt(ln)&&(Si?(lp(Ei),Ei=-1):Si=!0,Ha(Ua,n-r))):(e.sortIndex=i,ja(St,e),$n||dl||($n=!0,$a(Ba))),e};K.unstable_shouldYield=up;K.unstable_wrapCallback=function(e){var t=ke;return function(){var n=ke;ke=t;try{return e.apply(this,arguments)}finally{ke=n}}}});var dp=ie((TC,fp)=>{"use strict";fp.exports=cp()});var _0=ie(qe=>{"use strict";var vm=ge(),Qe=dp();function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),du=Object.prototype.hasOwnProperty,$v=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pp={},mp={};function Hv(e){return du.call(mp,e)?!0:du.call(pp,e)?!1:$v.test(e)?mp[e]=!0:(pp[e]=!0,!1)}function Vv(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Wv(e,t,n,r){if(t===null||typeof t>"u"||Vv(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ae(e,t,n,r,i,o,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=l}var ve={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ve[e]=new Ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ve[t]=new Ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Ae(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ve[e]=new Ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var ic=/[\-:]([a-z])/g;function oc(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(ic,oc);ve[t]=new Ae(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(ic,oc);ve[t]=new Ae(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(ic,oc);ve[t]=new Ae(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Ae(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Ae("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Ae(e,1,!1,e.toLowerCase(),null,!0,!0)});function lc(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(i!==null?i.type!==0:r||!(2s||i[l]!==o[s]){var c=` -`+i[l].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{Ka=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Li(e):""}function lw(e){switch(e.tag){case 5:return Li(e.type);case 16:return Li("Lazy");case 13:return Li("Suspense");case 19:return Li("SuspenseList");case 0:case 2:case 15:return e=Qa(e.type,!1),e;case 11:return e=Qa(e.type.render,!1),e;case 1:return e=Qa(e.type,!0),e;default:return""}}function vu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sr:return"Fragment";case kr:return"Portal";case gu:return"Profiler";case cc:return"StrictMode";case yu:return"Suspense";case _u:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cm:return(e.displayName||"Context")+".Consumer";case Rm:return(e._context.displayName||"Context")+".Provider";case fc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dc:return t=e.displayName||null,t!==null?t:vu(e.type)||"Memo";case an:t=e._payload,e=e._init;try{return vu(e(t))}catch{}}return null}function sw(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return vu(t);case 8:return t===cc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nm(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function aw(e){var t=Nm(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _l(e){e._valueTracker||(e._valueTracker=aw(e))}function Im(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Nm(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function wu(e,t){var n=t.checked;return ie({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function xp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Om(e,t){t=t.checked,t!=null&&uc(e,"checked",t,!1)}function xu(e,t){Om(e,t);var n=kn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ku(e,t.type,n):t.hasOwnProperty("defaultValue")&&ku(e,t.type,kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function kp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ku(e,t,n){(t!=="number"||Zl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mi=Array.isArray;function Lr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=vl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ki(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ji={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},uw=["Webkit","ms","Moz","O"];Object.keys(ji).forEach(function(e){uw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ji[t]=ji[e]})});function Mm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ji.hasOwnProperty(e)&&ji[e]?(""+t).trim():t+"px"}function zm(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Mm(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var cw=ie({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bu(e,t){if(t){if(cw[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Ru(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cu=null;function pc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Tu=null,Mr=null,zr=null;function bp(e){if(e=po(e)){if(typeof Tu!="function")throw Error(E(280));var t=e.stateNode;t&&(t=ws(t),Tu(e.stateNode,e.type,t))}}function Dm(e){Mr?zr?zr.push(e):zr=[e]:Mr=e}function jm(){if(Mr){var e=Mr,t=zr;if(zr=Mr=null,bp(e),t)for(e=0;e>>=0,e===0?32:31-(xw(e)/kw|0)|0}var wl=64,xl=4194304;function zi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Xl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=zi(s):(o&=l,o!==0&&(r=zi(o)))}else l=n&~i,l!==0?r=zi(l):o!==0&&(r=zi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function co(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function Rw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ui),Lp=" ",Mp=!1;function ih(e,t){switch(e){case"keyup":return ex.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Er=!1;function nx(e,t){switch(e){case"compositionend":return oh(t);case"keypress":return t.which!==32?null:(Mp=!0,Lp);case"textInput":return e=t.data,e===Lp&&Mp?null:e;default:return null}}function rx(e,t){if(Er)return e==="compositionend"||!xc&&ih(e,t)?(e=nh(),Dl=_c=dn=null,Er=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=jp(n)}}function uh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?uh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ch(){for(var e=window,t=Zl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zl(e.document)}return t}function kc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function px(e){var t=ch(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&uh(n.ownerDocument.documentElement,n)){if(r!==null&&kc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Fp(n,o);var l=Fp(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,br=null,Lu=null,$i=null,Mu=!1;function Up(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Mu||br==null||br!==Zl(r)||(r=br,"selectionStart"in r&&kc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$i&&eo($i,r)||($i=r,r=Jl(Lu,"onSelect"),0Tr||(e.current=Bu[Tr],Bu[Tr]=null,Tr--)}function Q(e,t){Tr++,Bu[Tr]=e.current,e.current=t}var Sn={},Re=bn(Sn),Ue=bn(!1),qn=Sn;function Br(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Be(e){return e=e.childContextTypes,e!=null}function ts(){Y(Ue),Y(Re)}function Qp(e,t,n){if(Re.current!==Sn)throw Error(E(168));Q(Re,t),Q(Ue,n)}function vh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,sw(e)||"Unknown",i));return ie({},n,r)}function ns(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,qn=Re.current,Q(Re,e),Q(Ue,Ue.current),!0}function Xp(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=vh(e,t,qn),r.__reactInternalMemoizedMergedChildContext=e,Y(Ue),Y(Re),Q(Re,e)):Y(Ue),Q(Ue,n)}var Ft=null,xs=!1,lu=!1;function wh(e){Ft===null?Ft=[e]:Ft.push(e)}function Sx(e){xs=!0,wh(e)}function Rn(){if(!lu&&Ft!==null){lu=!0;var e=0,t=W;try{var n=Ft;for(W=1;e>=l,i-=l,Ut=1<<32-_t(t)+i|n<b?(I=k,k=null):I=k.sibling;var C=f(h,k,y[b],v);if(C===null){k===null&&(k=I);break}e&&k&&C.alternate===null&&t(h,k),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C,k=I}if(b===y.length)return n(h,k),ee&&Vn(h,b),S;if(k===null){for(;bb?(I=k,k=null):I=k.sibling;var O=f(h,k,C.value,v);if(O===null){k===null&&(k=I);break}e&&k&&O.alternate===null&&t(h,k),m=o(O,m,b),R===null?S=O:R.sibling=O,R=O,k=I}if(C.done)return n(h,k),ee&&Vn(h,b),S;if(k===null){for(;!C.done;b++,C=y.next())C=d(h,C.value,v),C!==null&&(m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return ee&&Vn(h,b),S}for(k=r(h,k);!C.done;b++,C=y.next())C=p(k,h,b,C.value,v),C!==null&&(e&&C.alternate!==null&&k.delete(C.key===null?b:C.key),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return e&&k.forEach(function(De){return t(h,De)}),ee&&Vn(h,b),S}function x(h,m,y,v){if(typeof y=="object"&&y!==null&&y.type===Sr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case yl:e:{for(var S=y.key,R=m;R!==null;){if(R.key===S){if(S=y.type,S===Sr){if(R.tag===7){n(h,R.sibling),m=i(R,y.props.children),m.return=h,h=m;break e}}else if(R.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===an&&rm(S)===R.type){n(h,R.sibling),m=i(R,y.props),m.ref=Ii(h,R,y),m.return=h,h=m;break e}n(h,R);break}else t(h,R);R=R.sibling}y.type===Sr?(m=Xn(y.props.children,h.mode,v,y.key),m.return=h,h=m):(v=Wl(y.type,y.key,y.props,null,h.mode,v),v.ref=Ii(h,m,y),v.return=h,h=v)}return l(h);case kr:e:{for(R=y.key;m!==null;){if(m.key===R)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=mu(y,h.mode,v),m.return=h,h=m}return l(h);case an:return R=y._init,x(h,m,R(y._payload),v)}if(Mi(y))return g(h,m,y,v);if(Ri(y))return _(h,m,y,v);Al(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,y),m.return=h,h=m):(n(h,m),m=pu(y,h.mode,v),m.return=h,h=m),l(h)):n(h,m)}return x}var Hr=Th(!0),Nh=Th(!1),mo={},Tt=bn(mo),io=bn(mo),oo=bn(mo);function Kn(e){if(e===mo)throw Error(E(174));return e}function Oc(e,t){switch(Q(oo,t),Q(io,e),Q(Tt,mo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Eu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Eu(t,e)}Y(Tt),Q(Tt,t)}function Vr(){Y(Tt),Y(io),Y(oo)}function Ih(e){Kn(oo.current);var t=Kn(Tt.current),n=Eu(t,e.type);t!==n&&(Q(io,e),Q(Tt,n))}function Ac(e){io.current===e&&(Y(Tt),Y(io))}var ne=bn(0);function as(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var su=[];function Pc(){for(var e=0;en?n:4,e(!0);var r=au.transition;au.transition={};try{e(!1),t()}finally{W=n,au.transition=r}}function Zh(){return lt().memoizedState}function Cx(e,t,n){var r=wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Gh(e))Kh(t,n);else if(n=Eh(e,t,n,r),n!==null){var i=Oe();vt(n,e,r,i),Qh(n,t,r)}}function Tx(e,t,n){var r=wn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gh(e))Kh(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,wt(s,l)){var c=t.interleaved;c===null?(i.next=i,Nc(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Eh(e,t,i,r),n!==null&&(i=Oe(),vt(n,e,r,i),Qh(n,t,r))}}function Gh(e){var t=e.alternate;return e===re||t!==null&&t===re}function Kh(e,t){Hi=us=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,hc(e,n)}}var cs={readContext:ot,useCallback:Se,useContext:Se,useEffect:Se,useImperativeHandle:Se,useInsertionEffect:Se,useLayoutEffect:Se,useMemo:Se,useReducer:Se,useRef:Se,useState:Se,useDebugValue:Se,useDeferredValue:Se,useTransition:Se,useMutableSource:Se,useSyncExternalStore:Se,useId:Se,unstable_isNewReconciler:!1},Nx={readContext:ot,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:om,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Bl(4194308,4,Bh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Bl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bl(4,2,e,t)},useMemo:function(e,t){var n=bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Cx.bind(null,re,e),[r.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:im,useDebugValue:jc,useDeferredValue:function(e){return bt().memoizedState=e},useTransition:function(){var e=im(!1),t=e[0];return e=Rx.bind(null,e[1]),bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=re,i=bt();if(ee){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),me===null)throw Error(E(349));Jn&30||Ph(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,om(Mh.bind(null,r,o,e),[e]),r.flags|=2048,ao(9,Lh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=bt(),t=me.identifierPrefix;if(ee){var n=Bt,r=Ut;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=lo++,0")&&(c=c.replace("",e.displayName)),c}while(1<=l&&0<=s);break}}}finally{Wa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pi(e):""}function Zv(e){switch(e.tag){case 5:return Pi(e.type);case 16:return Pi("Lazy");case 13:return Pi("Suspense");case 19:return Pi("SuspenseList");case 0:case 2:case 15:return e=Za(e.type,!1),e;case 11:return e=Za(e.type.render,!1),e;case 1:return e=Za(e.type,!0),e;default:return""}}function gu(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case kr:return"Fragment";case xr:return"Portal";case pu:return"Profiler";case sc:return"StrictMode";case mu:return"Suspense";case hu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case km:return(e.displayName||"Context")+".Consumer";case xm:return(e._context.displayName||"Context")+".Provider";case ac:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uc:return t=e.displayName||null,t!==null?t:gu(e.type)||"Memo";case an:t=e._payload,e=e._init;try{return gu(e(t))}catch{}}return null}function Gv(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return gu(t);case 8:return t===sc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function kn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Em(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kv(e){var t=Em(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function hl(e){e._valueTracker||(e._valueTracker=Kv(e))}function bm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Em(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Hl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yu(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function gp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=kn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Rm(e,t){t=t.checked,t!=null&&lc(e,"checked",t,!1)}function _u(e,t){Rm(e,t);var n=kn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?vu(e,t.type,n):t.hasOwnProperty("defaultValue")&&vu(e,t.type,kn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function yp(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function vu(e,t,n){(t!=="number"||Hl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Li=Array.isArray;function Pr(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Mi={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qv=["Webkit","ms","Moz","O"];Object.keys(Mi).forEach(function(e){Qv.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mi[t]=Mi[e]})});function Om(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Mi.hasOwnProperty(e)&&Mi[e]?(""+t).trim():t+"px"}function Im(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Om(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Xv=re({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ku(e,t){if(t){if(Xv[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Su(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Eu=null;function cc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bu=null,Lr=null,zr=null;function wp(e){if(e=fo(e)){if(typeof bu!="function")throw Error(E(280));var t=e.stateNode;t&&(t=ys(t),bu(e.stateNode,e.type,t))}}function Am(e){Lr?zr?zr.push(e):zr=[e]:Lr=e}function Pm(){if(Lr){var e=Lr,t=zr;if(zr=Lr=null,wp(e),t)for(e=0;e>>=0,e===0?32:31-(sw(e)/aw|0)|0}var yl=64,_l=4194304;function zi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Gl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~i;s!==0?r=zi(s):(o&=l,o!==0&&(r=zi(o)))}else l=n&~i,l!==0?r=zi(l):o!==0&&(r=zi(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function uo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-_t(t),e[t]=n}function dw(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Fi),Np=" ",Op=!1;function Jm(e,t){switch(e){case"keyup":return Uw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function eh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sr=!1;function $w(e,t){switch(e){case"compositionend":return eh(t);case"keypress":return t.which!==32?null:(Op=!0,Np);case"textInput":return e=t.data,e===Np&&Op?null:e;default:return null}}function Hw(e,t){if(Sr)return e==="compositionend"||!_c&&Jm(e,t)?(e=qm(),Ll=hc=dn=null,Sr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pp(n)}}function ih(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ih(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oh(){for(var e=window,t=Hl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hl(e.document)}return t}function vc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Yw(e){var t=oh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ih(n.ownerDocument.documentElement,n)){if(r!==null&&vc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Lp(n,o);var l=Lp(n,r);i&&l&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Er=null,Iu=null,Bi=null,Au=!1;function zp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Au||Er==null||Er!==Hl(r)||(r=Er,"selectionStart"in r&&vc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Bi&&Ji(Bi,r)||(Bi=r,r=Xl(Iu,"onSelect"),0Cr||(e.current=ju[Cr],ju[Cr]=null,Cr--)}function Q(e,t){Cr++,ju[Cr]=e.current,e.current=t}var Sn={},Re=bn(Sn),Ue=bn(!1),Xn=Sn;function Ur(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Be(e){return e=e.childContextTypes,e!=null}function Yl(){Y(Ue),Y(Re)}function Vp(e,t,n){if(Re.current!==Sn)throw Error(E(168));Q(Re,t),Q(Ue,n)}function mh(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(E(108,Gv(e)||"Unknown",i));return re({},n,r)}function Jl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Xn=Re.current,Q(Re,e),Q(Ue,Ue.current),!0}function Wp(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=mh(e,t,Xn),r.__reactInternalMemoizedMergedChildContext=e,Y(Ue),Y(Re),Q(Re,e)):Y(Ue),Q(Ue,n)}var Ft=null,_s=!1,ru=!1;function hh(e){Ft===null?Ft=[e]:Ft.push(e)}function ax(e){_s=!0,hh(e)}function Rn(){if(!ru&&Ft!==null){ru=!0;var e=0,t=W;try{var n=Ft;for(W=1;e>=l,i-=l,Ut=1<<32-_t(t)+i|n<b?(O=k,k=null):O=k.sibling;var C=f(h,k,y[b],v);if(C===null){k===null&&(k=O);break}e&&k&&C.alternate===null&&t(h,k),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C,k=O}if(b===y.length)return n(h,k),J&&Hn(h,b),S;if(k===null){for(;bb?(O=k,k=null):O=k.sibling;var I=f(h,k,C.value,v);if(I===null){k===null&&(k=O);break}e&&k&&I.alternate===null&&t(h,k),m=o(I,m,b),R===null?S=I:R.sibling=I,R=I,k=O}if(C.done)return n(h,k),J&&Hn(h,b),S;if(k===null){for(;!C.done;b++,C=y.next())C=d(h,C.value,v),C!==null&&(m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return J&&Hn(h,b),S}for(k=r(h,k);!C.done;b++,C=y.next())C=p(k,h,b,C.value,v),C!==null&&(e&&C.alternate!==null&&k.delete(C.key===null?b:C.key),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C);return e&&k.forEach(function(Me){return t(h,Me)}),J&&Hn(h,b),S}function x(h,m,y,v){if(typeof y=="object"&&y!==null&&y.type===kr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case ml:e:{for(var S=y.key,R=m;R!==null;){if(R.key===S){if(S=y.type,S===kr){if(R.tag===7){n(h,R.sibling),m=i(R,y.props.children),m.return=h,h=m;break e}}else if(R.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===an&&Yp(S)===R.type){n(h,R.sibling),m=i(R,y.props),m.ref=Ni(h,R,y),m.return=h,h=m;break e}n(h,R);break}else t(h,R);R=R.sibling}y.type===kr?(m=Qn(y.props.children,h.mode,v,y.key),m.return=h,h=m):(v=$l(y.type,y.key,y.props,null,h.mode,v),v.ref=Ni(h,m,y),v.return=h,h=v)}return l(h);case xr:e:{for(R=y.key;m!==null;){if(m.key===R)if(m.tag===4&&m.stateNode.containerInfo===y.containerInfo&&m.stateNode.implementation===y.implementation){n(h,m.sibling),m=i(m,y.children||[]),m.return=h,h=m;break e}else{n(h,m);break}else t(h,m);m=m.sibling}m=fu(y,h.mode,v),m.return=h,h=m}return l(h);case an:return R=y._init,x(h,m,R(y._payload),v)}if(Li(y))return g(h,m,y,v);if(bi(y))return _(h,m,y,v);Nl(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,m!==null&&m.tag===6?(n(h,m.sibling),m=i(m,y),m.return=h,h=m):(n(h,m),m=cu(y,h.mode,v),m.return=h,h=m),l(h)):n(h,m)}return x}var $r=Sh(!0),Eh=Sh(!1),po={},Tt=bn(po),ro=bn(po),io=bn(po);function Gn(e){if(e===po)throw Error(E(174));return e}function Tc(e,t){switch(Q(io,t),Q(ro,e),Q(Tt,po),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xu(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xu(t,e)}Y(Tt),Q(Tt,t)}function Hr(){Y(Tt),Y(ro),Y(io)}function bh(e){Gn(io.current);var t=Gn(Tt.current),n=xu(t,e.type);t!==n&&(Q(ro,e),Q(Tt,n))}function Nc(e){ro.current===e&&(Y(Tt),Y(ro))}var te=bn(0);function os(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var iu=[];function Oc(){for(var e=0;en?n:4,e(!0);var r=ou.transition;ou.transition={};try{e(!1),t()}finally{W=n,ou.transition=r}}function Bh(){return lt().memoizedState}function px(e,t,n){var r=wn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$h(e))Hh(t,n);else if(n=vh(e,t,n,r),n!==null){var i=Ie();vt(n,e,r,i),Vh(n,t,r)}}function mx(e,t,n){var r=wn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($h(e))Hh(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,s=o(l,n);if(i.hasEagerState=!0,i.eagerState=s,wt(s,l)){var c=t.interleaved;c===null?(i.next=i,Rc(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=vh(e,t,i,r),n!==null&&(i=Ie(),vt(n,e,r,i),Vh(n,t,r))}}function $h(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Hh(e,t){$i=ls=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dc(e,n)}}var ss={readContext:ot,useCallback:Se,useContext:Se,useEffect:Se,useImperativeHandle:Se,useInsertionEffect:Se,useLayoutEffect:Se,useMemo:Se,useReducer:Se,useRef:Se,useState:Se,useDebugValue:Se,useDeferredValue:Se,useTransition:Se,useMutableSource:Se,useSyncExternalStore:Se,useId:Se,unstable_isNewReconciler:!1},hx={readContext:ot,useCallback:function(e,t){return bt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:em,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,jl(4194308,4,Dh.bind(null,t,e),n)},useLayoutEffect:function(e,t){return jl(4194308,4,e,t)},useInsertionEffect:function(e,t){return jl(4,2,e,t)},useMemo:function(e,t){var n=bt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=bt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=px.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=bt();return e={current:e},t.memoizedState=e},useState:Jp,useDebugValue:zc,useDeferredValue:function(e){return bt().memoizedState=e},useTransition:function(){var e=Jp(!1),t=e[0];return e=dx.bind(null,e[1]),bt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=bt();if(J){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),me===null)throw Error(E(349));Yn&30||Th(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,em(Oh.bind(null,r,o,e),[e]),r.flags|=2048,so(9,Nh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=bt(),t=me.identifierPrefix;if(J){var n=Bt,r=Ut;n=(r&~(1<<32-_t(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=oo++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Rt]=t,e[ro]=r,i0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Ru(n,r),n){case"dialog":q("cancel",e),q("close",e),i=r;break;case"iframe":case"object":case"embed":q("load",e),i=r;break;case"video":case"audio":for(i=0;iZr&&(t.flags|=128,r=!0,Oi(o,!1),t.lanes=4194304)}else{if(!r)if(e=as(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!ee)return Ee(t),null}else 2*le()-o.renderingStartTime>Zr&&n!==1073741824&&(t.flags|=128,r=!0,Oi(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=le(),t.sibling=null,n=ne.current,Q(ne,r?n&1|2:n&1),t):(Ee(t),null);case 22:case 23:return Vc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Dx(e,t){switch(Ec(t),t.tag){case 1:return Be(t.type)&&ts(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(),Y(Ue),Y(Re),Pc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ac(t),null;case 13:if(Y(ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));$r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(ne),null;case 4:return Vr(),null;case 10:return Tc(t.type._context),null;case 22:case 23:return Vc(),null;case 24:return null;default:return null}}var Ll=!1,be=!1,jx=typeof WeakSet=="function"?WeakSet:Set,N=null;function Ar(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function Ju(e,t,n){try{n()}catch(r){oe(e,t,r)}}var mm=!1;function Fx(e,t){if(zu=ql,e=ch(),kc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,a=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=l+i),d!==o||r!==0&&d.nodeType!==3||(c=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++a===i&&(s=l),f===o&&++u===r&&(c=l),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Du={focusedElem:e,selectionRange:n},ql=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var _=g.memoizedProps,x=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?_:ht(t.type,_),x);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(v){oe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return g=mm,mm=!1,g}function Vi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ju(t,n,o)}i=i.next}while(i!==r)}}function Es(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ec(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function s0(e){var t=e.alternate;t!==null&&(e.alternate=null,s0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[ro],delete t[Uu],delete t[xx],delete t[kx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function a0(e){return e.tag===5||e.tag===3||e.tag===4}function hm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||a0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function tc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=es));else if(r!==4&&(e=e.child,e!==null))for(tc(e,t,n),e=e.sibling;e!==null;)tc(e,t,n),e=e.sibling}function nc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(nc(e,t,n),e=e.sibling;e!==null;)nc(e,t,n),e=e.sibling}var ye=null,gt=!1;function sn(e,t,n){for(n=n.child;n!==null;)u0(e,t,n),n=n.sibling}function u0(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(gs,n)}catch{}switch(n.tag){case 5:be||Ar(n,t);case 6:var r=ye,i=gt;ye=null,sn(e,t,n),ye=r,gt=i,ye!==null&&(gt?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(gt?(e=ye,n=n.stateNode,e.nodeType===8?ou(e.parentNode,n):e.nodeType===1&&ou(e,n),Yi(e)):ou(ye,n.stateNode));break;case 4:r=ye,i=gt,ye=n.stateNode.containerInfo,gt=!0,sn(e,t,n),ye=r,gt=i;break;case 0:case 11:case 14:case 15:if(!be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Ju(n,t,l),i=i.next}while(i!==r)}sn(e,t,n);break;case 1:if(!be&&(Ar(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){oe(n,t,s)}sn(e,t,n);break;case 21:sn(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,sn(e,t,n),be=r):sn(e,t,n);break;default:sn(e,t,n)}}function gm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jx),t.forEach(function(r){var i=Kx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bx(r/1960))-r,10e?16:e,pn===null)var r=!1;else{if(e=pn,pn=null,ps=0,B&6)throw Error(E(331));var i=B;for(B|=4,N=e.current;N!==null;){var o=N,l=o.child;if(N.flags&16){var s=o.deletions;if(s!==null){for(var c=0;cle()-$c?Qn(e,0):Bc|=n),$e(e,t)}function y0(e,t){t===0&&(e.mode&1?(t=xl,xl<<=1,!(xl&130023424)&&(xl=4194304)):t=1);var n=Oe();e=Wt(e,t),e!==null&&(co(e,t,n),$e(e,n))}function Gx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),y0(e,n)}function Kx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),y0(e,n)}var _0;_0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,Mx(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,ee&&t.flags&1048576&&xh(t,is,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;$l(e,t),e=t.pendingProps;var i=Br(t,Re.current);jr(t,n),i=Mc(null,t,r,e,i,n);var o=zc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(o=!0,ns(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Ic(t),i.updater=ks,t.stateNode=i,i._reactInternals=t,Zu(t,r,e,n),t=Qu(null,t,r,!0,o,n)):(t.tag=0,ee&&o&&Sc(t),Ie(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch($l(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Xx(r),e=ht(r,e),i){case 0:t=Ku(null,t,r,e,n);break e;case 1:t=fm(null,t,r,e,n);break e;case 11:t=um(null,t,r,e,n);break e;case 14:t=cm(null,t,r,ht(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Ku(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),fm(e,t,r,i,n);case 3:e:{if(t0(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,bh(e,t),ss(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Wr(Error(E(423)),t),t=dm(e,t,r,n,i);break e}else if(r!==i){i=Wr(Error(E(424)),t),t=dm(e,t,r,n,i);break e}else for(Ge=yn(t.stateNode.containerInfo.firstChild),Ke=t,ee=!0,yt=null,n=Nh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if($r(),r===i){t=Zt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Ih(t),e===null&&Hu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,ju(r,i)?l=null:o!==null&&ju(r,o)&&(t.flags|=32),e0(e,t),Ie(e,t,l,n),t.child;case 6:return e===null&&Hu(t),null;case 13:return n0(e,t,n);case 4:return Oc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),um(e,t,r,i,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Q(os,r._currentValue),r._currentValue=l,o!==null)if(wt(o.value,l)){if(o.children===i.children&&!Ue.current){t=Zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=$t(-1,n&-n),c.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var u=a.pending;u===null?c.next=c:(c.next=u.next,u.next=c),a.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Vu(o.return,n,t),s.lanes|=n;break}c=c.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(E(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Vu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}Ie(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jr(t,n),i=ot(i),r=r(i),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,i=ht(r,t.pendingProps),i=ht(r.type,i),cm(e,t,r,i,n);case 15:return Yh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),$l(e,t),t.tag=1,Be(r)?(e=!0,ns(t)):e=!1,jr(t,n),Ch(t,r,i),Zu(t,r,i,n),Qu(null,t,r,!0,e,n);case 19:return r0(e,t,n);case 22:return Jh(e,t,n)}throw Error(E(156,t.tag))};function v0(e,t){return Wm(e,t)}function Qx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rt(e,t,n,r){return new Qx(e,t,n,r)}function Zc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xx(e){if(typeof e=="function")return Zc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===fc)return 11;if(e===dc)return 14}return 2}function xn(e,t){var n=e.alternate;return n===null?(n=rt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wl(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Zc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Sr:return Xn(n.children,i,o,t);case cc:l=8,i|=8;break;case gu:return e=rt(12,n,t,i|2),e.elementType=gu,e.lanes=o,e;case yu:return e=rt(13,n,t,i),e.elementType=yu,e.lanes=o,e;case _u:return e=rt(19,n,t,i),e.elementType=_u,e.lanes=o,e;case Tm:return Rs(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Rm:l=10;break e;case Cm:l=9;break e;case fc:l=11;break e;case dc:l=14;break e;case an:l=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=rt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Xn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function Rs(e,t,n,r){return e=rt(22,e,r,t),e.elementType=Tm,e.lanes=n,e.stateNode={isHidden:!1},e}function pu(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function mu(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function qx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qa(0),this.expirationTimes=qa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qa(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Gc(e,t,n,r,i,o,l,s,c){return e=new qx(e,t,n,s,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=rt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ic(o),e}function Yx(e,t,n){var r=3{"use strict";function E0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(E0)}catch(e){console.error(e)}}E0(),b0.exports=S0()});var C0=J(Yc=>{"use strict";var R0=qc();Yc.createRoot=R0.createRoot,Yc.hydrateRoot=R0.hydrateRoot;var e3});var P0=J(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.output=Pe.exists=Pe.hash=Pe.bytes=Pe.bool=Pe.number=void 0;function Os(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}Pe.number=Os;function N0(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}Pe.bool=N0;function ik(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Jc(e,...t){if(!ik(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}Pe.bytes=Jc;function I0(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Os(e.outputLen),Os(e.blockLen)}Pe.hash=I0;function O0(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}Pe.exists=O0;function A0(e,t){Jc(e);let n=t.outputLen;if(e.length{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.add5L=P.add5H=P.add4H=P.add4L=P.add3H=P.add3L=P.add=P.rotlBL=P.rotlBH=P.rotlSL=P.rotlSH=P.rotr32L=P.rotr32H=P.rotrBL=P.rotrBH=P.rotrSL=P.rotrSH=P.shrSL=P.shrSH=P.toBig=P.split=P.fromBig=void 0;var As=BigInt(2**32-1),ef=BigInt(32);function tf(e,t=!1){return t?{h:Number(e&As),l:Number(e>>ef&As)}:{h:Number(e>>ef&As)|0,l:Number(e&As)|0}}P.fromBig=tf;function L0(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);P.toBig=M0;var z0=(e,t,n)=>e>>>n;P.shrSH=z0;var D0=(e,t,n)=>e<<32-n|t>>>n;P.shrSL=D0;var j0=(e,t,n)=>e>>>n|t<<32-n;P.rotrSH=j0;var F0=(e,t,n)=>e<<32-n|t>>>n;P.rotrSL=F0;var U0=(e,t,n)=>e<<64-n|t>>>n-32;P.rotrBH=U0;var B0=(e,t,n)=>e>>>n-32|t<<64-n;P.rotrBL=B0;var $0=(e,t)=>t;P.rotr32H=$0;var H0=(e,t)=>e;P.rotr32L=H0;var V0=(e,t,n)=>e<>>32-n;P.rotlSH=V0;var W0=(e,t,n)=>t<>>32-n;P.rotlSL=W0;var Z0=(e,t,n)=>t<>>64-n;P.rotlBH=Z0;var G0=(e,t,n)=>e<>>64-n;P.rotlBL=G0;function K0(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}P.add=K0;var Q0=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);P.add3L=Q0;var X0=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;P.add3H=X0;var q0=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);P.add4L=q0;var Y0=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;P.add4H=Y0;var J0=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);P.add5L=J0;var eg=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;P.add5H=eg;var lk={fromBig:tf,split:L0,toBig:M0,shrSH:z0,shrSL:D0,rotrSH:j0,rotrSL:F0,rotrBH:U0,rotrBL:B0,rotr32H:$0,rotr32L:H0,rotlSH:V0,rotlSL:W0,rotlBH:Z0,rotlBL:G0,add:K0,add3L:Q0,add3H:X0,add4L:q0,add4H:Y0,add5H:eg,add5L:J0};P.default=lk});var ng=J(Ps=>{"use strict";Object.defineProperty(Ps,"__esModule",{value:!0});Ps.crypto=void 0;Ps.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var og=J(z=>{"use strict";Object.defineProperty(z,"__esModule",{value:!0});z.randomBytes=z.wrapXOFConstructorWithOpts=z.wrapConstructorWithOpts=z.wrapConstructor=z.checkOpts=z.Hash=z.concatBytes=z.toBytes=z.utf8ToBytes=z.asyncLoop=z.nextTick=z.hexToBytes=z.bytesToHex=z.isLE=z.rotr=z.createView=z.u32=z.u8=void 0;var nf=ng(),sk=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);z.u8=sk;var ak=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));z.u32=ak;function of(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var uk=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);z.createView=uk;var ck=(e,t)=>e<<32-t|e>>>t;z.rotr=ck;z.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!z.isLE)throw new Error("Non little-endian hardware is not supported");var fk=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function dk(e){if(!of(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n=Kt._0&&e<=Kt._9)return e-Kt._0;if(e>=Kt._A&&e<=Kt._F)return e-(Kt._A-10);if(e>=Kt._a&&e<=Kt._f)return e-(Kt._a-10)}function pk(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,o=0;i{};z.nextTick=mk;async function hk(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(Ls(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}z.wrapConstructor=vk;function wk(e){let t=(r,i)=>e(i).update(Ls(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}z.wrapConstructorWithOpts=wk;function xk(e){let t=(r,i)=>e(i).update(Ls(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}z.wrapXOFConstructorWithOpts=xk;function kk(e=32){if(nf.crypto&&typeof nf.crypto.getRandomValues=="function")return nf.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}z.randomBytes=kk});var lf=J(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.shake256=X.shake128=X.keccak_512=X.keccak_384=X.keccak_256=X.keccak_224=X.sha3_512=X.sha3_384=X.sha3_256=X.sha3_224=X.Keccak=X.keccakP=void 0;var Xr=P0(),yo=tg(),go=og(),[ag,ug,cg]=[[],[],[]],Sk=BigInt(0),ho=BigInt(1),Ek=BigInt(2),bk=BigInt(7),Rk=BigInt(256),Ck=BigInt(113);for(let e=0,t=ho,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],ag.push(2*(5*r+n)),ug.push((e+1)*(e+2)/2%64);let i=Sk;for(let o=0;o<7;o++)t=(t<>bk)*Ck)%Rk,t&Ek&&(i^=ho<<(ho<n>32?(0,yo.rotlBH)(e,t,n):(0,yo.rotlSH)(e,t,n),sg=(e,t,n)=>n>32?(0,yo.rotlBL)(e,t,n):(0,yo.rotlSL)(e,t,n);function fg(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let l=0;l<10;l++)n[l]=e[l]^e[l+10]^e[l+20]^e[l+30]^e[l+40];for(let l=0;l<10;l+=2){let s=(l+8)%10,c=(l+2)%10,a=n[c],u=n[c+1],d=lg(a,u,1)^n[s],f=sg(a,u,1)^n[s+1];for(let p=0;p<50;p+=10)e[l+p]^=d,e[l+p+1]^=f}let i=e[2],o=e[3];for(let l=0;l<24;l++){let s=ug[l],c=lg(i,o,s),a=sg(i,o,s),u=ag[l];i=e[u],o=e[u+1],e[u]=c,e[u+1]=a}for(let l=0;l<50;l+=10){for(let s=0;s<10;s++)n[s]=e[l+s];for(let s=0;s<10;s++)e[l+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=Tk[r],e[1]^=Nk[r]}n.fill(0)}X.keccakP=fg;var _o=class e extends go.Hash{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,Xr.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,go.u32)(this.state)}keccak(){fg(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,Xr.exists)(this);let{blockLen:n,state:r}=this;t=(0,go.toBytes)(t);let i=t.length;for(let o=0;o=r&&this.keccak();let l=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+l),i),this.posOut+=l,i+=l}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,Xr.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Xr.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:l}=this;return t||(t=new e(n,r,i,l,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=l,t.destroyed=this.destroyed,t}};X.Keccak=_o;var Tn=(e,t,n)=>(0,go.wrapConstructor)(()=>new _o(t,e,n));X.sha3_224=Tn(6,144,224/8);X.sha3_256=Tn(6,136,256/8);X.sha3_384=Tn(6,104,384/8);X.sha3_512=Tn(6,72,512/8);X.keccak_224=Tn(1,144,224/8);X.keccak_256=Tn(1,136,256/8);X.keccak_384=Tn(1,104,384/8);X.keccak_512=Tn(1,72,512/8);var dg=(e,t,n)=>(0,go.wrapXOFConstructorWithOpts)((r={})=>new _o(t,e,r.dkLen===void 0?n:r.dkLen,!0));X.shake128=dg(31,168,128/8);X.shake256=dg(31,136,256/8)});var wg=J((f3,Nn)=>{var{sha3_512:Ik}=lf(),mg=24,vo=32,sf=(e=4,t=Math.random)=>{let n="";for(;n.lengthhg(Ik(e)).toString(36).slice(1),pg=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),Ok=e=>pg[Math.floor(e()*pg.length)],yg=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{}}={})=>{let t=Object.keys(e).toString(),n=t.length?t+sf(vo):sf(vo);return gg(n).substring(0,vo)},_g=e=>()=>e++,Ak=476782367,vg=({random:e=Math.random,counter:t=_g(Math.floor(e()*Ak)),length:n=mg,fingerprint:r=yg()}={})=>function(){let o=Ok(e),l=Date.now().toString(36),s=t().toString(36),c=sf(n,e),a=`${l+c+s+r}`;return`${o+gg(a).substring(1,n)}`},Pk=vg(),Lk=(e,{minLength:t=2,maxLength:n=vo}={})=>{let r=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&i.test(e))return!0}finally{}return!1};Nn.exports.getConstants=()=>({defaultLength:mg,bigLength:vo});Nn.exports.init=vg;Nn.exports.createId=Pk;Nn.exports.bufToBigInt=hg;Nn.exports.createCounter=_g;Nn.exports.createFingerprint=yg;Nn.exports.isCuid=Lk});var xg=J((d3,wo)=>{var{createId:Mk,init:zk,getConstants:Dk,isCuid:jk}=wg();wo.exports.createId=Mk;wo.exports.init=zk;wo.exports.getConstants=Dk;wo.exports.isCuid=jk});var Sg=J(uf=>{"use strict";var Fk=Symbol.for("react.fragment");uf.Fragment=Fk;uf.jsxDEV=void 0});var bg=J((g3,Eg)=>{"use strict";Eg.exports=Sg()});var Cg=J(Ms=>{"use strict";var Uk=ge(),Bk=Symbol.for("react.element"),$k=Symbol.for("react.fragment"),Hk=Object.prototype.hasOwnProperty,Vk=Uk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wk={key:!0,ref:!0,__self:!0,__source:!0};function Rg(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Hk.call(t,r)&&!Wk.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Bk,type:e,key:o,ref:l,props:i,_owner:Vk.current}}Ms.Fragment=$k;Ms.jsx=Rg;Ms.jsxs=Rg});var Z=J((_3,Tg)=>{"use strict";Tg.exports=Cg()});var Sf=J((oT,sy)=>{var Jk="Expected a function",Jg="__lodash_hash_undefined__",ey=1/0,eS="[object Function]",tS="[object GeneratorFunction]",nS="[object Symbol]",rS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iS=/^\w*$/,oS=/^\./,lS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,sS=/[\\^$.*+?()[\]{}|]/g,aS=/\\(\\)?/g,uS=/^\[object .+?Constructor\]$/,cS=typeof global=="object"&&global&&global.Object===Object&&global,fS=typeof self=="object"&&self&&self.Object===Object&&self,vf=cS||fS||Function("return this")();function dS(e,t){return e?.[t]}function pS(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var mS=Array.prototype,hS=Function.prototype,ty=Object.prototype,_f=vf["__core-js_shared__"],Qg=function(){var e=/[^.]+$/.exec(_f&&_f.keys&&_f.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ny=hS.toString,wf=ty.hasOwnProperty,ry=ty.toString,gS=RegExp("^"+ny.call(wf).replace(sS,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xg=vf.Symbol,yS=mS.splice,_S=iy(vf,"Map"),So=iy(Object,"create"),qg=Xg?Xg.prototype:void 0,Yg=qg?qg.toString:void 0;function or(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function TS(e,t){var n=this.__data__,r=js(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}qr.prototype.clear=ES;qr.prototype.delete=bS;qr.prototype.get=RS;qr.prototype.has=CS;qr.prototype.set=TS;function lr(e){var t=-1,n=e?e.length:0;for(this.clear();++t{var{sha3_512:QS}=lf(),yy=24,bo=32,bf=(e=4,t=Math.random)=>{let n="";for(;n.length_y(QS(e)).toString(36).slice(1),gy=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),XS=e=>gy[Math.floor(e()*gy.length)],wy=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+bf(bo,t):bf(bo,t);return vy(r).substring(0,bo)},xy=e=>()=>e++,qS=476782367,ky=({random:e=Math.random,counter:t=xy(Math.floor(e()*qS)),length:n=yy,fingerprint:r=wy({random:e})}={})=>function(){let o=XS(e),l=Date.now().toString(36),s=t().toString(36),c=bf(n,e),a=`${l+c+s+r}`;return`${o+vy(a).substring(1,n)}`},YS=ky(),JS=(e,{minLength:t=2,maxLength:n=bo}={})=>{let r=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&i.test(e))return!0}finally{}return!1};Pn.exports.getConstants=()=>({defaultLength:yy,bigLength:bo});Pn.exports.init=ky;Pn.exports.createId=YS;Pn.exports.bufToBigInt=_y;Pn.exports.createCounter=xy;Pn.exports.createFingerprint=wy;Pn.exports.isCuid=JS});var Rf=J((IT,Ro)=>{var{createId:e2,init:t2,getConstants:n2,isCuid:r2}=Sy();Ro.exports.createId=e2;Ro.exports.init=t2;Ro.exports.getConstants=n2;Ro.exports.isCuid=r2});var $y=J((To,Qs)=>{(function(e,t){"use strict";var n="1.0.37",r="",i="?",o="function",l="undefined",s="object",c="string",a="major",u="model",d="name",f="type",p="vendor",g="version",_="architecture",x="console",h="mobile",m="tablet",y="smarttv",v="wearable",S="embedded",R=500,k="Amazon",b="Apple",I="ASUS",C="BlackBerry",O="Browser",De="Chrome",rl="Edge",zt="Firefox",Dt="Google",jd="Huawei",ba="LG",Ra="Microsoft",Fd="Motorola",il="Opera",ol="Samsung",Ud="Sharp",ll="Sony",Ca="Xiaomi",Ta="Zebra",Bd="Facebook",$d="Chromium OS",Hd="Mac OS",Iv=function(F,V){var M={};for(var G in F)V[G]&&V[G].length%2===0?M[G]=V[G].concat(F[G]):M[G]=F[G];return M},sl=function(F){for(var V={},M=0;M0?H.length===2?typeof H[1]==o?this[H[0]]=H[1].call(this,kt):this[H[0]]=H[1]:H.length===3?typeof H[1]===o&&!(H[1].exec&&H[1].test)?this[H[0]]=kt?H[1].call(this,kt,H[2]):t:this[H[0]]=kt?kt.replace(H[1],H[2]):t:H.length===4&&(this[H[0]]=kt?H[3].call(this,kt.replace(H[1],H[2])):t):this[H]=kt||t;M+=2}},Ia=function(F,V){for(var M in V)if(typeof V[M]===s&&V[M].length>0){for(var G=0;G2&&(L[u]="iPad",L[f]=m),L},this.getEngine=function(){var L={};return L[d]=t,L[g]=t,xi.call(L,G,xt.engine),L},this.getOS=function(){var L={};return L[d]=t,L[g]=t,xi.call(L,G,xt.os),H&&!L[d]&&on&&on.platform!="Unknown"&&(L[d]=on.platform.replace(/chrome os/i,$d).replace(/macos/i,Hd)),L},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return G},this.setUA=function(L){return G=typeof L===c&&L.length>R?Na(L,R):L,this},this.setUA(G),this};We.VERSION=n,We.BROWSER=sl([d,g,a]),We.CPU=sl([_]),We.DEVICE=sl([u,p,f,x,h,y,m,v,S]),We.ENGINE=We.OS=sl([d,g]),typeof To!==l?(typeof Qs!==l&&Qs.exports&&(To=Qs.exports=We),To.UAParser=We):typeof define===o&&define.amd?define(function(){return We}):typeof e!==l&&(e.UAParser=We);var _r=typeof e!==l&&(e.jQuery||e.Zepto);if(_r&&!_r.ua){var al=new We;_r.ua=al.getResult(),_r.ua.get=function(){return al.getUA()},_r.ua.set=function(F){al.setUA(F);var V=al.getResult();for(var M in V)_r.ua[M]=V[M]}}})(typeof window=="object"?window:To)});var V_=J((QA,H_)=>{var hE=1/0,gE="[object Symbol]",yE=/^\s+|\s+$/g,id="\\ud800-\\udfff",A_="\\u0300-\\u036f\\ufe20-\\ufe23",P_="\\u20d0-\\u20f0",L_="\\ufe0e\\ufe0f",_E="["+id+"]",nd="["+A_+P_+"]",rd="\\ud83c[\\udffb-\\udfff]",vE="(?:"+nd+"|"+rd+")",M_="[^"+id+"]",z_="(?:\\ud83c[\\udde6-\\uddff]){2}",D_="[\\ud800-\\udbff][\\udc00-\\udfff]",j_="\\u200d",F_=vE+"?",U_="["+L_+"]?",wE="(?:"+j_+"(?:"+[M_,z_,D_].join("|")+")"+U_+F_+")*",xE=U_+F_+wE,kE="(?:"+[M_+nd+"?",nd,z_,D_,_E].join("|")+")",SE=RegExp(rd+"(?="+rd+")|"+kE+xE,"g"),EE=RegExp("["+j_+id+A_+P_+L_+"]"),bE=typeof global=="object"&&global&&global.Object===Object&&global,RE=typeof self=="object"&&self&&self.Object===Object&&self,CE=bE||RE||Function("return this")();function TE(e){return e.split("")}function NE(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function AE(e,t){for(var n=e.length;n--&&B_(t,e[n],0)>-1;);return n}function PE(e){return EE.test(e)}function T_(e){return PE(e)?LE(e):TE(e)}function LE(e){return e.match(SE)||[]}var ME=Object.prototype,zE=ME.toString,N_=CE.Symbol,I_=N_?N_.prototype:void 0,O_=I_?I_.toString:void 0;function DE(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:DE(e,t,n)}function FE(e){return!!e&&typeof e=="object"}function UE(e){return typeof e=="symbol"||FE(e)&&zE.call(e)==gE}function BE(e){return e==null?"":$_(e)}function $E(e,t,n){if(e=BE(e),e&&(n||t===void 0))return e.replace(yE,"");if(!e||!(t=$_(t)))return e;var r=T_(e),i=T_(t),o=OE(r,i),l=AE(r,i)+1;return jE(r,o,l).join("")}H_.exports=$E});var q_=J((rP,X_)=>{"use strict";function WE(e,t){for(;e.length{let[,r]=(0,Qr.useState)({}),o=(0,Qr.useRef)({data:e,deps:n||[],ready:!1,_loading:{}}).current;if((0,Qr.useEffect)(()=>{o.ready=!0,t&&t({init:!0})},[]),o.ready===!1)o._loading={},o.data.render=()=>{o.ready&&r({})};else if(o.deps.length>0&&n){for(let[l,s]of Object.entries(n))if(o.deps[l]!==s){o.deps[l]=s,t&&setTimeout(()=>{t({init:!1})});break}}return o.data};var T0=(e,t)=>new Promise(async n=>{if(typeof e=="function"){let r=null;if(t&&(r=setTimeout(n,t)),await e()){clearTimeout(r),n();return}let i=0,o=setInterval(async()=>{await e()&&(r&&clearTimeout(r),clearInterval(o),n()),i>100&&clearInterval(o)},10)}else typeof e=="number"&&setTimeout(()=>{n()},e)});var rk=A(ge());var kg=A(xg()),Qt=A(ge()),af=(0,Qt.createContext)({global:{},render:()=>{}});var On=(e,t,n)=>{let r=window;r.globalValueID||(r.globalValueID=new WeakMap);let i=typeof t=="string"?t:n;i||(r.globalValueID.has(e)||r.globalValueID.set(e,(0,kg.createId)()),i=r.globalValueID.get(e)||""),i||(i="GLOBAL_DEFAULT");let o=(0,Qt.useContext)(af),{global:l,render:s}=o;l[i]||(l[i]=e),(0,Qt.useEffect)(()=>{let a=null;if(typeof t=="function")try{a=t()}catch(u){console.log(u)}return()=>{typeof a=="function"?a():a instanceof Promise&&a.then(u=>{typeof u=="function"&&u()})}},[]);let c=l[i];return c?c.render=a=>{a&&(l[i]=void 0),(0,Qt.startTransition)(s)}:console.log(e,i),c},In=e=>{if(e==null||typeof e!="object")return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.map(i=>In(i));var n={};for(var r in e)typeof e[r]=="object"?n[r]=In(e[r]):n[r]=e[r];return n};var R3=A(ge());var cf=A(ge()),Ng=A(qc()),Ig=A(bg()),Og=A(Z()),Ag=()=>{let e=typeof window=="object"?window:globalThis;e.React=cf.default,e.ReactDOM=Ng.default,e.JSXRuntime=Og.default,e.JSXDevRuntime=Ig.default,e.Fragment=cf.default.Fragment};var Zk={data:""},Lg=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||Zk,Mg=e=>{let t=Lg(e),n=t.data;return t.data="",n},Gk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Kk=/\/\*[^]*?\*\/| +/g,Pg=/\n+/g,ir=(e,t)=>{let n="",r="",i="";for(let o in e){let l=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+l+";":r+=o[1]=="f"?ir(l,o):o+"{"+ir(l,o[1]=="k"?"":t)+"}":typeof l=="object"?r+=ir(l,t?t.replace(/([^,])+/g,s=>o.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):o):l!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=ir.p?ir.p(o,l):o+":"+l+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Xt={},zg=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+zg(e[n]);return t}return e},Qk=(e,t,n,r,i)=>{let o=zg(e),l=Xt[o]||(Xt[o]=(c=>{let a=0,u=11;for(;a>>0;return"go"+u})(o));if(!Xt[l]){let c=o!==e?e:(a=>{let u,d,f=[{}];for(;u=Gk.exec(a.replace(Kk,""));)u[4]?f.shift():u[3]?(d=u[3].replace(Pg," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(Pg," ").trim();return f[0]})(e);Xt[l]=ir(i?{["@keyframes "+l]:c}:c,n?"":"."+l)}let s=n&&Xt.g?Xt.g:null;return n&&(Xt.g=Xt[l]),((c,a,u,d)=>{d?a.data=a.data.replace(d,c):a.data.indexOf(c)===-1&&(a.data=u?c+a.data:a.data+c)})(Xt[l],t,r,s),l},Xk=(e,t,n)=>e.reduce((r,i,o)=>{let l=t[o];if(l&&l.call){let s=l(n),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;l=c?"."+c:s&&typeof s=="object"?s.props?"":ir(s,""):s===!1?"":s}return r+i+(l??"")},"");function zs(e){let t=this||{},n=e.call?e(t.p):e;return Qk(n.unshift?n.raw?Xk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,Lg(t.target),t.g,t.o,t.k)}var w3=zs.bind({g:1}),x3=zs.bind({k:1});var Dg=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await T0(()=>t.__SRV_URL__),t.prasiContext={global:{},render(){}};let n=window.location,r=n.protocol.indexOf("http")===0?n.hostname:"localhost",i=n.protocol!="https:"||/localhost|127.0.0.1|0.0.0.0/.test(r)?"http":"https";if(t.__SRV_URL__){t.serverurl=t.__SRV_URL__;let l=new URL(t.serverurl);(l.hostname==="localhost"||l.hostname==="127.0.0.1")&&(l.hostname=n.hostname,l.pathname=l.pathname==="/"?"":l.pathname,t.serverurl=l.toString(),t.serverurl.endsWith("/")&&(t.serverurl=t.serverurl.substring(0,t.serverurl.length-1)))}let o=n.port;t.baseurl=i+"://"+r+(o?":"+o:"")+"/",t.basepath||(t.basepath="/"),t.css=zs,t.extractCss=Mg,t.pathname=n.pathname,t.cx=(...l)=>{let s=[];return l.filter(c=>c?(typeof c=="string"&&c.trim(),!0):!1).forEach(c=>{if(Array.isArray(c))for(let a of c)typeof a=="string"&&a.trim()&&s.push(a.trim());else s.push(c.trim())}),s.join(" ")},t.navigate=l=>{let s=l;if(typeof t.navigateOverride=="function"&&(s=t.navigateOverride(l),!s))return null;history.pushState({prevUrl:window.location.href},"",s),t.pathname=l,t.prasiContext&&t.prasiContext.render&&t.prasiContext.render()},typeof window=="object"&&window.addEventListener("popstate",()=>{let l=navigator.serviceWorker.controller;if(l&&l.postMessage({type:"add-cache",url:n.href}),t.prasiContext.popState){t.prasiContext.popState();return}if(t.preventPopRender){t.preventPopRender=!1;return}t.prasiContext&&t.prasiContext.render&&(t.pathname=n.pathname,t.prasiContext.render())})};function df(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function pf(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=df(n);return(i,o)=>r.then(l=>o(l.transaction(t,i).objectStore(t)))}var ff;function jg(){return ff||(ff=pf("keyval-store","keyval")),ff}function mf(e,t=jg()){return t("readonly",n=>df(n.get(e)))}function Ds(e,t,n=jg()){return n("readwrite",r=>(r.put(t,e),df(r.transaction)))}var Rv=A(ge());var Fg=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function qk(e){return typeof e=="string"&&Fg.test(e)}var hf=qk;var xo=A(Z()),gf=({children:e,back:t})=>(0,xo.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,xo.jsx)("div",{children:e}),(0,xo.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});var Bg=A(ge());var Ce=A(Z()),Ug=window,ko=({children:e,className:t,show:n,backdrop:r,note:i,alt:o})=>{let l=Cn({icon:(0,Ce.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,Bg.useEffect)(()=>(l.ival=setInterval(()=>{l.value+=.1333,l.value>=1.3&&(l.value=0),l.render()},200),Ug.loadingIcon&&(l.icon=(0,Ce.jsx)("img",{alt:"loading",src:Ug.loadingIcon,className:css` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function au(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Vu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var _x=typeof WeakMap=="function"?WeakMap:Map;function Wh(e,t,n){n=$t(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){us||(us=!0,ec=r),Vu(e,t)},n}function Zh(e,t,n){n=$t(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Vu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Vu(e,t),typeof r!="function"&&(vn===null?vn=new Set([this]):vn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function tm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new _x;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ax.bind(null,e,t,n),t.then(e,e))}function nm(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function rm(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=$t(-1,1),t.tag=2,_n(n,t,1))),n.lanes|=1),e)}var vx=Gt.ReactCurrentOwner,Fe=!1;function Oe(e,t,n,r){t.child=e===null?Eh(t,null,n,r):$r(t,e.child,n,r)}function im(e,t,n,r,i){n=n.render;var o=t.ref;return Mr(t,i),r=Ac(e,t,n,r,o,i),n=Pc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Zt(e,t,i)):(J&&n&&wc(t),t.flags|=1,Oe(e,t,r,i),t.child)}function om(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Hc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Gh(e,t,o,r,i)):(e=$l(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ji,n(l,r)&&e.ref===t.ref)return Zt(e,t,i)}return t.flags|=1,e=xn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Gh(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ji(o,r)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(Fe=!0);else return t.lanes=e.lanes,Zt(e,t,i)}return Wu(e,t,n,r,i)}function Kh(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Q(Ar,Ze),Ze|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Q(Ar,Ze),Ze|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Q(Ar,Ze),Ze|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Q(Ar,Ze),Ze|=r;return Oe(e,t,i,n),t.child}function Qh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Wu(e,t,n,r,i){var o=Be(n)?Xn:Re.current;return o=Ur(t,o),Mr(t,i),n=Ac(e,t,n,r,o,i),r=Pc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Zt(e,t,i)):(J&&r&&wc(t),t.flags|=1,Oe(e,t,n,i),t.child)}function lm(e,t,n,r,i){if(Be(n)){var o=!0;Jl(t)}else o=!1;if(Mr(t,i),t.stateNode===null)Fl(e,t),kh(t,n,r),Hu(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var c=l.context,a=n.contextType;typeof a=="object"&&a!==null?a=ot(a):(a=Be(n)?Xn:Re.current,a=Ur(t,a));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||c!==a)&&qp(t,l,r,a),un=!1;var f=t.memoizedState;l.state=f,is(t,r,l,i),c=t.memoizedState,s!==r||f!==c||Ue.current||un?(typeof u=="function"&&($u(t,n,u,r),c=t.memoizedState),(s=un||Xp(t,n,s,r,f,c,a))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),l.props=r,l.state=c,l.context=a,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,wh(e,t),s=t.memoizedProps,a=t.type===t.elementType?s:ht(t.type,s),l.props=a,d=t.pendingProps,f=l.context,c=n.contextType,typeof c=="object"&&c!==null?c=ot(c):(c=Be(n)?Xn:Re.current,c=Ur(t,c));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==d||f!==c)&&qp(t,l,r,c),un=!1,f=t.memoizedState,l.state=f,is(t,r,l,i);var g=t.memoizedState;s!==d||f!==g||Ue.current||un?(typeof p=="function"&&($u(t,n,p,r),g=t.memoizedState),(a=un||Xp(t,n,a,r,f,g,c)||!1)?(u||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,g,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,g,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),l.props=r,l.state=g,l.context=c,r=a):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Zu(e,t,n,r,o,i)}function Zu(e,t,n,r,i,o){Qh(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&Wp(t,n,!1),Zt(e,t,o);r=t.stateNode,vx.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=$r(t,e.child,null,o),t.child=$r(t,null,s,o)):Oe(e,t,s,o),t.memoizedState=r.state,i&&Wp(t,n,!0),t.child}function Xh(e){var t=e.stateNode;t.pendingContext?Vp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Vp(e,t.context,!1),Tc(e,t.containerInfo)}function sm(e,t,n,r,i){return Br(),kc(i),t.flags|=256,Oe(e,t,n,r),t.child}var Gu={dehydrated:null,treeContext:null,retryLane:0};function Ku(e){return{baseLanes:e,cachePool:null,transitions:null}}function qh(e,t,n){var r=t.pendingProps,i=te.current,o=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Q(te,i&1),e===null)return Uu(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,o?(r=t.mode,o=t.child,l={mode:"hidden",children:l},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=l):o=Ss(l,r,0,null),e=Qn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ku(n),t.memoizedState=Gu,e):Dc(t,l));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return wx(e,t,l,r,s,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,s=i.sibling;var c={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=xn(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=xn(s,o):(o=Qn(o,l,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,l=e.child.memoizedState,l=l===null?Ku(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Gu,r}return o=e.child,e=o.sibling,r=xn(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Dc(e,t){return t=Ss({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ol(e,t,n,r){return r!==null&&kc(r),$r(t,e.child,null,n),e=Dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wx(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=au(Error(E(422))),Ol(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ss({mode:"visible",children:r.children},i,0,null),o=Qn(o,i,l,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&$r(t,e.child,null,l),t.child.memoizedState=Ku(l),t.memoizedState=Gu,o);if(!(t.mode&1))return Ol(e,t,l,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(E(419)),r=au(o,r,void 0),Ol(e,t,l,r)}if(s=(l&e.childLanes)!==0,Fe||s){if(r=me,r!==null){switch(l&-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|l)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Wt(e,i),vt(r,e,i,-1))}return $c(),r=au(Error(E(421))),Ol(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Px.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ge=yn(i.nextSibling),Ke=t,J=!0,yt=null,e!==null&&(tt[nt++]=Ut,tt[nt++]=Bt,tt[nt++]=qn,Ut=e.id,Bt=e.overflow,qn=t),t=Dc(t,r.children),t.flags|=4096,t)}function am(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Bu(e.return,t,n)}function uu(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Yh(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Oe(e,t,r.children,n),r=te.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&am(e,n,t);else if(e.tag===19)am(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Q(te,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&os(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),uu(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&os(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}uu(t,!0,n,null,o);break;case"together":uu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Zt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(E(153));if(t.child!==null){for(e=t.child,n=xn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xx(e,t,n){switch(t.tag){case 3:Xh(t),Br();break;case 5:bh(t);break;case 1:Be(t.type)&&Jl(t);break;case 4:Tc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Q(ns,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Q(te,te.current&1),t.flags|=128,null):n&t.child.childLanes?qh(e,t,n):(Q(te,te.current&1),e=Zt(e,t,n),e!==null?e.sibling:null);Q(te,te.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Yh(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Q(te,te.current),r)break;return null;case 22:case 23:return t.lanes=0,Kh(e,t,n)}return Zt(e,t,n)}var Jh,Qu,e0,t0;Jh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Qu=function(){};e0=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Gn(Tt.current);var o=null;switch(n){case"input":i=yu(e,i),r=yu(e,r),o=[];break;case"select":i=re({},i,{value:void 0}),r=re({},r,{value:void 0}),o=[];break;case"textarea":i=wu(e,i),r=wu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ql)}ku(n,r);var l;n=null;for(a in i)if(!r.hasOwnProperty(a)&&i.hasOwnProperty(a)&&i[a]!=null)if(a==="style"){var s=i[a];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else a!=="dangerouslySetInnerHTML"&&a!=="children"&&a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Zi.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var c=r[a];if(s=i?.[a],r.hasOwnProperty(a)&&c!==s&&(c!=null||s!=null))if(a==="style")if(s){for(l in s)!s.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in c)c.hasOwnProperty(l)&&s[l]!==c[l]&&(n||(n={}),n[l]=c[l])}else n||(o||(o=[]),o.push(a,n)),n=c;else a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,s=s?s.__html:void 0,c!=null&&s!==c&&(o=o||[]).push(a,c)):a==="children"?typeof c!="string"&&typeof c!="number"||(o=o||[]).push(a,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(Zi.hasOwnProperty(a)?(c!=null&&a==="onScroll"&&q("scroll",e),o||s===c||(o=[])):(o=o||[]).push(a,c))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};t0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Oi(e,t){if(!J)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ee(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function kx(e,t,n){var r=t.pendingProps;switch(xc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ee(t),null;case 1:return Be(t.type)&&Yl(),Ee(t),null;case 3:return r=t.stateNode,Hr(),Y(Ue),Y(Re),Oc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Tl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yt!==null&&(rc(yt),yt=null))),Qu(e,t),Ee(t),null;case 5:Nc(t);var i=Gn(io.current);if(n=t.type,e!==null&&t.stateNode!=null)e0(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(E(166));return Ee(t),null}if(e=Gn(Tt.current),Tl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Rt]=t,r[no]=o,e=(t.mode&1)!==0,n){case"dialog":q("cancel",r),q("close",r);break;case"iframe":case"object":case"embed":q("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[Rt]=t,e[no]=r,Jh(e,t,!1,!1),t.stateNode=e;e:{switch(l=Su(n,r),n){case"dialog":q("cancel",e),q("close",e),i=r;break;case"iframe":case"object":case"embed":q("load",e),i=r;break;case"video":case"audio":for(i=0;iWr&&(t.flags|=128,r=!0,Oi(o,!1),t.lanes=4194304)}else{if(!r)if(e=os(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Oi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!J)return Ee(t),null}else 2*le()-o.renderingStartTime>Wr&&n!==1073741824&&(t.flags|=128,r=!0,Oi(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(n=o.last,n!==null?n.sibling=l:t.child=l,o.last=l)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=le(),t.sibling=null,n=te.current,Q(te,r?n&1|2:n&1),t):(Ee(t),null);case 22:case 23:return Bc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ze&1073741824&&(Ee(t),t.subtreeFlags&6&&(t.flags|=8192)):Ee(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Sx(e,t){switch(xc(t),t.tag){case 1:return Be(t.type)&&Yl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hr(),Y(Ue),Y(Re),Oc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Nc(t),null;case 13:if(Y(te),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));Br()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(te),null;case 4:return Hr(),null;case 10:return bc(t.type._context),null;case 22:case 23:return Bc(),null;case 24:return null;default:return null}}var Il=!1,be=!1,Ex=typeof WeakSet=="function"?WeakSet:Set,N=null;function Ir(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){oe(e,t,r)}else n.current=null}function Xu(e,t,n){try{n()}catch(r){oe(e,t,r)}}var um=!1;function bx(e,t){if(Pu=Kl,e=oh(),vc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,s=-1,c=-1,a=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=l+i),d!==o||r!==0&&d.nodeType!==3||(c=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++a===i&&(s=l),f===o&&++u===r&&(c=l),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lu={focusedElem:e,selectionRange:n},Kl=!1,N=t;N!==null;)if(t=N,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var _=g.memoizedProps,x=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?_:ht(t.type,_),x);h.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(v){oe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return g=um,um=!1,g}function Hi(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Xu(t,n,o)}i=i.next}while(i!==r)}}function xs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function qu(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function n0(e){var t=e.alternate;t!==null&&(e.alternate=null,n0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Rt],delete t[no],delete t[Mu],delete t[lx],delete t[sx])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function r0(e){return e.tag===5||e.tag===3||e.tag===4}function cm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||r0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Yu(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ql));else if(r!==4&&(e=e.child,e!==null))for(Yu(e,t,n),e=e.sibling;e!==null;)Yu(e,t,n),e=e.sibling}function Ju(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Ju(e,t,n),e=e.sibling;e!==null;)Ju(e,t,n),e=e.sibling}var ye=null,gt=!1;function sn(e,t,n){for(n=n.child;n!==null;)i0(e,t,n),n=n.sibling}function i0(e,t,n){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(ps,n)}catch{}switch(n.tag){case 5:be||Ir(n,t);case 6:var r=ye,i=gt;ye=null,sn(e,t,n),ye=r,gt=i,ye!==null&&(gt?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(gt?(e=ye,n=n.stateNode,e.nodeType===8?nu(e.parentNode,n):e.nodeType===1&&nu(e,n),qi(e)):nu(ye,n.stateNode));break;case 4:r=ye,i=gt,ye=n.stateNode.containerInfo,gt=!0,sn(e,t,n),ye=r,gt=i;break;case 0:case 11:case 14:case 15:if(!be&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,l=o.destroy;o=o.tag,l!==void 0&&(o&2||o&4)&&Xu(n,t,l),i=i.next}while(i!==r)}sn(e,t,n);break;case 1:if(!be&&(Ir(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){oe(n,t,s)}sn(e,t,n);break;case 21:sn(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,sn(e,t,n),be=r):sn(e,t,n);break;default:sn(e,t,n)}}function fm(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ex),t.forEach(function(r){var i=Lx.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function mt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=l),r&=~o}if(r=i,r=le()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cx(r/1960))-r,10e?16:e,pn===null)var r=!1;else{if(e=pn,pn=null,cs=0,B&6)throw Error(E(331));var i=B;for(B|=4,N=e.current;N!==null;){var o=N,l=o.child;if(N.flags&16){var s=o.deletions;if(s!==null){for(var c=0;cle()-Fc?Kn(e,0):jc|=n),$e(e,t)}function d0(e,t){t===0&&(e.mode&1?(t=_l,_l<<=1,!(_l&130023424)&&(_l=4194304)):t=1);var n=Ie();e=Wt(e,t),e!==null&&(uo(e,t,n),$e(e,n))}function Px(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),d0(e,n)}function Lx(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),d0(e,n)}var p0;p0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,xx(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,J&&t.flags&1048576&&gh(t,ts,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fl(e,t),e=t.pendingProps;var i=Ur(t,Re.current);Mr(t,n),i=Ac(null,t,r,e,i,n);var o=Pc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Be(r)?(o=!0,Jl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Cc(t),i.updater=vs,t.stateNode=i,i._reactInternals=t,Hu(t,r,e,n),t=Zu(null,t,r,!0,o,n)):(t.tag=0,J&&o&&wc(t),Oe(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Dx(r),e=ht(r,e),i){case 0:t=Wu(null,t,r,e,n);break e;case 1:t=lm(null,t,r,e,n);break e;case 11:t=im(null,t,r,e,n);break e;case 14:t=om(null,t,r,ht(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Wu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),lm(e,t,r,i,n);case 3:e:{if(Xh(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,wh(e,t),is(t,r,null,n);var l=t.memoizedState;if(r=l.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Vr(Error(E(423)),t),t=sm(e,t,r,n,i);break e}else if(r!==i){i=Vr(Error(E(424)),t),t=sm(e,t,r,n,i);break e}else for(Ge=yn(t.stateNode.containerInfo.firstChild),Ke=t,J=!0,yt=null,n=Eh(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Br(),r===i){t=Zt(e,t,n);break e}Oe(e,t,r,n)}t=t.child}return t;case 5:return bh(t),e===null&&Uu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,zu(r,i)?l=null:o!==null&&zu(r,o)&&(t.flags|=32),Qh(e,t),Oe(e,t,l,n),t.child;case 6:return e===null&&Uu(t),null;case 13:return qh(e,t,n);case 4:return Tc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=$r(t,null,r,n):Oe(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),im(e,t,r,i,n);case 7:return Oe(e,t,t.pendingProps,n),t.child;case 8:return Oe(e,t,t.pendingProps.children,n),t.child;case 12:return Oe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,l=i.value,Q(ns,r._currentValue),r._currentValue=l,o!==null)if(wt(o.value,l)){if(o.children===i.children&&!Ue.current){t=Zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){l=o.child;for(var c=s.firstContext;c!==null;){if(c.context===r){if(o.tag===1){c=$t(-1,n&-n),c.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var u=a.pending;u===null?c.next=c:(c.next=u.next,u.next=c),a.pending=c}}o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),Bu(o.return,n,t),s.lanes|=n;break}c=c.next}}else if(o.tag===10)l=o.type===t.type?null:o.child;else if(o.tag===18){if(l=o.return,l===null)throw Error(E(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),Bu(l,n,t),l=o.sibling}else l=o.child;if(l!==null)l.return=o;else for(l=o;l!==null;){if(l===t){l=null;break}if(o=l.sibling,o!==null){o.return=l.return,l=o;break}l=l.return}o=l}Oe(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Mr(t,n),i=ot(i),r=r(i),t.flags|=1,Oe(e,t,r,n),t.child;case 14:return r=t.type,i=ht(r,t.pendingProps),i=ht(r.type,i),om(e,t,r,i,n);case 15:return Gh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ht(r,i),Fl(e,t),t.tag=1,Be(r)?(e=!0,Jl(t)):e=!1,Mr(t,n),kh(t,r,i),Hu(t,r,i,n),Zu(null,t,r,!0,e,n);case 19:return Yh(e,t,n);case 22:return Kh(e,t,n)}throw Error(E(156,t.tag))};function m0(e,t){return Um(e,t)}function zx(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rt(e,t,n,r){return new zx(e,t,n,r)}function Hc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dx(e){if(typeof e=="function")return Hc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ac)return 11;if(e===uc)return 14}return 2}function xn(e,t){var n=e.alternate;return n===null?(n=rt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function $l(e,t,n,r,i,o){var l=2;if(r=e,typeof e=="function")Hc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case kr:return Qn(n.children,i,o,t);case sc:l=8,i|=8;break;case pu:return e=rt(12,n,t,i|2),e.elementType=pu,e.lanes=o,e;case mu:return e=rt(13,n,t,i),e.elementType=mu,e.lanes=o,e;case hu:return e=rt(19,n,t,i),e.elementType=hu,e.lanes=o,e;case Sm:return Ss(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xm:l=10;break e;case km:l=9;break e;case ac:l=11;break e;case uc:l=14;break e;case an:l=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=rt(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Qn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function Ss(e,t,n,r){return e=rt(22,e,r,t),e.elementType=Sm,e.lanes=n,e.stateNode={isHidden:!1},e}function cu(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function fu(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Mx(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ka(0),this.expirationTimes=Ka(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ka(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Vc(e,t,n,r,i,o,l,s,c){return e=new Mx(e,t,n,s,c),t===1?(t=1,o===!0&&(t|=8)):t=0,o=rt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cc(o),e}function jx(e,t,n){var r=3{"use strict";function v0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(v0)}catch(e){console.error(e)}}v0(),w0.exports=_0()});var k0=ie(Qc=>{"use strict";var x0=Kc();Qc.createRoot=x0.createRoot,Qc.hydrateRoot=x0.hydrateRoot;var IC});var E0=ie(qc=>{"use strict";var Vx=Symbol.for("react.fragment");qc.Fragment=Vx;qc.jsxDEV=void 0});var R0=ie((UC,b0)=>{"use strict";b0.exports=E0()});var T0=ie(Ts=>{"use strict";var Wx=ge(),Zx=Symbol.for("react.element"),Gx=Symbol.for("react.fragment"),Kx=Object.prototype.hasOwnProperty,Qx=Wx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Xx={key:!0,ref:!0,__self:!0,__source:!0};function C0(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Kx.call(t,r)&&!Xx.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Zx,type:e,key:o,ref:l,props:i,_owner:Qx.current}}Ts.Fragment=Gx;Ts.jsx=C0;Ts.jsxs=C0});var Z=ie(($C,N0)=>{"use strict";N0.exports=T0()});var df=ie((N3,ag)=>{var ik="Expected a function",eg="__lodash_hash_undefined__",tg=1/0,ok="[object Function]",lk="[object GeneratorFunction]",sk="[object Symbol]",ak=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uk=/^\w*$/,ck=/^\./,fk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dk=/[\\^$.*+?()[\]{}|]/g,pk=/\\(\\)?/g,mk=/^\[object .+?Constructor\]$/,hk=typeof global=="object"&&global&&global.Object===Object&&global,gk=typeof self=="object"&&self&&self.Object===Object&&self,af=hk||gk||Function("return this")();function yk(e,t){return e?.[t]}function _k(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var vk=Array.prototype,wk=Function.prototype,ng=Object.prototype,sf=af["__core-js_shared__"],X0=function(){var e=/[^.]+$/.exec(sf&&sf.keys&&sf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),rg=wk.toString,uf=ng.hasOwnProperty,ig=ng.toString,xk=RegExp("^"+rg.call(uf).replace(dk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),q0=af.Symbol,kk=vk.splice,Sk=og(af,"Map"),go=og(Object,"create"),Y0=q0?q0.prototype:void 0,J0=Y0?Y0.toString:void 0;function ir(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function Pk(e,t){var n=this.__data__,r=Is(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Qr.prototype.clear=Nk;Qr.prototype.delete=Ok;Qr.prototype.get=Ik;Qr.prototype.has=Ak;Qr.prototype.set=Pk;function or(e){var t=-1,n=e?e.length:0;for(this.clear();++t{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.output=Pe.exists=Pe.hash=Pe.bytes=Pe.bool=Pe.number=void 0;function Ps(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}Pe.number=Ps;function yg(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}Pe.bool=yg;function eS(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function mf(e,...t){if(!eS(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}Pe.bytes=mf;function _g(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ps(e.outputLen),Ps(e.blockLen)}Pe.hash=_g;function vg(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}Pe.exists=vg;function wg(e,t){mf(e);let n=t.outputLen;if(e.length{"use strict";Object.defineProperty(P,"__esModule",{value:!0});P.add5L=P.add5H=P.add4H=P.add4L=P.add3H=P.add3L=P.add=P.rotlBL=P.rotlBH=P.rotlSL=P.rotlSH=P.rotr32L=P.rotr32H=P.rotrBL=P.rotrBH=P.rotrSL=P.rotrSH=P.shrSL=P.shrSH=P.toBig=P.split=P.fromBig=void 0;var Ls=BigInt(2**32-1),hf=BigInt(32);function gf(e,t=!1){return t?{h:Number(e&Ls),l:Number(e>>hf&Ls)}:{h:Number(e>>hf&Ls)|0,l:Number(e&Ls)|0}}P.fromBig=gf;function kg(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);P.toBig=Sg;var Eg=(e,t,n)=>e>>>n;P.shrSH=Eg;var bg=(e,t,n)=>e<<32-n|t>>>n;P.shrSL=bg;var Rg=(e,t,n)=>e>>>n|t<<32-n;P.rotrSH=Rg;var Cg=(e,t,n)=>e<<32-n|t>>>n;P.rotrSL=Cg;var Tg=(e,t,n)=>e<<64-n|t>>>n-32;P.rotrBH=Tg;var Ng=(e,t,n)=>e>>>n-32|t<<64-n;P.rotrBL=Ng;var Og=(e,t)=>t;P.rotr32H=Og;var Ig=(e,t)=>e;P.rotr32L=Ig;var Ag=(e,t,n)=>e<>>32-n;P.rotlSH=Ag;var Pg=(e,t,n)=>t<>>32-n;P.rotlSL=Pg;var Lg=(e,t,n)=>t<>>64-n;P.rotlBH=Lg;var zg=(e,t,n)=>e<>>64-n;P.rotlBL=zg;function Dg(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}P.add=Dg;var Mg=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);P.add3L=Mg;var jg=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;P.add3H=jg;var Fg=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);P.add4L=Fg;var Ug=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;P.add4H=Ug;var Bg=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);P.add5L=Bg;var $g=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;P.add5H=$g;var nS={fromBig:gf,split:kg,toBig:Sg,shrSH:Eg,shrSL:bg,rotrSH:Rg,rotrSL:Cg,rotrBH:Tg,rotrBL:Ng,rotr32H:Og,rotr32L:Ig,rotlSH:Ag,rotlSL:Pg,rotlBH:Lg,rotlBL:zg,add:Dg,add3L:Mg,add3H:jg,add4L:Fg,add4H:Ug,add5H:$g,add5L:Bg};P.default=nS});var Vg=ie(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});zs.crypto=void 0;zs.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var Gg=ie(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.randomBytes=D.wrapXOFConstructorWithOpts=D.wrapConstructorWithOpts=D.wrapConstructor=D.checkOpts=D.Hash=D.concatBytes=D.toBytes=D.utf8ToBytes=D.asyncLoop=D.nextTick=D.hexToBytes=D.bytesToHex=D.isLE=D.rotr=D.createView=D.u32=D.u8=void 0;var yf=Vg(),rS=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);D.u8=rS;var iS=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));D.u32=iS;function vf(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var oS=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);D.createView=oS;var lS=(e,t)=>e<<32-t|e>>>t;D.rotr=lS;D.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!D.isLE)throw new Error("Non little-endian hardware is not supported");var sS=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function aS(e){if(!vf(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n=qt._0&&e<=qt._9)return e-qt._0;if(e>=qt._A&&e<=qt._F)return e-(qt._A-10);if(e>=qt._a&&e<=qt._f)return e-(qt._a-10)}function uS(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,o=0;i{};D.nextTick=cS;async function fS(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(Ds(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}D.wrapConstructor=hS;function gS(e){let t=(r,i)=>e(i).update(Ds(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}D.wrapConstructorWithOpts=gS;function yS(e){let t=(r,i)=>e(i).update(Ds(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}D.wrapXOFConstructorWithOpts=yS;function _S(e=32){if(yf.crypto&&typeof yf.crypto.getRandomValues=="function")return yf.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}D.randomBytes=_S});var ty=ie(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.shake256=X.shake128=X.keccak_512=X.keccak_384=X.keccak_256=X.keccak_224=X.sha3_512=X.sha3_384=X.sha3_256=X.sha3_224=X.Keccak=X.keccakP=void 0;var qr=xg(),wo=Hg(),vo=Gg(),[Xg,qg,Yg]=[[],[],[]],vS=BigInt(0),_o=BigInt(1),wS=BigInt(2),xS=BigInt(7),kS=BigInt(256),SS=BigInt(113);for(let e=0,t=_o,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],Xg.push(2*(5*r+n)),qg.push((e+1)*(e+2)/2%64);let i=vS;for(let o=0;o<7;o++)t=(t<<_o^(t>>xS)*SS)%kS,t&wS&&(i^=_o<<(_o<n>32?(0,wo.rotlBH)(e,t,n):(0,wo.rotlSH)(e,t,n),Qg=(e,t,n)=>n>32?(0,wo.rotlBL)(e,t,n):(0,wo.rotlSL)(e,t,n);function Jg(e,t=24){let n=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let l=0;l<10;l++)n[l]=e[l]^e[l+10]^e[l+20]^e[l+30]^e[l+40];for(let l=0;l<10;l+=2){let s=(l+8)%10,c=(l+2)%10,a=n[c],u=n[c+1],d=Kg(a,u,1)^n[s],f=Qg(a,u,1)^n[s+1];for(let p=0;p<50;p+=10)e[l+p]^=d,e[l+p+1]^=f}let i=e[2],o=e[3];for(let l=0;l<24;l++){let s=qg[l],c=Kg(i,o,s),a=Qg(i,o,s),u=Xg[l];i=e[u],o=e[u+1],e[u]=c,e[u+1]=a}for(let l=0;l<50;l+=10){for(let s=0;s<10;s++)n[s]=e[l+s];for(let s=0;s<10;s++)e[l+s]^=~n[(s+2)%10]&n[(s+4)%10]}e[0]^=ES[r],e[1]^=bS[r]}n.fill(0)}X.keccakP=Jg;var xo=class e extends vo.Hash{constructor(t,n,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=n,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,qr.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,vo.u32)(this.state)}keccak(){Jg(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,qr.exists)(this);let{blockLen:n,state:r}=this;t=(0,vo.toBytes)(t);let i=t.length;for(let o=0;o=r&&this.keccak();let l=Math.min(r-this.posOut,o-i);t.set(n.subarray(this.posOut,this.posOut+l),i),this.posOut+=l,i+=l}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,qr.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,qr.output)(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){let{blockLen:n,suffix:r,outputLen:i,rounds:o,enableXOF:l}=this;return t||(t=new e(n,r,i,l,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=l,t.destroyed=this.destroyed,t}};X.Keccak=xo;var In=(e,t,n)=>(0,vo.wrapConstructor)(()=>new xo(t,e,n));X.sha3_224=In(6,144,224/8);X.sha3_256=In(6,136,256/8);X.sha3_384=In(6,104,384/8);X.sha3_512=In(6,72,512/8);X.keccak_224=In(1,144,224/8);X.keccak_256=In(1,136,256/8);X.keccak_384=In(1,104,384/8);X.keccak_512=In(1,72,512/8);var ey=(e,t,n)=>(0,vo.wrapXOFConstructorWithOpts)((r={})=>new xo(t,e,r.dkLen===void 0?n:r.dkLen,!0));X.shake128=ey(31,168,128/8);X.shake256=ey(31,136,256/8)});var uy=ie((iT,An)=>{var{sha3_512:RS}=ty(),ry=24,ko=32,wf=(e=4,t=Math.random)=>{let n="";for(;n.lengthiy(RS(e)).toString(36).slice(1),ny=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),CS=e=>ny[Math.floor(e()*ny.length)],ly=({globalObj:e=typeof global<"u"?global:typeof window<"u"?window:{},random:t=Math.random}={})=>{let n=Object.keys(e).toString(),r=n.length?n+wf(ko,t):wf(ko,t);return oy(r).substring(0,ko)},sy=e=>()=>e++,TS=476782367,ay=({random:e=Math.random,counter:t=sy(Math.floor(e()*TS)),length:n=ry,fingerprint:r=ly({random:e})}={})=>function(){let o=CS(e),l=Date.now().toString(36),s=t().toString(36),c=wf(n,e),a=`${l+c+s+r}`;return`${o+oy(a).substring(1,n)}`},NS=ay(),OS=(e,{minLength:t=2,maxLength:n=ko}={})=>{let r=e.length,i=/^[0-9a-z]+$/;try{if(typeof e=="string"&&r>=t&&r<=n&&i.test(e))return!0}finally{}return!1};An.exports.getConstants=()=>({defaultLength:ry,bigLength:ko});An.exports.init=ay;An.exports.createId=NS;An.exports.bufToBigInt=iy;An.exports.createCounter=sy;An.exports.createFingerprint=ly;An.exports.isCuid=OS});var xf=ie((oT,So)=>{var{createId:IS,init:AS,getConstants:PS,isCuid:LS}=uy();So.exports.createId=IS;So.exports.init=AS;So.exports.getConstants=PS;So.exports.isCuid=LS});var Ty=ie((bo,Zs)=>{(function(e,t){"use strict";var n="1.0.37",r="",i="?",o="function",l="undefined",s="object",c="string",a="major",u="model",d="name",f="type",p="vendor",g="version",_="architecture",x="console",h="mobile",m="tablet",y="smarttv",v="wearable",S="embedded",R=500,k="Amazon",b="Apple",O="ASUS",C="BlackBerry",I="Browser",Me="Chrome",el="Edge",Dt="Firefox",Mt="Google",Pd="Huawei",ka="LG",Sa="Microsoft",Ld="Motorola",tl="Opera",nl="Samsung",zd="Sharp",rl="Sony",Ea="Xiaomi",ba="Zebra",Dd="Facebook",Md="Chromium OS",jd="Mac OS",gv=function(F,V){var z={};for(var G in F)V[G]&&V[G].length%2===0?z[G]=V[G].concat(F[G]):z[G]=F[G];return z},il=function(F){for(var V={},z=0;z0?H.length===2?typeof H[1]==o?this[H[0]]=H[1].call(this,kt):this[H[0]]=H[1]:H.length===3?typeof H[1]===o&&!(H[1].exec&&H[1].test)?this[H[0]]=kt?H[1].call(this,kt,H[2]):t:this[H[0]]=kt?kt.replace(H[1],H[2]):t:H.length===4&&(this[H[0]]=kt?H[3].call(this,kt.replace(H[1],H[2])):t):this[H]=kt||t;z+=2}},Ca=function(F,V){for(var z in V)if(typeof V[z]===s&&V[z].length>0){for(var G=0;G2&&(L[u]="iPad",L[f]=m),L},this.getEngine=function(){var L={};return L[d]=t,L[g]=t,wi.call(L,G,xt.engine),L},this.getOS=function(){var L={};return L[d]=t,L[g]=t,wi.call(L,G,xt.os),H&&!L[d]&&on&&on.platform!="Unknown"&&(L[d]=on.platform.replace(/chrome os/i,Md).replace(/macos/i,jd)),L},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return G},this.setUA=function(L){return G=typeof L===c&&L.length>R?Ra(L,R):L,this},this.setUA(G),this};We.VERSION=n,We.BROWSER=il([d,g,a]),We.CPU=il([_]),We.DEVICE=il([u,p,f,x,h,y,m,v,S]),We.ENGINE=We.OS=il([d,g]),typeof bo!==l?(typeof Zs!==l&&Zs.exports&&(bo=Zs.exports=We),bo.UAParser=We):typeof define===o&&define.amd?define(function(){return We}):typeof e!==l&&(e.UAParser=We);var yr=typeof e!==l&&(e.jQuery||e.Zepto);if(yr&&!yr.ua){var ol=new We;yr.ua=ol.getResult(),yr.ua.get=function(){return ol.getUA()},yr.ua.set=function(F){ol.setUA(F);var V=ol.getResult();for(var z in V)yr.ua[z]=V[z]}}})(typeof window=="object"?window:bo)});var O_=ie((EA,N_)=>{var Z2=1/0,G2="[object Symbol]",K2=/^\s+|\s+$/g,Jf="\\ud800-\\udfff",__="\\u0300-\\u036f\\ufe20-\\ufe23",v_="\\u20d0-\\u20f0",w_="\\ufe0e\\ufe0f",Q2="["+Jf+"]",qf="["+__+v_+"]",Yf="\\ud83c[\\udffb-\\udfff]",X2="(?:"+qf+"|"+Yf+")",x_="[^"+Jf+"]",k_="(?:\\ud83c[\\udde6-\\uddff]){2}",S_="[\\ud800-\\udbff][\\udc00-\\udfff]",E_="\\u200d",b_=X2+"?",R_="["+w_+"]?",q2="(?:"+E_+"(?:"+[x_,k_,S_].join("|")+")"+R_+b_+")*",Y2=R_+b_+q2,J2="(?:"+[x_+qf+"?",qf,k_,S_,Q2].join("|")+")",eE=RegExp(Yf+"(?="+Yf+")|"+J2+Y2,"g"),tE=RegExp("["+E_+Jf+__+v_+w_+"]"),nE=typeof global=="object"&&global&&global.Object===Object&&global,rE=typeof self=="object"&&self&&self.Object===Object&&self,iE=nE||rE||Function("return this")();function oE(e){return e.split("")}function lE(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function uE(e,t){for(var n=e.length;n--&&C_(t,e[n],0)>-1;);return n}function cE(e){return tE.test(e)}function m_(e){return cE(e)?fE(e):oE(e)}function fE(e){return e.match(eE)||[]}var dE=Object.prototype,pE=dE.toString,h_=iE.Symbol,g_=h_?h_.prototype:void 0,y_=g_?g_.toString:void 0;function mE(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:mE(e,t,n)}function gE(e){return!!e&&typeof e=="object"}function yE(e){return typeof e=="symbol"||gE(e)&&pE.call(e)==G2}function _E(e){return e==null?"":T_(e)}function vE(e,t,n){if(e=_E(e),e&&(n||t===void 0))return e.replace(K2,"");if(!e||!(t=T_(t)))return e;var r=m_(e),i=m_(t),o=aE(r,i),l=uE(r,i)+1;return hE(r,o,l).join("")}N_.exports=vE});var M_=ie((AA,D_)=>{"use strict";function kE(e,t){for(;e.length{let[,r]=(0,Kr.useState)({}),o=(0,Kr.useRef)({data:e,deps:n||[],ready:!1,_loading:{}}).current;if((0,Kr.useEffect)(()=>{o.ready=!0,t&&t({init:!0})},[]),o.ready===!1)o._loading={},o.data.render=()=>{o.ready&&r({})};else if(o.deps.length>0&&n){for(let[l,s]of Object.entries(n))if(o.deps[l]!==s){o.deps[l]=s,t&&setTimeout(()=>{t({init:!1})});break}}return o.data};var S0=(e,t)=>new Promise(async n=>{if(typeof e=="function"){let r=null;if(t&&(r=setTimeout(n,t)),await e()){clearTimeout(r),n();return}let i=0,o=setInterval(async()=>{await e()&&(r&&clearTimeout(r),clearInterval(o),n()),i>100&&clearInterval(o)},10)}else typeof e=="number"&&setTimeout(()=>{n()},e)});var Hx=A(ge());var Kt=A(ge()),Xc=(0,Kt.createContext)({global:{},render:()=>{}});var Nn=(e,t)=>{let n=(0,Kt.useContext)(Xc),{global:r,render:i}=n;r[t]||(r[t]=e),(0,Kt.useEffect)(()=>{let l=null;return()=>{typeof l=="function"?l():l instanceof Promise&&l.then(s=>{typeof s=="function"&&s()})}},[]);let o=r[t];return o&&(o.render=l=>{l&&(r[t]=void 0),(0,Kt.startTransition)(i)}),o},Tn=e=>{if(e==null||typeof e!="object")return e;if(e instanceof Date){var t=new Date;return t.setTime(e.getTime()),t}if(e instanceof Array)return e.map(i=>Tn(i));var n={};for(var r in e)typeof e[r]=="object"?n[r]=Tn(e[r]):n[r]=e[r];return n};var XC=A(ge());var Yc=A(ge()),O0=A(Kc()),I0=A(R0()),A0=A(Z()),P0=()=>{let e=typeof window=="object"?window:globalThis;e.React=Yc.default,e.ReactDOM=O0.default,e.JSXRuntime=A0.default,e.JSXDevRuntime=I0.default,e.Fragment=Yc.default.Fragment};var qx={data:""},z0=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||qx,D0=e=>{let t=z0(e),n=t.data;return t.data="",n},Yx=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Jx=/\/\*[^]*?\*\/| +/g,L0=/\n+/g,rr=(e,t)=>{let n="",r="",i="";for(let o in e){let l=e[o];o[0]=="@"?o[1]=="i"?n=o+" "+l+";":r+=o[1]=="f"?rr(l,o):o+"{"+rr(l,o[1]=="k"?"":t)+"}":typeof l=="object"?r+=rr(l,t?t.replace(/([^,])+/g,s=>o.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):o):l!=null&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=rr.p?rr.p(o,l):o+":"+l+";")}return n+(t&&i?t+"{"+i+"}":i)+r},Qt={},M0=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+M0(e[n]);return t}return e},ek=(e,t,n,r,i)=>{let o=M0(e),l=Qt[o]||(Qt[o]=(c=>{let a=0,u=11;for(;a>>0;return"go"+u})(o));if(!Qt[l]){let c=o!==e?e:(a=>{let u,d,f=[{}];for(;u=Yx.exec(a.replace(Jx,""));)u[4]?f.shift():u[3]?(d=u[3].replace(L0," ").trim(),f.unshift(f[0][d]=f[0][d]||{})):f[0][u[1]]=u[2].replace(L0," ").trim();return f[0]})(e);Qt[l]=rr(i?{["@keyframes "+l]:c}:c,n?"":"."+l)}let s=n&&Qt.g?Qt.g:null;return n&&(Qt.g=Qt[l]),((c,a,u,d)=>{d?a.data=a.data.replace(d,c):a.data.indexOf(c)===-1&&(a.data=u?c+a.data:a.data+c)})(Qt[l],t,r,s),l},tk=(e,t,n)=>e.reduce((r,i,o)=>{let l=t[o];if(l&&l.call){let s=l(n),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;l=c?"."+c:s&&typeof s=="object"?s.props?"":rr(s,""):s===!1?"":s}return r+i+(l??"")},"");function Ns(e){let t=this||{},n=e.call?e(t.p):e;return ek(n.unshift?n.raw?tk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,z0(t.target),t.g,t.o,t.k)}var VC=Ns.bind({g:1}),WC=Ns.bind({k:1});var j0=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await S0(()=>t.__SRV_URL__),t.prasiContext={global:{},render(){}};let n=window.location,r=n.protocol.indexOf("http")===0?n.hostname:"localhost",i=n.protocol!="https:"||/localhost|127.0.0.1|0.0.0.0/.test(r)?"http":"https";if(t.__SRV_URL__){t.serverurl=t.__SRV_URL__;let l=new URL(t.serverurl);(l.hostname==="localhost"||l.hostname==="127.0.0.1")&&(l.hostname=n.hostname,l.pathname=l.pathname==="/"?"":l.pathname,t.serverurl=l.toString(),t.serverurl.endsWith("/")&&(t.serverurl=t.serverurl.substring(0,t.serverurl.length-1)))}let o=n.port;t.baseurl=i+"://"+r+(o?":"+o:"")+"/",t.basepath||(t.basepath="/"),t.css=Ns,t.extractCss=D0,t.pathname=n.pathname,t.cx=(...l)=>{let s=[];return l.filter(c=>c?(typeof c=="string"&&c.trim(),!0):!1).forEach(c=>{if(Array.isArray(c))for(let a of c)typeof a=="string"&&a.trim()&&s.push(a.trim());else s.push(c.trim())}),s.join(" ")},t.navigate=l=>{let s=l;if(typeof t.navigateOverride=="function"&&(s=t.navigateOverride(l),!s))return null;history.pushState({prevUrl:window.location.href},"",s),t.pathname=l,t.prasiContext&&t.prasiContext.render&&t.prasiContext.render()},typeof window=="object"&&window.addEventListener("popstate",()=>{let l=navigator.serviceWorker.controller;if(l&&l.postMessage({type:"add-cache",url:n.href}),t.prasiContext.popState){t.prasiContext.popState();return}if(t.preventPopRender){t.preventPopRender=!1;return}t.prasiContext&&t.prasiContext.render&&(t.pathname=n.pathname,t.prasiContext.render())})};function ef(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function tf(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=ef(n);return(i,o)=>r.then(l=>o(l.transaction(t,i).objectStore(t)))}var Jc;function F0(){return Jc||(Jc=tf("keyval-store","keyval")),Jc}function nf(e,t=F0()){return t("readonly",n=>ef(n.get(e)))}function Os(e,t,n=F0()){return n("readwrite",r=>(r.put(t,e),ef(r.transaction)))}var dv=A(ge());var U0=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function nk(e){return typeof e=="string"&&U0.test(e)}var rf=nk;var mo=A(Z()),of=({children:e,back:t})=>(0,mo.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,mo.jsx)("div",{children:e}),(0,mo.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});var $0=A(ge());var Ce=A(Z()),B0=window,ho=({children:e,className:t,show:n,backdrop:r,note:i,alt:o})=>{let l=Cn({icon:(0,Ce.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,$0.useEffect)(()=>(l.ival=setInterval(()=>{l.value+=.1333,l.value>=1.3&&(l.value=0),l.render()},200),B0.loadingIcon&&(l.icon=(0,Ce.jsx)("img",{alt:"loading",src:B0.loadingIcon,className:css` width: 42px; height: 42px; `}),l.render()),()=>{clearInterval(l.ival)}),[]),(0,Ce.jsxs)(Ce.Fragment,{children:[r!==!1&&(0,Ce.jsx)("div",{className:cx("flex items-center z-40 bg-white pointer-events-none","w-full h-full fixed transition-all duration-1000",typeof n<"u"?n?"opacity-50":"opacity-0":"opacity-50"),onContextMenuCapture:s=>{s.preventDefault()}}),e?(0,Ce.jsx)("div",{onContextMenuCapture:s=>{s.preventDefault()},className:cx("flex flex-1 items-center justify-center z-40 transition-all",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center flex-col space-y-3 bg-white p-4 rounded-lg select-none",children:(0,Ce.jsx)("div",{className:"text-sm",children:e})})}):(0,Ce.jsx)("div",{className:cx("flex flex-1 items-center justify-center z-40 pointer-events-none transition-all",t||(r!==!1?"w-full h-full fixed":""),typeof n<"u"?n?"":"hidden":""),children:(0,Ce.jsxs)("div",{className:cx("w-1/6 flex flex-col items-center justify-center",css` @@ -15,9 +15,9 @@ Error generating stack: `+o.message+` } `),children:[(0,Ce.jsx)("div",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:i}),(0,Ce.jsx)("div",{className:"pr-outer w-full h-[3px] flex items-stretch rounded-sm overflow-hidden",children:(0,Ce.jsx)("div",{className:cx("bg-blue-800 transition-all duration-200 rounded-sm w-full",css` transform: translate(${-100+l.value*200}%); - `)})}),o]})})]})};var Gs=A(ge());var $g=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};var An={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{}},comp:{load:async()=>null},on_preload:void 0};var zy=A(ge());var de=A(ge()),yf=class extends de.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},Yk=()=>!1,Hg=(0,de.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:Yk});function Vg({children:e}){let[t,n]=(0,de.useState)(),r=(0,de.useRef)(),i=(0,de.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return de.default.createElement(Hg.Provider,{value:i},de.default.createElement(yf,{error:t,onError:(o,l)=>{n(o),r.current?.(o,l)}},e))}Vg.displayName="ReactUseErrorBoundaryContext";function Wg(e){function t(n){return de.default.createElement(Vg,null,de.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function Zg(e){let t=(0,de.useContext)(Hg);t.componentDidCatch.current=e;let n=(0,de.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var st=A(Z()),Nt=Wg(({children:e,meta:t,id:n,silent:r=!0})=>{let i=Cn({retrying:!1,meta:t}),[o,l]=Zg((c,a)=>{r!==!0&&console.warn(c)});t&&i.meta!==t&&(i.meta=t,setTimeout(l));let s=t;return o?(0,st.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,st.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",s?.item.name?"["+s.item.name+"]:":""]}),(0,st.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,st.jsx)(st.Fragment,{children:"Retrying..."}):(0,st.jsx)(st.Fragment,{children:o.message})}),(0,st.jsx)("div",{className:"p-1",children:(0,st.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),l()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});var He=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var Gg=(e,t)=>{let n=He(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` + `)})}),o]})})]})};var Vs=A(ge());var H0=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};var On={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{}},comp:{load:async()=>null},on_preload:void 0};var ky=A(ge());var de=A(ge()),lf=class extends de.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},rk=()=>!1,V0=(0,de.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:rk});function W0({children:e}){let[t,n]=(0,de.useState)(),r=(0,de.useRef)(),i=(0,de.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return de.default.createElement(V0.Provider,{value:i},de.default.createElement(lf,{error:t,onError:(o,l)=>{n(o),r.current?.(o,l)}},e))}W0.displayName="ReactUseErrorBoundaryContext";function Z0(e){function t(n){return de.default.createElement(W0,null,de.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function G0(e){let t=(0,de.useContext)(V0);t.componentDidCatch.current=e;let n=(0,de.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var st=A(Z()),Nt=Z0(({children:e,meta:t,id:n,silent:r=!0})=>{let i=Cn({retrying:!1,meta:t}),[o,l]=G0((c,a)=>{r!==!0&&console.warn(c)});t&&i.meta!==t&&(i.meta=t,setTimeout(l));let s=t;return o?(0,st.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,st.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",s?.item.name?"["+s.item.name+"]:":""]}),(0,st.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,st.jsx)(st.Fragment,{children:"Retrying..."}):(0,st.jsx)(st.Fragment,{children:o.message})}),(0,st.jsx)("div",{className:"p-1",children:(0,st.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),l()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});var He=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var K0=(e,t)=>{let n=He(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` ${n.css} - `,t):""};var Kg=(e,t)=>{let n=He(e,"bg",t,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(` + `,t):""};var Q0=(e,t)=>{let n=He(e,"bg",t,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(` background-repeat: no-repeat; `,n.color&&` background-color: ${n.color}; @@ -25,7 +25,7 @@ Error generating stack: `+o.message+` background-size: ${n.size}; `,n.pos&&` background-position: ${n.pos}; - `)};var ay=A(Sf());var uy=(e,t)=>{let n=He(e,"border",t,{style:"solid",stroke:{},rounded:{tr:0,tl:0,bl:0,br:0},color:"transparent"});return cx(It(n,"stroke.l","border-left-width"),It(n,"stroke.r","border-right-width"),It(n,"stroke.b","border-bottom-width"),It(n,"stroke.t","border-top-width"),It(n,"color","border-color","transparent"),It(n,"style","border-style","dashed"),It(n,"rounded.tl","border-top-left-radius"),It(n,"rounded.tr","border-top-right-radius"),It(n,"rounded.bl","border-bottom-left-radius"),It(n,"rounded.br","border-bottom-right-radius"))},It=(e,t,n,r)=>{let i=(0,ay.default)(e,t);if(r)return i?`${n}: ${i};`:`${n}: ${r};`;if(i)return`${n}: ${i}px;`};var cy=(e,t,n)=>{let r=He(e,"dim",t,{h:"fit",w:"fit"});return r.w==="full"&&r.h==="full"?` + `)};var ug=A(df());var cg=(e,t)=>{let n=He(e,"border",t,{style:"solid",stroke:{},rounded:{tr:0,tl:0,bl:0,br:0},color:"transparent"});return cx(Ot(n,"stroke.l","border-left-width"),Ot(n,"stroke.r","border-right-width"),Ot(n,"stroke.b","border-bottom-width"),Ot(n,"stroke.t","border-top-width"),Ot(n,"color","border-color","transparent"),Ot(n,"style","border-style","dashed"),Ot(n,"rounded.tl","border-top-left-radius"),Ot(n,"rounded.tr","border-top-right-radius"),Ot(n,"rounded.bl","border-bottom-left-radius"),Ot(n,"rounded.br","border-bottom-right-radius"))},Ot=(e,t,n,r)=>{let i=(0,ug.default)(e,t);if(r)return i?`${n}: ${i};`:`${n}: ${r};`;if(i)return`${n}: ${i}px;`};var fg=(e,t,n)=>{let r=He(e,"dim",t,{h:"fit",w:"fit"});return r.w==="full"&&r.h==="full"?` width:100%; height:100%; flex:1; @@ -44,7 +44,7 @@ Error generating stack: `+o.message+` `,r.h&&typeof r.h=="number"&&r.h>=0&&` height: ${r.h}${r.hUnit||"px"}; overflow-y: clip; - `)};var fy=({item:e,hover:t,active:n})=>cx(t&&css` + `)};var dg=({item:e,hover:t,active:n})=>cx(t&&css` & { box-shadow: inset 0 0 0px 3px #bae3fd; > img { @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` > img { opacity: 0.6; } - `);var Yr=window,dy=(e,t)=>{let n=He(e,"font",t,{});if(n.family){Yr.loadedFonts||(Yr.loadedFonts=[]);let i=`:wght@${[300,400,500,600].join(";")}`,o=n.family.replace(/ /g,"+");if(Yr.loadedFonts.indexOf(n.family)<0){Yr.loadedFonts.push(n.family);let l=document,s=`https://prasi.avolut.com/_font/css2?family=${o}${i}`;if(!l.querySelector(`link[href="${s}]`)){let c=l.createElement("link");c.type="text/css",c.rel="stylesheet",c.href=s,l.head.appendChild(c)}}}return!n.family&&Yr.defaultFont&&(n.family=Yr.defaultFont),cx(n.color&&` + `);var Xr=window,pg=(e,t)=>{let n=He(e,"font",t,{});if(n.family){Xr.loadedFonts||(Xr.loadedFonts=[]);let i=`:wght@${[300,400,500,600].join(";")}`,o=n.family.replace(/ /g,"+");if(Xr.loadedFonts.indexOf(n.family)<0){Xr.loadedFonts.push(n.family);let l=document,s=`https://prasi.avolut.com/_font/css2?family=${o}${i}`;if(!l.querySelector(`link[href="${s}]`)){let c=l.createElement("link");c.type="text/css",c.rel="stylesheet",c.href=s,l.head.appendChild(c)}}}return!n.family&&Xr.defaultFont&&(n.family=Xr.defaultFont),cx(n.color&&` color: ${n.color}; `,n.whitespace==="whitespace-normal"&&` word-break: break-word; @@ -72,10 +72,10 @@ Error generating stack: `+o.message+` line-height: ${n.height==="auto"?"normal":`${n.height}%`}; `,n.family&&` font-family: ${n.family}; - `)};var py=(e,t)=>{let n=[],r=He(e,"layout",t,{dir:"col",align:"top-left",gap:0,wrap:void 0});if(r)r.wrap&&n.push(r.wrap==="flex-wrap"?"flex-wrap: wrap;":"flex-wrap: nowrap;"),r.dir.startsWith("col")?(r.dir==="col"?n.push("flex-direction: column;"):r.dir==="col-reverse"&&n.push("flex-direction: column-reverse;"),r.gap==="auto"?(r.align==="left"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="right"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`gap: ${r.gap}px;`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:center; justify-content: start;"),r.align==="top-right"&&n.push("align-items:end; justify-content: start;"),r.align==="left"&&n.push("align-items:start; justify-content: center;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-left"&&n.push("align-items:start; justify-content: end;"),r.align==="bottom-center"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;"))):(r.dir==="row"?n.push("flex-direction: row;"):r.dir==="row-reverse"&&n.push("flex-direction: row-reverse;"),r.gap==="auto"?(r.align==="top"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="bottom"&&n.push("align-items:end; justify-content: space-between;")):(n.push(` + `)};var mg=(e,t)=>{let n=[],r=He(e,"layout",t,{dir:"col",align:"top-left",gap:0,wrap:void 0});if(r)r.wrap&&n.push(r.wrap==="flex-wrap"?"flex-wrap: wrap;":"flex-wrap: nowrap;"),r.dir.startsWith("col")?(r.dir==="col"?n.push("flex-direction: column;"):r.dir==="col-reverse"&&n.push("flex-direction: column-reverse;"),r.gap==="auto"?(r.align==="left"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="right"&&n.push("align-items:end; justify-content: space-between;")):(n.push(`gap: ${r.gap}px;`),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:center; justify-content: start;"),r.align==="top-right"&&n.push("align-items:end; justify-content: start;"),r.align==="left"&&n.push("align-items:start; justify-content: center;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-left"&&n.push("align-items:start; justify-content: end;"),r.align==="bottom-center"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;"))):(r.dir==="row"?n.push("flex-direction: row;"):r.dir==="row-reverse"&&n.push("flex-direction: row-reverse;"),r.gap==="auto"?(r.align==="top"&&n.push("align-items:start; justify-content: space-between;"),r.align==="center"&&n.push("align-items:center; justify-content: space-between;"),r.align==="bottom"&&n.push("align-items:end; justify-content: space-between;")):(n.push(` gap: ${r.gap}px; `),r.align==="top-left"&&n.push("align-items:start; justify-content: start;"),r.align==="top-center"&&n.push("align-items:start; justify-content: center;"),r.align==="top-right"&&n.push("align-items:start; justify-content: end;"),r.align==="left"&&n.push("align-items:center; justify-content: start;"),r.align==="center"&&n.push("align-items:center; justify-content: center;"),r.align==="right"&&n.push("align-items:center; justify-content: end;"),r.align==="bottom-left"&&n.push("align-items:end; justify-content: start;"),r.align==="bottom-center"&&n.push("align-items:end; justify-content: center;"),r.align==="bottom-right"&&n.push("align-items:end; justify-content: end;")));else return"flex-direction:column; align-items:start; justify-content: start;";return n.join(` - `).trim()};var my=(e,t)=>{let n=He(e,"padding",t,{l:0,b:0,t:0,r:0});return cx(n.l!==void 0&&` + `).trim()};var hg=(e,t)=>{let n=He(e,"padding",t,{l:0,b:0,t:0,r:0});return cx(n.l!==void 0&&` padding-left: ${n.l}px; `,n.r!==void 0&&` padding-right: ${n.r}px; @@ -83,35 +83,35 @@ Error generating stack: `+o.message+` padding-bottom: ${n.b}px; `,n.t!==void 0&&` padding-top: ${n.t}px; - `)};var Ef=(e,t)=>{try{return cx([e.id?`s-${e.id}`:"",css` + `)};var pf=(e,t)=>{try{return cx([e.id?`s-${e.id}`:"",css` display: flex; position: relative; user-select: none; - ${py(e,t.mode)} - ${my(e,t.mode)} - ${cy(e,t.mode,t?.editor)} - ${uy(e,t.mode)} - ${Kg(e,t.mode)} - ${dy(e,t.mode)} - `,(t?.hover||t?.active)&&fy({item:e,hover:t?.hover,active:t?.active}),Gg(e,t.mode)])}catch(n){console.log(n)}return cx([])};var hy=A(Z()),Eo=(e,t,n,r,i)=>{let o=t.item,l;o.component?.style&&(l={style:o.component.style,className:Ef(o.component.style,{mode:e.mode})});let s={className:Ef(o,{mode:e.mode}),inherit:l},c={},a=t.item.childs,u;return t.item.type==="text"?(u=null,s.dangerouslySetInnerHTML={__html:t.item.html||""}):u=Array.isArray(a)&&a?.map(d=>{if(!d)return null;let{id:f}=d,p=n?e.layout?.meta[f]:e.meta[f];return p?(0,hy.jsx)(qt,{meta:p,is_layout:n,passprop:{...r},depth:i+1},f):null}),s.children=u,t.item.adv?.html?(delete s.children,s.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete s.children,delete s.dangerouslySetInnerHTML),{props:s,text_props:c}};var My=A(ge());var Ay=A(Rf());var Jr={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Us(e={}){let t={options:e,rootNode:by(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)Ey(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>i2(t,n(r)),insert:(r,i)=>Ey(t,n(r),i),remove:r=>o2(t,n(r))}}function i2(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,l=null,s=e.rootNode,c=null;for(let a=0;a{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:a2,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{comp_editable:localStorage.getItem("prasi-comp-editable")==="yes",zoom:localStorage.zoom||"100%",side:{prop:!0},layout:{left:parseInt(localStorage.getItem("prasi-layout-left")||"250"),right:parseInt(localStorage.getItem("prasi-layout-right")||"250")},prevent_indent_hook:!1,syncing:!1,tree:{item_loading:[],search:"",search_ref:null,search_mode:{Name:!0,JS:!1,HTML:!1,CSS:!1},rename_id:"",open:{}},popup:{file:{enabled:!1,open:!1,picker:{value:"",on_pick:!1,multi:!1},path:"/",expanded:JSON.parse(localStorage.getItem("panel-file-expanded")||"{}"),entry:{},selected:new Set,action:null,file_renaming:"",file_ctx_menu_event:null,tree:[],tree_renaming:"",tree_ctx_path:"",tree_ctx_menu_event:null,preview:!0,upload:{started:!1,progress:{}}},code:{init:!1,open:!1,name:"site",log:"",loading:!1,startup_status:"init",error:!1,show_log:!1,list:{}},page:{open:null,form:null},script:{open:!1,mode:"js",lastMode:"js",type:"item",prop_kind:"",prop_name:"",on_close:()=>{},typings:{status:"ok",err_msg:""},wb_render:()=>{}},site:null,site_form:null,comp:{preview_id:"",open:null,import:!1},comp_group:null,api:{open:!1}}}};var Bs=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});var ur=A(ge());var at=window;var u2=pf("prasi-cache","prasi-cache-store"),Co={timeout:null,store:u2},$s=(e,t)=>{let n=[...Ry(t,"navigate(",")"),...Ry(t,"href = ",";")],r=e.page.cur.id;e.page.navs[r]||(e.page.navs[r]=new Set);for(let i of n)e.page.navs[r].add(i);clearTimeout(Co.timeout),Co.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},Ry=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let l=e.indexOf(t,r);if(i=r,l>=0){let s=e[l+t.length];if(s==='"'||s==="'"||s==="`"){let c=e.indexOf(`${s}${n}`,l+t.length+1),a=e.substring(l+t.length+1,c);r=c+2+n.length,o.push(a)}}if(i===r)break}return o};var ar=A(ge());var Ty=A(Sf()),sr=A(ge());var Cf=A(Z()),Ny=(e,t,n,r)=>i=>{let[o,l]=(0,sr.useState)({}),s=i.internal_key;n.item.script||(n.item.script={});let c=n.item.script;s&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[s]||(n.item.script_keyed[s]={}),c=n.item.script_keyed[s]),c.passprop||(c.passprop={});let a={};if(c.passprop){let f=!1;for(let[p,g]of Object.entries(i))["children","key"].includes(p)||(f=!0,a[p]=g,c.passprop[p]={end:0,start:0,value:g})}let u={...r,...a};if(!Array.isArray(i.children)&&(0,sr.isValidElement)(i.children)&&typeof i.children=="object"){let f=(0,Ty.default)(i.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(f)){let p=!0;for(let g of f)!(0,sr.isValidElement)(g)&&typeof g=="object"||(p=!1);if(p)return f.map(g=>{let _=e.meta[g.id];if(_||(e.meta[g.id]={item:g},_=e.meta[g.id]),_){if(Object.keys(_.item).length<=3&&_.mitem){let x={..._.item},h=_.mitem.toJSON();_.item={...h,...x}}return(0,Cf.jsx)(qt,{is_layout:t,meta:_,passprop:u,parent_key:i.internal_key},g.id)}return null})}}if(!Array.isArray(i.children)&&!(0,sr.isValidElement)(i.children)&&typeof i.children=="object"){let f=i.children.id;if(f){let p=e.meta[f];if(!p){e.meta[f]={item:i.children},p=e.meta[f];let g=p.item.component?.id;g&&e.comp.load(g).then(_=>{if(_){for(let[h,m]of Object.entries(_)){let y=p.item;y[h]||(y[h]=m)}let x=p.item.component?.props;for(let[h,m]of Object.entries(_.component?.props||{}))x[h]||(x[h]=m);l({})}})}return(0,Cf.jsx)(qt,{is_layout:t,meta:p,passprop:u,parent_key:i.internal_key})}}return Tf(i,u,s?{parent_key:s}:void 0)},Tf=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){let i=[];for(let o of r.children)i.push(Cy(o,r,t,n));return i}return Cy(r.children,r,t,n)},Cy=(e,t,n,r)=>{if((0,sr.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var ti={},Iy=(e,t,n)=>r=>{let i=["localhost","prasi.avolut.com"].includes(location.hostname)&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:l,parent_key:s}=r,c=e.script?.init_local_effect,a=t?e.layout?.meta:e.meta,u=(0,ar.useRef)(ti[o]?ti[o]:r.value),[d,f]=(0,ar.useState)({}),p=u.current;return p.render=()=>{window.prasiContext.render?window.prasiContext.render():f({})},Hs(e,n,n.script?.scope,s),r.hook&&r.hook(p),(0,ar.useEffect)(()=>{if(n.parent?.instance_id&&a){let _=a[n.parent?.instance_id];if(_&&_.instances){for(let[x,h]of Object.entries(_.instances[n.parent.instance_id]))if(h===n.item.id){o=x;break}}}return!c[o]&&(typeof c=="object"&&(c[o]=!0),(async()=>r.effect&&(await r.effect(p),i&&(ti[o]=p)))()),()=>{}},[...r.deps||[],location.pathname]),(0,ar.useEffect)(()=>{i&&ti[o]===null&&(async()=>r.effect&&(await r.effect(p),i&&(ti[o]=p)))()},[ti[o]]),Tf(l,{...n.script?.scope,[r.name]:p})};var Nf=A(Z()),Oy=(e,t,n,r,i,o)=>{let l=Eo(e,t,n,r,i);e.visit&&e.visit(t,l),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:Iy(e,n,t),PassProp:Ny(e,n,t,r)};let s=t.script,c=window.exports,a={useEffect:ur.useEffect,children:l.props.children,props:l.props,Local:s?.Local,db:e.site.db,api:e.site.api,PassProp:s?.PassProp,ErrorBox:Nt,newElement:()=>{},render:f=>{let p=f;if((0,ur.isValidElement)(f)&&f.props.children){let g=x=>{let h=!1,m=[];if((0,ur.isValidElement)(x)){if(x.type===t.script?.PassProp)return{should_replace:!0,el:{...x,props:{...x.props,internal_key:x.key}}};if(Array.isArray(x.props?.children))for(let y of x.props?.children)if(Array.isArray(y)){let v=[],S=!1;for(let R of y){let k=g(R);k.should_replace?(v.push(k.el),S=!0):v.push(R)}S?(h=!0,m.push(v)):m.push(y)}else typeof y=="object"?y.type===t.script?.PassProp&&(h=!0,m.push({...y,props:{...y.props,internal_key:y.props.key}})):m.push(y)}return{should_replace:h,el:{...x,props:{...x.props,children:m}}}},_=g(f);_.should_replace&&(p=_.el)}s&&(s.result=(0,Nf.jsx)(ur.Suspense,{children:p}))},params,...Bs(e),...c,...r,_meta:e.meta,_item:t.item,_syncm:typeof syncronize<"u"?syncronize:void 0};if(typeof r=="object"){for(let[f,p]of Object.entries(r))if(typeof p=="object"&&p&&p._jsx){let g=p;a[f]=(0,Nf.jsx)(c2,{fn:g.fn,passprop:{...r},meta:t})}}!at.isEditor&&t.item.adv?.js&&$s(e,t.item.adv.js);let u=t.item.adv?.jsBuilt||"",d=Of(u,If)||"";try{new Function(...Object.keys(a),"___js",`// ${t.item.name}: ${t.item.id} + ${mg(e,t.mode)} + ${hg(e,t.mode)} + ${fg(e,t.mode,t?.editor)} + ${cg(e,t.mode)} + ${Q0(e,t.mode)} + ${pg(e,t.mode)} + `,(t?.hover||t?.active)&&dg({item:e,hover:t?.hover,active:t?.active}),K0(e,t.mode)])}catch(n){console.log(n)}return cx([])};var gg=A(Z()),yo=(e,t,n,r,i)=>{let o=t.item,l;o.component?.style&&(l={style:o.component.style,className:pf(o.component.style,{mode:e.mode})});let s={className:pf(o,{mode:e.mode}),inherit:l},c={},a=t.item.childs,u;return t.item.type==="text"?(u=null,s.dangerouslySetInnerHTML={__html:t.item.html||""}):u=Array.isArray(a)&&a?.map(d=>{if(!d)return null;let{id:f}=d,p=n?e.layout?.meta[f]:e.meta[f];return p?(0,gg.jsx)(Xt,{meta:p,is_layout:n,passprop:{...r},depth:i+1},f):null}),s.children=u,t.item.adv?.html?(delete s.children,s.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete s.children,delete s.dangerouslySetInnerHTML),{props:s,text_props:c}};var xy=A(ge());var _y=A(xf());var Yr={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Ms(e={}){let t={options:e,rootNode:fy(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)cy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>zS(t,n(r)),insert:(r,i)=>cy(t,n(r),i),remove:r=>DS(t,n(r))}}function zS(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,l=null,s=e.rootNode,c=null;for(let a=0;a{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:FS,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{comp_editable:localStorage.getItem("prasi-comp-editable")==="yes",zoom:localStorage.zoom||"100%",side:{prop:!0},layout:{left:parseInt(localStorage.getItem("prasi-layout-left")||"250"),right:parseInt(localStorage.getItem("prasi-layout-right")||"250")},prevent_indent_hook:!1,syncing:!1,tree:{item_loading:[],search:"",search_ref:null,search_mode:{Name:!0,JS:!1,HTML:!1,CSS:!1},rename_id:"",open:{}},popup:{file:{enabled:!1,open:!1,picker:{value:"",on_pick:!1,multi:!1},path:"/",expanded:JSON.parse(localStorage.getItem("panel-file-expanded")||"{}"),entry:{},selected:new Set,action:null,file_renaming:"",file_ctx_menu_event:null,tree:[],tree_renaming:"",tree_ctx_path:"",tree_ctx_menu_event:null,preview:!0,upload:{started:!1,progress:{}}},code:{init:!1,open:!1,name:"site",log:"",loading:!1,startup_status:"init",error:!1,show_log:!1,list:{}},page:{open:null,form:null},script:{open:!1,mode:"js",lastMode:"js",type:"item",prop_kind:"",prop_name:"",on_close:()=>{},typings:{status:"ok",err_msg:""},wb_render:()=>{}},site:null,site_form:null,comp:{preview_id:"",open:null,import:!1},comp_group:null,api:{open:!1}}}};var js=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});var ar=A(ge());var at=window;var US=tf("prasi-cache","prasi-cache-store"),Eo={timeout:null,store:US},Fs=(e,t)=>{let n=[...dy(t,"navigate(",")"),...dy(t,"href = ",";")],r=e.page.cur.id;e.page.navs[r]||(e.page.navs[r]=new Set);for(let i of n)e.page.navs[r].add(i);clearTimeout(Eo.timeout),Eo.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},dy=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let l=e.indexOf(t,r);if(i=r,l>=0){let s=e[l+t.length];if(s==='"'||s==="'"||s==="`"){let c=e.indexOf(`${s}${n}`,l+t.length+1),a=e.substring(l+t.length+1,c);r=c+2+n.length,o.push(a)}}if(i===r)break}return o};var sr=A(ge());var my=A(df()),lr=A(ge());var kf=A(Z()),hy=(e,t,n,r)=>i=>{let[o,l]=(0,lr.useState)({}),s=i.internal_key;n.item.script||(n.item.script={});let c=n.item.script;s&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[s]||(n.item.script_keyed[s]={}),c=n.item.script_keyed[s]),c.passprop||(c.passprop={});let a={};if(c.passprop){let f=!1;for(let[p,g]of Object.entries(i))["children","key"].includes(p)||(f=!0,a[p]=g,c.passprop[p]={end:0,start:0,value:g})}let u={...r,...a};if(!Array.isArray(i.children)&&(0,lr.isValidElement)(i.children)&&typeof i.children=="object"){let f=(0,my.default)(i.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(f)){let p=!0;for(let g of f)!(0,lr.isValidElement)(g)&&typeof g=="object"||(p=!1);if(p)return f.map(g=>{let _=e.meta[g.id];if(_||(e.meta[g.id]={item:g},_=e.meta[g.id]),_){if(Object.keys(_.item).length<=3&&_.mitem){let x={..._.item},h=_.mitem.toJSON();_.item={...h,...x}}return(0,kf.jsx)(Xt,{is_layout:t,meta:_,passprop:u,parent_key:i.internal_key},g.id)}return null})}}if(!Array.isArray(i.children)&&!(0,lr.isValidElement)(i.children)&&typeof i.children=="object"){let f=i.children.id;if(f){let p=e.meta[f];if(!p){e.meta[f]={item:i.children},p=e.meta[f];let g=p.item.component?.id;g&&e.comp.load(g).then(_=>{if(_){for(let[h,m]of Object.entries(_)){let y=p.item;y[h]||(y[h]=m)}let x=p.item.component?.props;for(let[h,m]of Object.entries(_.component?.props||{}))x[h]||(x[h]=m);l({})}})}return(0,kf.jsx)(Xt,{is_layout:t,meta:p,passprop:u,parent_key:i.internal_key})}}return Sf(i,u,s?{parent_key:s}:void 0)},Sf=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){let i=[];for(let o of r.children)i.push(py(o,r,t,n));return i}return py(r.children,r,t,n)},py=(e,t,n,r)=>{if((0,lr.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var ei={},gy=(e,t,n)=>r=>{let i=["localhost","prasi.avolut.com"].includes(location.hostname)&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:l,parent_key:s}=r,c=e.script?.init_local_effect,a=t?e.layout?.meta:e.meta,u=(0,sr.useRef)(ei[o]?ei[o]:r.value),[d,f]=(0,sr.useState)({}),p=u.current;return p.render=()=>{window.prasiContext.render?window.prasiContext.render():f({})},Us(e,n,n.script?.scope,s),r.hook&&r.hook(p),(0,sr.useEffect)(()=>{if(n.parent?.instance_id&&a){let _=a[n.parent?.instance_id];if(_&&_.instances){for(let[x,h]of Object.entries(_.instances[n.parent.instance_id]))if(h===n.item.id){o=x;break}}}return!c[o]&&(typeof c=="object"&&(c[o]=!0),(async()=>r.effect&&(await r.effect(p),i&&(ei[o]=p)))()),()=>{}},[...r.deps||[],location.pathname]),(0,sr.useEffect)(()=>{i&&ei[o]===null&&(async()=>r.effect&&(await r.effect(p),i&&(ei[o]=p)))()},[ei[o]]),Sf(l,{...n.script?.scope,[r.name]:p})};var Ef=A(Z()),yy=(e,t,n,r,i,o)=>{let l=yo(e,t,n,r,i);e.visit&&e.visit(t,l),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:gy(e,n,t),PassProp:hy(e,n,t,r)};let s=t.script,c=window.exports,a={useEffect:ar.useEffect,children:l.props.children,props:l.props,Local:s?.Local,db:e.site.db,api:e.site.api,PassProp:s?.PassProp,ErrorBox:Nt,newElement:()=>{},render:f=>{let p=f;if((0,ar.isValidElement)(f)&&f.props.children){let g=x=>{let h=!1,m=[];if((0,ar.isValidElement)(x)){if(x.type===t.script?.PassProp)return{should_replace:!0,el:{...x,props:{...x.props,internal_key:x.key}}};if(Array.isArray(x.props?.children))for(let y of x.props?.children)if(Array.isArray(y)){let v=[],S=!1;for(let R of y){let k=g(R);k.should_replace?(v.push(k.el),S=!0):v.push(R)}S?(h=!0,m.push(v)):m.push(y)}else typeof y=="object"?y.type===t.script?.PassProp&&(h=!0,m.push({...y,props:{...y.props,internal_key:y.props.key}})):m.push(y)}return{should_replace:h,el:{...x,props:{...x.props,children:m}}}},_=g(f);_.should_replace&&(p=_.el)}s&&(s.result=(0,Ef.jsx)(ar.Suspense,{children:p}))},params,...js(e),...c,...r,_meta:e.meta,_item:t.item,_syncm:typeof syncronize<"u"?syncronize:void 0};if(typeof r=="object"){for(let[f,p]of Object.entries(r))if(typeof p=="object"&&p&&p._jsx){let g=p;a[f]=(0,Ef.jsx)(BS,{fn:g.fn,passprop:{...r},meta:t})}}!at.isEditor&&t.item.adv?.js&&Fs(e,t.item.adv.js);let u=t.item.adv?.jsBuilt||"",d=Rf(u,bf)||"";try{new Function(...Object.keys(a),"___js",`// ${t.item.name}: ${t.item.id} try { ${d} } catch(e) { console.warn("Error at item ${t.item.name}:", ___js); console.error(e); } - `)(...Object.values(a),t.item.adv?.js)}catch(f){console.warn(`Error at item ${t.item.name}:`,t.item.adv?.js),console.error(f)}Hs(e,t,r,o)},c2=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),If={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},Of=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var Ly=A(Z());var Py=(e,t,n,r,i,o)=>{if(t.item.component?.id){let l=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),l=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),l=t.item.script),!l)return;let c={...window.exports,db:e.site.db,api:e.site.api,...Bs(e),...r,params};l.props={};let a=new Set;if(t.item.component.props){let u={};for(let[d,f]of Object.entries(t.item.component.props))try{if(f.meta?.type==="content-element"){let h={_jsx:!0,fn:m=>{let y=f.content?.id;if(y){let v=n?e.layout?.meta[y]:e.meta[y];if(!v)return null;let S=t.instances;if(!m.meta.item.originalId||!S||!S[t.item.id])return null;let k=m.meta.item.originalId;if(v.mitem&&(f.jsxCalledBy&&(!f.jsxCalledBy.includes(k)||f.jsxCalledBy.length!==2)||!f.jsxCalledBy)){let b=t.mitem?.get("component")?.get("props")?.get(d);if(b){let I=b.get("jsxCalledBy");!I||typeof I!="object"?b.set("jsxCalledBy",[t.item.id,k]):Array.isArray(I)&&(!I.includes(k)||I.length!==2||I[0]!==t.item.id||I[1]!==k)&&b.set("jsxCalledBy",[t.item.id,k])}}return(0,Ly.jsx)(qt,{meta:v,passprop:m.passprop,is_layout:n,depth:i+1})}return null}};c[d]=h,r&&(r[d]=h);continue}if(f.value&&$s(e,f.value),!f.valueBuilt&&f.value&&t.mitem){let h=t.mitem?.get("component")?.get("props")?.get(d);if(h){f2(h,f.value);return}}let p=f.valueBuilt||"",g=Of(p,If)||"",_=new Function(...Object.keys(c),`// [${t.item.name}] ${d}: ${t.item.id} + `)(...Object.values(a),t.item.adv?.js)}catch(f){console.warn(`Error at item ${t.item.name}:`,t.item.adv?.js),console.error(f)}Us(e,t,r,o)},BS=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),bf={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},Rf=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var wy=A(Z());var vy=(e,t,n,r,i,o)=>{if(t.item.component?.id){let l=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),l=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),l=t.item.script),!l)return;let c={...window.exports,db:e.site.db,api:e.site.api,...js(e),...r,params};l.props={};let a=new Set;if(t.item.component.props){let u={};for(let[d,f]of Object.entries(t.item.component.props))try{if(f.meta?.type==="content-element"){let h={_jsx:!0,fn:m=>{let y=f.content?.id;if(y){let v=n?e.layout?.meta[y]:e.meta[y];if(!v)return null;let S=t.instances;if(!m.meta.item.originalId||!S||!S[t.item.id])return null;let k=m.meta.item.originalId;if(v.mitem&&(f.jsxCalledBy&&(!f.jsxCalledBy.includes(k)||f.jsxCalledBy.length!==2)||!f.jsxCalledBy)){let b=t.mitem?.get("component")?.get("props")?.get(d);if(b){let O=b.get("jsxCalledBy");!O||typeof O!="object"?b.set("jsxCalledBy",[t.item.id,k]):Array.isArray(O)&&(!O.includes(k)||O.length!==2||O[0]!==t.item.id||O[1]!==k)&&b.set("jsxCalledBy",[t.item.id,k])}}return(0,wy.jsx)(Xt,{meta:v,passprop:m.passprop,is_layout:n,depth:i+1})}return null}};c[d]=h,r&&(r[d]=h);continue}if(f.value&&Fs(e,f.value),!f.valueBuilt&&f.value&&t.mitem){let h=t.mitem?.get("component")?.get("props")?.get(d);if(h){$S(h,f.value);return}}let p=f.valueBuilt||"",g=Rf(p,bf)||"",_=new Function(...Object.keys(c),`// [${t.item.name}] ${d}: ${t.item.id} return ${g} - `);l.props[d]={value:g};let x=_(...Object.values(c));typeof x=="function"&&(l.props[d].fn=x,x=(...h)=>{if(l)return l.props?.[d].fn(...h)}),c[d]=x,u[d]=x,r&&(r[d]=x)}catch{a.add(d)}if(location.pathname.startsWith("/ed/")&&ei.item_id&&t.item.id===ei.item_id){ei.scope={};for(let[d,f]of Object.entries(r))ei.scope[d]=f;ei.scope.self_props=u}}}},ut={timeout:null,set:new WeakSet,map:{},src:{}},f2=(e,t)=>{if(!ut.set.has(e)){ut.set.add(e);let n=(0,Ay.createId)();ut.map[n]={mprop:e},ut.src[n]=t}clearTimeout(ut.timeout),ut.timeout=setTimeout(async()=>{let n=await _api.code_build(ut.src),r=null;for(let[i,o]of Object.entries(n)){let l=ut.map[i].mprop;if(!r&&l.doc){r=l.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))ut.map[i].mprop.set("valueBuilt",o)}),ut.set=new WeakSet,ut.map={},ut.src={})},300)},Hs=(e,t,n,r)=>{let i=r?t.item.script_keyed?.[r]:t.item.script;if(i&&i.props){let o={...n,api:e.site.api,db:e.site.db};for(let[l,s]of Object.entries(i.props))if(s.fn){let c=new Function(...Object.keys(o),`// [${t.item.name}] ${l}: ${t.item.id} + `);l.props[d]={value:g};let x=_(...Object.values(c));typeof x=="function"&&(l.props[d].fn=x,x=(...h)=>{if(l)return l.props?.[d].fn(...h)}),c[d]=x,u[d]=x,r&&(r[d]=x)}catch{a.add(d)}if(location.pathname.startsWith("/ed/")&&Jr.item_id&&t.item.id===Jr.item_id){Jr.scope={};for(let[d,f]of Object.entries(r))Jr.scope[d]=f;Jr.scope.self_props=u}}}},ut={timeout:null,set:new WeakSet,map:{},src:{}},$S=(e,t)=>{if(!ut.set.has(e)){ut.set.add(e);let n=(0,_y.createId)();ut.map[n]={mprop:e},ut.src[n]=t}clearTimeout(ut.timeout),ut.timeout=setTimeout(async()=>{let n=await _api.code_build(ut.src),r=null;for(let[i,o]of Object.entries(n)){let l=ut.map[i].mprop;if(!r&&l.doc){r=l.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))ut.map[i].mprop.set("valueBuilt",o)}),ut.set=new WeakSet,ut.map={},ut.src={})},300)},Us=(e,t,n,r)=>{let i=r?t.item.script_keyed?.[r]:t.item.script;if(i&&i.props){let o={...n,api:e.site.api,db:e.site.db};for(let[l,s]of Object.entries(i.props))if(s.fn){let c=new Function(...Object.keys(o),`// [${t.item.name}] ${l}: ${t.item.id} return ${s.value||""} - `);s.fn=c(...Object.values(o))}}};var Af=A(Z()),Pf=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=On(An,"VI"),[l,s]=(0,My.useState)({});e.render=()=>{s({})};let c=t;return e.item.component?.id&&(c||(c={}),Py(o,e,n,c,i,r)),e.item.adv?.html?(0,Af.jsx)(Vs,{meta:e,passprop:c,is_layout:n,depth:i}):e.item.adv?.js&&(Oy(o,e,n,c,i,r),e.script)?e.script.result:(0,Af.jsx)(Vs,{meta:e,passprop:c,is_layout:n,depth:i})};var we=A(Z()),d2=70,p2={debug:!!localStorage.getItem("prasi-js-debug")},Ws={enabled:!1,meta:{}},qt=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(Ws.enabled){let o=Ws.meta;if(o[e.item.id]?o[e.item.id].last_render===Math.floor(Date.now()/1e3)?o[e.item.id].count++:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1}:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},o[e.item.id]?.count>d2)return(0,we.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,we.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,we.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",o[e.item.id]?.count," times in less than 1 second."]})]})}if(!e||e.item.hidden)return null;if(p2.debug){let o="";for(let l=0;l{let o=On(An,"VI");if(n&&e.item.name==="children"){let s=[];for(let c of o.entry){let a=o.meta[c];if(a.item.adv?.js||a.item.component?.id)s.push((0,we.jsx)(Nt,{meta:a,children:(0,we.jsx)(Pf,{meta:a,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let u=Eo(o,a,!1,t,i);o.visit&&o.visit(a,u),s.push((0,we.jsx)("div",{...u.props}))}}return(0,we.jsx)(we.Fragment,{children:s.map((c,a)=>(0,we.jsx)(zy.Fragment,{children:c},a))})}let l=Eo(o,e,n,t,i);return o.visit&&o.visit(e,l),(0,we.jsx)("div",{...l.props})};var ni=A(Z()),Dy=({})=>{let e=On(An,"VI"),t=Cn({tick:Date.now()});if(e.tick=t.tick,e.status!=="ready")return(0,ni.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,ni.jsx)(ko,{backdrop:!1})});let n=!!e.layout?.entry&&e.layout.entry.length>0,r=e.entry;return n&&e.layout?.entry&&(r=e.layout?.entry),(0,ni.jsx)("div",{className:"flex flex-1 flex-col relative",children:Array.isArray(r)&&r.map(i=>{let o=n?e.layout?.meta[i]:e.meta[i];return o&&Element?(0,ni.jsx)(Nt,{children:(0,ni.jsx)(qt,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Zs=A(Z()),Ln=window;Ln.prasi_error_handler||(Ln.prasi_error_handler=!0,window.addEventListener("error",e=>{let{lineno:t,colno:n}=e;console.log(`Error thrown at: ${t}:${n}`),e.preventDefault()}));var jy=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:l,visit:s,script:c,page_id:a,render_stat:u,on_status_changed:d,on_preload:f,layout:p,comp_load:g})=>{let _=On(An,"VI");return _.mode=o,_.entry=t,_.on_preload=f,_.comp.load=g,Ln.siteurl=(x,h)=>{if(x.startsWith("http://")||x.startsWith("https://"))return x;try{["prasi.avolut.com","localhost"].includes(location.hostname)?_.site.api_url&&(_.site_url||(_.site_url=new URL(_.site.api_url))):_.site_url||(h&&_.site.api_url?_.site_url=new URL(_.site.api_url):_.site_url=new URL(location.href),_.site_url.pathname="")}catch{}if(_.site_url){let m=_.site_url,y=x;return y.startsWith("/")||(y="/"+y),Ln.prasiContext.siteUrl&&(y=Ln.prasiContext.siteUrl(y)),`${m.protocol}//${m.host}${y}`}return x},Ln.isMobile=o==="mobile",Ln.isDesktop=o==="desktop",Ln.preload=(x,h)=>{_.page.navs[a]||(_.page.navs[a]=new Set);let m=typeof x=="string"?[x]:x;for(let y of m)_.page.navs[a].add(y);return clearTimeout(Co.timeout),Co.timeout=setTimeout(()=>{_.on_preload&&_.on_preload({urls:Array.from(_.page.navs[a]),opt:{on_load:h?.on_load}})},100),""},_.layout=p,_.page.cur.id=a,_.on_status_changes=d,u==="disabled"&&(Ws.enabled=!1),_.meta!==e&&(_.meta=e),c&&(_.script.init_local_effect=c.init_local_effect),_.visit=s,_.status==="init"&&(_.site.db=l,_.site.api=i,$g(_,{api_url:n,site_id:r})),f&&(0,Gs.useEffect)(()=>{setTimeout(()=>{let x=_.page.navs[_.page.cur.id];x&&f({urls:Array.from(x),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,Zs.jsx)(Nt,{children:(0,Zs.jsx)(Gs.Suspense,{children:(0,Zs.jsx)(Dy,{})})})};var Lf=window,T={root:null,url(...e){let t=e.map(r=>Array.isArray(r)?r.join(""):r).join(""),n=this.root.toString();return n.endsWith("/")&&(n=n.substring(0,n.length-1)),t.startsWith("/")?n+t:n+"/"+t},get pathname(){let e=location.pathname.substring(T.root.pathname.length);return e.startsWith("/")?e:`/${e}`},site:{id:Lf._prasi?.site_id},init_local_effect:{},mode:"",route:{status:"init",pages:[],router:null},comp:{list:{},pending:{}},layout:{id:"",root:null,meta:null},cache:{urls:new Set},page:{id:"",url:"",root:null,meta:null,cache:{}}},Fy=()=>{if(!T.root){let e=new URL(location.href);Lf._prasi.basepath&&(e.pathname=Lf._prasi.basepath),T.root=new URL(`${e.protocol}//${e.host}${e.pathname}`),T.root.pathname.endsWith("/")&&(T.root.pathname=T.root.pathname.substring(0,T.root.length-1))}};var ri=async e=>{let t=T.comp;for(let r of e)r&&r.type!=="text"&&Ks(r);let n=Object.keys(t.pending);if(n.length>0)try{let r=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...n]})})).json();for(let[i,o]of Object.entries(r))delete t.pending[i],t.list[i]=o,await Ds(`comp-${i}`,o);if(Object.keys(t.pending).length>0){console.warn(`Warning: component not found: ${Object.keys(t.pending)}`);return}await ri(Object.values(r))}catch(r){console.error(r)}},Ks=e=>{let t=T.comp;if(e.type==="item"){let n=e.component?.id;if(n&&(!t.list[n]&&!t.pending[n]&&(t.pending[n]=[]),t.pending[n]&&(t.pending[n].find(r=>r.id===e.id)||t.pending[n].push(e)),t.pending[n])){if(t.list[n]){for(let r of t.pending[n])for(let i of Object.values(r.component?.props||{}))i.content&&Ks(i.content);delete t.pending[n]}else if(e.component?.props)for(let r of Object.values(e.component?.props||{}))r.content&&Ks(r.content)}}if(e.childs)for(let n of e.childs){let r=n;r&&r.type!=="text"&&Ks(r)}};var Uy=e=>new Promise(async t=>{let n=!1,r=await mf(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(T.url`_prasi/page/${e}`)).json();n||t(i)}),m2=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let l of r){let s=await mf(`page-${l}`);if(s)n[l]=s;else{i=!1;break}}i&&t(n);let o=await(await fetch(T.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),By=async e=>{let t=e.map(r=>T.route.router?.lookup(r)).filter(r=>r&&r.id);return await m2(t.map(r=>r?.id))};var Hy=A($y()),Vy=()=>{let e=T;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,Hy.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};function No(e,t){return function(){return e.apply(t,arguments)}}var{toString:h2}=Object.prototype,{getPrototypeOf:Df}=Object,qs=(e=>t=>{let n=h2.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ot=e=>(e=e.toLowerCase(),t=>qs(t)===e),Ys=e=>t=>typeof t===e,{isArray:ii}=Array,Io=Ys("undefined");function g2(e){return e!==null&&!Io(e)&&e.constructor!==null&&!Io(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Gy=Ot("ArrayBuffer");function y2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Gy(e.buffer),t}var _2=Ys("string"),ct=Ys("function"),Ky=Ys("number"),Js=e=>e!==null&&typeof e=="object",v2=e=>e===!0||e===!1,Xs=e=>{if(qs(e)!=="object")return!1;let t=Df(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},w2=Ot("Date"),x2=Ot("File"),k2=Ot("Blob"),S2=Ot("FileList"),E2=e=>Js(e)&&ct(e.pipe),b2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=qs(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},R2=Ot("URLSearchParams"),C2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Oo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ii(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Xy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qy=e=>!Io(e)&&e!==Xy;function zf(){let{caseless:e}=qy(this)&&this||{},t={},n=(r,i)=>{let o=e&&Qy(t,i)||i;Xs(t[o])&&Xs(r)?t[o]=zf(t[o],r):Xs(r)?t[o]=zf({},r):ii(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Oo(t,(i,o)=>{n&&ct(i)?e[o]=No(i,n):e[o]=i},{allOwnKeys:r}),e),N2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),I2=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},O2=(e,t,n,r)=>{let i,o,l,s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&Df(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},A2=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},P2=e=>{if(!e)return null;if(ii(e))return e;let t=e.length;if(!Ky(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},L2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Df(Uint8Array)),M2=(e,t)=>{let r=(e&&e[Symbol.iterator]).call(e),i;for(;(i=r.next())&&!i.done;){let o=i.value;t.call(e,o[0],o[1])}},z2=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},D2=Ot("HTMLFormElement"),j2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Wy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),F2=Ot("RegExp"),Yy=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Oo(n,(i,o)=>{let l;(l=t(i,o,e))!==!1&&(r[o]=l||i)}),Object.defineProperties(e,r)},U2=e=>{Yy(e,(t,n)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ct(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},B2=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ii(e)?r(e):r(String(e).split(t)),n},$2=()=>{},H2=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Mf="abcdefghijklmnopqrstuvwxyz",Zy="0123456789",Jy={DIGIT:Zy,ALPHA:Mf,ALPHA_DIGIT:Mf+Mf.toUpperCase()+Zy},V2=(e=16,t=Jy.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function W2(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var Z2=e=>{let t=new Array(10),n=(r,i)=>{if(Js(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ii(r)?[]:{};return Oo(r,(l,s)=>{let c=n(l,i+1);!Io(c)&&(o[s]=c)}),t[i]=void 0,o}}return r};return n(e,0)},G2=Ot("AsyncFunction"),K2=e=>e&&(Js(e)||ct(e))&&ct(e.then)&&ct(e.catch),w={isArray:ii,isArrayBuffer:Gy,isBuffer:g2,isFormData:b2,isArrayBufferView:y2,isString:_2,isNumber:Ky,isBoolean:v2,isObject:Js,isPlainObject:Xs,isUndefined:Io,isDate:w2,isFile:x2,isBlob:k2,isRegExp:F2,isFunction:ct,isStream:E2,isURLSearchParams:R2,isTypedArray:L2,isFileList:S2,forEach:Oo,merge:zf,extend:T2,trim:C2,stripBOM:N2,inherits:I2,toFlatObject:O2,kindOf:qs,kindOfTest:Ot,endsWith:A2,toArray:P2,forEachEntry:M2,matchAll:z2,isHTMLForm:D2,hasOwnProperty:Wy,hasOwnProp:Wy,reduceDescriptors:Yy,freezeMethods:U2,toObjectSet:B2,toCamelCase:j2,noop:$2,toFiniteNumber:H2,findKey:Qy,global:Xy,isContextDefined:qy,ALPHABET:Jy,generateString:V2,isSpecCompliantForm:W2,toJSONObject:Z2,isAsyncFn:G2,isThenable:K2};function oi(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}w.inherits(oi,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:w.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var e_=oi.prototype,t_={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{t_[e]={value:e}});Object.defineProperties(oi,t_);Object.defineProperty(e_,"isAxiosError",{value:!0});oi.from=(e,t,n,r,i,o)=>{let l=Object.create(e_);return w.toFlatObject(e,l,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),oi.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};var D=oi;var ea=null;function jf(e){return w.isPlainObject(e)||w.isArray(e)}function r_(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function n_(e,t,n){return e?e.concat(t).map(function(i,o){return i=r_(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Q2(e){return w.isArray(e)&&!e.some(jf)}var X2=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function q2(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new(ea||FormData),n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,x){return!w.isUndefined(x[_])});let r=n.metaTokens,i=n.visitor||u,o=n.dots,l=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&w.isSpecCompliantForm(t);if(!w.isFunction(i))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(w.isDate(g))return g.toISOString();if(!c&&w.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return w.isArrayBuffer(g)||w.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,_,x){let h=g;if(g&&!x&&typeof g=="object"){if(w.endsWith(_,"{}"))_=r?_:_.slice(0,-2),g=JSON.stringify(g);else if(w.isArray(g)&&Q2(g)||(w.isFileList(g)||w.endsWith(_,"[]"))&&(h=w.toArray(g)))return _=r_(_),h.forEach(function(y,v){!(w.isUndefined(y)||y===null)&&t.append(l===!0?n_([_],v,o):l===null?_:_+"[]",a(y))}),!1}return jf(g)?!0:(t.append(n_(x,_,o),a(g)),!1)}let d=[],f=Object.assign(X2,{defaultVisitor:u,convertValue:a,isVisitable:jf});function p(g,_){if(!w.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(g),w.forEach(g,function(h,m){(!(w.isUndefined(h)||h===null)&&i.call(t,h,w.isString(m)?m.trim():m,_,f))===!0&&p(h,_?_.concat(m):[m])}),d.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return p(e),t}var Mn=q2;function i_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function o_(e,t){this._pairs=[],e&&Mn(e,this,t)}var l_=o_.prototype;l_.append=function(t,n){this._pairs.push([t,n])};l_.toString=function(t){let n=t?function(r){return t.call(this,r,i_)}:i_;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var ta=o_;function Y2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ao(e,t,n){if(!t)return e;let r=n&&n.encode||Y2,i=n&&n.serialize,o;if(i?o=i(t,n):o=w.isURLSearchParams(t)?t.toString():new ta(t,n).toString(r),o){let l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Ff=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){w.forEach(this.handlers,function(r){r!==null&&t(r)})}},Uf=Ff;var na={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var s_=typeof URLSearchParams<"u"?URLSearchParams:ta;var a_=typeof FormData<"u"?FormData:null;var u_=typeof Blob<"u"?Blob:null;var c_={isBrowser:!0,classes:{URLSearchParams:s_,FormData:a_,Blob:u_},protocols:["http","https","file","blob","url","data"]};var Bf={};jv(Bf,{hasBrowserEnv:()=>f_,hasStandardBrowserEnv:()=>J2,hasStandardBrowserWebWorkerEnv:()=>eE});var f_=typeof window<"u"&&typeof document<"u",J2=(e=>f_&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),eE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Le={...Bf,...c_};function $f(e,t){return Mn(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Le.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function tE(e){return w.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function nE(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return l=!l&&w.isArray(i)?i.length:l,c?(w.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!w.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&w.isArray(i[l])&&(i[l]=nE(i[l])),!s)}if(w.isFormData(e)&&w.isFunction(e.entries)){let n={};return w.forEachEntry(e,(r,i)=>{t(tE(r),i,n,0)}),n}return null}var ra=rE;function iE(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Hf={transitional:na,adapter:["xhr","http"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=w.isObject(t);if(o&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return i?JSON.stringify(ra(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return $f(t,this.formSerializer).toString();if((s=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Mn(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),iE(t)):t}],transformResponse:[function(t){let n=this.transitional||Hf.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&w.isString(t)&&(r&&!this.responseType||i)){let l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(l)throw s.name==="SyntaxError"?D.from(s,D.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch"],e=>{Hf.headers[e]={}});var li=Hf;var oE=w.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),d_=e=>{let t={},n,r,i;return e&&e.split(` -`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&oE[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var p_=Symbol("internals");function Po(e){return e&&String(e).trim().toLowerCase()}function ia(e){return e===!1||e==null?e:w.isArray(e)?e.map(ia):String(e)}function lE(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var sE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vf(e,t,n,r,i){if(w.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function aE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function uE(e,t){let n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,l){return this[r].call(this,t,i,o,l)},configurable:!0})})}var si=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(s,c,a){let u=Po(c);if(!u)throw new Error("header name must be a non-empty string");let d=w.findKey(i,u);(!d||i[d]===void 0||a===!0||a===void 0&&i[d]!==!1)&&(i[d||c]=ia(s))}let l=(s,c)=>w.forEach(s,(a,u)=>o(a,u,c));return w.isPlainObject(t)||t instanceof this.constructor?l(t,n):w.isString(t)&&(t=t.trim())&&!sE(t)?l(d_(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Po(t),t){let r=w.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return lE(i);if(w.isFunction(n))return n.call(this,i,r);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Po(t),t){let r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Vf(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(l){if(l=Po(l),l){let s=w.findKey(r,l);s&&(!n||Vf(r,r[s],s,n))&&(delete r[s],i=!0)}}return w.isArray(t)?t.forEach(o):o(t),i}clear(t){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let o=n[r];(!t||Vf(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return w.forEach(this,(i,o)=>{let l=w.findKey(r,o);if(l){n[l]=ia(i),delete n[o];return}let s=t?aE(o):String(o).trim();s!==o&&delete n[o],n[s]=ia(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return w.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&w.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){let r=(this[p_]=this[p_]={accessors:{}}).accessors,i=this.prototype;function o(l){let s=Po(l);r[s]||(uE(i,l),r[s]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}};si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);w.reduceDescriptors(si.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});w.freezeMethods(si);var Me=si;function Lo(e,t){let n=this||li,r=t||n,i=Me.from(r.headers),o=r.data;return w.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Mo(e){return!!(e&&e.__CANCEL__)}function m_(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}w.inherits(m_,D,{__CANCEL__:!0});var zn=m_;function Wf(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new D("Request failed with status code "+n.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var h_=Le.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let l=[e+"="+encodeURIComponent(t)];w.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),w.isString(r)&&l.push("path="+r),w.isString(i)&&l.push("domain="+i),o===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Zf(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function zo(e,t){return e&&!Zf(t)?Gf(e,t):t}var g_=Le.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){let l=o;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){let s=w.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Kf(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cE(e,t){e=e||10;let n=new Array(e),r=new Array(e),i=0,o=0,l;return t=t!==void 0?t:1e3,function(c){let a=Date.now(),u=r[o];l||(l=a),n[i]=c,r[i]=a;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),a-l{let o=i.loaded,l=i.lengthComputable?i.total:void 0,s=o-n,c=r(s),a=o<=l;n=o;let u={loaded:o,total:l,progress:l?o/l:void 0,bytes:s,rate:c||void 0,estimated:c&&l&&a?(l-o)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var fE=typeof XMLHttpRequest<"u",v_=fE&&function(e){return new Promise(function(n,r){let i=e.data,o=Me.from(e.headers).normalize(),{responseType:l,withXSRFToken:s}=e,c;function a(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let u;if(w.isFormData(i)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){let[_,...x]=u?u.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([_||"multipart/form-data",...x].join("; "))}}let d=new XMLHttpRequest;if(e.auth){let _=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+x))}let f=zo(e.baseURL,e.url);d.open(e.method.toUpperCase(),Ao(f,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function p(){if(!d)return;let _=Me.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),h={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:_,config:e,request:d};Wf(function(y){n(y),a()},function(y){r(y),a()},h),d=null}if("onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(r(new D("Request aborted",D.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",h=e.transitional||na;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),r(new D(x,h.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,d)),d=null},Le.hasStandardBrowserEnv&&(s&&w.isFunction(s)&&(s=s(e)),s||s!==!1&&g_(f))){let _=e.xsrfHeaderName&&e.xsrfCookieName&&h_.read(e.xsrfCookieName);_&&o.set(e.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&w.forEach(o.toJSON(),function(x,h){d.setRequestHeader(h,x)}),w.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",__(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",__(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=_=>{d&&(r(!_||_.type?new zn(null,e,d):_),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let g=Kf(f);if(g&&Le.protocols.indexOf(g)===-1){r(new D("Unsupported protocol "+g+":",D.ERR_BAD_REQUEST,e));return}d.send(i||null)})};var Qf={http:ea,xhr:v_};w.forEach(Qf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var w_=e=>`- ${e}`,dE=e=>w.isFunction(e)||e===null||e===!1,oa={getAdapter:e=>{e=w.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build")),l=t?o.length>1?`since : -`+o.map(w_).join(` -`):" "+w_(o[0]):"as no adapter specified";throw new D("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:Qf};function Xf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zn(null,e)}function la(e){return Xf(e),e.headers=Me.from(e.headers),e.data=Lo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),oa.getAdapter(e.adapter||li.adapter)(e).then(function(r){return Xf(e),r.data=Lo.call(e,e.transformResponse,r),r.headers=Me.from(r.headers),r},function(r){return Mo(r)||(Xf(e),r&&r.response&&(r.response.data=Lo.call(e,e.transformResponse,r.response),r.response.headers=Me.from(r.response.headers))),Promise.reject(r)})}var x_=e=>e instanceof Me?e.toJSON():e;function Yt(e,t){t=t||{};let n={};function r(a,u,d){return w.isPlainObject(a)&&w.isPlainObject(u)?w.merge.call({caseless:d},a,u):w.isPlainObject(u)?w.merge({},u):w.isArray(u)?u.slice():u}function i(a,u,d){if(w.isUndefined(u)){if(!w.isUndefined(a))return r(void 0,a,d)}else return r(a,u,d)}function o(a,u){if(!w.isUndefined(u))return r(void 0,u)}function l(a,u){if(w.isUndefined(u)){if(!w.isUndefined(a))return r(void 0,a)}else return r(void 0,u)}function s(a,u,d){if(d in t)return r(a,u);if(d in e)return r(void 0,a)}let c={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(a,u)=>i(x_(a),x_(u),!0)};return w.forEach(Object.keys(Object.assign({},e,t)),function(u){let d=c[u]||i,f=d(e[u],t[u],u);w.isUndefined(f)&&d!==s||(n[u]=f)}),n}var sa="1.6.7";var qf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var k_={};qf.transitional=function(t,n,r){function i(o,l){return"[Axios v"+sa+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,s)=>{if(t===!1)throw new D(i(l," has been removed"+(n?" in "+n:"")),D.ERR_DEPRECATED);return n&&!k_[l]&&(k_[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,s):!0}};function pE(e,t,n){if(typeof e!="object")throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],l=t[o];if(l){let s=e[o],c=s===void 0||l(s,o,e);if(c!==!0)throw new D("option "+o+" must be "+c,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}var aa={assertOptions:pE,validators:qf};var Dn=aa.validators,ai=class{constructor(t){this.defaults=t,this.interceptors={request:new Uf,response:new Uf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yt(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&aa.assertOptions(r,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:aa.assertOptions(i,{encode:Dn.function,serialize:Dn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=Me.concat(l,o);let s=[],c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,s.unshift(_.fulfilled,_.rejected))});let a=[];this.interceptors.response.forEach(function(_){a.push(_.fulfilled,_.rejected)});let u,d=0,f;if(!c){let g=[la.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,a),f=g.length,u=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o,l=new Promise(s=>{r.subscribe(s),o=s}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,s){r.reason||(r.reason=new zn(o,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},S_=Yf;function Jf(e){return function(n){return e.apply(null,n)}}function ed(e){return w.isObject(e)&&e.isAxiosError===!0}var td={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(td).forEach(([e,t])=>{td[t]=e});var E_=td;function b_(e){let t=new Do(e),n=No(Do.prototype.request,t);return w.extend(n,Do.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return b_(Yt(e,i))},n}var ue=b_(li);ue.Axios=Do;ue.CanceledError=zn;ue.CancelToken=S_;ue.isCancel=Mo;ue.VERSION=sa;ue.toFormData=Mn;ue.AxiosError=D;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=Jf;ue.isAxiosError=ed;ue.mergeConfig=Yt;ue.AxiosHeaders=Me;ue.formToJSON=e=>ra(w.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=oa.getAdapter;ue.HttpStatusCode=E_;ue.default=ue;var ua=ue;var{Axios:IA,AxiosError:OA,CanceledError:AA,isCancel:PA,CancelToken:LA,VERSION:MA,all:zA,Cancel:DA,isAxiosError:jA,spread:FA,toFormData:UA,AxiosHeaders:BA,HttpStatusCode:$A,formToJSON:HA,getAdapter:VA,mergeConfig:WA}=ua;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var mE=typeof window<"u"?window:null,R_=typeof global<"u"?global:void 0,ui=async(e,t,n)=>{let r={...n},i=null,o=!1,l=null,s=[];if(Array.isArray(t))for(let d of t)d instanceof File&&(s.push(d),o=!0),typeof d=="function"&&(l=d);else t instanceof File&&(o=!0,s.push(t));if(!o)i=JSON.stringify(t),r["content-type"]="aplication/json";else{let d=new FormData;for(let f of s)d.append(f.name,f);i=d,delete r["content-type"],r.enctype="multipart/form-data;"}let c=new URL(e);if(mE!==null){let d=new URL(location.href),f="";if(c.host===d.host||R_&&typeof R_.server_hook=="function"?f=c.toString():f=`${d.protocol}//${d.host}/_proxy/${encodeURIComponent(c.toString())}`,f){if(l)return(await ua({method:t?"post":void 0,url:f,data:i,onUploadProgress:l})).data;{let g=await(await fetch(f,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(g,C_)}catch{return g}}}}let u=await(await fetch(c,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(u,C_)}catch{return u}},C_=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;var W_=A(V_());var Z_=async(e,t)=>{let n=(0,W_.default)(e,"/"),r=await ui(VE(n,"/_prasi/_")),i="";r&&r.prasi&&(i=r.prasi);let o=HE(n);if(i==="v2")await new Promise(l=>{let s=document,c=s.createElement("script");c.onload=async()=>{l()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let a=localStorage.getItem("api-ts-"+n);t?c.src=`${o}/_prasi/load.js?url=${n}&v3&dev=1&ts=${a}`:c.src=`${o}/_prasi/load.js?url=${n}&v3&ts=${a}`,document.querySelector(`script[src="${c.src}"]`)?l():s.body.appendChild(c)});else{let l=await fetch(o+"/_prasi/api-entry");if(at.prasiApi[n]={apiEntry:(await l.json()).srv},t){let s=await fetch(o+"/_prasi/api-types");at.prasiApi[n].apiTypes=await s.text(),at.prasiApi[n].prismaTypes={"prisma.d.ts":await od(`${o}/_prasi/prisma/index.d.ts`),"runtime/index.d.ts":await od(`${o}/_prasi/prisma/runtime/index.d.ts`),"runtime/library.d.ts":await od(`${o}/_prasi/prisma/runtime/library.d.ts`)}}}},HE=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`},VE=(e,t)=>{let n=new URL(e);return n.pathname=t,n.toString()},od=async(e,t)=>await(await fetch(e)).text();var jo={},K_=e=>{at.prasiApi||(at.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return at.prasiApi[n]||jo[n]||(jo[n]=Z_(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(l,s)=>{let c=new URL(n);c.pathname=l.split("/").filter(d=>d).join("/");let a=new URL(location.href),u="";return c.host===a.host||s===!1?u=c.toString():u=`${a.protocol}//${a.host}/_proxy/${encodeURIComponent(c.toString())}`,u};let o=l=>function(...s){return new Promise(async(c,a)=>{try{let u=at.prasiApi[n];if(!u&&jo&&typeof jo[n]=="object"&&(await jo[n],u=at.prasiApi[n]),u){if(l==="_raw"){let p=s[0],g=`${n}${p}`,_=await G_(g,s.slice(1));c(_);return}if(u.apiEntry||(u.apiEntry={}),u.apiEntry&&!u.apiEntry[l]){a(`API ${l.toString()} not found, existing API: + `);s.fn=c(...Object.values(o))}}};var Cf=A(Z()),Tf=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=Nn(On,"VI"),[l,s]=(0,xy.useState)({});e.render=()=>{s({})};let c=t;return e.item.component?.id&&(c||(c={}),vy(o,e,n,c,i,r)),e.item.adv?.html?(0,Cf.jsx)(Bs,{meta:e,passprop:c,is_layout:n,depth:i}):e.item.adv?.js&&(yy(o,e,n,c,i,r),e.script)?e.script.result:(0,Cf.jsx)(Bs,{meta:e,passprop:c,is_layout:n,depth:i})};var we=A(Z()),HS=70,VS={debug:!!localStorage.getItem("prasi-js-debug")},$s={enabled:!1,meta:{}},Xt=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if($s.enabled){let o=$s.meta;if(o[e.item.id]?o[e.item.id].last_render===Math.floor(Date.now()/1e3)?o[e.item.id].count++:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1}:o[e.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},o[e.item.id]?.count>HS)return(0,we.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,we.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,we.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",o[e.item.id]?.count," times in less than 1 second."]})]})}if(!e||e.item.hidden)return null;if(VS.debug){let o="";for(let l=0;l{let o=Nn(On,"VI");if(n&&e.item.name==="children"){let s=[];for(let c of o.entry){let a=o.meta[c];if(a.item.adv?.js||a.item.component?.id)s.push((0,we.jsx)(Nt,{meta:a,children:(0,we.jsx)(Tf,{meta:a,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let u=yo(o,a,!1,t,i);o.visit&&o.visit(a,u),s.push((0,we.jsx)("div",{...u.props}))}}return(0,we.jsx)(we.Fragment,{children:s.map((c,a)=>(0,we.jsx)(ky.Fragment,{children:c},a))})}let l=yo(o,e,n,t,i);return o.visit&&o.visit(e,l),(0,we.jsx)("div",{...l.props})};var ti=A(Z()),Sy=({})=>{let e=Nn(On,"VI"),t=Cn({tick:Date.now()});if(e.tick=t.tick,e.status!=="ready")return(0,ti.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,ti.jsx)(ho,{backdrop:!1})});let n=!!e.layout?.entry&&e.layout.entry.length>0,r=e.entry;return n&&e.layout?.entry&&(r=e.layout?.entry),(0,ti.jsx)("div",{className:"flex flex-1 flex-col relative",children:Array.isArray(r)&&r.map(i=>{let o=n?e.layout?.meta[i]:e.meta[i];return o&&Element?(0,ti.jsx)(Nt,{children:(0,ti.jsx)(Xt,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Hs=A(Z()),Pn=window;Pn.prasi_error_handler||(Pn.prasi_error_handler=!0,window.addEventListener("error",e=>{let{lineno:t,colno:n}=e;console.log(`Error thrown at: ${t}:${n}`),e.preventDefault()}));var Ey=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:l,visit:s,script:c,page_id:a,render_stat:u,on_status_changed:d,on_preload:f,layout:p,comp_load:g})=>{let _=Nn(On,"VI");return _.mode=o,_.entry=t,_.on_preload=f,_.comp.load=g,Pn.siteurl=(x,h)=>{if(x.startsWith("http://")||x.startsWith("https://"))return x;try{["prasi.avolut.com","localhost"].includes(location.hostname)?_.site.api_url&&(_.site_url||(_.site_url=new URL(_.site.api_url))):_.site_url||(h&&_.site.api_url?_.site_url=new URL(_.site.api_url):_.site_url=new URL(location.href),_.site_url.pathname="")}catch{}if(_.site_url){let m=_.site_url,y=x;return y.startsWith("/")||(y="/"+y),Pn.prasiContext.siteUrl&&(y=Pn.prasiContext.siteUrl(y)),`${m.protocol}//${m.host}${y}`}return x},Pn.isMobile=o==="mobile",Pn.isDesktop=o==="desktop",Pn.preload=(x,h)=>{_.page.navs[a]||(_.page.navs[a]=new Set);let m=typeof x=="string"?[x]:x;for(let y of m)_.page.navs[a].add(y);return clearTimeout(Eo.timeout),Eo.timeout=setTimeout(()=>{_.on_preload&&_.on_preload({urls:Array.from(_.page.navs[a]),opt:{on_load:h?.on_load}})},100),""},_.layout=p,_.page.cur.id=a,_.on_status_changes=d,u==="disabled"&&($s.enabled=!1),_.meta!==e&&(_.meta=e),c&&(_.script.init_local_effect=c.init_local_effect),_.visit=s,_.status==="init"&&(_.site.db=l,_.site.api=i,H0(_,{api_url:n,site_id:r})),f&&(0,Vs.useEffect)(()=>{setTimeout(()=>{let x=_.page.navs[_.page.cur.id];x&&f({urls:Array.from(x),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,Hs.jsx)(Nt,{children:(0,Hs.jsx)(Vs.Suspense,{children:(0,Hs.jsx)(Sy,{})})})};var Nf=window,T={root:null,url(...e){let t=e.map(r=>Array.isArray(r)?r.join(""):r).join(""),n=this.root.toString();return n.endsWith("/")&&(n=n.substring(0,n.length-1)),t.startsWith("/")?n+t:n+"/"+t},get pathname(){let e=location.pathname.substring(T.root.pathname.length);return e.startsWith("/")?e:`/${e}`},site:{id:Nf._prasi?.site_id},init_local_effect:{},mode:"",route:{status:"init",pages:[],router:null},comp:{list:{},pending:{}},layout:{id:"",root:null,meta:null},cache:{urls:new Set},page:{id:"",url:"",root:null,meta:null,cache:{}}},by=()=>{if(!T.root){let e=new URL(location.href);Nf._prasi.basepath&&(e.pathname=Nf._prasi.basepath),T.root=new URL(`${e.protocol}//${e.host}${e.pathname}`),T.root.pathname.endsWith("/")&&(T.root.pathname=T.root.pathname.substring(0,T.root.length-1))}};var ni=async e=>{let t=T.comp;for(let r of e)r&&r.type!=="text"&&Ws(r);let n=Object.keys(t.pending);if(n.length>0)try{let r=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...n]})})).json();for(let[i,o]of Object.entries(r))delete t.pending[i],t.list[i]=o,await Os(`comp-${i}`,o);if(Object.keys(t.pending).length>0){console.warn(`Warning: component not found: ${Object.keys(t.pending)}`);return}await ni(Object.values(r))}catch(r){console.error(r)}},Ws=e=>{let t=T.comp;if(e.type==="item"){let n=e.component?.id;if(n&&(!t.list[n]&&!t.pending[n]&&(t.pending[n]=[]),t.pending[n]&&(t.pending[n].find(r=>r.id===e.id)||t.pending[n].push(e)),t.pending[n])){if(t.list[n]){for(let r of t.pending[n])for(let i of Object.values(r.component?.props||{}))i.content&&Ws(i.content);delete t.pending[n]}else if(e.component?.props)for(let r of Object.values(e.component?.props||{}))r.content&&Ws(r.content)}}if(e.childs)for(let n of e.childs){let r=n;r&&r.type!=="text"&&Ws(r)}};var Ry=e=>new Promise(async t=>{let n=!1,r=await nf(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(T.url`_prasi/page/${e}`)).json();n||t(i)}),WS=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let l of r){let s=await nf(`page-${l}`);if(s)n[l]=s;else{i=!1;break}}i&&t(n);let o=await(await fetch(T.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),Cy=async e=>{let t=e.map(r=>T.route.router?.lookup(r)).filter(r=>r&&r.id);return await WS(t.map(r=>r?.id))};var Ny=A(Ty()),Oy=()=>{let e=T;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,Ny.default)();e.mode=t.device.type==="mobile"?"mobile":"desktop"}else e.site.responsive==="mobile-only"?e.mode="mobile":e.site.responsive==="desktop-only"&&(e.mode="desktop");localStorage.getItem("prasi-editor-mode")&&(e.mode=localStorage.getItem("prasi-editor-mode"))}};function Ro(e,t){return function(){return e.apply(t,arguments)}}var{toString:ZS}=Object.prototype,{getPrototypeOf:Af}=Object,Ks=(e=>t=>{let n=ZS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=e=>(e=e.toLowerCase(),t=>Ks(t)===e),Qs=e=>t=>typeof t===e,{isArray:ri}=Array,Co=Qs("undefined");function GS(e){return e!==null&&!Co(e)&&e.constructor!==null&&!Co(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Py=It("ArrayBuffer");function KS(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Py(e.buffer),t}var QS=Qs("string"),ct=Qs("function"),Ly=Qs("number"),Xs=e=>e!==null&&typeof e=="object",XS=e=>e===!0||e===!1,Gs=e=>{if(Ks(e)!=="object")return!1;let t=Af(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},qS=It("Date"),YS=It("File"),JS=It("Blob"),e2=It("FileList"),t2=e=>Xs(e)&&ct(e.pipe),n2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=Ks(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},r2=It("URLSearchParams"),i2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function To(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ri(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Dy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,My=e=>!Co(e)&&e!==Dy;function If(){let{caseless:e}=My(this)&&this||{},t={},n=(r,i)=>{let o=e&&zy(t,i)||i;Gs(t[o])&&Gs(r)?t[o]=If(t[o],r):Gs(r)?t[o]=If({},r):ri(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(To(t,(i,o)=>{n&&ct(i)?e[o]=Ro(i,n):e[o]=i},{allOwnKeys:r}),e),l2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),s2=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},a2=(e,t,n,r)=>{let i,o,l,s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)l=i[o],(!r||r(l,e,t))&&!s[l]&&(t[l]=e[l],s[l]=!0);e=n!==!1&&Af(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},u2=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},c2=e=>{if(!e)return null;if(ri(e))return e;let t=e.length;if(!Ly(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},f2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Af(Uint8Array)),d2=(e,t)=>{let r=(e&&e[Symbol.iterator]).call(e),i;for(;(i=r.next())&&!i.done;){let o=i.value;t.call(e,o[0],o[1])}},p2=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},m2=It("HTMLFormElement"),h2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Iy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),g2=It("RegExp"),jy=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};To(n,(i,o)=>{let l;(l=t(i,o,e))!==!1&&(r[o]=l||i)}),Object.defineProperties(e,r)},y2=e=>{jy(e,(t,n)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ct(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},_2=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ri(e)?r(e):r(String(e).split(t)),n},v2=()=>{},w2=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Of="abcdefghijklmnopqrstuvwxyz",Ay="0123456789",Fy={DIGIT:Ay,ALPHA:Of,ALPHA_DIGIT:Of+Of.toUpperCase()+Ay},x2=(e=16,t=Fy.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function k2(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var S2=e=>{let t=new Array(10),n=(r,i)=>{if(Xs(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ri(r)?[]:{};return To(r,(l,s)=>{let c=n(l,i+1);!Co(c)&&(o[s]=c)}),t[i]=void 0,o}}return r};return n(e,0)},E2=It("AsyncFunction"),b2=e=>e&&(Xs(e)||ct(e))&&ct(e.then)&&ct(e.catch),w={isArray:ri,isArrayBuffer:Py,isBuffer:GS,isFormData:n2,isArrayBufferView:KS,isString:QS,isNumber:Ly,isBoolean:XS,isObject:Xs,isPlainObject:Gs,isUndefined:Co,isDate:qS,isFile:YS,isBlob:JS,isRegExp:g2,isFunction:ct,isStream:t2,isURLSearchParams:r2,isTypedArray:f2,isFileList:e2,forEach:To,merge:If,extend:o2,trim:i2,stripBOM:l2,inherits:s2,toFlatObject:a2,kindOf:Ks,kindOfTest:It,endsWith:u2,toArray:c2,forEachEntry:d2,matchAll:p2,isHTMLForm:m2,hasOwnProperty:Iy,hasOwnProp:Iy,reduceDescriptors:jy,freezeMethods:y2,toObjectSet:_2,toCamelCase:h2,noop:v2,toFiniteNumber:w2,findKey:zy,global:Dy,isContextDefined:My,ALPHABET:Fy,generateString:x2,isSpecCompliantForm:k2,toJSONObject:S2,isAsyncFn:E2,isThenable:b2};function ii(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}w.inherits(ii,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:w.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Uy=ii.prototype,By={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{By[e]={value:e}});Object.defineProperties(ii,By);Object.defineProperty(Uy,"isAxiosError",{value:!0});ii.from=(e,t,n,r,i,o)=>{let l=Object.create(Uy);return w.toFlatObject(e,l,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ii.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};var M=ii;var qs=null;function Pf(e){return w.isPlainObject(e)||w.isArray(e)}function Hy(e){return w.endsWith(e,"[]")?e.slice(0,-2):e}function $y(e,t,n){return e?e.concat(t).map(function(i,o){return i=Hy(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function R2(e){return w.isArray(e)&&!e.some(Pf)}var C2=w.toFlatObject(w,{},null,function(t){return/^is[A-Z]/.test(t)});function T2(e,t,n){if(!w.isObject(e))throw new TypeError("target must be an object");t=t||new(qs||FormData),n=w.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,x){return!w.isUndefined(x[_])});let r=n.metaTokens,i=n.visitor||u,o=n.dots,l=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&w.isSpecCompliantForm(t);if(!w.isFunction(i))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(w.isDate(g))return g.toISOString();if(!c&&w.isBlob(g))throw new M("Blob is not supported. Use a Buffer instead.");return w.isArrayBuffer(g)||w.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,_,x){let h=g;if(g&&!x&&typeof g=="object"){if(w.endsWith(_,"{}"))_=r?_:_.slice(0,-2),g=JSON.stringify(g);else if(w.isArray(g)&&R2(g)||(w.isFileList(g)||w.endsWith(_,"[]"))&&(h=w.toArray(g)))return _=Hy(_),h.forEach(function(y,v){!(w.isUndefined(y)||y===null)&&t.append(l===!0?$y([_],v,o):l===null?_:_+"[]",a(y))}),!1}return Pf(g)?!0:(t.append($y(x,_,o),a(g)),!1)}let d=[],f=Object.assign(C2,{defaultVisitor:u,convertValue:a,isVisitable:Pf});function p(g,_){if(!w.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));d.push(g),w.forEach(g,function(h,m){(!(w.isUndefined(h)||h===null)&&i.call(t,h,w.isString(m)?m.trim():m,_,f))===!0&&p(h,_?_.concat(m):[m])}),d.pop()}}if(!w.isObject(e))throw new TypeError("data must be an object");return p(e),t}var Ln=T2;function Vy(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Wy(e,t){this._pairs=[],e&&Ln(e,this,t)}var Zy=Wy.prototype;Zy.append=function(t,n){this._pairs.push([t,n])};Zy.toString=function(t){let n=t?function(r){return t.call(this,r,Vy)}:Vy;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var Ys=Wy;function N2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function No(e,t,n){if(!t)return e;let r=n&&n.encode||N2,i=n&&n.serialize,o;if(i?o=i(t,n):o=w.isURLSearchParams(t)?t.toString():new Ys(t,n).toString(r),o){let l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Lf=class{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){w.forEach(this.handlers,function(r){r!==null&&t(r)})}},zf=Lf;var Js={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Gy=typeof URLSearchParams<"u"?URLSearchParams:Ys;var Ky=typeof FormData<"u"?FormData:null;var Qy=typeof Blob<"u"?Blob:null;var Xy={isBrowser:!0,classes:{URLSearchParams:Gy,FormData:Ky,Blob:Qy},protocols:["http","https","file","blob","url","data"]};var Df={};Ev(Df,{hasBrowserEnv:()=>qy,hasStandardBrowserEnv:()=>O2,hasStandardBrowserWebWorkerEnv:()=>I2});var qy=typeof window<"u"&&typeof document<"u",O2=(e=>qy&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),I2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Le={...Df,...Xy};function Mf(e,t){return Ln(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Le.isNode&&w.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function A2(e){return w.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function P2(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return l=!l&&w.isArray(i)?i.length:l,c?(w.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!w.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&w.isArray(i[l])&&(i[l]=P2(i[l])),!s)}if(w.isFormData(e)&&w.isFunction(e.entries)){let n={};return w.forEachEntry(e,(r,i)=>{t(A2(r),i,n,0)}),n}return null}var ea=L2;function z2(e,t,n){if(w.isString(e))try{return(t||JSON.parse)(e),w.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var jf={transitional:Js,adapter:["xhr","http"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=w.isObject(t);if(o&&w.isHTMLForm(t)&&(t=new FormData(t)),w.isFormData(t))return i?JSON.stringify(ea(t)):t;if(w.isArrayBuffer(t)||w.isBuffer(t)||w.isStream(t)||w.isFile(t)||w.isBlob(t))return t;if(w.isArrayBufferView(t))return t.buffer;if(w.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Mf(t,this.formSerializer).toString();if((s=w.isFileList(t))||r.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return Ln(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),z2(t)):t}],transformResponse:[function(t){let n=this.transitional||jf.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&w.isString(t)&&(r&&!this.responseType||i)){let l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(l)throw s.name==="SyntaxError"?M.from(s,M.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Le.classes.FormData,Blob:Le.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};w.forEach(["delete","get","head","post","put","patch"],e=>{jf.headers[e]={}});var oi=jf;var D2=w.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yy=e=>{let t={},n,r,i;return e&&e.split(` +`).forEach(function(l){i=l.indexOf(":"),n=l.substring(0,i).trim().toLowerCase(),r=l.substring(i+1).trim(),!(!n||t[n]&&D2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var Jy=Symbol("internals");function Oo(e){return e&&String(e).trim().toLowerCase()}function ta(e){return e===!1||e==null?e:w.isArray(e)?e.map(ta):String(e)}function M2(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var j2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ff(e,t,n,r,i){if(w.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!w.isString(t)){if(w.isString(r))return t.indexOf(r)!==-1;if(w.isRegExp(r))return r.test(t)}}function F2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function U2(e,t){let n=w.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,l){return this[r].call(this,t,i,o,l)},configurable:!0})})}var li=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(s,c,a){let u=Oo(c);if(!u)throw new Error("header name must be a non-empty string");let d=w.findKey(i,u);(!d||i[d]===void 0||a===!0||a===void 0&&i[d]!==!1)&&(i[d||c]=ta(s))}let l=(s,c)=>w.forEach(s,(a,u)=>o(a,u,c));return w.isPlainObject(t)||t instanceof this.constructor?l(t,n):w.isString(t)&&(t=t.trim())&&!j2(t)?l(Yy(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Oo(t),t){let r=w.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return M2(i);if(w.isFunction(n))return n.call(this,i,r);if(w.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Oo(t),t){let r=w.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ff(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(l){if(l=Oo(l),l){let s=w.findKey(r,l);s&&(!n||Ff(r,r[s],s,n))&&(delete r[s],i=!0)}}return w.isArray(t)?t.forEach(o):o(t),i}clear(t){let n=Object.keys(this),r=n.length,i=!1;for(;r--;){let o=n[r];(!t||Ff(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return w.forEach(this,(i,o)=>{let l=w.findKey(r,o);if(l){n[l]=ta(i),delete n[o];return}let s=t?F2(o):String(o).trim();s!==o&&delete n[o],n[s]=ta(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return w.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&w.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){let r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){let r=(this[Jy]=this[Jy]={accessors:{}}).accessors,i=this.prototype;function o(l){let s=Oo(l);r[s]||(U2(i,l),r[s]=!0)}return w.isArray(t)?t.forEach(o):o(t),this}};li.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);w.reduceDescriptors(li.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});w.freezeMethods(li);var ze=li;function Io(e,t){let n=this||oi,r=t||n,i=ze.from(r.headers),o=r.data;return w.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Ao(e){return!!(e&&e.__CANCEL__)}function e_(e,t,n){M.call(this,e??"canceled",M.ERR_CANCELED,t,n),this.name="CanceledError"}w.inherits(e_,M,{__CANCEL__:!0});var zn=e_;function Uf(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new M("Request failed with status code "+n.status,[M.ERR_BAD_REQUEST,M.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}var t_=Le.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let l=[e+"="+encodeURIComponent(t)];w.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),w.isString(r)&&l.push("path="+r),w.isString(i)&&l.push("domain="+i),o===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){let t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Bf(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function $f(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Po(e,t){return e&&!Bf(t)?$f(e,t):t}var n_=Le.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){let l=o;return t&&(n.setAttribute("href",l),l=n.href),n.setAttribute("href",l),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(l){let s=w.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Hf(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function B2(e,t){e=e||10;let n=new Array(e),r=new Array(e),i=0,o=0,l;return t=t!==void 0?t:1e3,function(c){let a=Date.now(),u=r[o];l||(l=a),n[i]=c,r[i]=a;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),a-l{let o=i.loaded,l=i.lengthComputable?i.total:void 0,s=o-n,c=r(s),a=o<=l;n=o;let u={loaded:o,total:l,progress:l?o/l:void 0,bytes:s,rate:c||void 0,estimated:c&&l&&a?(l-o)/c:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}var $2=typeof XMLHttpRequest<"u",o_=$2&&function(e){return new Promise(function(n,r){let i=e.data,o=ze.from(e.headers).normalize(),{responseType:l,withXSRFToken:s}=e,c;function a(){e.cancelToken&&e.cancelToken.unsubscribe(c),e.signal&&e.signal.removeEventListener("abort",c)}let u;if(w.isFormData(i)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((u=o.getContentType())!==!1){let[_,...x]=u?u.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([_||"multipart/form-data",...x].join("; "))}}let d=new XMLHttpRequest;if(e.auth){let _=e.auth.username||"",x=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+x))}let f=Po(e.baseURL,e.url);d.open(e.method.toUpperCase(),No(f,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function p(){if(!d)return;let _=ze.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),h={data:!l||l==="text"||l==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:_,config:e,request:d};Uf(function(y){n(y),a()},function(y){r(y),a()},h),d=null}if("onloadend"in d?d.onloadend=p:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(p)},d.onabort=function(){d&&(r(new M("Request aborted",M.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new M("Network Error",M.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let x=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",h=e.transitional||Js;e.timeoutErrorMessage&&(x=e.timeoutErrorMessage),r(new M(x,h.clarifyTimeoutError?M.ETIMEDOUT:M.ECONNABORTED,e,d)),d=null},Le.hasStandardBrowserEnv&&(s&&w.isFunction(s)&&(s=s(e)),s||s!==!1&&n_(f))){let _=e.xsrfHeaderName&&e.xsrfCookieName&&t_.read(e.xsrfCookieName);_&&o.set(e.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in d&&w.forEach(o.toJSON(),function(x,h){d.setRequestHeader(h,x)}),w.isUndefined(e.withCredentials)||(d.withCredentials=!!e.withCredentials),l&&l!=="json"&&(d.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&d.addEventListener("progress",i_(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",i_(e.onUploadProgress)),(e.cancelToken||e.signal)&&(c=_=>{d&&(r(!_||_.type?new zn(null,e,d):_),d.abort(),d=null)},e.cancelToken&&e.cancelToken.subscribe(c),e.signal&&(e.signal.aborted?c():e.signal.addEventListener("abort",c)));let g=Hf(f);if(g&&Le.protocols.indexOf(g)===-1){r(new M("Unsupported protocol "+g+":",M.ERR_BAD_REQUEST,e));return}d.send(i||null)})};var Vf={http:qs,xhr:o_};w.forEach(Vf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var l_=e=>`- ${e}`,H2=e=>w.isFunction(e)||e===null||e===!1,na={getAdapter:e=>{e=w.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build")),l=t?o.length>1?`since : +`+o.map(l_).join(` +`):" "+l_(o[0]):"as no adapter specified";throw new M("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return r},adapters:Vf};function Wf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zn(null,e)}function ra(e){return Wf(e),e.headers=ze.from(e.headers),e.data=Io.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),na.getAdapter(e.adapter||oi.adapter)(e).then(function(r){return Wf(e),r.data=Io.call(e,e.transformResponse,r),r.headers=ze.from(r.headers),r},function(r){return Ao(r)||(Wf(e),r&&r.response&&(r.response.data=Io.call(e,e.transformResponse,r.response),r.response.headers=ze.from(r.response.headers))),Promise.reject(r)})}var s_=e=>e instanceof ze?e.toJSON():e;function Yt(e,t){t=t||{};let n={};function r(a,u,d){return w.isPlainObject(a)&&w.isPlainObject(u)?w.merge.call({caseless:d},a,u):w.isPlainObject(u)?w.merge({},u):w.isArray(u)?u.slice():u}function i(a,u,d){if(w.isUndefined(u)){if(!w.isUndefined(a))return r(void 0,a,d)}else return r(a,u,d)}function o(a,u){if(!w.isUndefined(u))return r(void 0,u)}function l(a,u){if(w.isUndefined(u)){if(!w.isUndefined(a))return r(void 0,a)}else return r(void 0,u)}function s(a,u,d){if(d in t)return r(a,u);if(d in e)return r(void 0,a)}let c={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:s,headers:(a,u)=>i(s_(a),s_(u),!0)};return w.forEach(Object.keys(Object.assign({},e,t)),function(u){let d=c[u]||i,f=d(e[u],t[u],u);w.isUndefined(f)&&d!==s||(n[u]=f)}),n}var ia="1.6.7";var Zf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Zf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var a_={};Zf.transitional=function(t,n,r){function i(o,l){return"[Axios v"+ia+"] Transitional option '"+o+"'"+l+(r?". "+r:"")}return(o,l,s)=>{if(t===!1)throw new M(i(l," has been removed"+(n?" in "+n:"")),M.ERR_DEPRECATED);return n&&!a_[l]&&(a_[l]=!0,console.warn(i(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,s):!0}};function V2(e,t,n){if(typeof e!="object")throw new M("options must be an object",M.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let o=r[i],l=t[o];if(l){let s=e[o],c=s===void 0||l(s,o,e);if(c!==!0)throw new M("option "+o+" must be "+c,M.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new M("Unknown option "+o,M.ERR_BAD_OPTION)}}var oa={assertOptions:V2,validators:Zf};var Dn=oa.validators,si=class{constructor(t){this.defaults=t,this.interceptors={request:new zf,response:new zf}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;let o=i.stack?i.stack.replace(/^.+\n/,""):"";r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Yt(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&oa.assertOptions(r,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),i!=null&&(w.isFunction(i)?n.paramsSerializer={serialize:i}:oa.assertOptions(i,{encode:Dn.function,serialize:Dn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&w.merge(o.common,o[n.method]);o&&w.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=ze.concat(l,o);let s=[],c=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(c=c&&_.synchronous,s.unshift(_.fulfilled,_.rejected))});let a=[];this.interceptors.response.forEach(function(_){a.push(_.fulfilled,_.rejected)});let u,d=0,f;if(!c){let g=[ra.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,a),f=g.length,u=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o,l=new Promise(s=>{r.subscribe(s),o=s}).then(i);return l.cancel=function(){r.unsubscribe(o)},l},t(function(o,l,s){r.reason||(r.reason=new zn(o,l,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;let n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new e(function(i){t=i}),cancel:t}}},u_=Gf;function Kf(e){return function(n){return e.apply(null,n)}}function Qf(e){return w.isObject(e)&&e.isAxiosError===!0}var Xf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Xf).forEach(([e,t])=>{Xf[t]=e});var c_=Xf;function f_(e){let t=new Lo(e),n=Ro(Lo.prototype.request,t);return w.extend(n,Lo.prototype,t,{allOwnKeys:!0}),w.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return f_(Yt(e,i))},n}var ue=f_(oi);ue.Axios=Lo;ue.CanceledError=zn;ue.CancelToken=u_;ue.isCancel=Ao;ue.VERSION=ia;ue.toFormData=Ln;ue.AxiosError=M;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=Kf;ue.isAxiosError=Qf;ue.mergeConfig=Yt;ue.AxiosHeaders=ze;ue.formToJSON=e=>ea(w.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=na.getAdapter;ue.HttpStatusCode=c_;ue.default=ue;var la=ue;var{Axios:oA,AxiosError:lA,CanceledError:sA,isCancel:aA,CancelToken:uA,VERSION:cA,all:fA,Cancel:dA,isAxiosError:pA,spread:mA,toFormData:hA,AxiosHeaders:gA,HttpStatusCode:yA,formToJSON:_A,getAdapter:vA,mergeConfig:wA}=la;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var W2=typeof window<"u"?window:null,d_=typeof global<"u"?global:void 0,ai=async(e,t,n)=>{let r={...n},i=null,o=!1,l=null,s=[];if(Array.isArray(t))for(let d of t)d instanceof File&&(s.push(d),o=!0),typeof d=="function"&&(l=d);else t instanceof File&&(o=!0,s.push(t));if(!o)i=JSON.stringify(t),r["content-type"]="aplication/json";else{let d=new FormData;for(let f of s)d.append(f.name,f);i=d,delete r["content-type"],r.enctype="multipart/form-data;"}let c=new URL(e);if(W2!==null){let d=new URL(location.href),f="";if(c.host===d.host||d_&&typeof d_.server_hook=="function"?f=c.toString():f=`${d.protocol}//${d.host}/_proxy/${encodeURIComponent(c.toString())}`,f){if(l)return(await la({method:t?"post":void 0,url:f,data:i,onUploadProgress:l})).data;{let g=await(await fetch(f,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(g,p_)}catch{return g}}}}let u=await(await fetch(c,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(u,p_)}catch{return u}},p_=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;var I_=A(O_());var A_=async(e,t)=>{let n=(0,I_.default)(e,"/"),r=await ai(xE(n,"/_prasi/_")),i="";r&&r.prasi&&(i=r.prasi);let o=wE(n);if(i==="v2")await new Promise(l=>{let s=document,c=s.createElement("script");c.onload=async()=>{l()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let a=localStorage.getItem("api-ts-"+n);t?c.src=`${o}/_prasi/load.js?url=${n}&v3&dev=1&ts=${a}`:c.src=`${o}/_prasi/load.js?url=${n}&v3&ts=${a}`,document.querySelector(`script[src="${c.src}"]`)?l():s.body.appendChild(c)});else{let l=await fetch(o+"/_prasi/api-entry");if(at.prasiApi[n]={apiEntry:(await l.json()).srv},t){let s=await fetch(o+"/_prasi/api-types");at.prasiApi[n].apiTypes=await s.text(),at.prasiApi[n].prismaTypes={"prisma.d.ts":await ed(`${o}/_prasi/prisma/index.d.ts`),"runtime/index.d.ts":await ed(`${o}/_prasi/prisma/runtime/index.d.ts`),"runtime/library.d.ts":await ed(`${o}/_prasi/prisma/runtime/library.d.ts`)}}}},wE=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`},xE=(e,t)=>{let n=new URL(e);return n.pathname=t,n.toString()},ed=async(e,t)=>await(await fetch(e)).text();var zo={},L_=e=>{at.prasiApi||(at.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return at.prasiApi[n]||zo[n]||(zo[n]=A_(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(l,s)=>{let c=new URL(n);c.pathname=l.split("/").filter(d=>d).join("/");let a=new URL(location.href),u="";return c.host===a.host||s===!1?u=c.toString():u=`${a.protocol}//${a.host}/_proxy/${encodeURIComponent(c.toString())}`,u};let o=l=>function(...s){return new Promise(async(c,a)=>{try{let u=at.prasiApi[n];if(!u&&zo&&typeof zo[n]=="object"&&(await zo[n],u=at.prasiApi[n]),u){if(l==="_raw"){let p=s[0],g=`${n}${p}`,_=await P_(g,s.slice(1));c(_);return}if(u.apiEntry||(u.apiEntry={}),u.apiEntry&&!u.apiEntry[l]){a(`API ${l.toString()} not found, existing API: - ${Object.keys(u.apiEntry||{}).join(` - - `)}`);return}let d=u.apiEntry[l].url,f=u.apiEntry[l].args;if(d&&f){if(s.length>0&&f.length>0)for(let[_,x]of Object.entries(s)){let h=f[parseInt(_)];f&&f.includes(h)&&x&&typeof x!="string"&&typeof x!="number"||(d=d.replace(`:${h}?`,x+""),d=d.replace(`:${h}`,x+""))}let p=`${n}${d}`,g=await G_(p,s);c(g)}else console.error(`API Not Found: ${l.toString()}`)}else a("Failed to load API [Proxy]: "+n)}catch(u){a(u)}})};return i==="then"?new Proxy({},{get:(l,s)=>o(s)}):o(i)}})}catch{return null}},G_=async(e,t)=>await ui(e,t,{"content-type":"application/json"});var _v=A(q_());function hi(e){let t=e.length;for(;--t>=0;)e[t]=0}var QE=0,z1=1,XE=2,qE=3,YE=258,Nd=29,Jo=256,Wo=Jo+1+Nd,di=30,Id=19,D1=2*Wo+1,cr=15,ld=16,JE=7,Od=256,j1=16,F1=17,U1=18,wd=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),ha=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),eb=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),B1=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tb=512,tn=new Array((Wo+2)*2);hi(tn);var $o=new Array(di*2);hi($o);var Zo=new Array(tb);hi(Zo);var Go=new Array(YE-qE+1);hi(Go);var Ad=new Array(Nd);hi(Ad);var ga=new Array(di);hi(ga);function sd(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var $1,H1,V1;function ad(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var W1=e=>e<256?Zo[e]:Zo[256+(e>>>7)],Ko=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Ve=(e,t,n)=>{e.bi_valid>ld-n?(e.bi_buf|=t<>ld-e.bi_valid,e.bi_valid+=n-ld):(e.bi_buf|=t<{Ve(e,n[t*2],n[t*2+1])},Z1=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},nb=e=>{e.bi_valid===16?(Ko(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},rb=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,a,u,d,f,p,g,_=0;for(f=0;f<=cr;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,a=e.heap_max+1;ac&&(f=c,_++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=l[u-s]),g=n[u*2],e.opt_len+=g*(f+p),o&&(e.static_len+=g*(i[u*2+1]+p)));if(_!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,_-=2}while(_>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--a],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},G1=(e,t,n)=>{let r=new Array(cr+1),i=0,o,l;for(o=1;o<=cr;o++)i=i+n[o-1]<<1,r[o]=i;for(l=0;l<=t;l++){let s=e[l*2+1];s!==0&&(e[l*2]=Z1(r[s]++,s))}},ib=()=>{let e,t,n,r,i,o=new Array(cr+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t{e.bi_valid>8?Ko(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},Y_=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,l,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Pt(e,i,t):(l=Go[i],Pt(e,l+Jo+1,t),s=wd[l],s!==0&&(i-=Ad[l],Ve(e,i,s)),r--,l=W1(r),Pt(e,l,n),s=ha[l],s!==0&&(r-=ga[l],Ve(e,r,s)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,l,s,c=-1,a;for(e.heap_len=0,e.heap_max=D1,l=0;l>1;l>=1;l--)ud(e,n,l);a=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ud(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=s,n[a*2]=n[l*2]+n[s*2],e.depth[a]=(e.depth[l]>=e.depth[s]?e.depth[l]:e.depth[s])+1,n[l*2+1]=n[s*2+1]=a,e.heap[1]=a++,ud(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],rb(e,t),G1(n,c,e.bl_count)},e1=(e,t,n)=>{let r,i=-1,o,l=t[0*2+1],s=0,c=7,a=4;for(l===0&&(c=138,a=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=l,l=t[(r+1)*2+1],!(++s{let r,i=-1,o,l=t[0*2+1],s=0,c=7,a=4;for(l===0&&(c=138,a=3),r=0;r<=n;r++)if(o=l,l=t[(r+1)*2+1],!(++s{let t;for(e1(e,e.dyn_ltree,e.l_desc.max_code),e1(e,e.dyn_dtree,e.d_desc.max_code),xd(e,e.bl_desc),t=Id-1;t>=3&&e.bl_tree[B1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},lb=(e,t,n,r)=>{let i;for(Ve(e,t-257,5),Ve(e,n-1,5),Ve(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{n1||(ib(),n1=!0),e.l_desc=new ad(e.dyn_ltree,$1),e.d_desc=new ad(e.dyn_dtree,H1),e.bl_desc=new ad(e.bl_tree,V1),e.bi_buf=0,e.bi_valid=0,K1(e)},X1=(e,t,n,r)=>{Ve(e,(QE<<1)+(r?1:0),3),Q1(e),Ko(e,n),Ko(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},ub=e=>{Ve(e,z1<<1,3),Pt(e,Od,tn),nb(e)},cb=(e,t,n,r)=>{let i,o,l=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=sb(e)),xd(e,e.l_desc),xd(e,e.d_desc),l=ob(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?X1(e,t,n,r):e.strategy===4||o===i?(Ve(e,(z1<<1)+(r?1:0),3),J_(e,tn,$o)):(Ve(e,(XE<<1)+(r?1:0),3),lb(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),J_(e,e.dyn_ltree,e.dyn_dtree)),K1(e),r&&Q1(e)},fb=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Go[n]+Jo+1)*2]++,e.dyn_dtree[W1(t)*2]++),e.sym_next===e.sym_end),db=ab,pb=X1,mb=cb,hb=fb,gb=ub,yb={_tr_init:db,_tr_stored_block:pb,_tr_flush_block:mb,_tr_tally:hb,_tr_align:gb},_b=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,o=o+i|0;while(--l);i%=65521,o%=65521}return i|o<<16|0},Qo=_b,vb=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},wb=new Uint32Array(vb()),xb=(e,t,n,r)=>{let i=wb,o=r+n;e^=-1;for(let l=r;l>>8^i[(e^t[l])&255];return e^-1},he=xb,pr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},gr={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:kb,_tr_stored_block:kd,_tr_flush_block:Sb,_tr_tally:Un,_tr_align:Eb}=yb,{Z_NO_FLUSH:Bn,Z_PARTIAL_FLUSH:bb,Z_FULL_FLUSH:Rb,Z_FINISH:ft,Z_BLOCK:r1,Z_OK:xe,Z_STREAM_END:i1,Z_STREAM_ERROR:Lt,Z_DATA_ERROR:Cb,Z_BUF_ERROR:cd,Z_DEFAULT_COMPRESSION:Tb,Z_FILTERED:Nb,Z_HUFFMAN_ONLY:ca,Z_RLE:Ib,Z_FIXED:Ob,Z_DEFAULT_STRATEGY:Ab,Z_UNKNOWN:Pb,Z_DEFLATED:va}=gr,Lb=9,Mb=15,zb=8,Db=29,jb=256,Sd=jb+1+Db,Fb=30,Ub=19,Bb=2*Sd+1,$b=15,U=3,Fn=258,Mt=Fn+U+1,Hb=32,pi=42,Pd=57,Ed=69,bd=73,Rd=91,Cd=103,fr=113,Uo=666,ze=1,gi=2,mr=3,yi=4,Vb=3,dr=(e,t)=>(e.msg=pr[t],t),o1=e=>e*2-(e>4?9:0),jn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Wb=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},Zb=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Je=(e,t)=>{Sb(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ye(e.strm)},$=(e,t)=>{e.pending_buf[e.pending++]=t},Fo=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Td=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Qo(e.adler,t,i,n):e.state.wrap===2&&(e.adler=he(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},q1=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,l=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-Mt?e.strstart-(e.w_size-Mt):0,a=e.window,u=e.w_mask,d=e.prev,f=e.strstart+Fn,p=a[r+l-1],g=a[r+l];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(a[i+l]!==g||a[i+l-1]!==p||a[i]!==a[r]||a[++i]!==a[r+1])){r+=2,i++;do;while(a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&rl){if(e.match_start=t,l=o,o>=s)break;p=a[r+l-1],g=a[r+l]}}while((t=d[t&u])>c&&--n!==0);return l<=e.lookahead?l:e.lookahead},mi=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Mt)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Wb(e),r+=t),e.strm.avail_in===0)break;if(n=Td(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=U)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=$n(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=$n(e,e.ins_h,e.window[i+U-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,l=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Ye(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Td(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(l===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Td(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===ft)&&t!==Bn&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,l=t===ft&&e.strm.avail_in===0&&r===i?1:0,kd(e,e.block_start,r,l),e.block_start+=r,Ye(e.strm)),l?mr:ze)},fd=(e,t)=>{let n,r;for(;;){if(e.lookahead=U&&(e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-Mt&&(e.match_length=q1(e,n)),e.match_length>=U)if(r=Un(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=$n(e,e.ins_h,e.window[e.strstart+1]);else r=Un(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Je(e,!1),e.strm.avail_out===0))return ze}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=U&&(e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=U-1,n!==0&&e.prev_length4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,r=Un(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=$n(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=U-1,e.strstart++,r&&(Je(e,!1),e.strm.avail_out===0))return ze}else if(e.match_available){if(r=Un(e,0,e.window[e.strstart-1]),r&&Je(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return ze}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Un(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,l=e.window;for(;;){if(e.lookahead<=Fn){if(mi(e),e.lookahead<=Fn&&t===Bn)return ze;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(i=e.strstart-1,r=l[i],r===l[++i]&&r===l[++i]&&r===l[++i])){o=e.strstart+Fn;do;while(r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(n=Un(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Un(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Je(e,!1),e.strm.avail_out===0))return ze}return e.insert=0,t===ft?(Je(e,!0),e.strm.avail_out===0?mr:yi):e.sym_next&&(Je(e,!1),e.strm.avail_out===0)?ze:gi},Kb=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(mi(e),e.lookahead===0)){if(t===Bn)return ze;break}if(e.match_length=0,n=Un(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Je(e,!1),e.strm.avail_out===0))return ze}return e.insert=0,t===ft?(Je(e,!0),e.strm.avail_out===0?mr:yi):e.sym_next&&(Je(e,!1),e.strm.avail_out===0)?ze:gi};function At(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Bo=[new At(0,0,0,0,Y1),new At(4,4,8,4,fd),new At(4,5,16,8,fd),new At(4,6,32,32,fd),new At(4,4,16,16,ci),new At(8,16,32,32,ci),new At(8,16,128,128,ci),new At(8,32,128,256,ci),new At(32,128,258,1024,ci),new At(32,258,258,4096,ci)],Qb=e=>{e.window_size=2*e.w_size,jn(e.head),e.max_lazy_match=Bo[e.level].max_lazy,e.good_match=Bo[e.level].good_length,e.nice_match=Bo[e.level].nice_length,e.max_chain_length=Bo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0};function Xb(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=va,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Bb*2),this.dyn_dtree=new Uint16Array((2*Fb+1)*2),this.bl_tree=new Uint16Array((2*Ub+1)*2),jn(this.dyn_ltree),jn(this.dyn_dtree),jn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array($b+1),this.heap=new Uint16Array(2*Sd+1),jn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Sd+1),jn(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var el=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==pi&&t.status!==Pd&&t.status!==Ed&&t.status!==bd&&t.status!==Rd&&t.status!==Cd&&t.status!==fr&&t.status!==Uo?1:0},J1=e=>{if(el(e))return dr(e,Lt);e.total_in=e.total_out=0,e.data_type=Pb;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Pd:t.wrap?pi:fr,e.adler=t.wrap===2?0:1,t.last_flush=-2,kb(t),xe},ev=e=>{let t=J1(e);return t===xe&&Qb(e.state),t},qb=(e,t)=>el(e)||e.state.wrap!==2?Lt:(e.state.gzhead=t,xe),tv=(e,t,n,r,i,o)=>{if(!e)return Lt;let l=1;if(t===Tb&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>Lb||n!==va||r<8||r>15||t<0||t>9||o<0||o>Ob||r===8&&l!==1)return dr(e,Lt);r===8&&(r=9);let s=new Xb;return e.state=s,s.strm=e,s.status=pi,s.wrap=l,s.gzhead=null,s.w_bits=r,s.w_size=1<tv(e,t,va,Mb,zb,Ab),Jb=(e,t)=>{if(el(e)||t>r1||t<0)return e?dr(e,Lt):Lt;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Uo&&t!==ft)return dr(e,e.avail_out===0?cd:Lt);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Ye(e),e.avail_out===0)return n.last_flush=-1,xe}else if(e.avail_in===0&&o1(t)<=o1(r)&&t!==ft)return dr(e,cd);if(n.status===Uo&&e.avail_in!==0)return dr(e,cd);if(n.status===pi&&n.wrap===0&&(n.status=fr),n.status===pi){let i=va+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=ca||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=Hb),i+=31-i%31,Fo(n,i),n.strstart!==0&&(Fo(n,e.adler>>>16),Fo(n,e.adler&65535)),e.adler=1,n.status=fr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===Pd){if(e.adler=0,$(n,31),$(n,139),$(n,8),n.gzhead)$(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),$(n,n.gzhead.time&255),$(n,n.gzhead.time>>8&255),$(n,n.gzhead.time>>16&255),$(n,n.gzhead.time>>24&255),$(n,n.level===9?2:n.strategy>=ca||n.level<2?4:0),$(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&($(n,n.gzhead.extra.length&255),$(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=he(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=Ed;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,n.level===9?2:n.strategy>=ca||n.level<2?4:0),$(n,Vb),n.status=fr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===Ed){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0,o-=s}let l=new Uint8Array(n.gzhead.extra);n.pending_buf.set(l.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=bd}if(n.status===bd){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0}n.gzindexi&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=Rd}if(n.status===Rd){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0}n.gzindexi&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i))}n.status=Cd}if(n.status===Cd){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Ye(e),n.pending!==0))return n.last_flush=-1,xe;$(n,e.adler&255),$(n,e.adler>>8&255),e.adler=0}if(n.status=fr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(e.avail_in!==0||n.lookahead!==0||t!==Bn&&n.status!==Uo){let i=n.level===0?Y1(n,t):n.strategy===ca?Kb(n,t):n.strategy===Ib?Gb(n,t):Bo[n.level].func(n,t);if((i===mr||i===yi)&&(n.status=Uo),i===ze||i===mr)return e.avail_out===0&&(n.last_flush=-1),xe;if(i===gi&&(t===bb?Eb(n):t!==r1&&(kd(n,0,0,!1),t===Rb&&(jn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Ye(e),e.avail_out===0))return n.last_flush=-1,xe}return t!==ft?xe:n.wrap<=0?i1:(n.wrap===2?($(n,e.adler&255),$(n,e.adler>>8&255),$(n,e.adler>>16&255),$(n,e.adler>>24&255),$(n,e.total_in&255),$(n,e.total_in>>8&255),$(n,e.total_in>>16&255),$(n,e.total_in>>24&255)):(Fo(n,e.adler>>>16),Fo(n,e.adler&65535)),Ye(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?xe:i1)},eR=e=>{if(el(e))return Lt;let t=e.state.status;return e.state=null,t===fr?dr(e,Cb):xe},tR=(e,t)=>{let n=t.length;if(el(e))return Lt;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==pi||r.lookahead)return Lt;if(i===1&&(e.adler=Qo(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(jn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}let o=e.avail_in,l=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,mi(r);r.lookahead>=U;){let c=r.strstart,a=r.lookahead-(U-1);do r.ins_h=$n(r,r.ins_h,r.window[c+U-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--a);r.strstart=c,r.lookahead=U-1,mi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=U-1,r.match_available=0,e.next_in=l,e.input=s,e.avail_in=o,r.wrap=i,xe},nR=Yb,rR=tv,iR=ev,oR=J1,lR=qb,sR=Jb,aR=eR,uR=tR,cR="pako deflate (from Nodeca project)",Ho={deflateInit:nR,deflateInit2:rR,deflateReset:iR,deflateResetKeep:oR,deflateSetHeader:lR,deflate:sR,deflateEnd:aR,deflateSetDictionary:uR,deflateInfo:cR},fR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),dR=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)fR(n,r)&&(e[r]=n[r])}}return e},pR=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Xo[254]=Xo[254]=1;var mR=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,l=e.length,s=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},hR=(e,t)=>{if(t<65534&&e.subarray&&nv)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=s-1;continue}for(l&=s===2?31:s===3?15:7;s>1&&r1){o[i++]=65533;continue}l<65536?o[i++]=l:(l-=65536,o[i++]=55296|l>>10&1023,o[i++]=56320|l&1023)}return hR(o,i)},yR=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Xo[e[n]]>t?n:t},qo={string2buf:mR,buf2string:gR,utf8border:yR};function _R(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var rv=_R,iv=Object.prototype.toString,{Z_NO_FLUSH:vR,Z_SYNC_FLUSH:wR,Z_FULL_FLUSH:xR,Z_FINISH:kR,Z_OK:ya,Z_STREAM_END:SR,Z_DEFAULT_COMPRESSION:ER,Z_DEFAULT_STRATEGY:bR,Z_DEFLATED:RR}=gr;function tl(e){this.options=wa.assign({level:ER,method:RR,chunkSize:16384,windowBits:15,memLevel:8,strategy:bR},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new rv,this.strm.avail_out=0;let n=Ho.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ya)throw new Error(pr[n]);if(t.header&&Ho.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=qo.string2buf(t.dictionary):iv.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ho.deflateSetDictionary(this.strm,r),n!==ya)throw new Error(pr[n]);this._dict_set=!0}}tl.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?kR:vR,typeof e=="string"?n.input=qo.string2buf(e):iv.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===wR||o===xR)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Ho.deflate(n,o),i===SR)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Ho.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ya;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};tl.prototype.onData=function(e){this.chunks.push(e)};tl.prototype.onEnd=function(e){e===ya&&(this.result=wa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ld(e,t){let n=new tl(t);if(n.push(e,!0),n.err)throw n.msg||pr[n.err];return n.result}function CR(e,t){return t=t||{},t.raw=!0,Ld(e,t)}function TR(e,t){return t=t||{},t.gzip=!0,Ld(e,t)}var NR=tl,IR=Ld,OR=CR,AR=TR,PR=gr,LR={Deflate:NR,deflate:IR,deflateRaw:OR,gzip:AR,constants:PR},fa=16209,MR=16191,zR=function(t,n){let r,i,o,l,s,c,a,u,d,f,p,g,_,x,h,m,y,v,S,R,k,b,I,C,O=t.state;r=t.next_in,I=t.input,i=r+(t.avail_in-5),o=t.next_out,C=t.output,l=o-(n-t.avail_out),s=o+(t.avail_out-257),c=O.dmax,a=O.wsize,u=O.whave,d=O.wnext,f=O.window,p=O.hold,g=O.bits,_=O.lencode,x=O.distcode,h=(1<>>24,p>>>=v,g-=v,v=y>>>16&255,v===0)C[o++]=y&65535;else if(v&16){S=y&65535,v&=15,v&&(g>>=v,g-=v),g<15&&(p+=I[r++]<>>24,p>>>=v,g-=v,v=y>>>16&255,v&16){if(R=y&65535,v&=15,gc){t.msg="invalid distance too far back",O.mode=fa;break e}if(p>>>=v,g-=v,v=o-l,R>v){if(v=R-v,v>u&&O.sane){t.msg="invalid distance too far back",O.mode=fa;break e}if(k=0,b=f,d===0){if(k+=a-v,v2;)C[o++]=b[k++],C[o++]=b[k++],C[o++]=b[k++],S-=3;S&&(C[o++]=b[k++],S>1&&(C[o++]=b[k++]))}else{k=o-R;do C[o++]=C[k++],C[o++]=C[k++],C[o++]=C[k++],S-=3;while(S>2);S&&(C[o++]=C[k++],S>1&&(C[o++]=C[k++]))}}else if(v&64){t.msg="invalid distance code",O.mode=fa;break e}else{y=x[(y&65535)+(p&(1<>3,r-=S,g-=S<<3,p&=(1<{let c=s.bits,a=0,u=0,d=0,f=0,p=0,g=0,_=0,x=0,h=0,m=0,y,v,S,R,k,b=null,I,C=new Uint16Array(fi+1),O=new Uint16Array(fi+1),De=null,rl,zt,Dt;for(a=0;a<=fi;a++)C[a]=0;for(u=0;u=1&&C[f]===0;f--);if(p>f&&(p=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(d=1;d0&&(e===a1||f!==1))return-1;for(O[1]=0,a=1;al1||e===u1&&h>s1)return 1;for(;;){rl=a-_,l[u]+1=I?(zt=De[l[u]-I],Dt=b[l[u]-I]):(zt=96,Dt=0),y=1<>_)+v]=rl<<24|zt<<16|Dt|0;while(v!==0);for(y=1<>=1;if(y!==0?(m&=y-1,m+=y):m=0,u++,--C[a]===0){if(a===f)break;a=t[n+l[u]]}if(a>p&&(m&R)!==S){for(_===0&&(_=p),k+=d,g=a-_,x=1<l1||e===u1&&h>s1)return 1;S=m&R,i[S]=p<<24|g<<16|k-o|0}}return m!==0&&(i[k+m]=a-_<<24|64<<16|0),s.bits=p,0},Vo=BR,$R=0,ov=1,lv=2,{Z_FINISH:c1,Z_BLOCK:HR,Z_TREES:da,Z_OK:hr,Z_STREAM_END:VR,Z_NEED_DICT:WR,Z_STREAM_ERROR:dt,Z_DATA_ERROR:sv,Z_MEM_ERROR:av,Z_BUF_ERROR:ZR,Z_DEFLATED:f1}=gr,xa=16180,d1=16181,p1=16182,m1=16183,h1=16184,g1=16185,y1=16186,_1=16187,v1=16188,w1=16189,_a=16190,en=16191,pd=16192,x1=16193,md=16194,k1=16195,S1=16196,E1=16197,b1=16198,pa=16199,ma=16200,R1=16201,C1=16202,T1=16203,N1=16204,I1=16205,hd=16206,O1=16207,A1=16208,te=16209,uv=16210,cv=16211,GR=852,KR=592,QR=15,XR=QR,P1=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function qR(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var yr=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.modecv?1:0},fv=e=>{if(yr(e))return dt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=xa,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(GR),t.distcode=t.distdyn=new Int32Array(KR),t.sane=1,t.back=-1,hr},dv=e=>{if(yr(e))return dt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,fv(e)},pv=(e,t)=>{let n;if(yr(e))return dt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?dt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,dv(e))},mv=(e,t)=>{if(!e)return dt;let n=new qR;e.state=n,n.strm=e,n.window=null,n.mode=xa;let r=pv(e,t);return r!==hr&&(e.state=null),r},YR=e=>mv(e,XR),L1=!0,gd,yd,JR=e=>{if(L1){gd=new Int32Array(512),yd=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Vo(ov,e.lens,0,288,gd,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vo(lv,e.lens,0,32,yd,0,e.work,{bits:5}),L1=!1}e.lencode=gd,e.lenbits=9,e.distcode=yd,e.distbits=5},hv=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,l,s,c,a,u,d,f,p,g,_,x=0,h,m,y,v,S,R,k,b,I=new Uint8Array(4),C,O,De=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(yr(e)||!e.output||!e.input&&e.avail_in!==0)return dt;n=e.state,n.mode===en&&(n.mode=pd),l=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,u=n.bits,d=s,f=c,b=hr;e:for(;;)switch(n.mode){case xa:if(n.wrap===0){n.mode=pd;break}for(;u<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,I,2,0),a=0,u=0,n.mode=d1;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((a&255)<<8)+(a>>8))%31){e.msg="incorrect header check",n.mode=te;break}if((a&15)!==f1){e.msg="unknown compression method",n.mode=te;break}if(a>>>=4,u-=4,k=(a&15)+8,n.wbits===0&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=te;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(I[0]=a&255,I[1]=a>>>8&255,n.check=he(n.check,I,2,0)),a=0,u=0,n.mode=p1;case p1:for(;u<32;){if(s===0)break e;s--,a+=r[o++]<>>8&255,I[2]=a>>>16&255,I[3]=a>>>24&255,n.check=he(n.check,I,4,0)),a=0,u=0,n.mode=m1;case m1:for(;u<16;){if(s===0)break e;s--,a+=r[o++]<>8),n.flags&512&&n.wrap&4&&(I[0]=a&255,I[1]=a>>>8&255,n.check=he(n.check,I,2,0)),a=0,u=0,n.mode=h1;case h1:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,I,2,0)),a=0,u=0}else n.head&&(n.head.extra=null);n.mode=g1;case g1:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+p),k)),n.flags&512&&n.wrap&4&&(n.check=he(n.check,r,p,o)),s-=p,o+=p,n.length-=p),n.length))break e;n.length=0,n.mode=y1;case y1:if(n.flags&2048){if(s===0)break e;p=0;do k=r[o+p++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k));while(k&&p>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=en;break;case w1:for(;u<32;){if(s===0)break e;s--,a+=r[o++]<>>=u&7,u-=u&7,n.mode=hd;break}for(;u<3;){if(s===0)break e;s--,a+=r[o++]<>>=1,u-=1,a&3){case 0:n.mode=x1;break;case 1:if(JR(n),n.mode=pa,t===da){a>>>=2,u-=2;break e}break;case 2:n.mode=S1;break;case 3:e.msg="invalid block type",n.mode=te}a>>>=2,u-=2;break;case x1:for(a>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,a+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=te;break}if(n.length=a&65535,a=0,u=0,n.mode=md,t===da)break e;case md:n.mode=k1;case k1:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break e;i.set(r.subarray(o,o+p),l),s-=p,o+=p,c-=p,l+=p,n.length-=p;break}n.mode=en;break;case S1:for(;u<14;){if(s===0)break e;s--,a+=r[o++]<>>=5,u-=5,n.ndist=(a&31)+1,a>>>=5,u-=5,n.ncode=(a&15)+4,a>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=te;break}n.have=0,n.mode=E1;case E1:for(;n.have>>=3,u-=3}for(;n.have<19;)n.lens[De[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,C={bits:n.lenbits},b=Vo($R,n.lens,0,19,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid code lengths set",n.mode=te;break}n.have=0,n.mode=b1;case b1:for(;n.have>>24,m=x>>>16&255,y=x&65535,!(h<=u);){if(s===0)break e;s--,a+=r[o++]<>>=h,u-=h,n.lens[n.have++]=y;else{if(y===16){for(O=h+2;u>>=h,u-=h,n.have===0){e.msg="invalid bit length repeat",n.mode=te;break}k=n.lens[n.have-1],p=3+(a&3),a>>>=2,u-=2}else if(y===17){for(O=h+3;u>>=h,u-=h,k=0,p=3+(a&7),a>>>=3,u-=3}else{for(O=h+7;u>>=h,u-=h,k=0,p=11+(a&127),a>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=te;break}for(;p--;)n.lens[n.have++]=k}}if(n.mode===te)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=te;break}if(n.lenbits=9,C={bits:n.lenbits},b=Vo(ov,n.lens,0,n.nlen,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid literal/lengths set",n.mode=te;break}if(n.distbits=6,n.distcode=n.distdyn,C={bits:n.distbits},b=Vo(lv,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,C),n.distbits=C.bits,b){e.msg="invalid distances set",n.mode=te;break}if(n.mode=pa,t===da)break e;case pa:n.mode=ma;case ma:if(s>=6&&c>=258){e.next_out=l,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=a,n.bits=u,zR(e,f),l=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,u=n.bits,n.mode===en&&(n.back=-1);break}for(n.back=0;x=n.lencode[a&(1<>>24,m=x>>>16&255,y=x&65535,!(h<=u);){if(s===0)break e;s--,a+=r[o++]<>v)],h=x>>>24,m=x>>>16&255,y=x&65535,!(v+h<=u);){if(s===0)break e;s--,a+=r[o++]<>>=v,u-=v,n.back+=v}if(a>>>=h,u-=h,n.back+=h,n.length=y,m===0){n.mode=I1;break}if(m&32){n.back=-1,n.mode=en;break}if(m&64){e.msg="invalid literal/length code",n.mode=te;break}n.extra=m&15,n.mode=R1;case R1:if(n.extra){for(O=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=C1;case C1:for(;x=n.distcode[a&(1<>>24,m=x>>>16&255,y=x&65535,!(h<=u);){if(s===0)break e;s--,a+=r[o++]<>v)],h=x>>>24,m=x>>>16&255,y=x&65535,!(v+h<=u);){if(s===0)break e;s--,a+=r[o++]<>>=v,u-=v,n.back+=v}if(a>>>=h,u-=h,n.back+=h,m&64){e.msg="invalid distance code",n.mode=te;break}n.offset=y,n.extra=m&15,n.mode=T1;case T1:if(n.extra){for(O=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=te;break}n.mode=N1;case N1:if(c===0)break e;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=te;break}p>n.wnext?(p-=n.wnext,g=n.wsize-p):g=n.wnext-p,p>n.length&&(p=n.length),_=n.window}else _=i,g=l-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[l++]=_[g++];while(--p);n.length===0&&(n.mode=ma);break;case I1:if(c===0)break e;i[l++]=n.length,c--,n.mode=ma;break;case hd:if(n.wrap){for(;u<32;){if(s===0)break e;s--,a|=r[o++]<{if(yr(e))return dt;let t=e.state;return t.window&&(t.window=null),e.state=null,hr},nC=(e,t)=>{if(yr(e))return dt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,hr):dt},rC=(e,t)=>{let n=t.length,r,i,o;return yr(e)||(r=e.state,r.wrap!==0&&r.mode!==_a)?dt:r.mode===_a&&(i=1,i=Qo(i,t,n,0),i!==r.check)?sv:(o=hv(e,t,n,n),o?(r.mode=uv,av):(r.havedict=1,hr))},iC=dv,oC=pv,lC=fv,sC=YR,aC=mv,uC=eC,cC=tC,fC=nC,dC=rC,pC="pako inflate (from Nodeca project)",nn={inflateReset:iC,inflateReset2:oC,inflateResetKeep:lC,inflateInit:sC,inflateInit2:aC,inflate:uC,inflateEnd:cC,inflateGetHeader:fC,inflateSetDictionary:dC,inflateInfo:pC};function mC(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var hC=mC,gv=Object.prototype.toString,{Z_NO_FLUSH:gC,Z_FINISH:yC,Z_OK:Yo,Z_STREAM_END:_d,Z_NEED_DICT:vd,Z_STREAM_ERROR:_C,Z_DATA_ERROR:M1,Z_MEM_ERROR:vC}=gr;function nl(e){this.options=wa.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new rv,this.strm.avail_out=0;let n=nn.inflateInit2(this.strm,t.windowBits);if(n!==Yo)throw new Error(pr[n]);if(this.header=new hC,nn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=qo.string2buf(t.dictionary):gv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=nn.inflateSetDictionary(this.strm,t.dictionary),n!==Yo)))throw new Error(pr[n])}nl.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,l,s;if(this.ended)return!1;for(t===~~t?l=t:l=t===!0?yC:gC,gv.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=nn.inflate(n,l),o===vd&&i&&(o=nn.inflateSetDictionary(n,i),o===Yo?o=nn.inflate(n,l):o===M1&&(o=vd));n.avail_in>0&&o===_d&&n.state.wrap>0&&e[n.next_in]!==0;)nn.inflateReset(n),o=nn.inflate(n,l);switch(o){case _C:case M1:case vd:case vC:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===_d))if(this.options.to==="string"){let c=qo.utf8border(n.output,n.next_out),a=n.next_out-c,u=qo.buf2string(n.output,c);n.next_out=a,n.avail_out=r-a,a&&n.output.set(n.output.subarray(c,c+a),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===Yo&&s===0)){if(o===_d)return o=nn.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};nl.prototype.onData=function(e){this.chunks.push(e)};nl.prototype.onEnd=function(e){e===Yo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=wa.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Md(e,t){let n=new nl(t);if(n.push(e),n.err)throw n.msg||pr[n.err];return n.result}function wC(e,t){return t=t||{},t.raw=!0,Md(e,t)}var xC=nl,kC=Md,SC=wC,EC=Md,bC=gr,RC={Inflate:xC,inflate:kC,inflateRaw:SC,ungzip:EC,constants:bC},{Deflate:CC,deflate:TC,deflateRaw:NC,gzip:IC}=LR,{Inflate:OC,inflate:AC,inflateRaw:PC,ungzip:LC}=RC,MC=CC,zC=TC,DC=NC,jC=IC,FC=OC,UC=AC,BC=PC,$C=LC,HC=gr,yv={Deflate:MC,deflate:zC,deflateRaw:DC,gzip:jC,Inflate:FC,inflate:UC,inflateRaw:BC,ungzip:$C,constants:HC};var vv=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>_i({name:t,action:"batch_update",table:"",params:{batch:i}},e)}:r==="_schema"?{tables:async()=>_i({name:t,action:"schema_tables",table:"",params:[]},e),columns:async i=>_i({name:t,action:"schema_columns",table:i,params:[]},e),rels:async i=>_i({name:t,action:"schema_rels",table:i,params:[]},e)}:r.startsWith("$")?(...i)=>{let o=yv.gzip(JSON.stringify(i));return _i({name:t,action:"query",table:r,params:btoa(o.reduce((l,s)=>l+String.fromCharCode(s),""))},e)}:new Proxy({},{get(i,o){return async(...l)=>(r==="query"&&(r=o,o="query"),await _i({name:t,action:o,table:r,params:l},e))}})}})},ka={},_i=async(e,t)=>{try{let n=new URL(t);n.pathname="/_dbs",e.table&&(n.pathname+=`/${e.table}`);let r=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(e.mlsid=localStorage.mlsid);let i=(0,_v.default)(e),o=ka[i];if(!o||o&&Date.now()-o.timestamp>1e3){ka[i]={timestamp:Date.now(),promise:ui(r,e,{"content-type":"application/json"}),result:null};let l=await ka[i].promise;return ka[i].result=l,l}return await o.promise}catch{}};var wv=A(Rf());var xv=e=>{let{item:t,item_comp:n,ids:r}=e,i=In(n);if(kv(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component)for(let o of Object.keys(i.component.props)){let l=t.component.props[o],s=i.component.props[o];l&&(s.value=l.value,s.valueBuilt=l.valueBuilt,s.jsxCalledBy=l.jsxCalledBy,s.content=l.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,l]of Object.entries(i))t[o]=l},kv=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,wv.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)kv(n,t)};var Sv=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=In(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};var Sa=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var Ev=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let l=i[n.id];i[n.id]||(i[n.id]={},l=i[n.id]),xv({item:n,item_comp:r,ids:l})}let o={item:Sa(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),Sv({item:n,item_comp:r,instance:i?i[n.id]:{},each(l,s){let c=n.component?.id;s.meta?.type==="content-element"&&c&&s.content&&(s.content.name=l,vi({...e},{item:s.content,root:t.root||s.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:c,name:l},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}});for(let l of Object.values(n.childs))l?.name?.startsWith("jsx:")||l&&Object.keys(l).length>3&&vi({...e,mode:"comp"},{item:l,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var vi=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){Ev(e,t);return}let r={item:Sa(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let l={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(l.jsx_prop={...t.jsx_prop,is_root:!1}),vi(e,l)}}};var VC=()=>new Promise(async e=>{let t=!1,n=await(await fetch(T.url`_prasi/route`)).json();t||e(n)}),bv=async()=>{let e=Us(),t=[];try{let n=await VC();if(n&&n.site&&n.urls){n.layout&&(T.layout.id=n.layout.id,T.layout.root=n.layout.root,T.layout.meta={},T.layout.root&&(await ri(T.layout.root.childs),Ea(T.layout.meta,T.layout.root))),T.site=n.site,T.site.code={mode:"vsc"},await WC(),T.site.api=K_(T.site.api_url),T.site.db=vv(T.site.api_url);let r=window;r.serverurl=T.site.api_url,r.db=T.site.db,r.api=T.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},WC=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=T.site.api_url;if(r==="*")r=`${location.protocol}//${location.host}`,T.site.api_url=r;else try{new URL(r)}catch{location.hostname==="localhost"?r="http://localhost:4550":r="https://prasi.avolut.com"}localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=localStorage.getItem("api-ts-"+r);n.src=`${r}/_prasi/load.js?url=${r}&v3&ts=${i}`,document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),Ea=(e,t)=>{for(let n of t.childs)vi({set_meta:!0,comps:T.comp.list,meta:e,mode:"page"},{item:n})};var se=window;var rn=A(Z()),Dd=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",Cv=()=>{let e=Cn({page_id:""}),[t,n]=(0,Rv.useState)({}),r=()=>n({});se.prasiContext.render=r;let i=af.Provider,o=Dd()&&location.pathname.startsWith("/prod");if(T.route.status!=="ready")return T.route.status==="init"&&(T.route.status="loading",bv().then(async({router:u,pages:d})=>{Vy(),T.route.status="ready",T.route.router=u,T.route.pages=d;let f=se._prasi.basepath,p=`${f.endsWith("/")?f:`${f}/`}_prasi/code/index.js`,g=new URL(location.href);p.startsWith("/")&&(p=`${g.protocol}//${g.host}${p}`);let _=new Function("callback",`import("${p}").then(callback)`);await new Promise(x=>{_(h=>{for(let[m,y]of Object.entries(h))se[m]=y;x()})}),r()})),(0,rn.jsx)(ko,{});let l=T.route.router;if(!l)return(0,rn.jsx)(gf,{children:"Failed to create Router"});let s="";if(o){let u=location.pathname.split("/");hf(u[3])&&(s=u[3])}let c=null;if(se._prasi.page_id)l.insert(T.pathname,{id:se._prasi.page_id,url:T.pathname}),c={id:se._prasi.page_id,url:"",params:se._prasi.params},se._prasi.routed={page_id:se._prasi.page_id,params:se._prasi.params},delete se._prasi.page_id,delete se._prasi.params;else{if(c=l.lookup(T.pathname),s){let u=T.route.pages.find(d=>s===d.id);u&&(c=u)}c&&se._prasi.routed&&se._prasi.routed.page_id===c.id&&se._prasi.routed.params&&(c.params=se._prasi.routed.params)}if(!c)return(0,rn.jsx)(gf,{children:"Page Not Found"});c.id!==e.page_id&&(T.init_local_effect={}),se.params=c.params||{},T.page.id=c.id,T.page.url=c.url;let a=T.page.cache[c.id];if(a)T.page.root=a.root,T.page.meta=a.meta;else return Uy(c.id).then(async({root:u})=>{if(c){let d={id:c.id,url:c.url,root:u,meta:{}};await ri(u.childs),Ea(d.meta,u),T.page.cache[d.id]=d,r()}}).catch(()=>{r()}),(0,rn.jsx)(ko,{note:"Loading page"});return(0,rn.jsx)(i,{value:se.prasiContext,children:(0,rn.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,rn.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white main-content-preview",T.mode==="mobile"?css` + - `)}`);return}let d=u.apiEntry[l].url,f=u.apiEntry[l].args;if(d&&f){if(s.length>0&&f.length>0)for(let[_,x]of Object.entries(s)){let h=f[parseInt(_)];f&&f.includes(h)&&x&&typeof x!="string"&&typeof x!="number"||(d=d.replace(`:${h}?`,x+""),d=d.replace(`:${h}`,x+""))}let p=`${n}${d}`,g=await P_(p,s);c(g)}else console.error(`API Not Found: ${l.toString()}`)}else a("Failed to load API [Proxy]: "+n)}catch(u){a(u)}})};return i==="then"?new Proxy({},{get:(l,s)=>o(s)}):o(i)}})}catch{return null}},P_=async(e,t)=>await ai(e,t,{"content-type":"application/json"});var iv=A(M_());function mi(e){let t=e.length;for(;--t>=0;)e[t]=0}var RE=0,k1=1,CE=2,TE=3,NE=258,Ed=29,Xo=256,$o=Xo+1+Ed,fi=30,bd=19,S1=2*$o+1,ur=15,td=16,OE=7,Rd=256,E1=16,b1=17,R1=18,hd=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),da=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),IE=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),C1=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),AE=512,tn=new Array(($o+2)*2);mi(tn);var Fo=new Array(fi*2);mi(Fo);var Ho=new Array(AE);mi(Ho);var Vo=new Array(NE-TE+1);mi(Vo);var Cd=new Array(Ed);mi(Cd);var pa=new Array(fi);mi(pa);function nd(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var T1,N1,O1;function rd(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var I1=e=>e<256?Ho[e]:Ho[256+(e>>>7)],Wo=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Ve=(e,t,n)=>{e.bi_valid>td-n?(e.bi_buf|=t<>td-e.bi_valid,e.bi_valid+=n-td):(e.bi_buf|=t<{Ve(e,n[t*2],n[t*2+1])},A1=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},PE=e=>{e.bi_valid===16?(Wo(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},LE=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,o=t.stat_desc.has_stree,l=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,a,u,d,f,p,g,_=0;for(f=0;f<=ur;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,a=e.heap_max+1;ac&&(f=c,_++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=l[u-s]),g=n[u*2],e.opt_len+=g*(f+p),o&&(e.static_len+=g*(i[u*2+1]+p)));if(_!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,_-=2}while(_>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--a],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},P1=(e,t,n)=>{let r=new Array(ur+1),i=0,o,l;for(o=1;o<=ur;o++)i=i+n[o-1]<<1,r[o]=i;for(l=0;l<=t;l++){let s=e[l*2+1];s!==0&&(e[l*2]=A1(r[s]++,s))}},zE=()=>{let e,t,n,r,i,o=new Array(ur+1);for(n=0,r=0;r>=7;r{let t;for(t=0;t<$o;t++)e.dyn_ltree[t*2]=0;for(t=0;t{e.bi_valid>8?Wo(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},j_=(e,t,n,r)=>{let i=t*2,o=n*2;return e[i]{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i{let r,i,o=0,l,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+o++]&255,r+=(e.pending_buf[e.sym_buf+o++]&255)<<8,i=e.pending_buf[e.sym_buf+o++],r===0?Pt(e,i,t):(l=Vo[i],Pt(e,l+Xo+1,t),s=hd[l],s!==0&&(i-=Cd[l],Ve(e,i,s)),r--,l=I1(r),Pt(e,l,n),s=da[l],s!==0&&(r-=pa[l],Ve(e,r,s)));while(o{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,o=t.stat_desc.elems,l,s,c=-1,a;for(e.heap_len=0,e.heap_max=S1,l=0;l>1;l>=1;l--)id(e,n,l);a=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],id(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=l,e.heap[--e.heap_max]=s,n[a*2]=n[l*2]+n[s*2],e.depth[a]=(e.depth[l]>=e.depth[s]?e.depth[l]:e.depth[s])+1,n[l*2+1]=n[s*2+1]=a,e.heap[1]=a++,id(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],LE(e,t),P1(n,c,e.bl_count)},U_=(e,t,n)=>{let r,i=-1,o,l=t[0*2+1],s=0,c=7,a=4;for(l===0&&(c=138,a=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)o=l,l=t[(r+1)*2+1],!(++s{let r,i=-1,o,l=t[0*2+1],s=0,c=7,a=4;for(l===0&&(c=138,a=3),r=0;r<=n;r++)if(o=l,l=t[(r+1)*2+1],!(++s{let t;for(U_(e,e.dyn_ltree,e.l_desc.max_code),U_(e,e.dyn_dtree,e.d_desc.max_code),gd(e,e.bl_desc),t=bd-1;t>=3&&e.bl_tree[C1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},ME=(e,t,n,r)=>{let i;for(Ve(e,t-257,5),Ve(e,n-1,5),Ve(e,r-4,4),i=0;i{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return 0;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return 1;for(n=32;n{$_||(zE(),$_=!0),e.l_desc=new rd(e.dyn_ltree,T1),e.d_desc=new rd(e.dyn_dtree,N1),e.bl_desc=new rd(e.bl_tree,O1),e.bi_buf=0,e.bi_valid=0,L1(e)},D1=(e,t,n,r)=>{Ve(e,(RE<<1)+(r?1:0),3),z1(e),Wo(e,n),Wo(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},UE=e=>{Ve(e,k1<<1,3),Pt(e,Rd,tn),PE(e)},BE=(e,t,n,r)=>{let i,o,l=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=jE(e)),gd(e,e.l_desc),gd(e,e.d_desc),l=DE(e),i=e.opt_len+3+7>>>3,o=e.static_len+3+7>>>3,o<=i&&(i=o)):i=o=n+5,n+4<=i&&t!==-1?D1(e,t,n,r):e.strategy===4||o===i?(Ve(e,(k1<<1)+(r?1:0),3),F_(e,tn,Fo)):(Ve(e,(CE<<1)+(r?1:0),3),ME(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),F_(e,e.dyn_ltree,e.dyn_dtree)),L1(e),r&&z1(e)},$E=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(Vo[n]+Xo+1)*2]++,e.dyn_dtree[I1(t)*2]++),e.sym_next===e.sym_end),HE=FE,VE=D1,WE=BE,ZE=$E,GE=UE,KE={_tr_init:HE,_tr_stored_block:VE,_tr_flush_block:WE,_tr_tally:ZE,_tr_align:GE},QE=(e,t,n,r)=>{let i=e&65535|0,o=e>>>16&65535|0,l=0;for(;n!==0;){l=n>2e3?2e3:n,n-=l;do i=i+t[r++]|0,o=o+i|0;while(--l);i%=65521,o%=65521}return i|o<<16|0},Zo=QE,XE=()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t},qE=new Uint32Array(XE()),YE=(e,t,n,r)=>{let i=qE,o=r+n;e^=-1;for(let l=r;l>>8^i[(e^t[l])&255];return e^-1},he=YE,dr={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},hr={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:JE,_tr_stored_block:yd,_tr_flush_block:eb,_tr_tally:Fn,_tr_align:tb}=KE,{Z_NO_FLUSH:Un,Z_PARTIAL_FLUSH:nb,Z_FULL_FLUSH:rb,Z_FINISH:ft,Z_BLOCK:H_,Z_OK:xe,Z_STREAM_END:V_,Z_STREAM_ERROR:Lt,Z_DATA_ERROR:ib,Z_BUF_ERROR:od,Z_DEFAULT_COMPRESSION:ob,Z_FILTERED:lb,Z_HUFFMAN_ONLY:sa,Z_RLE:sb,Z_FIXED:ab,Z_DEFAULT_STRATEGY:ub,Z_UNKNOWN:cb,Z_DEFLATED:ga}=hr,fb=9,db=15,pb=8,mb=29,hb=256,_d=hb+1+mb,gb=30,yb=19,_b=2*_d+1,vb=15,U=3,jn=258,zt=jn+U+1,wb=32,di=42,Td=57,vd=69,wd=73,xd=91,kd=103,cr=113,Mo=666,De=1,hi=2,pr=3,gi=4,xb=3,fr=(e,t)=>(e.msg=dr[t],t),W_=e=>e*2-(e>4?9:0),Mn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},kb=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},Sb=(e,t,n)=>(t<{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Je=(e,t)=>{eb(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Ye(e.strm)},$=(e,t)=>{e.pending_buf[e.pending++]=t},Do=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},Sd=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=Zo(e.adler,t,i,n):e.state.wrap===2&&(e.adler=he(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},M1=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,l=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-zt?e.strstart-(e.w_size-zt):0,a=e.window,u=e.w_mask,d=e.prev,f=e.strstart+jn,p=a[r+l-1],g=a[r+l];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,!(a[i+l]!==g||a[i+l-1]!==p||a[i]!==a[r]||a[++i]!==a[r+1])){r+=2,i++;do;while(a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&a[++r]===a[++i]&&rl){if(e.match_start=t,l=o,o>=s)break;p=a[r+l-1],g=a[r+l]}}while((t=d[t&u])>c&&--n!==0);return l<=e.lookahead?l:e.lookahead},pi=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-zt)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),kb(e),r+=t),e.strm.avail_in===0)break;if(n=Sd(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=U)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Bn(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Bn(e,e.ins_h,e.window[i+U-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,o,l=0,s=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outi+e.strm.avail_in&&(r=i+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Ye(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(Sd(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(l===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Sd(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,n=o>e.w_size?e.w_size:o,i=e.strstart-e.block_start,(i>=n||(i||t===ft)&&t!==Un&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,l=t===ft&&e.strm.avail_in===0&&r===i?1:0,yd(e,e.block_start,r,l),e.block_start+=r,Ye(e.strm)),l?pr:De)},ld=(e,t)=>{let n,r;for(;;){if(e.lookahead=U&&(e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-zt&&(e.match_length=M1(e,n)),e.match_length>=U)if(r=Fn(e,e.strstart-e.match_start,e.match_length-U),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=U){e.match_length--;do e.strstart++,e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+1]);else r=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Je(e,!1),e.strm.avail_out===0))return De}return e.insert=e.strstart{let n,r,i;for(;;){if(e.lookahead=U&&(e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=U-1,n!==0&&e.prev_length4096)&&(e.match_length=U-1)),e.prev_length>=U&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-U,r=Fn(e,e.strstart-1-e.prev_match,e.prev_length-U),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Bn(e,e.ins_h,e.window[e.strstart+U-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=U-1,e.strstart++,r&&(Je(e,!1),e.strm.avail_out===0))return De}else if(e.match_available){if(r=Fn(e,0,e.window[e.strstart-1]),r&&Je(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return De}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Fn(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart{let n,r,i,o,l=e.window;for(;;){if(e.lookahead<=jn){if(pi(e),e.lookahead<=jn&&t===Un)return De;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=U&&e.strstart>0&&(i=e.strstart-1,r=l[i],r===l[++i]&&r===l[++i]&&r===l[++i])){o=e.strstart+jn;do;while(r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&r===l[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=U?(n=Fn(e,1,e.match_length-U),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Je(e,!1),e.strm.avail_out===0))return De}return e.insert=0,t===ft?(Je(e,!0),e.strm.avail_out===0?pr:gi):e.sym_next&&(Je(e,!1),e.strm.avail_out===0)?De:hi},bb=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(pi(e),e.lookahead===0)){if(t===Un)return De;break}if(e.match_length=0,n=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Je(e,!1),e.strm.avail_out===0))return De}return e.insert=0,t===ft?(Je(e,!0),e.strm.avail_out===0?pr:gi):e.sym_next&&(Je(e,!1),e.strm.avail_out===0)?De:hi};function At(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var jo=[new At(0,0,0,0,j1),new At(4,4,8,4,ld),new At(4,5,16,8,ld),new At(4,6,32,32,ld),new At(4,4,16,16,ui),new At(8,16,32,32,ui),new At(8,16,128,128,ui),new At(8,32,128,256,ui),new At(32,128,258,1024,ui),new At(32,258,258,4096,ui)],Rb=e=>{e.window_size=2*e.w_size,Mn(e.head),e.max_lazy_match=jo[e.level].max_lazy,e.good_match=jo[e.level].good_length,e.nice_match=jo[e.level].nice_length,e.max_chain_length=jo[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=U-1,e.match_available=0,e.ins_h=0};function Cb(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ga,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(_b*2),this.dyn_dtree=new Uint16Array((2*gb+1)*2),this.bl_tree=new Uint16Array((2*yb+1)*2),Mn(this.dyn_ltree),Mn(this.dyn_dtree),Mn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(vb+1),this.heap=new Uint16Array(2*_d+1),Mn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*_d+1),Mn(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var qo=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.status!==di&&t.status!==Td&&t.status!==vd&&t.status!==wd&&t.status!==xd&&t.status!==kd&&t.status!==cr&&t.status!==Mo?1:0},F1=e=>{if(qo(e))return fr(e,Lt);e.total_in=e.total_out=0,e.data_type=cb;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Td:t.wrap?di:cr,e.adler=t.wrap===2?0:1,t.last_flush=-2,JE(t),xe},U1=e=>{let t=F1(e);return t===xe&&Rb(e.state),t},Tb=(e,t)=>qo(e)||e.state.wrap!==2?Lt:(e.state.gzhead=t,xe),B1=(e,t,n,r,i,o)=>{if(!e)return Lt;let l=1;if(t===ob&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>fb||n!==ga||r<8||r>15||t<0||t>9||o<0||o>ab||r===8&&l!==1)return fr(e,Lt);r===8&&(r=9);let s=new Cb;return e.state=s,s.strm=e,s.status=di,s.wrap=l,s.gzhead=null,s.w_bits=r,s.w_size=1<B1(e,t,ga,db,pb,ub),Ob=(e,t)=>{if(qo(e)||t>H_||t<0)return e?fr(e,Lt):Lt;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Mo&&t!==ft)return fr(e,e.avail_out===0?od:Lt);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Ye(e),e.avail_out===0)return n.last_flush=-1,xe}else if(e.avail_in===0&&W_(t)<=W_(r)&&t!==ft)return fr(e,od);if(n.status===Mo&&e.avail_in!==0)return fr(e,od);if(n.status===di&&n.wrap===0&&(n.status=cr),n.status===di){let i=ga+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=sa||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=wb),i+=31-i%31,Do(n,i),n.strstart!==0&&(Do(n,e.adler>>>16),Do(n,e.adler&65535)),e.adler=1,n.status=cr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===Td){if(e.adler=0,$(n,31),$(n,139),$(n,8),n.gzhead)$(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),$(n,n.gzhead.time&255),$(n,n.gzhead.time>>8&255),$(n,n.gzhead.time>>16&255),$(n,n.gzhead.time>>24&255),$(n,n.level===9?2:n.strategy>=sa||n.level<2?4:0),$(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&($(n,n.gzhead.extra.length&255),$(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=he(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=vd;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,n.level===9?2:n.strategy>=sa||n.level<2?4:0),$(n,xb),n.status=cr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===vd){if(n.gzhead.extra){let i=n.pending,o=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+o>n.pending_buf_size;){let s=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=s,Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0,o-=s}let l=new Uint8Array(n.gzhead.extra);n.pending_buf.set(l.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending+=o,n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=wd}if(n.status===wd){if(n.gzhead.name){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0}n.gzindexi&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=xd}if(n.status===xd){if(n.gzhead.comment){let i=n.pending,o;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i)),Ye(e),n.pending!==0)return n.last_flush=-1,xe;i=0}n.gzindexi&&(e.adler=he(e.adler,n.pending_buf,n.pending-i,i))}n.status=kd}if(n.status===kd){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Ye(e),n.pending!==0))return n.last_flush=-1,xe;$(n,e.adler&255),$(n,e.adler>>8&255),e.adler=0}if(n.status=cr,Ye(e),n.pending!==0)return n.last_flush=-1,xe}if(e.avail_in!==0||n.lookahead!==0||t!==Un&&n.status!==Mo){let i=n.level===0?j1(n,t):n.strategy===sa?bb(n,t):n.strategy===sb?Eb(n,t):jo[n.level].func(n,t);if((i===pr||i===gi)&&(n.status=Mo),i===De||i===pr)return e.avail_out===0&&(n.last_flush=-1),xe;if(i===hi&&(t===nb?tb(n):t!==H_&&(yd(n,0,0,!1),t===rb&&(Mn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Ye(e),e.avail_out===0))return n.last_flush=-1,xe}return t!==ft?xe:n.wrap<=0?V_:(n.wrap===2?($(n,e.adler&255),$(n,e.adler>>8&255),$(n,e.adler>>16&255),$(n,e.adler>>24&255),$(n,e.total_in&255),$(n,e.total_in>>8&255),$(n,e.total_in>>16&255),$(n,e.total_in>>24&255)):(Do(n,e.adler>>>16),Do(n,e.adler&65535)),Ye(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?xe:V_)},Ib=e=>{if(qo(e))return Lt;let t=e.state.status;return e.state=null,t===cr?fr(e,ib):xe},Ab=(e,t)=>{let n=t.length;if(qo(e))return Lt;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==di||r.lookahead)return Lt;if(i===1&&(e.adler=Zo(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Mn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let c=new Uint8Array(r.w_size);c.set(t.subarray(n-r.w_size,n),0),t=c,n=r.w_size}let o=e.avail_in,l=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,pi(r);r.lookahead>=U;){let c=r.strstart,a=r.lookahead-(U-1);do r.ins_h=Bn(r,r.ins_h,r.window[c+U-1]),r.prev[c&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=c,c++;while(--a);r.strstart=c,r.lookahead=U-1,pi(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=U-1,r.match_available=0,e.next_in=l,e.input=s,e.avail_in=o,r.wrap=i,xe},Pb=Nb,Lb=B1,zb=U1,Db=F1,Mb=Tb,jb=Ob,Fb=Ib,Ub=Ab,Bb="pako deflate (from Nodeca project)",Uo={deflateInit:Pb,deflateInit2:Lb,deflateReset:zb,deflateResetKeep:Db,deflateSetHeader:Mb,deflate:jb,deflateEnd:Fb,deflateSetDictionary:Ub,deflateInfo:Bb},$b=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Hb=function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(let r in n)$b(n,r)&&(e[r]=n[r])}}return e},Vb=e=>{let t=0;for(let r=0,i=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Go[254]=Go[254]=1;var Wb=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,o,l=e.length,s=0;for(i=0;i>>6,t[o++]=128|n&63):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|n&63):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|n&63);return t},Zb=(e,t)=>{if(t<65534&&e.subarray&&$1)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r{let n=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,o=new Array(n*2);for(i=0,r=0;r4){o[i++]=65533,r+=s-1;continue}for(l&=s===2?31:s===3?15:7;s>1&&r1){o[i++]=65533;continue}l<65536?o[i++]=l:(l-=65536,o[i++]=55296|l>>10&1023,o[i++]=56320|l&1023)}return Zb(o,i)},Kb=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)===128;)n--;return n<0||n===0?t:n+Go[e[n]]>t?n:t},Ko={string2buf:Wb,buf2string:Gb,utf8border:Kb};function Qb(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var H1=Qb,V1=Object.prototype.toString,{Z_NO_FLUSH:Xb,Z_SYNC_FLUSH:qb,Z_FULL_FLUSH:Yb,Z_FINISH:Jb,Z_OK:ma,Z_STREAM_END:eR,Z_DEFAULT_COMPRESSION:tR,Z_DEFAULT_STRATEGY:nR,Z_DEFLATED:rR}=hr;function Yo(e){this.options=ya.assign({level:tR,method:rR,chunkSize:16384,windowBits:15,memLevel:8,strategy:nR},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H1,this.strm.avail_out=0;let n=Uo.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==ma)throw new Error(dr[n]);if(t.header&&Uo.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=Ko.string2buf(t.dictionary):V1.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Uo.deflateSetDictionary(this.strm,r),n!==ma)throw new Error(dr[n]);this._dict_set=!0}}Yo.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?Jb:Xb,typeof e=="string"?n.input=Ko.string2buf(e):V1.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(o===qb||o===Yb)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Uo.deflate(n,o),i===eR)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Uo.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===ma;if(n.avail_out===0){this.onData(n.output);continue}if(o>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};Yo.prototype.onData=function(e){this.chunks.push(e)};Yo.prototype.onEnd=function(e){e===ma&&(this.result=ya.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Nd(e,t){let n=new Yo(t);if(n.push(e,!0),n.err)throw n.msg||dr[n.err];return n.result}function iR(e,t){return t=t||{},t.raw=!0,Nd(e,t)}function oR(e,t){return t=t||{},t.gzip=!0,Nd(e,t)}var lR=Yo,sR=Nd,aR=iR,uR=oR,cR=hr,fR={Deflate:lR,deflate:sR,deflateRaw:aR,gzip:uR,constants:cR},aa=16209,dR=16191,pR=function(t,n){let r,i,o,l,s,c,a,u,d,f,p,g,_,x,h,m,y,v,S,R,k,b,O,C,I=t.state;r=t.next_in,O=t.input,i=r+(t.avail_in-5),o=t.next_out,C=t.output,l=o-(n-t.avail_out),s=o+(t.avail_out-257),c=I.dmax,a=I.wsize,u=I.whave,d=I.wnext,f=I.window,p=I.hold,g=I.bits,_=I.lencode,x=I.distcode,h=(1<>>24,p>>>=v,g-=v,v=y>>>16&255,v===0)C[o++]=y&65535;else if(v&16){S=y&65535,v&=15,v&&(g>>=v,g-=v),g<15&&(p+=O[r++]<>>24,p>>>=v,g-=v,v=y>>>16&255,v&16){if(R=y&65535,v&=15,gc){t.msg="invalid distance too far back",I.mode=aa;break e}if(p>>>=v,g-=v,v=o-l,R>v){if(v=R-v,v>u&&I.sane){t.msg="invalid distance too far back",I.mode=aa;break e}if(k=0,b=f,d===0){if(k+=a-v,v2;)C[o++]=b[k++],C[o++]=b[k++],C[o++]=b[k++],S-=3;S&&(C[o++]=b[k++],S>1&&(C[o++]=b[k++]))}else{k=o-R;do C[o++]=C[k++],C[o++]=C[k++],C[o++]=C[k++],S-=3;while(S>2);S&&(C[o++]=C[k++],S>1&&(C[o++]=C[k++]))}}else if(v&64){t.msg="invalid distance code",I.mode=aa;break e}else{y=x[(y&65535)+(p&(1<>3,r-=S,g-=S<<3,p&=(1<{let c=s.bits,a=0,u=0,d=0,f=0,p=0,g=0,_=0,x=0,h=0,m=0,y,v,S,R,k,b=null,O,C=new Uint16Array(ci+1),I=new Uint16Array(ci+1),Me=null,el,Dt,Mt;for(a=0;a<=ci;a++)C[a]=0;for(u=0;u=1&&C[f]===0;f--);if(p>f&&(p=f),f===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(d=1;d0&&(e===K_||f!==1))return-1;for(I[1]=0,a=1;aZ_||e===Q_&&h>G_)return 1;for(;;){el=a-_,l[u]+1=O?(Dt=Me[l[u]-O],Mt=b[l[u]-O]):(Dt=96,Mt=0),y=1<>_)+v]=el<<24|Dt<<16|Mt|0;while(v!==0);for(y=1<>=1;if(y!==0?(m&=y-1,m+=y):m=0,u++,--C[a]===0){if(a===f)break;a=t[n+l[u]]}if(a>p&&(m&R)!==S){for(_===0&&(_=p),k+=d,g=a-_,x=1<Z_||e===Q_&&h>G_)return 1;S=m&R,i[S]=p<<24|g<<16|k-o|0}}return m!==0&&(i[k+m]=a-_<<24|64<<16|0),s.bits=p,0},Bo=_R,vR=0,W1=1,Z1=2,{Z_FINISH:X_,Z_BLOCK:wR,Z_TREES:ua,Z_OK:mr,Z_STREAM_END:xR,Z_NEED_DICT:kR,Z_STREAM_ERROR:dt,Z_DATA_ERROR:G1,Z_MEM_ERROR:K1,Z_BUF_ERROR:SR,Z_DEFLATED:q_}=hr,_a=16180,Y_=16181,J_=16182,e1=16183,t1=16184,n1=16185,r1=16186,i1=16187,o1=16188,l1=16189,ha=16190,en=16191,ad=16192,s1=16193,ud=16194,a1=16195,u1=16196,c1=16197,f1=16198,ca=16199,fa=16200,d1=16201,p1=16202,m1=16203,h1=16204,g1=16205,cd=16206,y1=16207,_1=16208,ee=16209,Q1=16210,X1=16211,ER=852,bR=592,RR=15,CR=RR,v1=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function TR(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var gr=e=>{if(!e)return 1;let t=e.state;return!t||t.strm!==e||t.mode<_a||t.mode>X1?1:0},q1=e=>{if(gr(e))return dt;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=_a,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(ER),t.distcode=t.distdyn=new Int32Array(bR),t.sane=1,t.back=-1,mr},Y1=e=>{if(gr(e))return dt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,q1(e)},J1=(e,t)=>{let n;if(gr(e))return dt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?dt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Y1(e))},ev=(e,t)=>{if(!e)return dt;let n=new TR;e.state=n,n.strm=e,n.window=null,n.mode=_a;let r=J1(e,t);return r!==mr&&(e.state=null),r},NR=e=>ev(e,CR),w1=!0,fd,dd,OR=e=>{if(w1){fd=new Int32Array(512),dd=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Bo(W1,e.lens,0,288,fd,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Bo(Z1,e.lens,0,32,dd,0,e.work,{bits:5}),w1=!1}e.lencode=fd,e.lenbits=9,e.distcode=dd,e.distbits=5},tv=(e,t,n,r)=>{let i,o=e.state;return o.window===null&&(o.wsize=1<=o.wsize?(o.window.set(t.subarray(n-o.wsize,n),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>r&&(i=r),o.window.set(t.subarray(n-r,n-r+i),o.wnext),r-=i,r?(o.window.set(t.subarray(n-r,n),0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave{let n,r,i,o,l,s,c,a,u,d,f,p,g,_,x=0,h,m,y,v,S,R,k,b,O=new Uint8Array(4),C,I,Me=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(gr(e)||!e.output||!e.input&&e.avail_in!==0)return dt;n=e.state,n.mode===en&&(n.mode=ad),l=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,u=n.bits,d=s,f=c,b=mr;e:for(;;)switch(n.mode){case _a:if(n.wrap===0){n.mode=ad;break}for(;u<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,O,2,0),a=0,u=0,n.mode=Y_;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((a&255)<<8)+(a>>8))%31){e.msg="incorrect header check",n.mode=ee;break}if((a&15)!==q_){e.msg="unknown compression method",n.mode=ee;break}if(a>>>=4,u-=4,k=(a&15)+8,n.wbits===0&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=ee;break}n.dmax=1<>8&1),n.flags&512&&n.wrap&4&&(O[0]=a&255,O[1]=a>>>8&255,n.check=he(n.check,O,2,0)),a=0,u=0,n.mode=J_;case J_:for(;u<32;){if(s===0)break e;s--,a+=r[o++]<>>8&255,O[2]=a>>>16&255,O[3]=a>>>24&255,n.check=he(n.check,O,4,0)),a=0,u=0,n.mode=e1;case e1:for(;u<16;){if(s===0)break e;s--,a+=r[o++]<>8),n.flags&512&&n.wrap&4&&(O[0]=a&255,O[1]=a>>>8&255,n.check=he(n.check,O,2,0)),a=0,u=0,n.mode=t1;case t1:if(n.flags&1024){for(;u<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,O,2,0)),a=0,u=0}else n.head&&(n.head.extra=null);n.mode=n1;case n1:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(o,o+p),k)),n.flags&512&&n.wrap&4&&(n.check=he(n.check,r,p,o)),s-=p,o+=p,n.length-=p),n.length))break e;n.length=0,n.mode=r1;case r1:if(n.flags&2048){if(s===0)break e;p=0;do k=r[o+p++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k));while(k&&p>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=en;break;case l1:for(;u<32;){if(s===0)break e;s--,a+=r[o++]<>>=u&7,u-=u&7,n.mode=cd;break}for(;u<3;){if(s===0)break e;s--,a+=r[o++]<>>=1,u-=1,a&3){case 0:n.mode=s1;break;case 1:if(OR(n),n.mode=ca,t===ua){a>>>=2,u-=2;break e}break;case 2:n.mode=u1;break;case 3:e.msg="invalid block type",n.mode=ee}a>>>=2,u-=2;break;case s1:for(a>>>=u&7,u-=u&7;u<32;){if(s===0)break e;s--,a+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=ee;break}if(n.length=a&65535,a=0,u=0,n.mode=ud,t===ua)break e;case ud:n.mode=a1;case a1:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break e;i.set(r.subarray(o,o+p),l),s-=p,o+=p,c-=p,l+=p,n.length-=p;break}n.mode=en;break;case u1:for(;u<14;){if(s===0)break e;s--,a+=r[o++]<>>=5,u-=5,n.ndist=(a&31)+1,a>>>=5,u-=5,n.ncode=(a&15)+4,a>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ee;break}n.have=0,n.mode=c1;case c1:for(;n.have>>=3,u-=3}for(;n.have<19;)n.lens[Me[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,C={bits:n.lenbits},b=Bo(vR,n.lens,0,19,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid code lengths set",n.mode=ee;break}n.have=0,n.mode=f1;case f1:for(;n.have>>24,m=x>>>16&255,y=x&65535,!(h<=u);){if(s===0)break e;s--,a+=r[o++]<>>=h,u-=h,n.lens[n.have++]=y;else{if(y===16){for(I=h+2;u>>=h,u-=h,n.have===0){e.msg="invalid bit length repeat",n.mode=ee;break}k=n.lens[n.have-1],p=3+(a&3),a>>>=2,u-=2}else if(y===17){for(I=h+3;u>>=h,u-=h,k=0,p=3+(a&7),a>>>=3,u-=3}else{for(I=h+7;u>>=h,u-=h,k=0,p=11+(a&127),a>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ee;break}for(;p--;)n.lens[n.have++]=k}}if(n.mode===ee)break;if(n.lens[256]===0){e.msg="invalid code -- missing end-of-block",n.mode=ee;break}if(n.lenbits=9,C={bits:n.lenbits},b=Bo(W1,n.lens,0,n.nlen,n.lencode,0,n.work,C),n.lenbits=C.bits,b){e.msg="invalid literal/lengths set",n.mode=ee;break}if(n.distbits=6,n.distcode=n.distdyn,C={bits:n.distbits},b=Bo(Z1,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,C),n.distbits=C.bits,b){e.msg="invalid distances set",n.mode=ee;break}if(n.mode=ca,t===ua)break e;case ca:n.mode=fa;case fa:if(s>=6&&c>=258){e.next_out=l,e.avail_out=c,e.next_in=o,e.avail_in=s,n.hold=a,n.bits=u,pR(e,f),l=e.next_out,i=e.output,c=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,u=n.bits,n.mode===en&&(n.back=-1);break}for(n.back=0;x=n.lencode[a&(1<>>24,m=x>>>16&255,y=x&65535,!(h<=u);){if(s===0)break e;s--,a+=r[o++]<>v)],h=x>>>24,m=x>>>16&255,y=x&65535,!(v+h<=u);){if(s===0)break e;s--,a+=r[o++]<>>=v,u-=v,n.back+=v}if(a>>>=h,u-=h,n.back+=h,n.length=y,m===0){n.mode=g1;break}if(m&32){n.back=-1,n.mode=en;break}if(m&64){e.msg="invalid literal/length code",n.mode=ee;break}n.extra=m&15,n.mode=d1;case d1:if(n.extra){for(I=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=p1;case p1:for(;x=n.distcode[a&(1<>>24,m=x>>>16&255,y=x&65535,!(h<=u);){if(s===0)break e;s--,a+=r[o++]<>v)],h=x>>>24,m=x>>>16&255,y=x&65535,!(v+h<=u);){if(s===0)break e;s--,a+=r[o++]<>>=v,u-=v,n.back+=v}if(a>>>=h,u-=h,n.back+=h,m&64){e.msg="invalid distance code",n.mode=ee;break}n.offset=y,n.extra=m&15,n.mode=m1;case m1:if(n.extra){for(I=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ee;break}n.mode=h1;case h1:if(c===0)break e;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ee;break}p>n.wnext?(p-=n.wnext,g=n.wsize-p):g=n.wnext-p,p>n.length&&(p=n.length),_=n.window}else _=i,g=l-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[l++]=_[g++];while(--p);n.length===0&&(n.mode=fa);break;case g1:if(c===0)break e;i[l++]=n.length,c--,n.mode=fa;break;case cd:if(n.wrap){for(;u<32;){if(s===0)break e;s--,a|=r[o++]<{if(gr(e))return dt;let t=e.state;return t.window&&(t.window=null),e.state=null,mr},PR=(e,t)=>{if(gr(e))return dt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,mr):dt},LR=(e,t)=>{let n=t.length,r,i,o;return gr(e)||(r=e.state,r.wrap!==0&&r.mode!==ha)?dt:r.mode===ha&&(i=1,i=Zo(i,t,n,0),i!==r.check)?G1:(o=tv(e,t,n,n),o?(r.mode=Q1,K1):(r.havedict=1,mr))},zR=Y1,DR=J1,MR=q1,jR=NR,FR=ev,UR=IR,BR=AR,$R=PR,HR=LR,VR="pako inflate (from Nodeca project)",nn={inflateReset:zR,inflateReset2:DR,inflateResetKeep:MR,inflateInit:jR,inflateInit2:FR,inflate:UR,inflateEnd:BR,inflateGetHeader:$R,inflateSetDictionary:HR,inflateInfo:VR};function WR(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var ZR=WR,nv=Object.prototype.toString,{Z_NO_FLUSH:GR,Z_FINISH:KR,Z_OK:Qo,Z_STREAM_END:pd,Z_NEED_DICT:md,Z_STREAM_ERROR:QR,Z_DATA_ERROR:x1,Z_MEM_ERROR:XR}=hr;function Jo(e){this.options=ya.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new H1,this.strm.avail_out=0;let n=nn.inflateInit2(this.strm,t.windowBits);if(n!==Qo)throw new Error(dr[n]);if(this.header=new ZR,nn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Ko.string2buf(t.dictionary):nv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=nn.inflateSetDictionary(this.strm,t.dictionary),n!==Qo)))throw new Error(dr[n])}Jo.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,o,l,s;if(this.ended)return!1;for(t===~~t?l=t:l=t===!0?KR:GR,nv.call(e)==="[object ArrayBuffer]"?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),o=nn.inflate(n,l),o===md&&i&&(o=nn.inflateSetDictionary(n,i),o===Qo?o=nn.inflate(n,l):o===x1&&(o=md));n.avail_in>0&&o===pd&&n.state.wrap>0&&e[n.next_in]!==0;)nn.inflateReset(n),o=nn.inflate(n,l);switch(o){case QR:case x1:case md:case XR:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===pd))if(this.options.to==="string"){let c=Ko.utf8border(n.output,n.next_out),a=n.next_out-c,u=Ko.buf2string(n.output,c);n.next_out=a,n.avail_out=r-a,a&&n.output.set(n.output.subarray(c,c+a),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(!(o===Qo&&s===0)){if(o===pd)return o=nn.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(n.avail_in===0)break}}return!0};Jo.prototype.onData=function(e){this.chunks.push(e)};Jo.prototype.onEnd=function(e){e===Qo&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ya.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Od(e,t){let n=new Jo(t);if(n.push(e),n.err)throw n.msg||dr[n.err];return n.result}function qR(e,t){return t=t||{},t.raw=!0,Od(e,t)}var YR=Jo,JR=Od,eC=qR,tC=Od,nC=hr,rC={Inflate:YR,inflate:JR,inflateRaw:eC,ungzip:tC,constants:nC},{Deflate:iC,deflate:oC,deflateRaw:lC,gzip:sC}=fR,{Inflate:aC,inflate:uC,inflateRaw:cC,ungzip:fC}=rC,dC=iC,pC=oC,mC=lC,hC=sC,gC=aC,yC=uC,_C=cC,vC=fC,wC=hr,rv={Deflate:dC,deflate:pC,deflateRaw:mC,gzip:hC,Inflate:gC,inflate:yC,inflateRaw:_C,ungzip:vC,constants:wC};var ov=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>yi({name:t,action:"batch_update",table:"",params:{batch:i}},e)}:r==="_schema"?{tables:async()=>yi({name:t,action:"schema_tables",table:"",params:[]},e),columns:async i=>yi({name:t,action:"schema_columns",table:i,params:[]},e),rels:async i=>yi({name:t,action:"schema_rels",table:i,params:[]},e)}:r.startsWith("$")?(...i)=>{let o=rv.gzip(JSON.stringify(i));return yi({name:t,action:"query",table:r,params:btoa(o.reduce((l,s)=>l+String.fromCharCode(s),""))},e)}:new Proxy({},{get(i,o){return async(...l)=>(r==="query"&&(r=o,o="query"),await yi({name:t,action:o,table:r,params:l},e))}})}})},va={},yi=async(e,t)=>{try{let n=new URL(t);n.pathname="/_dbs",e.table&&(n.pathname+=`/${e.table}`);let r=n.toString();typeof localStorage<"u"&&localStorage.mlsid&&(e.mlsid=localStorage.mlsid);let i=(0,iv.default)(e),o=va[i];if(!o||o&&Date.now()-o.timestamp>1e3){va[i]={timestamp:Date.now(),promise:ai(r,e,{"content-type":"application/json"}),result:null};let l=await va[i].promise;return va[i].result=l,l}return await o.promise}catch{}};var lv=A(xf());var sv=e=>{let{item:t,item_comp:n,ids:r}=e,i=Tn(n);if(av(i,r),t.id&&(i.id=t.id),i.hidden=t.hidden,i.component){if(i.component.props&&t.component)for(let o of Object.keys(i.component.props)){let l=t.component.props[o],s=i.component.props[o];l&&(s.value=l.value,s.valueBuilt=l.valueBuilt,s.jsxCalledBy=l.jsxCalledBy,s.content=l.content)}i.component.instances=t.component?.instances,i.component.style=t.component?.style}for(let o of Object.keys(t))delete t[o];for(let[o,l]of Object.entries(i))t[o]=l},av=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,lv.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)av(n,t)};var uv=e=>{let t=Object.entries(e.item_comp.component?.props||{}).sort((n,r)=>n[1].idx-r[1].idx);for(let[n,r]of t){let i=Tn(r),o=e.item.component?.props;o&&o[n]&&(i.value=o[n].value,i.valueBuilt=o[n].valueBuilt,o[n].content&&(i.content=o[n].content)),i&&e.each(n,i)}};var wa=e=>{let t={};for(let[n,r]of Object.entries(e))if(n==="childs"){if(t.childs=[],r&&Array.isArray(r))for(let i of r)i.type==="item"&&i.component?t.childs.push(i):t.childs.push({name:i.name,id:i.id,originalId:i.originalId})}else t[n]=r;return t};var cv=(e,t)=>{let{item:n}=t;if(n.type==="item"&&n.component?.id&&t.parent?.item.id){let r=e.comps[n.component.id];if(e.on?.visit_component&&e.on.visit_component(n,t.root||t.item),!r)return;if(r){let i;if(e.mode==="page"?(n.component.instances||(n.component.instances={}),i=n.component.instances):i=t.parent?.root_instances,i){let l=i[n.id];i[n.id]||(i[n.id]={},l=i[n.id]),sv({item:n,item_comp:r,ids:l})}let o={item:wa(n),jsx_prop:t.jsx_prop,parent:{id:t.parent.item.id,comp_id:t.parent?.comp?.component?.id,instance_id:t.parent?.instance_id},instances:i};e.on?.visit&&e.on.visit(o,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[n.id]=o),uv({item:n,item_comp:r,instance:i?i[n.id]:{},each(l,s){let c=n.component?.id;s.meta?.type==="content-element"&&c&&s.content&&(s.content.name=l,_i({...e},{item:s.content,root:t.root||s.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:c,name:l},parent:{item:o.item,instance_id:n.id,comp:r,root_instances:i}}))}});for(let l of Object.values(n.childs))l?.name?.startsWith("jsx:")||l&&Object.keys(l).length>3&&_i({...e,mode:"comp"},{item:l,is_root:!1,root:t.root||t.item,parent:{item:n,instance_id:n.id,root_instances:i,comp:r}})}}};var _i=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){cv(e,t);return}let r={item:wa(n),parent:{id:t.parent?.item.id||"root",instance_id:t.parent?.instance_id,comp_id:t.parent?.comp?.component?.id}};if(t.jsx_prop&&(r.jsx_prop=t.jsx_prop),e.on?.visit&&e.on.visit(r,n,t.root||t.item),n.id&&e.set_meta!==!1&&(e.meta[r.item.id]=r),n.childs){for(let[i,o]of Object.entries(n.childs))if(o.id){let l={item:o,is_root:!1,root:t.root||t.item,parent:{item:r.item,instance_id:t.parent?.instance_id,comp:t.parent?.comp,root_instances:t.parent?.root_instances}};t.jsx_prop&&(l.jsx_prop={...t.jsx_prop,is_root:!1}),_i(e,l)}}};var xC=()=>new Promise(async e=>{let t=!1,n=await(await fetch(T.url`_prasi/route`)).json();t||e(n)}),fv=async()=>{let e=Ms(),t=[];try{let n=await xC();if(n&&n.site&&n.urls){n.layout&&(T.layout.id=n.layout.id,T.layout.root=n.layout.root,T.layout.meta={},T.layout.root&&(await ni(T.layout.root.childs),xa(T.layout.meta,T.layout.root))),T.site=n.site,T.site.code={mode:"vsc"},await kC(),T.site.api=L_(T.site.api_url),T.site.db=ov(T.site.api_url);let r=window;r.serverurl=T.site.api_url,r.db=T.site.db,r.api=T.site.api;for(let i of n.urls)e.insert(i.url,i),t.push(i)}}catch{}return{router:e,pages:t}},kC=()=>new Promise(e=>{let t=document,n=t.createElement("script");n.onload=async()=>{e()};let r=T.site.api_url;if(r==="*")r=`${location.protocol}//${location.host}`,T.site.api_url=r;else try{new URL(r)}catch{location.hostname==="localhost"?r="http://localhost:4550":r="https://prasi.avolut.com"}localStorage.getItem("api-ts-"+r)||localStorage.setItem("api-ts-"+r,Date.now().toString());let i=localStorage.getItem("api-ts-"+r);n.src=`${r}/_prasi/load.js?url=${r}&v3&ts=${i}`,document.querySelector(`script[src="${n.src}"]`)?e():t.body.appendChild(n)}),xa=(e,t)=>{for(let n of t.childs)_i({set_meta:!0,comps:T.comp.list,meta:e,mode:"page"},{item:n})};var se=window;var rn=A(Z()),Ad=()=>location.hostname.split(".").length===4||location.hostname==="prasi.app"||location.hostname==="prasi.avolut.com"||location.hostname.includes("ngrok")||location.hostname==="localhost"||location.hostname==="127.0.0.1"||location.hostname==="10.0.2.2",pv=()=>{let e=Cn({page_id:""}),[t,n]=(0,dv.useState)({}),r=()=>n({});se.prasiContext.render=r;let i=Xc.Provider,o=Ad()&&location.pathname.startsWith("/prod");if(T.route.status!=="ready")return T.route.status==="init"&&(T.route.status="loading",fv().then(async({router:u,pages:d})=>{Oy(),T.route.status="ready",T.route.router=u,T.route.pages=d;let f=se._prasi.basepath,p=`${f.endsWith("/")?f:`${f}/`}_prasi/code/index.js`,g=new URL(location.href);p.startsWith("/")&&(p=`${g.protocol}//${g.host}${p}`);let _=new Function("callback",`import("${p}").then(callback)`);await new Promise(x=>{_(h=>{for(let[m,y]of Object.entries(h))se[m]=y;x()})}),r()})),(0,rn.jsx)(ho,{});let l=T.route.router;if(!l)return(0,rn.jsx)(of,{children:"Failed to create Router"});let s="";if(o){let u=location.pathname.split("/");rf(u[3])&&(s=u[3])}let c=null;if(se._prasi.page_id)l.insert(T.pathname,{id:se._prasi.page_id,url:T.pathname}),c={id:se._prasi.page_id,url:"",params:se._prasi.params},se._prasi.routed={page_id:se._prasi.page_id,params:se._prasi.params},delete se._prasi.page_id,delete se._prasi.params;else{if(c=l.lookup(T.pathname),s){let u=T.route.pages.find(d=>s===d.id);u&&(c=u)}c&&se._prasi.routed&&se._prasi.routed.page_id===c.id&&se._prasi.routed.params&&(c.params=se._prasi.routed.params)}if(!c)return(0,rn.jsx)(of,{children:"Page Not Found"});c.id!==e.page_id&&(T.init_local_effect={}),se.params=c.params||{},T.page.id=c.id,T.page.url=c.url;let a=T.page.cache[c.id];if(a)T.page.root=a.root,T.page.meta=a.meta;else return Ry(c.id).then(async({root:u})=>{if(c){let d={id:c.id,url:c.url,root:u,meta:{}};await ni(u.childs),xa(d.meta,u),T.page.cache[d.id]=d,r()}}).catch(()=>{r()}),(0,rn.jsx)(ho,{note:"Loading page"});return(0,rn.jsx)(i,{value:se.prasiContext,children:(0,rn.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,rn.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white main-content-preview",T.mode==="mobile"?css` @media (min-width: 768px) { border-left: 1px solid #ccc; border-right: 1px solid #ccc; @@ -130,7 +130,7 @@ ${d} } `:"inset-0 overflow-auto",css` contain: content; - `),children:(0,rn.jsx)(jy,{api_url:T.site.api_url,entry:Object.values(T.page.root.childs).filter(u=>u).map(u=>u.id),meta:T.page.meta,mode:T.mode,page_id:T.page.id,site_id:T.site.id,db:T.site.db,api:T.site.api,comp_load:async u=>{let d=T.comp;if(d.list[u])return d.list[u];try{let f=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[u]})})).json();for(let[p,g]of Object.entries(f))delete d.pending[p],d.list[p]=g,await Ds(`comp-${p}`,g)}catch{}return d.list[u]},layout:T.layout.id&&T.layout.root&&T.layout.meta?{id:T.layout.id,meta:T.layout.meta,entry:Object.values(T.layout.root.childs).filter(u=>u).map(u=>u.id)}:void 0,script:{init_local_effect:T.init_local_effect},on_preload:async({urls:u,opt:d})=>{let f=[],p={};if(T.cache.urls)for(let g of u)T.cache.urls.has(g)||(f.push(g),T.cache.urls.add(g));if(f.length>0){let g=await By(f);if(d?.on_load&&d.on_load(g,ZC),Array.isArray(g))for(let _ of g){let x={id:_.id,url:_.url,root:_.root,meta:{}};await ri(_.root.childs),Ea(x.meta,_.root),T.page.cache[x.id]=x}}}})})})})},ZC=(e,t)=>{for(let n of e)for(let r of n.root.childs)zd(r,t)},zd=(e,t)=>{if(t(e),e.type!=="text"){if(e.type==="item"&&e.component?.props)for(let n of Object.values(e.component.props))n.content&&zd(n.content,t);for(let n of e.childs)zd(n,t)}};var Nv=A(Z());(async()=>{Fy();let e=document.getElementById("root");if(e){let t=(0,Tv.createRoot)(e);await Dg(!1),Ag(),se.navigateOverride=n=>(n&&n.startsWith("/")&&Dd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.render((0,Nv.jsx)(Cv,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); + `),children:(0,rn.jsx)(Ey,{api_url:T.site.api_url,entry:Object.values(T.page.root.childs).filter(u=>u).map(u=>u.id),meta:T.page.meta,mode:T.mode,page_id:T.page.id,site_id:T.site.id,db:T.site.db,api:T.site.api,comp_load:async u=>{let d=T.comp;if(d.list[u])return d.list[u];try{let f=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[u]})})).json();for(let[p,g]of Object.entries(f))delete d.pending[p],d.list[p]=g,await Os(`comp-${p}`,g)}catch{}return d.list[u]},layout:T.layout.id&&T.layout.root&&T.layout.meta?{id:T.layout.id,meta:T.layout.meta,entry:Object.values(T.layout.root.childs).filter(u=>u).map(u=>u.id)}:void 0,script:{init_local_effect:T.init_local_effect},on_preload:async({urls:u,opt:d})=>{let f=[],p={};if(T.cache.urls)for(let g of u)T.cache.urls.has(g)||(f.push(g),T.cache.urls.add(g));if(f.length>0){let g=await Cy(f);if(d?.on_load&&d.on_load(g,SC),Array.isArray(g))for(let _ of g){let x={id:_.id,url:_.url,root:_.root,meta:{}};await ni(_.root.childs),xa(x.meta,_.root),T.page.cache[x.id]=x}}}})})})})},SC=(e,t)=>{for(let n of e)for(let r of n.root.childs)Id(r,t)},Id=(e,t)=>{if(t(e),e.type!=="text"){if(e.type==="item"&&e.component?.props)for(let n of Object.values(e.component.props))n.content&&Id(n.content,t);for(let n of e.childs)Id(n,t)}};var hv=A(Z());(async()=>{by();let e=document.getElementById("root");if(e){let t=(0,mv.createRoot)(e);await j0(!1),P0(),se.navigateOverride=n=>(n&&n.startsWith("/")&&Ad()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.render((0,hv.jsx)(pv,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); /*! Bundled license information: react/cjs/react.production.min.js: @@ -166,9 +166,6 @@ react-dom/cjs/react-dom.production.min.js: * LICENSE file in the root directory of this source tree. *) -@noble/hashes/utils.js: - (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) - react/cjs/react-jsx-dev-runtime.production.min.js: (** * @license React @@ -191,6 +188,9 @@ react/cjs/react-jsx-runtime.production.min.js: * LICENSE file in the root directory of this source tree. *) +@noble/hashes/utils.js: + (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *) + pako/dist/pako.esm.mjs: (*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) *) */ diff --git a/app/srv/ws/sync/code/parts/init/frontend.ts b/app/srv/ws/sync/code/parts/init/frontend.ts index 6dd4f145..6a709ac3 100644 --- a/app/srv/ws/sync/code/parts/init/frontend.ts +++ b/app/srv/ws/sync/code/parts/init/frontend.ts @@ -1,18 +1,72 @@ +import globalExternals from "@fal-works/esbuild-plugin-global-externals"; +import style from "@hyrious/esbuild-plugin-style"; import { dir } from "dir"; -import { code } from "../../code"; -import { Parcel } from "@parcel/core"; +import { context } from "esbuild"; import { removeAsync } from "fs-jetpack"; -import { $ } from "bun"; -let bundler = new Parcel({ - entries: "a.js", - defaultConfig: "@parcel/config-default", -}); +import { code } from "../../code"; export const initFrontEnd = async (root: string, id_site: string) => { let existing = code.internal.frontend[id_site]; if (!existing) { - // const run = $`` + const build_path = dir.data(`code/${id_site}/site/build`); + await removeAsync(build_path); + existing = await context({ + absWorkingDir: root, + entryPoints: ["index.tsx"], + outdir: build_path, + format: "esm", + bundle: true, + minify: true, + treeShaking: true, + splitting: true, + logLevel: "silent", + sourcemap: true, + plugins: [ + style(), + globalExternals({ + react: { + varName: "window.React", + type: "cjs", + }, + "react-dom": { + varName: "window.ReactDOM", + type: "cjs", + }, + }), + { + name: "prasi", + setup(setup) { + setup.onEnd(async (res) => { + if (res.errors.length > 0) { + await codeError( + id_site, + res.errors.map((e) => e.text).join("\n\n"), + "site" + ); + } + }); + }, + }, + ], + }); + code.internal.frontend[id_site] = existing; + existing.watch() } - + await code.internal.frontend[id_site].rebuild() +}; + +const codeError = async ( + id_site: string, + error: string, + mode: "server" | "site" +) => { + const path = code.path( + id_site, + "site", + "src", + mode === "server" ? "server.log" : "index.log" + ); + + await Bun.write(path, error); }; diff --git a/app/srv/ws/sync/code/parts/internal.ts b/app/srv/ws/sync/code/parts/internal.ts index 8582685a..c8b5ca9f 100644 --- a/app/srv/ws/sync/code/parts/internal.ts +++ b/app/srv/ws/sync/code/parts/internal.ts @@ -16,7 +16,7 @@ export const codeInternal = { get frontend() { if (!g.prasi_code) g.prasi_code = {}; if (!g.prasi_code.frontend) g.prasi_code.frontend = {}; - return g.prasi_code.frontend as Record; + return g.prasi_code.frontend as Record; }, get typings() { if (!g.prasi_code) g.prasi_code = {}; diff --git a/app/web/src/base/page/editor.tsx b/app/web/src/base/page/editor.tsx deleted file mode 100644 index 7785ed25..00000000 --- a/app/web/src/base/page/editor.tsx +++ /dev/null @@ -1,150 +0,0 @@ -import { FC, useEffect } from "react"; -import { page, useGlobal, useLocal } from "web-utils"; -import { EditorGlobal } from "../../render/editor/logic/global"; -import { Loading } from "../../utils/ui/loading"; - -export default page({ - url: "/editor/:site_id/:page_id", - component: ({}) => { - const p = useGlobal(EditorGlobal, "EDITOR"); - - const local = useLocal({ - loading: true, - session: null as any, - notfound: false, - init: false, - Editor: null as null | FC, - }); - const site_id = params.site_id === "_" ? "" : params.site_id; - const page_id = params.page_id === "_" ? "" : params.page_id; - - useEffect(() => { - if (!local.init) { - (async () => { - if (!local.Editor) { - local.Editor = (await import("../../render/editor/editor")).Editor; - } - - let ses: any = null; - try { - ses = JSON.parse(localStorage.getItem("prasi-session") || ""); - } catch (e) {} - - await new Promise(async (done) => { - try { - if (!!ses) { - done(); - } - let e = await _api.session(); - if (!e) { - (window as any).redirectTo = location.pathname; - navigate("/login"); - localStorage.removeItem("prasi-session"); - } else { - localStorage.setItem("prasi-session", JSON.stringify(e)); - } - if (!ses) { - ses = e; - done(); - } - } catch (e) { - console.error(e); - } - }); - - if (ses) { - local.session = ses; - - if (!site_id) { - const res = await _db.site.findFirst({ - where: { - is_deleted: false, - org: { - org_user: { - some: { id_user: ses.data.user.id }, - }, - }, - }, - select: { - id: true, - }, - }); - if (res) { - const page = await _db.page.findFirst({ - where: { - id_site: res.id, - is_deleted: false, - }, - select: { - id: true, - }, - }); - if (page) { - local.loading = false; - local.render(); - navigate(`/editor/${res.id}/${page.id}`); - return; - } - } else { - local.loading = false; - local.render(); - return; - } - } else if (!page_id) { - let res = await _db.page.findFirst({ - where: { - id_site: site_id, - is_deleted: false, - }, - select: { - id: true, - }, - }); - - if (!res) { - res = await _db.page.create({ - data: { - content_tree: { - childs: [], - id: "root", - type: "root", - }, - name: "home", - url: "/", - id_site: site_id, - }, - }); - } - - if (res) { - local.loading = false; - local.render(); - navigate(`/editor/${site_id}/${res.id}`); - return; - } - } - } - - local.init = true; - local.loading = false; - local.render(); - })(); - } - }, [local.init]); - - const Editor = local.Editor; - if (local.loading || !Editor) return ; - - const sw = navigator.serviceWorker.controller; - if (sw) { - sw.postMessage({ - type: "add-cache", - url: location.href, - }); - } - - return ( - - ); - }, -}); diff --git a/app/web/src/base/page/live.tsx b/app/web/src/base/page/live.tsx deleted file mode 100644 index 7152450e..00000000 --- a/app/web/src/base/page/live.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { validate } from "uuid"; -import { page } from "web-utils"; -import { devLoader } from "../../render/live/dev-loader"; -import { Live } from "../../render/live/live"; - -export default page({ - url: "/live/:domain/**", - component: ({}) => { - params.site_id = params.domain; - let pathname = `/${params._ === "_" ? "" : params._}`; - if (validate(params._)) { - const arr = params._.split("/"); - params.page_id = arr.shift(); - pathname = `/${arr.join("/")}`; - } - (window as any).pathname = pathname; - - if (navigator.serviceWorker) { - navigator.serviceWorker.controller?.postMessage({ - type: "add-cache", - url: location.href, - }); - } - - return ( - - ); - }, -}); diff --git a/app/web/src/base/pages.ts b/app/web/src/base/pages.ts index 7d840f5f..447f0083 100644 --- a/app/web/src/base/pages.ts +++ b/app/web/src/base/pages.ts @@ -18,14 +18,6 @@ export const ed = { url: "/ed/:site_id/:page_id", page: () => import("./page/ed"), }; -export const editor = { - url: "/editor/:site_id/:page_id", - page: () => import("./page/editor"), -}; -export const live = { - url: "/live/:domain/**", - page: () => import("./page/live"), -}; export const vi = { url: "/vi/:domain/**", page: () => import("./page/vi"), diff --git a/app/web/src/index.tsx b/app/web/src/index.tsx index 4a4b360b..1f05b451 100644 --- a/app/web/src/index.tsx +++ b/app/web/src/index.tsx @@ -5,7 +5,6 @@ import { loadApiProxyDef } from "./base/load/api/api-proxy-def"; import { dbProxy } from "./base/load/db/db-proxy"; import { Root } from "./base/root"; import "./index.css"; -import { registerMobile } from "./render/live/logic/mobile"; import { sworkerAddCache, sworkerRegister } from "./sworker-boot"; import { w } from "./utils/types/general"; @@ -13,7 +12,6 @@ const start = async () => { let react = { root: null as null | ReactRoot, }; - w.mobile = registerMobile(); const cur = new URL(w.basehost || location.href); const base_url = `${cur.protocol}//${cur.host}`; diff --git a/app/web/src/nova/ed/panel/tree/node/item/action/clone.tsx b/app/web/src/nova/ed/panel/tree/node/item/action/clone.tsx index c6c64036..b2b938b9 100644 --- a/app/web/src/nova/ed/panel/tree/node/item/action/clone.tsx +++ b/app/web/src/nova/ed/panel/tree/node/item/action/clone.tsx @@ -1,10 +1,10 @@ import { syncronize } from "y-pojo"; -import { fillID } from "../../../../../../../render/editor/tools/fill-id"; import { IContent, MContent } from "../../../../../../../utils/types/general"; import { IItem } from "../../../../../../../utils/types/item"; import { getMetaById } from "../../../../../logic/active/get-meta"; import { PG } from "../../../../../logic/ed-global"; import { treeRebuild } from "../../../../../logic/tree/build"; +import { fillID } from "../../../../../logic/tree/fill-id"; export const edActionClone = (p: PG, item: IContent) => { const mitem = getMetaById(p, item.id)?.mitem; diff --git a/app/web/src/nova/ed/panel/tree/node/item/action/detach.tsx b/app/web/src/nova/ed/panel/tree/node/item/action/detach.tsx index 174e6f39..4a6e0e06 100644 --- a/app/web/src/nova/ed/panel/tree/node/item/action/detach.tsx +++ b/app/web/src/nova/ed/panel/tree/node/item/action/detach.tsx @@ -1,9 +1,9 @@ import { syncronize } from "y-pojo"; -import { fillID } from "../../../../../../../render/editor/tools/fill-id"; import { IItem } from "../../../../../../../utils/types/item"; import { getMetaById } from "../../../../../logic/active/get-meta"; import { PG } from "../../../../../logic/ed-global"; import { treeRebuild } from "../../../../../logic/tree/build"; +import { fillID } from "../../../../../logic/tree/fill-id"; export const edActionDetach = (p: PG, item: IItem) => { const mitem = getMetaById(p, item.id)?.mitem; diff --git a/app/web/src/nova/ed/panel/tree/node/item/action/paste.tsx b/app/web/src/nova/ed/panel/tree/node/item/action/paste.tsx index 0ca6729c..9db325c8 100644 --- a/app/web/src/nova/ed/panel/tree/node/item/action/paste.tsx +++ b/app/web/src/nova/ed/panel/tree/node/item/action/paste.tsx @@ -1,5 +1,4 @@ import { syncronize } from "y-pojo"; -import { fillID } from "../../../../../../../render/editor/tools/fill-id"; import { IContent } from "../../../../../../../utils/types/general"; import { IItem, MItem } from "../../../../../../../utils/types/item"; import { MSection } from "../../../../../../../utils/types/section"; @@ -8,6 +7,7 @@ import { PG, active } from "../../../../../logic/ed-global"; import { treeRebuild } from "../../../../../logic/tree/build"; import { TypedArray } from "yjs-types"; import { loadComponent } from "../../../../../logic/comp/load"; +import { fillID } from "../../../../../logic/tree/fill-id"; export const edActionPaste = async (p: PG, item: IContent) => { let mitem = getMetaById(p, item.id)?.mitem; diff --git a/app/web/src/render/live/dev-loader.tsx b/app/web/src/render/live/dev-loader.tsx deleted file mode 100644 index 18be26e3..00000000 --- a/app/web/src/render/live/dev-loader.tsx +++ /dev/null @@ -1,121 +0,0 @@ -import { LSite, Loader } from "./logic/global"; - -const cache = { site: null as any, pages: [] as any, api: null }; -const config = { serverurl: "" }; - -export const devLoader: Loader = { - async site(p, where) { - config.serverurl = serverurl; - const site = (await _db.site.findFirst({ - where: - where.type === "siteid" ? { id: where.id } : { domain: where.domain }, - select: { - id: true, - config: true, - domain: true, - name: true, - js: true, - responsive: true, - js_compiled: true, - }, - })) as unknown as LSite; - - if (!site) { - return null; - } - - const cgroups = await _db.site_use_comp.findMany({ - where: { id_site: site.id }, - select: { use_id_site: true }, - }); - - if (Array.isArray(cgroups)) { - site.cgroup_ids = []; - for (const id of cgroups.map((c: any) => c.use_id_site)) { - site.cgroup_ids.push(id); - } - } - - const layout = await _db.page.findFirst({ - where: { - id_site: site.id, - name: { startsWith: "layout:" }, - is_default_layout: true, - is_deleted: false, - }, - select: { content_tree: true, id: true }, - }); - - if (layout && layout.content_tree) { - const childs = (layout.content_tree as any).childs; - if (childs && childs.length > 0) { - site.layout = childs[0]; - site.layout_id = layout.id; - } - } - - cache.site = site; - - return site; - }, - async comp(p, id) { - const comp = await load(`${config.serverurl}/_web/comp/${id}`); - p.comps.all[id] = comp; - return comp; - }, - npm(p, type, id) { - if (type === "site") { - return `${config.serverurl}/npm/site/${id}/site.js`; - } - return `${config.serverurl}/npm/page/${id}/page.js`; - }, - async page(p, id) { - return await load(`${config.serverurl}/_web/page/${id}`); - }, - async pages(p, id) { - let pages = [] as any; - /** load pages */ - const pagesLocal = localStorage.getItem(`prasi-pages-[${id}]`); - if (pagesLocal) { - try { - pages = JSON.parse(pagesLocal); - } catch (e) {} - } - - const loadPages = async () => { - return await _db.page.findMany({ - where: { - id_site: cache.site.id, - is_deleted: false, - name: { not: { startsWith: "layout:" } }, - }, - select: { - id: true, - name: true, - url: true, - }, - }); - }; - - if (pages.length === 0) { - pages = await loadPages(); - localStorage.setItem(`prasi-pages-[${id}]`, JSON.stringify(pages)); - } else { - loadPages().then((pages) => { - localStorage.setItem(`prasi-pages-[${id}]`, JSON.stringify(pages)); - }); - } - return pages; - }, -}; - -const load = async (url: string) => { - const res = await fetch(url); - try { - const text = await res.text(); - const json = JSON.parse(text); - return json; - } catch (e) { - return null; - } -}; diff --git a/app/web/src/render/live/elements/l-item.tsx b/app/web/src/render/live/elements/l-item.tsx deleted file mode 100644 index 03e15fc1..00000000 --- a/app/web/src/render/live/elements/l-item.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { FC } from "react"; -import { LRender } from "./l-render"; -import { LText } from "./l-text"; - -export const LItem: FC<{ - id: string; - _scopeIndex?: Record; - fromProp?: boolean; -}> = ({ id, fromProp, _scopeIndex }) => { - return ( - - {(childs) => { - return childs.map((e) => { - if (e.type === "item") { - return ( - - ); - } else { - return ( - - ); - } - }); - }} - - ); -}; diff --git a/app/web/src/render/live/elements/l-page.tsx b/app/web/src/render/live/elements/l-page.tsx deleted file mode 100644 index e983e989..00000000 --- a/app/web/src/render/live/elements/l-page.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import { useGlobal } from "web-utils"; -import { LiveGlobal } from "../logic/global"; -import { LSection } from "./l-section"; -import { Loading } from "../../../utils/ui/loading"; - -export const LPage = () => { - const p = useGlobal(LiveGlobal, "LIVE"); - const mode = p.mode; - - let childs = Object.values(p.page?.content_tree?.childs || []); - if (p.layout.section && p.layout.content) { - childs = [p.layout.section]; - } - - const rootChilds: string[] | undefined = Object.values(childs).map( - (e) => e.id - ); - - return ( -
-
- {p.status === "ready" || p.status === "tree-rebuild" ? ( - rootChilds?.map((id) => ) - ) : ( - - )} -
-
- ); -}; - -export const mobileCSS = css` - background-color: white; - background-image: linear-gradient(45deg, #fafafa 25%, transparent 25%), - linear-gradient(-45deg, #fafafa 25%, transparent 25%), - linear-gradient(45deg, transparent 75%, #fafafa 75%), - linear-gradient(-45deg, transparent 75%, #fafafa 75%); - - background-size: 20px 20px; - background-position: - 0 0, - 0 10px, - 10px -10px, - -10px 0px; -`; diff --git a/app/web/src/render/live/elements/l-render.tsx b/app/web/src/render/live/elements/l-render.tsx deleted file mode 100644 index 46c075d0..00000000 --- a/app/web/src/render/live/elements/l-render.tsx +++ /dev/null @@ -1,243 +0,0 @@ -import { FC, ReactNode, useEffect, useState } from "react"; -import { deepClone, useGlobal, useLocal } from "web-utils"; -import { produceCSS } from "../../../utils/css/gen"; -import { IContent } from "../../../utils/types/general"; -import { FNAdv, FNCompDef, FNLinkTag } from "../../../utils/types/meta-fn"; -import { responsiveVal } from "../../editor/tools/responsive-val"; -import { ItemMeta, LiveGlobal, PG } from "../logic/global"; -import { preload } from "../logic/route"; -import { treePropEval } from "../logic/tree-prop"; -import { treeScopeEval } from "../logic/tree-scope"; -import { LTextInternal } from "./l-text"; - -export const LRender: FC<{ - id: string; - children?: (childs: IContent[]) => ReactNode; - fromProp?: boolean; - _scopeIndex?: Record; -}> = ({ id, children, fromProp, _scopeIndex }) => { - const p = useGlobal(LiveGlobal, "LIVE"); - const meta = p.treeMeta[id]; - - if (meta) { - if (meta.item.name.startsWith("::")) { - if (meta.isLayout) { - meta.className = produceCSS(meta.item, { - mode: p.mode, - }); - - return ; - } else { - if (!p.portal[meta.item.name]) return null; - p.portal[meta.item.name].el = ( - - ); - return null; - } - } - } - - return ( - - ); -}; -export const LRenderInternal: FC<{ - id: string; - children?: (childs: IContent[]) => ReactNode; - fromProp?: boolean; - meta?: ItemMeta; - _scopeIndex?: Record; - p: PG; -}> = ({ id, children, meta, p, _scopeIndex }) => { - const [_, render] = useState({}); - - useEffect(() => { - if (meta) { - meta.mounted = true; - if (meta.pendingRender) { - meta.pendingRender = false; - render({}); - } - } - }); - - if (!meta) { - return null; - } - meta.render = () => { - if (meta) { - if (meta.mounted) { - render({}); - } else { - meta.pendingRender = true; - } - } - }; - let item = meta.item; - - if (meta.comp?.id) { - const comp = meta.comp; - - let props = {} as Record; - let cprops = {} as [string, FNCompDef][]; - - props = deepClone( - p.comps.all[meta.comp.id]?.content_tree.component?.props || {} - ); - cprops = Object.entries(props); - - comp.propval = treePropEval(p, id, cprops, _scopeIndex); - } - - let _children = null; - - if (children) { - if (item.type === "text") _children = children([]); - else { - _children = children( - item.childs.filter((c) => { - if (c.hidden === "all") { - return false; - } - - if (!p.treeMeta[c.id]) { - if (p.treePending) p.treePending.then(meta.render); - return false; - } - return true; - }) || [] - ); - } - } - - meta.className = produceCSS(item, { - mode: p.mode, - }); - - const className = meta.className; - const adv = item.adv; - - if (!(adv?.jsBuilt && adv?.js) && meta.comp) { - return treeScopeEval( - p, - id, - _children, - `render(React.createElement("div",{...props},children));`, - _scopeIndex - ); - } - - if (adv) { - if (adv.html) { - const html = renderHTML(className, adv); - if (html) return html; - } else if (adv.jsBuilt && adv.js) { - const el = treeScopeEval(p, id, _children, adv.jsBuilt, _scopeIndex); - return el; - } - } - const linktag = responsiveVal(item, "linktag", p.mode, {}); - const isComponent = item.type === "item" && item.component?.id; - - if (linktag && linktag.link && !isComponent) { - let href = linktag.link || ""; - if (href.startsWith("/")) { - preload(p, href); - if ( - (location.pathname.startsWith("/preview/") || - location.pathname.startsWith("/site/")) && - ["localhost", "127.0.0.1", "prasi.app"].includes(location.hostname) - ) { - const parts = location.pathname.split("/"); - if (parts.length >= 3) { - href = `/${parts[1]}/${parts[2]}${href}`; - } - } - } - - const props = { - className: className, - href: href, - onClick: (e: any) => { - e.preventDefault(); - if (href.startsWith("/")) { - navigate(href); - } else { - location.href = href; - } - }, - }; - - if (item.type === "text") { - return ( - - ); - } - return {_children}; - } - - if (item.type === "text") { - return ( - - ); - } - - return ( -
- {/* {isComponent && ( -
-          {item.id}-{item.name}
-        
- )} */} - {_children} -
- ); -}; - -export const renderHTML = (className: string, adv: FNAdv) => { - if (adv.html) { - return ( -
- ); - } - return null; -}; - -const PrasiPortal = ({ name }: { name: string }) => { - const p = useGlobal(LiveGlobal, "LIVE"); - const local = useLocal({}); - - if (!p.portal[name]) { - p.portal[name] = { render: local.render, el: null }; - } else { - p.portal[name].render = local.render; - } - - return p.portal[name].el; -}; diff --git a/app/web/src/render/live/elements/l-section.tsx b/app/web/src/render/live/elements/l-section.tsx deleted file mode 100644 index 3d2a385b..00000000 --- a/app/web/src/render/live/elements/l-section.tsx +++ /dev/null @@ -1,15 +0,0 @@ -import { FC } from "react"; -import { LItem } from "./l-item"; -import { LRender } from "./l-render"; - -export const LSection: FC<{ id: string }> = ({ id }) => { - return ( - - {(childs) => - childs.map((e) => { - return ; - }) - } - - ); -}; diff --git a/app/web/src/render/live/elements/l-text.tsx b/app/web/src/render/live/elements/l-text.tsx deleted file mode 100644 index 4387bc4a..00000000 --- a/app/web/src/render/live/elements/l-text.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { FC } from "react"; -import { IText } from "../../../utils/types/text"; -import { PG } from "../logic/global"; -import { LRender } from "./l-render"; - -export const LText: FC<{ - id: string; - fromProp?: boolean; - _scopeIndex?: Record; -}> = ({ id, fromProp, _scopeIndex }) => { - return ; -}; - -export const LTextInternal: FC<{ - className: any; - p: PG; - item: IText; - _children: any; -}> = ({ className, item, _children }) => { - return ( -
- ); -}; diff --git a/app/web/src/render/live/live.tsx b/app/web/src/render/live/live.tsx deleted file mode 100644 index 4444f4c3..00000000 --- a/app/web/src/render/live/live.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import { FC, useCallback, useEffect } from "react"; -import parseUA from "ua-parser-js"; -import { useGlobal } from "web-utils"; -import { LPage } from "./elements/l-page"; -import { LiveGlobal, Loader } from "./logic/global"; -import { initLive, w } from "./logic/init"; -import { preload, routeLive } from "./logic/route"; -import { Loading } from "../../utils/ui/loading"; - -export const Live: FC<{ - domain_or_siteid: string; - pathname: string; - loader: Loader; - liveSync?: boolean; -}> = ({ domain_or_siteid, pathname, loader, liveSync }) => { - const p = useGlobal(LiveGlobal, "LIVE"); - p.loader = loader; - - w.preload = (url: string) => { - preload(p, url); - }; - - if (p.site.id) { - if (!p.mode && !!p.site.responsive) { - if (p.site.responsive === "all") { - const parsed = parseUA(); - p.mode = parsed.device.type === "mobile" ? "mobile" : "desktop"; - if (localStorage.getItem("prasi-editor-mode")) { - p.mode = localStorage.getItem("prasi-editor-mode") as any; - } - } else if (p.site.responsive === "mobile-only") { - p.mode = "mobile"; - } else if (p.site.responsive === "desktop-only") { - p.mode = "desktop"; - } - } - } - - const onResize = useCallback(() => { - let newmode = p.mode; - if (window.innerWidth < 600) newmode = "mobile"; - else newmode = "desktop"; - - if (newmode !== p.mode) { - p.mode = newmode; - p.render(); - } - }, [p]); - - useEffect(() => { - if (p.site.id) { - window.removeEventListener("resize", onResize); - - if (p.site.responsive === "all") { - window.addEventListener("resize", onResize); - } - } - }, [p.site.responsive]); - - if (p.status === "init") { - initLive(p, domain_or_siteid); - } - - if (p.site.id) { - routeLive(p, pathname); - } - - if (!p.mode) return ; - else { - w.isMobile = p.mode === "mobile"; - w.isDesktop = p.mode === "desktop"; - } - - if (p.status === "not-found") - return ( -
-
404
-
NOT FOUND
-
- ); - - return ; -}; diff --git a/app/web/src/render/live/logic/comp.ts b/app/web/src/render/live/logic/comp.ts deleted file mode 100644 index dce6e903..00000000 --- a/app/web/src/render/live/logic/comp.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { createId } from "@paralleldrive/cuid2"; -import * as Y from "yjs"; -import { IContent } from "../../../utils/types/general"; -import { IItem, MItem } from "../../../utils/types/item"; -import { FNCompDef, FNComponent } from "../../../utils/types/meta-fn"; -import { IRoot } from "../../../utils/types/root"; -import { fillID } from "../../editor/tools/fill-id"; -import { PG } from "./global"; -import { PRASI_COMPONENT } from "../../../utils/types/render"; -import { deepClone } from "web-utils"; - -export const scanComponent = ( - item: IRoot | IContent, - componentIDS?: Set -) => { - const ids = componentIDS || new Set(); - if (!item) return ids; - - if (item.type === "item" && item.component?.id) { - ids.add(item.component.id); - - if (item.component.props) { - for (const p of Object.values(item.component.props)) { - if (p.meta?.type === "content-element" && p.content) { - scanComponent(p.content, ids); - } - } - } - } - - if (item.type !== "text" && item.childs) { - for (const c of item.childs) { - scanComponent(c, ids); - } - } - return ids; -}; - -export const loadComponent = async ( - p: PG, - itemOrID: string | IRoot | IContent -) => { - const compIds = new Set(); - let tree: IRoot | IContent = null as any; - if (typeof itemOrID !== "string") { - tree = itemOrID; - } else { - await loadComponentById(p, itemOrID); - } - - scanComponent(tree, compIds); - const promises = [...compIds] - .filter((id) => { - if (!p.comps.all[id] && !p.comps.pending[id]) return true; - return false; - }) - .map(async (id) => { - const comp = await loadComponentById(p, id); - await loadComponent(p, comp.content_tree); - }); - - if (promises.length > 0) { - await Promise.all(promises); - } -}; - -const loadComponentById = async (p: PG, id: string) => { - if (!!p.comps.pending[id]) { - return await p.comps.pending[id]; - } - const res = p.loader.comp(p, id); - p.comps.pending[id] = res; - p.comps.all[id] = await res; - return p.comps.all[id]; -}; - -export const instantiateComp = ( - p: PG, - item: IItem, - mcomp: { item: MItem; type: "m" } | { item: PRASI_COMPONENT; type: "i" }, - child_ids: Record -) => { - const comp = item.component as FNComponent; - - let target = null as any; - let mprops = {} as Record; - if (mcomp.type === "m") { - const mitem = mcomp.item; - - mprops = mitem.get("component")?.get("props")?.toJSON() as Record< - string, - FNCompDef - >; - - if (!mprops) { - mitem.get("component")?.set("props", new Y.Map() as any); - mprops = mitem.get("component")?.get("props")?.toJSON() as any; - } - target = mitem.toJSON(); - } else { - target = deepClone(mcomp.item.content_tree); - mprops = target.component.props || {}; - } - - let nitem = {}; - nitem = fillID(target, (i) => { - if (!i.originalId) { - i.originalId = i.id; - } - let newid = i.id; - if (child_ids[i.originalId]) { - newid = child_ids[i.originalId]; - } else { - newid = createId(); - } - - i.id = newid; - child_ids[i.originalId] = newid; - - return false; - }) as IItem; - - const props: any = {}; - for (const [k, v] of Object.entries(mprops)) { - props[k] = v; - if (comp.props[k]) { - props[k].value = comp.props[k].value; - props[k].valueBuilt = comp.props[k].valueBuilt; - props[k].content = comp.props[k].content; - } - } - - return { - ...nitem, - id: item.id, - originalId: item.originalId || (nitem as IItem).originalId, - component: { ...comp, props }, - } as IItem; -}; diff --git a/app/web/src/render/live/logic/global.ts b/app/web/src/render/live/logic/global.ts deleted file mode 100644 index abebb7a2..00000000 --- a/app/web/src/render/live/logic/global.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { createRouter } from "radix3"; -import { FC, ReactNode } from "react"; -import { CompDoc } from "../../../base/global/content-editor"; -import { IContent, MPage } from "../../../utils/types/general"; -import { IItem, MItem } from "../../../utils/types/item"; -import { PRASI_COMPONENT } from "../../../utils/types/render"; -import { IRoot } from "../../../utils/types/root"; -import { ISection } from "../../../utils/types/section"; -import { IText } from "../../../utils/types/text"; - -type WithRequired = T & { [P in K]-?: T[P] }; -export type ItemMeta = { - item: IContent; - scope?: any; - indexedScope: Record; - comp?: { - id: string; - propval?: any; - child_ids: Record; - }; - className?: string; - parent_id: string; - parent_comp?: WithRequired & { item: IItem }; - memoize?: Record; - PassProp: FC; - }>; - isLayout: boolean; - render?: () => void; - mounted?: boolean; - pendingRender?: boolean; -}; - -export type LPage = { - id: string; - name: string; - url: string; - content_tree?: IRoot; - js: string; -}; - -export type LSite = { - id: string; - api_url: string; - api_prasi: { - port: string; - db: string; - }; - responsive: "all" | "mobile-only" | "desktop-only"; - domain: string; - name: string; - js: string; - js_compiled: string; - layout?: ISection; - layout_id?: string; - cgroup_ids?: string[]; - config?: any; -}; -export type Loader = { - site: ( - p: PG, - where: { type: "domain"; domain: string } | { type: "siteid"; id: string } - ) => Promise; - page: (p: PG, id: string) => Promise; - pages: (p: PG, site_id: string) => Promise; - npm: (p: PG, type: "site" | "page", id: string) => string; - comp: (p: PG, id: string) => Promise; -}; -export const LiveGlobal = { - liveSync: { - ws: null as null | WebSocket, - init: false, - decompress: null as null | ((buf: Uint8Array) => Uint8Array), - }, - prod: false, - loader: undefined as unknown as Loader, - mode: "" as "desktop" | "mobile", - layout: { - section: null as null | ISection, - content: null as null | IItem | IText, - }, - status: "init" as - | "init" - | "loading" - | "reload" - | "ready" - | "not-found" - | "error" - | "tree-rebuild", - site: { - id: "", - api_url: "", - api_prasi: { - port: "", - db: "", - }, - responsive: "all" as "all" | "mobile-only" | "desktop-only", - domain: "", - name: "", - js: "", - js_compiled: "", - } as LSite, - page: null as null | LPage, - mpage: null as null | MPage, - mpageLoaded: null as null | ((mpage: MPage) => void), - pagePreload: {} as Record, - pages: {} as Record, - route: createRouter<{ - id: string; - url: string; - }>(), - treePending: null as null | Promise, - treeMeta: {} as Record, - cachedParentID: {} as Record, - portal: {} as Record void }>, - comps: { - pending: {} as Record>, - resolve: {} as Record void>, - all: {} as Record, - }, - script: { - db: null as any, - api: null as any, - }, - compInstance: {} as Record>, - ws: null as null | WebSocket, - wsRetry: { - fast: false, - localIP: false, - disabled: false, - reconnecting: false, - }, -}; - -export type PG = typeof LiveGlobal & { render: () => void }; diff --git a/app/web/src/render/live/logic/init.tsx b/app/web/src/render/live/logic/init.tsx deleted file mode 100644 index a74ee235..00000000 --- a/app/web/src/render/live/logic/init.tsx +++ /dev/null @@ -1,153 +0,0 @@ -import { createRouter } from "radix3"; -import { validate } from "uuid"; -import { apiProxy } from "../../../base/load/api/api-proxy"; -import { dbProxy } from "../../../base/load/db/db-proxy"; -import importModule from "../../editor/tools/dynamic-import"; -import { LSite, PG } from "./global"; -import { validateLayout } from "./layout"; -import { registerMobile } from "./mobile"; - -export const w = window as unknown as { - basepath: string; - navigateOverride: (s: string) => string; - isEditor: boolean; - isMobile: boolean; - isLayout: boolean; - apiHeaders: any; - isDesktop: boolean; - exports: any; - params: any; - apiurl: string; - preload: (path: string) => void; - mobile?: ReturnType; - externalAPI: { - mode: "dev" | "prod"; - devUrl: string; - prodUrl: string; - }; -}; - -export const initLive = async (p: PG, domain_or_siteid: string) => { - if (p.status === "init") { - p.status = "loading"; - - if (w.mobile) { - w.mobile.bind(p); - w.mobile.send({ type: "ready" }); - } - - w.isEditor = false; - w.isLayout = true; - w.apiHeaders = {}; - - w.navigateOverride = (_href) => { - if (_href && _href.startsWith("/")) { - if (w.basepath.length > 1) { - _href = `${w.basepath}${_href}`; - } - if ( - location.hostname === "prasi.app" || - location.hostname === "prasi.avolut.com" || - location.hostname.includes("ngrok") || - location.hostname === "localhost" || - location.hostname === "127.0.0.1" || - location.hostname === "10.0.2.2" // android localhost - ) { - if ( - location.pathname.startsWith("/live") && - !_href.startsWith("/live") - ) { - const patharr = location.pathname.split("/"); - _href = `/live/${patharr[2]}${_href}`; - } - } - } - return _href; - }; - - /** load site */ - let site = null as null | LSite; - site = await p.loader.site( - p, - validate(domain_or_siteid) - ? { type: "siteid", id: domain_or_siteid } - : { type: "domain", domain: domain_or_siteid } - ); - - if (site) { - /** import site module */ - w.exports = {}; - - if (site.cgroup_ids) { - for (const id of site.cgroup_ids) { - await importModule(p.loader.npm(p, "site", id)); - } - } - - await importModule(p.loader.npm(p, "site", site.id)); - - p.site.id = site.id; - p.site.layout = site.layout; - p.site.js = site.js_compiled || ""; - p.site.responsive = site.responsive as any; - - await validateLayout(p); - - p.site.api_url = site.config.api_url || ""; - - w.apiurl = p.site.api_url; - - let pages = await p.loader.pages(p, site.id); - - /** execute site module */ - const exec = (fn: string, scopes: any) => { - if (p) { - if (p.site.api_url) { - scopes["api"] = apiProxy(p.site.api_url); - scopes["db"] = dbProxy(p.site.api_url); - } - if (!w.params) { - w.params = {}; - } - scopes.params = w.params; - scopes.module = {}; - const f = new Function(...Object.keys(scopes), fn); - const res = f(...Object.values(scopes)); - return res; - } - return null; - }; - const scope = { - types: {}, - exports: w.exports, - load: importModule, - render: p.render, - module: { - exports: {} as any, - }, - }; - exec(p.site.js, scope); - if (scope.module.exports) { - for (const [k, v] of Object.entries(scope.module.exports)) { - w.exports[k] = v; - } - } - - /** create router */ - p.pages = {}; - p.route = createRouter({ strictTrailingSlash: false }); - if (pages && pages.length > 0) { - for (const page of pages) { - p.pages[page.id] = page; - p.route.insert(page.url, page); - } - } - - p.status = "ready"; - p.render(); - } else { - p.status = "not-found"; - p.render(); - } - } -}; diff --git a/app/web/src/render/live/logic/layout.tsx b/app/web/src/render/live/logic/layout.tsx deleted file mode 100644 index 6d4ab529..00000000 --- a/app/web/src/render/live/logic/layout.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { IItem } from "../../../utils/types/item"; -import { IText } from "../../../utils/types/text"; -import { LSite, PG } from "./global"; - -export const validateLayout = async (p: { - site: LSite; - layout: PG["layout"]; -}) => { - if (p.site.layout) { - p.layout.section = p.site.layout; - - for (const child of p.layout.section.childs) { - const found = await walk(child); - if (found) { - p.layout.content = found; - break; - } - } - } -}; - -const walk = async ( - item: IItem | IText -): Promise => { - if (item.name === "content") { - return item; - } - if (item.type === "item" && !item.component?.id) { - for (const c of item.childs) { - const found = await walk(c); - if (found) { - return found; - } - } - } -}; diff --git a/app/web/src/render/live/logic/mobile.ts b/app/web/src/render/live/logic/mobile.ts deleted file mode 100644 index fd4f17ff..00000000 --- a/app/web/src/render/live/logic/mobile.ts +++ /dev/null @@ -1,164 +0,0 @@ -import { w } from "../../../utils/types/general"; -import { PG } from "./global"; - -type NOTIF_ARG = { - user_id: any; - body: string; - title: string; - data?: any; -}; -export const registerMobile = () => { - const default_mobile = { - send: () => {}, - bind: (p: PG) => {}, - notif: { - register: (user_id: string) => {}, - send: async (data: NOTIF_ARG) => { - const p = getP(); - if (p) { - return await p.script.api._notif("send", { - type: "send", - id: - typeof data.user_id === "string" - ? data.user_id - : data.user_id.toString(), - body: data.body, - title: data.title, - data: data.data, - }); - } - }, - onTap: (data: NOTIF_ARG) => {}, - onReceive: (data: NOTIF_ARG) => {}, - }, - }; - - let config = { notif_token: "", p: null as null | PG }; - const getP = () => { - const p = config.p; - if (p && p.site && p.site.api_url) { - const api = w.prasiApi[p.site.api_url]; - if ( - api && - api.apiEntry && - api.apiEntry._notif && - p.script && - p.script.api - ) { - return p; - } - } - }; - - if (window.parent) { - window.addEventListener("message", async ({ data: raw }) => { - if (typeof raw === "object" && raw.mobile) { - const data = raw as unknown as - | { - type: "notification-token"; - token: string; - } - | { type: "notification-tap"; notif: NOTIF_ARG } - | { type: "notification-receive"; notif: NOTIF_ARG }; - - const waitUntil = async (fn: () => boolean) => { - if (!notifObject.notif.onTap) { - let ival = null as any; - let i = 0; - await new Promise(() => { - ival = setInterval(() => { - i++; - if (i > 20) { - clearInterval(ival); - } - if (fn()) { - clearInterval(ival); - } - }, 500); - }); - return; - } - }; - - switch (data.type) { - case "notification-token": - config.notif_token = data.token; - break; - case "notification-tap": - if (!notifObject.notif.onTap) { - waitUntil(() => { - if (notifObject.notif.onTap) { - notifObject.notif.onTap(data.notif); - return true; - } - return false; - }); - return; - } - - if (notifObject.notif.onTap) { - notifObject.notif.onTap(data.notif); - } - break; - case "notification-receive": - if (!notifObject.notif.onReceive) { - waitUntil(() => { - if (notifObject.notif.onReceive) { - notifObject.notif.onReceive(data.notif); - return true; - } - return false; - }); - } - if (notifObject.notif.onReceive) { - notifObject.notif.onReceive(data.notif); - } - break; - } - } - }); - - const notifObject = { - send: (msg: { type: "ready" }) => { - window.parent.postMessage({ mobile: true, ...msg }, "*"); - }, - bind(p: PG) { - config.p = p; - }, - config, - notif: { - register: async (user_id: any) => { - const p = getP(); - if (p) { - return await p.script.api._notif("register", { - type: "register", - id: typeof user_id === "string" ? user_id : user_id.toString(), - token: config.notif_token, - }); - } - }, - send: async (data: NOTIF_ARG) => { - const p = getP(); - if (p) { - return await p.script.api._notif("send", { - type: "send", - id: - typeof data.user_id === "string" - ? data.user_id - : data.user_id.toString(), - body: data.body, - title: data.title, - data: data.data, - }); - } - }, - onTap: null as null | typeof default_mobile.notif.onTap, - onReceive: null as null | typeof default_mobile.notif.onReceive, - }, - }; - return notifObject; - } - return { - ...default_mobile, - }; -}; diff --git a/app/web/src/render/live/logic/route.ts b/app/web/src/render/live/logic/route.ts deleted file mode 100644 index a6429449..00000000 --- a/app/web/src/render/live/logic/route.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { w } from "../../../utils/types/general"; -import importModule from "../../editor/tools/dynamic-import"; -import { loadComponent } from "./comp"; -import { LPage, PG } from "./global"; -import { rebuildTree } from "./tree-logic"; - -export const routeLive = (p: PG, pathname: string) => { - if (p.status !== "loading" && p.status !== "not-found") { - if (!w.params) w.params = {}; - let page_id = w.params.page_id; - - if (!page_id) { - const found = p.route.lookup(pathname); - if (!found) { - p.status = "not-found"; - } else { - if (found.params) { - for (const [k, v] of Object.entries(found.params)) { - w.params[k] = v; - } - } - page_id = found.id; - } - } - - if (page_id) { - (window as any).pageid = page_id; - const promises: Promise[] = []; - if (page_id !== p.page?.id) { - p.page = p.pages[page_id]; - p.treeMeta = {}; - p.portal = {}; - } - - if (!p.page || !p.page.content_tree) { - promises.push(loadNpmPage(p, page_id)); - promises.push(loadPage(p, page_id)); - } - - if (promises.length > 0) { - p.status = "loading"; - Promise.all(promises).then(async () => { - p.page = p.pages[page_id]; - if (p.page) { - await pageLoaded(p); - p.render(); - } - }); - } else { - if (!firstRender[page_id]) { - firstRender[page_id] = true; - pageLoaded(p).then(p.render); - } else { - pageLoaded(p); - } - } - } - } -}; -const firstRender = {} as Record; - -const pageLoaded = async (p: PG) => { - if (p.page) { - await rebuildTree(p, { render: false, note: "render", reset: false }); - p.status = "ready"; - } else { - p.status = "not-found"; - } -}; - -export const preload = async (p: PG, pathname: string) => { - const found = p.route.lookup(pathname); - if (found) { - if ( - (!p.pages[found.id] || - (p.pages[found.id] && !p.pages[found.id].content_tree)) && - !p.pagePreload[found.id] - ) { - p.pagePreload[found.id] = true; - const dbpage = await p.loader.page(p, found.id); - if (dbpage) { - p.pages[dbpage.id] = dbpage; - const page = p.pages[dbpage.id]; - if (page && page.content_tree) { - await loadComponent(p, page.content_tree); - } - delete p.pagePreload[found.id]; - await loadNpmPage(p, dbpage.id); - } - } - } -}; - -const npmPageLoaded = {} as Record; -const loadNpmPage = async (p: PG, id: string) => { - try { - if (!npmPageLoaded[id]) { - npmPageLoaded[id] = true; - if (typeof window.exports === "undefined") { - window.exports = {}; - } - const npmurl = p.loader.npm(p, "page", id); - if (npmurl) { - await importModule(npmurl); - } - } - } catch (e) { - console.error(e); - } -}; - -const loading = {} as Record>; - -const loadPage = async (p: PG, id: string) => { - if (!loading[id]) { - loading[id] = p.loader.page(p, id); - } - - const page = await loading[id]; - - if (page) { - p.pages[page.id] = { - id: page.id, - url: page.url, - name: page.name, - content_tree: page.content_tree as any, - js: (page as any).js_compiled as any, - }; - - const cur = p.pages[page.id]; - if (cur && cur.content_tree) { - await loadComponent(p, cur.content_tree); - } - } -}; - -export const extractNavigate = (str: string) => { - return [ - ...findBetween(str, `navigate(`, `)`), - ...findBetween(str, `href = `, `;`), - ]; -}; - -const findBetween = (text: string, opener: string, closer: string) => { - let i = 0; - let last = 0; - const founds: string[] = []; - while (true) { - const startIndex = text.indexOf(opener, i); - last = i; - if (startIndex >= 0) { - const char = text[startIndex + opener.length]; - if (char === '"' || char === "'" || char === "`") { - const end = text.indexOf( - `${char}${closer}`, - startIndex + opener.length + 1 - ); - const found = text.substring(startIndex + opener.length + 1, end); - i = end + 2 + closer.length; - founds.push(found); - } - } - - if (last === i) { - break; - } - } - return founds; -}; diff --git a/app/web/src/render/live/logic/tree-logic.tsx b/app/web/src/render/live/logic/tree-logic.tsx deleted file mode 100644 index 3cb176e8..00000000 --- a/app/web/src/render/live/logic/tree-logic.tsx +++ /dev/null @@ -1,189 +0,0 @@ -import { produceCSS } from "../../../utils/css/gen"; -import { IContent } from "../../../utils/types/general"; -import { IItem } from "../../../utils/types/item"; -import { instantiateComp, loadComponent } from "./comp"; -import { ItemMeta, LiveGlobal, PG } from "./global"; - -export const rebuildTree = async ( - p: PG, - _: { note: string; render?: boolean; reset?: boolean } -) => { - if (!p.page?.content_tree) return; - - p.treePending = new Promise(async (resolve) => { - const treeMeta = p.treeMeta; - if (p.page) { - let childs = Object.values(p.page.content_tree?.childs || []); - if ( - p.layout.section && - p.layout.content && - !p.page?.name.startsWith("layout:") - ) { - childs = [p.layout.section]; - - p.layout.content.type = "item"; - if (p.layout.content.type === "item") { - p.layout.content.childs = p.page.content_tree?.childs.map((e) => ({ - ...e, - type: "item", - })) as IItem[]; - } - } - - await Promise.all( - childs.map(async (item, idx) => { - await walk(p, { - treeMeta, - item, - parent_id: "root", - idx, - isLayout: !!(p.layout.section && p.layout.content), - }); - }) || [] - ); - } - - resolve(); - p.treePending = null; - - if (_.render !== false) { - p.render(); - } - }); - await p.treePending; -}; - -const walk = async ( - p: PG, - val: { - treeMeta: (typeof LiveGlobal)["treeMeta"]; - item?: IContent; - isLayout: boolean; - parent_id: string; - idx: number; - parent_comp?: ItemMeta["parent_comp"]; - } -) => { - const treeMeta = val.treeMeta; - let item = val.item as IContent; - - if (item.hidden === "all") return; - - if (val.parent_comp) { - const pchild_ids = val.parent_comp.comp?.child_ids; - - if (pchild_ids && item.originalId) { - if (pchild_ids[item.originalId]) { - item.id = pchild_ids[item.originalId]; - } - } - } - - if (item) { - let comp: ItemMeta["comp"] = undefined as any; - - if (item.type === "item" && item.component?.id) { - comp = { - id: item.component.id, - child_ids: {}, - }; - } - - const meta: ItemMeta = { - item, - parent_id: p.cachedParentID[item.id] || val.parent_id, - parent_comp: val.parent_comp as any, - className: produceCSS(item, { - mode: p.mode, - }), - comp, - indexedScope: treeMeta[item.id] ? treeMeta[item.id].indexedScope : {}, - isLayout: val.isLayout, - }; - - treeMeta[meta.item.id] = meta; - - if (item.type === "item" && item.component?.id) { - const cid = item.component.id; - let comp = p.comps.all[cid]; - if (!comp) { - await loadComponent(p, cid); - comp = p.comps.all[cid]; - } - - if (comp) { - if (!p.compInstance[item.id]) { - p.compInstance[item.id] = {}; - } - const child_ids = p.compInstance[item.id]; - const itemnew = instantiateComp( - p, - item, - { type: "i", item: comp }, - child_ids - ); - - for (const [k, v] of Object.entries(itemnew)) { - if (k !== "id") (item as any)[k] = v; - } - - const cprops = comp.content_tree.component?.props; - const iprops = item.component.props; - - if (cprops && iprops) { - for (const [name, mprop] of Object.entries(cprops)) { - const jprop = iprops[name]; - - if (jprop) { - if (mprop.meta?.type === "content-element") { - let icontent = jprop.content; - - if (icontent) - await walk(p, { - treeMeta, - item: icontent, - parent_id: item.id, - parent_comp: val.parent_comp, - idx: mprop.idx, - isLayout: meta.isLayout, - }); - } - } - } - } - } - - await Promise.all( - item.childs.map(async (child, idx) => { - return await walk(p, { - treeMeta, - item: child, - parent_comp: meta as any, - parent_id: item.id, - idx, - isLayout: meta.isLayout, - }); - }) - ); - } else { - if (item.type !== "text" && Array.isArray(item.childs)) { - await Promise.all( - item.childs.map(async (child, idx) => { - let isLayout = false; - if (meta.isLayout && item.name !== "content") { - isLayout = true; - } - return await walk(p, { - treeMeta, - idx, - item: child, - parent_comp: val.parent_comp, - parent_id: item.id || "", - isLayout, - }); - }) - ); - } - } - } -}; diff --git a/app/web/src/render/live/logic/tree-prop.tsx b/app/web/src/render/live/logic/tree-prop.tsx deleted file mode 100644 index 2bd62008..00000000 --- a/app/web/src/render/live/logic/tree-prop.tsx +++ /dev/null @@ -1,106 +0,0 @@ -import { FC } from "react"; -import { apiProxy } from "../../../base/load/api/api-proxy"; -import { dbProxy } from "../../../base/load/db/db-proxy"; -import { FNCompDef } from "../../../utils/types/meta-fn"; -import { LItem } from "../elements/l-item"; -import { PG } from "./global"; -import { extractNavigate, preload } from "./route"; -import { mergeScopeUpwards } from "./tree-scope"; - -export type PropCompFC = FC<{}>; - -const jsxProps = {} as Record; -export const treePropEval = ( - p: PG, - id: string, - cprops: [string, FNCompDef][], - _scopeIndex?: Record -) => { - const meta = p.treeMeta[id]; - - if (meta.item.type === "item" && meta.item.component) { - if (p.site.api_url) { - if (!p.script.db) p.script.db = dbProxy(p.site.api_url); - if (!p.script.api) p.script.api = apiProxy(p.site.api_url); - } - - const props = meta.item.component.props; - - const w = window as any; - const finalScope = mergeScopeUpwards(p, id, { _scopeIndex }); - - const args = { - ...w.exports, - ...finalScope, - db: p.script.db, - api: p.script.api, - }; - - const result: any = {}; - for (const [name, _prop] of cprops) { - const prop = props[name] || _prop; - - let value: any = null; - if (prop.valueBuilt) { - const fn = new Function( - ...Object.keys(args), - `return ${prop.valueBuilt}` - ); - try { - value = fn(...Object.values(args)) || null; - - const navs = extractNavigate(prop.valueBuilt || ""); - if (navs.length > 0) { - navs.map((nav) => preload(p, nav)); - } - } catch (e) { - const cname = meta.item.name; - console.warn(e); - console.warn( - `ERROR in Component [${cname}], in prop [${name}]:\n ` + prop.value - ); - } - } - - if (prop.meta?.type === "content-element") { - if (!(typeof value === "object" && !!value && value._jsx)) { - const id = `${meta.item.id}-${name}`; - if (!jsxProps[id]) { - jsxProps[id] = { - _jsx: true, - Comp: ({ - parent_id, - _scopeIndex, - }: { - parent_id: string; - _scopeIndex?: Record; - }) => { - if (prop.content) { - const meta = p.treeMeta[prop.content.id]; - if (meta) { - meta.parent_id = parent_id; - p.cachedParentID[prop.content.id] = parent_id; - - return ( - - ); - } - } - return <>; - }, - }; - } - value = jsxProps[id]; - } - } - - result[name] = value; - } - - return result; - } -}; diff --git a/app/web/src/render/live/logic/tree-scope.tsx b/app/web/src/render/live/logic/tree-scope.tsx deleted file mode 100644 index 16a6ea44..00000000 --- a/app/web/src/render/live/logic/tree-scope.tsx +++ /dev/null @@ -1,369 +0,0 @@ -import hash_sum from "hash-sum"; -import { FC, ReactNode, Suspense, useEffect, useState } from "react"; -import { deepClone } from "web-utils"; -import { apiProxy } from "../../../base/load/api/api-proxy"; -import { dbProxy } from "../../../base/load/db/db-proxy"; -import { ErrorBox } from "../../editor/elements/e-error"; -import { ItemMeta, PG } from "./global"; -import { extractNavigate, preload } from "./route"; - -export const JS_DEBUG = false; - -export const treeScopeEval = ( - p: PG, - id: string, - children: ReactNode, - js: string, - _scopeIndex?: Record -) => { - const meta = p.treeMeta[id]; - const className = meta.className; - - let item = meta.item; - - const adv = item.adv; - let args = {}; - try { - if (!meta.memoize) { - meta.memoize = {}; - } - const memoizeKey = hash_sum(_scopeIndex) || "default"; - if (!meta.memoize[memoizeKey]) { - meta.memoize[memoizeKey] = { - Local: createLocal(p, id, _scopeIndex), - PassProp: createPassProp(p, id, _scopeIndex), - }; - } - - if (typeof adv?.js === "string") { - const navs = extractNavigate(adv.js || ""); - if (navs.length > 0) { - navs.map((nav) => preload(p, nav)); - } - } - - // prepare args - if (p.site.api_url) { - if (!p.script.db) p.script.db = dbProxy(p.site.api_url); - if (!p.script.api) p.script.api = apiProxy(p.site.api_url); - } - const w = window as any; - - const finalScope = mergeScopeUpwards(p, id, { _scopeIndex }); - - for (const [k, v] of Object.entries(finalScope)) { - if (v && typeof v === "object") { - const t: { - _jsx: true; - Comp: FC<{ parent_id: string; _scopeIndex?: Record }>; - } = v as any; - if (t._jsx && t.Comp) { - finalScope[k] = ( - - ); - } - } - } - - const output = { jsx: null as any }; - args = { - ...w.exports, - ...finalScope, - ...meta.memoize[memoizeKey], - db: p.script.db, - api: p.script.api, - children, - props: { className }, - useEffect: useEffect, - render: (jsx: ReactNode) => { - output.jsx = ( - - {jsx} - - ); - }, - }; - - // execute - const fn = new Function(...Object.keys(args), js); - const res = fn(...Object.values(args)); - if (res instanceof Promise) { - res.catch((e: any) => { - console.warn(e); - console.warn( - ( - `ERROR in ${item.type} [${item.name}]:\n ` + - ((adv?.js || "") as any) - ).trim() - ); - console.warn(`Available var:`, args, `\n\n`); - }); - } - return output.jsx; - } catch (e) { - console.warn(e); - console.warn( - ( - `ERROR in ${item.type} [${item.name}]:\n ` + ((adv?.js || "") as any) - ).trim() - ); - console.warn(`Available var:`, args, `\n\n`); - } -}; - -export const mergeScopeUpwards = ( - p: PG, - id: string, - opt?: { - _scopeIndex?: Record; - debug?: boolean; - each?: (meta: ItemMeta, values: Record) => boolean; - } -) => { - const meta = p.treeMeta[id]; - - if (!meta.scope) { - meta.scope = {}; - } - - let cur = meta; - const finalScope: any = {}; - while (cur) { - let scope = null; - - let indexedScope = null; - - if (cur.indexedScope && opt?._scopeIndex) { - const idx = opt._scopeIndex[cur.item.id]; - - if (typeof idx !== "undefined" && cur.indexedScope[idx]) { - indexedScope = cur.indexedScope[idx]; - } - } - - if (indexedScope || cur.scope || cur.comp?.propval) { - scope = { ...cur.scope, ...indexedScope, ...cur.comp?.propval }; - - for (const [k, v] of Object.entries(scope)) { - if (typeof finalScope[k] === "undefined") finalScope[k] = v; - } - if (opt?.each) { - if (!opt.each(cur, scope)) { - break; - } - } - } - - cur = p.treeMeta[cur.parent_id]; - } - - return finalScope; -}; - -const modifyChildIndex = ( - child: ReactNode | ReactNode[], - _scopeIndex: Record -) => { - if (Array.isArray(child)) { - const childs: any[] = []; - for (const c of child) { - childs.push(modifyChildIndex(c, _scopeIndex)); - } - return childs; - } - if (typeof child === "object" && child) { - return { ...child, props: { ...(child as any).props, _scopeIndex } }; - } - return child; -}; - -const createPassProp = ( - p: PG, - id: string, - _existingScopeIndex?: Record -) => { - return function ( - arg: Record & { children: ReactNode; idx?: any } - ) { - const meta = p.treeMeta[id]; - - if (typeof arg.idx !== "undefined" && meta && meta.item && meta.item.id) { - meta.indexedScope[arg.idx] = {}; - - for (const [k, v] of Object.entries(arg)) { - if (k === "children") continue; - meta.indexedScope[arg.idx][k] = v; - } - - const scopeIndex = { ..._existingScopeIndex, [meta.item.id]: arg.idx }; - - if (!meta.scope) { - meta.scope = {}; - } - for (const [k, v] of Object.entries(arg)) { - if (k === "children") continue; - meta.scope[k] = v; - } - - return modifyChildIndex(arg.children, scopeIndex); - } - - if (!meta.scope) { - meta.scope = {}; - } - for (const [k, v] of Object.entries(arg)) { - if (k === "children") continue; - meta.scope[k] = v; - } - return arg.children; - }; -}; - -const cachedLocal = {} as Record>; -const cachedPath = {} as Record>; -const cachedLayout = {} as Record; -const createLocal = ( - p: PG, - id: string, - _existingScopeIndex?: Record -) => { - const Local = ({ - name, - idx: local_id, - value, - effect, - children, - hook, - deps, - cache, - }: { - name: string; - value: any; - idx?: string; - effect?: (value: any) => void | Promise; - children: ReactNode; - hook?: (value: any) => void; - deps?: any[]; - cache?: boolean; - }) => { - const meta = p.treeMeta[id]; - const [_, set] = useState({}); - - let scope = null as any; - if (!local_id) { - if (!meta.scope) { - meta.scope = {}; - } - scope = meta.scope; - } else { - if (!meta.indexedScope) { - meta.indexedScope = {}; - } - if (!meta.indexedScope[local_id]) meta.indexedScope[local_id] = {}; - scope = meta.indexedScope[local_id]; - } - - const render = () => { - if (!local_id) { - if (meta.render) meta.render(); - else p.render(); - } else { - set({}); - } - }; - - const genScope = () => { - try { - const nval = deepClone(value); - - if (!scope[name]) { - scope[name] = { - ...nval, - render, - }; - } else { - for (const [k, v] of Object.entries(nval)) { - scope[name][k] = v; - } - scope[name].render = render; - } - } catch (e) { - console.warn(e); - } - }; - - let page_id = p.page?.id || ""; - const itemid = meta.item.id + (local_id ? `_${local_id}` : ""); - - if (meta.isLayout) { - page_id = "layout"; - if (cachedLayout[meta.item.id]) { - scope[name] = cachedLocal[page_id][itemid]; - scope[name].render = render; - } - } - - if ( - page_id !== "layout" || - (page_id === "layout" && !cachedLayout[meta.item.id]) - ) { - if (!cachedLocal[page_id]) { - cachedLocal[page_id] = {}; - } - if (!cachedPath[page_id]) { - cachedPath[page_id] = {}; - } - if (cachedLocal[page_id][itemid]) { - if (cache === false) { - if (cachedPath[page_id][itemid] !== location.href) { - cachedPath[page_id][itemid] = location.href; - genScope(); - cachedLocal[page_id][itemid] = scope[name]; - } else { - scope[name] = cachedLocal[page_id][itemid]; - scope[name].render = render; - } - } else { - scope[name] = cachedLocal[page_id][itemid]; - scope[name].render = render; - } - } else { - genScope(); - cachedLocal[page_id][itemid] = scope[name]; - cachedPath[page_id][itemid] = location.href; - } - } - - if (typeof hook === "function") { - try { - hook(scope[name]); - } catch (e) { - console.warn(e); - } - } - - useEffect(() => { - if (effect) { - if (meta.isLayout) { - if (cachedLayout[meta.item.id]) { - return; - } - cachedLayout[meta.item.id] = true; - } - try { - effect(scope[name]); - } catch (e) { - console.warn(e); - } - } - }, [...(deps || []), location.href]); - - if (local_id) { - const scopeIndex = { ..._existingScopeIndex, [meta.item.id]: local_id }; - return modifyChildIndex(children, scopeIndex); - } - return children; - }; - - return Local; -}; diff --git a/app/web/src/render/site/mobile-loader.tsx b/app/web/src/render/site/mobile-loader.tsx deleted file mode 100644 index 39c6ec07..00000000 --- a/app/web/src/render/site/mobile-loader.tsx +++ /dev/null @@ -1,66 +0,0 @@ -import { w } from "../../utils/types/general"; -import { Loader } from "../live/logic/global"; - -const cache = { - site: null as any, - pages: [] as any, - api: null, - npm_pages: [] as string[], -}; - -export const mobileLoader: Loader = { - async site(p, id) { - const res = (await load(`/content/site/site.json`)) as any; - cache.site = res; - - const pages = (await load(`/content/site/pages.json`)) as any; - cache.pages = pages; - - const npm_pages = (await load(`/content/site/npm_pages.json`)) as any; - cache.npm_pages = npm_pages; - - w.serverurl = res.config.api_url; - w.apiurl = res.config.api_url; - - w.prasiApi = { - [res.config.api_url]: { apiEntry: res.api }, - }; - - return res; - }, - async comp(p, id) { - const comp = (await load(`/content/comps/${id}.json`)) as any; - p.comps.all[id] = comp; - return comp; - }, - npm(p, type, id) { - if (type === "site") return `/content/npm/site/index.js`; - if (cache.npm_pages.includes(id)) { - return `/content/npm/pages/${id}/index.js`; - } - return ""; - }, - async page(p, id) { - const page = cache.pages.find((x: any) => x.id === id); - if (page && !page.content_tree) { - const res = (await load(`/content/pages/${id}.json`)) as any; - - return res; - } - return null; - }, - async pages(p, id) { - return cache.pages; - }, -}; - -const load = async (url: string) => { - const res = await fetch(`${(w as any).mobilepath}${url}`); - try { - const text = await res.text(); - const json = JSON.parse(text); - return json; - } catch (e) { - return null; - } -}; diff --git a/app/web/src/render/site/site-loader.tsx b/app/web/src/render/site/site-loader.tsx deleted file mode 100644 index 33963443..00000000 --- a/app/web/src/render/site/site-loader.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { w } from "../../utils/types/general"; -import { Loader } from "../live/logic/global"; - -const base = `/_web/${(window as any).id_site}`; - -const cache = { site: null as any, pages: [] as any, api: null }; - -export const siteLoader: Loader = { - async site(p, id) { - const res = (await load(`/site?prod=1`)) as { - site: any; - pages: any; - api: any; - }; - cache.site = res.site; - cache.pages = res.pages; - cache.api = res.api; - - w.serverurl = res.site.config.api_url; - w.apiurl = res.site.config.api_url; - - w.prasiApi = { - [res.site.config.api_url]: { apiEntry: res.api }, - }; - - return res.site; - }, - async comp(p, id) { - const comp = (await load(`/comp/${id}`)) as any; - p.comps.all[id] = comp; - return comp; - }, - npm(p, type, id) { - if (type === "site") return `/_web/${cache.site.id}/npm-site/site.js`; - return `/_web/${cache.site.id}/npm-page/${id}/page.js`; - }, - async page(p, id) { - const page = cache.pages.find((x: any) => x.id === id); - if (page && !page.content_tree) { - const res = (await load(`/page/${id}`)) as any; - return res; - } - return null; - }, - async pages(p, id) { - return cache.pages; - }, -}; - -const load = async (url: string) => { - const res = await fetch(`${base}${url}`); - try { - const text = await res.text(); - const json = JSON.parse(text); - return json; - } catch (e) { - return null; - } -}; diff --git a/app/web/src/render/site/site.tsx b/app/web/src/render/site/site.tsx deleted file mode 100644 index 6f905cf1..00000000 --- a/app/web/src/render/site/site.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import { FC, useState } from "react"; -import { createRoot } from "react-dom/client"; -import { GlobalContext, defineReact, defineWindow } from "web-utils"; -import { siteLoader } from "./site-loader"; -import { registerMobile } from "../live/logic/mobile"; -import { mobileLoader } from "./mobile-loader"; - -const w = window as unknown as { - prasiContext: any; - rootRender: any; - mobile: any; - mobilepath?: any; -}; - -if (!w.mobile) { - w.mobile = registerMobile(); -} - -w.prasiContext = { - global: {}, - render() {}, -}; - -const Root: FC<{ url: URL; Live: any }> = ({ url, Live }) => { - const [_, render] = useState({}); - w.prasiContext.render = () => { - render({}); - }; - - const Provider = GlobalContext.Provider as FC<{ value: any; children: any }>; - return ( - - - - ); -}; - -(async () => { - const div = document.getElementById("root"); - if (div) { - const root = createRoot(div); - const url = new URL(location.href); - await defineWindow(false); - defineReact(); - const { Live } = await import("../live/live"); - root.render(); - if (document.body.classList.contains("opacity-0")) { - document.body.classList.remove("opacity-0"); - } - } -})(); diff --git a/app/web/src/utils/types/general.ts b/app/web/src/utils/types/general.ts index cb585ab5..0c7d0663 100644 --- a/app/web/src/utils/types/general.ts +++ b/app/web/src/utils/types/general.ts @@ -61,7 +61,7 @@ export type MPage = TypedDoc<{ }>; export type IContent = ISection | IItem | IText; -export type MContent = MSection | MItem | MText; +export type MContent = MItem; export type RenderContentProp = Partial<{ active: IContent | null;