diff --git a/app/srv/core/main.js b/app/srv/core/main.js index b69cbf85..699edaca 100644 --- a/app/srv/core/main.js +++ b/app/srv/core/main.js @@ -1,11 +1,11 @@ -var Cv=Object.create;var La=Object.defineProperty;var Tv=Object.getOwnPropertyDescriptor;var Iv=Object.getOwnPropertyNames;var Nv=Object.getPrototypeOf,Ov=Object.prototype.hasOwnProperty;var ie=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Pv=(e,t)=>{for(var n in t)La(e,n,{get:t[n],enumerable:!0})},Av=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Iv(t))!Ov.call(e,i)&&i!==n&&La(e,i,{get:()=>t[i],enumerable:!(r=Tv(t,i))||r.enumerable});return e};var P=(e,t,n)=>(n=e!=null?Cv(Nv(e)):{},Av(t||!e||!e.__esModule?La(n,"default",{value:e,enumerable:!0}):n,e));var op=ie(j=>{"use strict";var ki=Symbol.for("react.element"),Lv=Symbol.for("react.portal"),zv=Symbol.for("react.fragment"),Mv=Symbol.for("react.strict_mode"),Dv=Symbol.for("react.profiler"),jv=Symbol.for("react.provider"),Fv=Symbol.for("react.context"),Uv=Symbol.for("react.forward_ref"),Bv=Symbol.for("react.suspense"),$v=Symbol.for("react.memo"),Hv=Symbol.for("react.lazy"),Qd=Symbol.iterator;function Vv(e){return e===null||typeof e!="object"?null:(e=Qd&&e[Qd]||e["@@iterator"],typeof e=="function"?e:null)}var Yd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jd=Object.assign,ep={};function vr(e,t,n){this.props=e,this.context=t,this.refs=ep,this.updater=n||Yd}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 tp(){}tp.prototype=vr.prototype;function Ma(e,t,n){this.props=e,this.context=t,this.refs=ep,this.updater=n||Yd}var Da=Ma.prototype=new tp;Da.constructor=Ma;Jd(Da,vr.prototype);Da.isPureReactComponent=!0;var Xd=Array.isArray,np=Object.prototype.hasOwnProperty,ja={current:null},rp={key:!0,ref:!0,__self:!0,__source:!0};function ip(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)np.call(t,r)&&!rp.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1{"use strict";lp.exports=op()});var gp=ie(K=>{"use strict";function Ha(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rdl(s,n))udl(a,s)?(e[r]=a,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else if(udl(a,n))e[r]=a,e[u]=n,r=u;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"?(sp=performance,K.unstable_now=function(){return sp.now()}):(Ua=Date,ap=Ua.now(),K.unstable_now=function(){return Ua.now()-ap});var sp,Ua,ap,Et=[],sn=[],Qv=1,tt=null,ke=3,hl=!1,$n=!1,Ei=!1,fp=typeof setTimeout=="function"?setTimeout:null,dp=typeof clearTimeout=="function"?clearTimeout:null,up=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Va(e){for(var t=mt(sn);t!==null;){if(t.callback===null)ml(sn);else if(t.startTime<=e)ml(sn),t.sortIndex=t.expirationTime,Ha(Et,t);else break;t=mt(sn)}}function Wa(e){if(Ei=!1,Va(e),!$n)if(mt(Et)!==null)$n=!0,Za(Ga);else{var t=mt(sn);t!==null&&Ka(Wa,t.startTime-e)}}function Ga(e,t){$n=!1,Ei&&(Ei=!1,dp(bi),bi=-1),hl=!0;var n=ke;try{for(Va(t),tt=mt(Et);tt!==null&&(!(tt.expirationTime>t)||e&&!hp());){var r=tt.callback;if(typeof r=="function"){tt.callback=null,ke=tt.priorityLevel;var i=r(tt.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?tt.callback=i:tt===mt(Et)&&ml(Et),Va(t)}else ml(Et);tt=mt(Et)}if(tt!==null)var o=!0;else{var l=mt(sn);l!==null&&Ka(Wa,l.startTime-t),o=!1}return o}finally{tt=null,ke=n,hl=!1}}var gl=!1,pl=null,bi=-1,pp=5,mp=-1;function hp(){return!(K.unstable_now()-mpe||125r?(e.sortIndex=n,Ha(sn,e),mt(Et)===null&&e===mt(sn)&&(Ei?(dp(bi),bi=-1):Ei=!0,Ka(Wa,n-r))):(e.sortIndex=i,Ha(Et,e),$n||hl||($n=!0,Za(Ga))),e};K.unstable_shouldYield=hp;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 _p=ie((MC,yp)=>{"use strict";yp.exports=gp()});var E0=ie(qe=>{"use strict";var bm=ge(),Qe=_p();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"),yu=Object.prototype.hasOwnProperty,Xv=/^[: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]*$/,vp={},wp={};function qv(e){return yu.call(wp,e)?!0:yu.call(vp,e)?!1:Xv.test(e)?wp[e]=!0:(vp[e]=!0,!1)}function Yv(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 Jv(e,t,n,r){if(t===null||typeof t>"u"||Yv(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 Pe(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 Pe(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 Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Pe(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 Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var uc=/[\-:]([a-z])/g;function cc(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(uc,cc);ve[t]=new Pe(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(uc,cc);ve[t]=new Pe(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(uc,cc);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function fc(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),Pv=(e,t)=>{for(var n in t)La(e,n,{get:t[n],enumerable:!0})},Av=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Iv(t))!Ov.call(e,i)&&i!==n&&La(e,i,{get:()=>t[i],enumerable:!(r=Tv(t,i))||r.enumerable});return e};var P=(e,t,n)=>(n=e!=null?Cv(Nv(e)):{},Av(t||!e||!e.__esModule?La(n,"default",{value:e,enumerable:!0}):n,e));var op=ie(j=>{"use strict";var Si=Symbol.for("react.element"),Lv=Symbol.for("react.portal"),zv=Symbol.for("react.fragment"),Mv=Symbol.for("react.strict_mode"),Dv=Symbol.for("react.profiler"),jv=Symbol.for("react.provider"),Fv=Symbol.for("react.context"),Uv=Symbol.for("react.forward_ref"),Bv=Symbol.for("react.suspense"),$v=Symbol.for("react.memo"),Hv=Symbol.for("react.lazy"),Qd=Symbol.iterator;function Vv(e){return e===null||typeof e!="object"?null:(e=Qd&&e[Qd]||e["@@iterator"],typeof e=="function"?e:null)}var Yd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jd=Object.assign,ep={};function vr(e,t,n){this.props=e,this.context=t,this.refs=ep,this.updater=n||Yd}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 tp(){}tp.prototype=vr.prototype;function Ma(e,t,n){this.props=e,this.context=t,this.refs=ep,this.updater=n||Yd}var Da=Ma.prototype=new tp;Da.constructor=Ma;Jd(Da,vr.prototype);Da.isPureReactComponent=!0;var Xd=Array.isArray,np=Object.prototype.hasOwnProperty,ja={current:null},rp={key:!0,ref:!0,__self:!0,__source:!0};function ip(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)np.call(t,r)&&!rp.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1{"use strict";lp.exports=op()});var gp=ie(K=>{"use strict";function Ha(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rdl(s,n))udl(a,s)?(e[r]=a,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else if(udl(a,n))e[r]=a,e[u]=n,r=u;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"?(sp=performance,K.unstable_now=function(){return sp.now()}):(Ua=Date,ap=Ua.now(),K.unstable_now=function(){return Ua.now()-ap});var sp,Ua,ap,Et=[],sn=[],Qv=1,tt=null,ke=3,hl=!1,$n=!1,bi=!1,fp=typeof setTimeout=="function"?setTimeout:null,dp=typeof clearTimeout=="function"?clearTimeout:null,up=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Va(e){for(var t=mt(sn);t!==null;){if(t.callback===null)ml(sn);else if(t.startTime<=e)ml(sn),t.sortIndex=t.expirationTime,Ha(Et,t);else break;t=mt(sn)}}function Wa(e){if(bi=!1,Va(e),!$n)if(mt(Et)!==null)$n=!0,Za(Ga);else{var t=mt(sn);t!==null&&Ka(Wa,t.startTime-e)}}function Ga(e,t){$n=!1,bi&&(bi=!1,dp(Ri),Ri=-1),hl=!0;var n=ke;try{for(Va(t),tt=mt(Et);tt!==null&&(!(tt.expirationTime>t)||e&&!hp());){var r=tt.callback;if(typeof r=="function"){tt.callback=null,ke=tt.priorityLevel;var i=r(tt.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?tt.callback=i:tt===mt(Et)&&ml(Et),Va(t)}else ml(Et);tt=mt(Et)}if(tt!==null)var o=!0;else{var l=mt(sn);l!==null&&Ka(Wa,l.startTime-t),o=!1}return o}finally{tt=null,ke=n,hl=!1}}var gl=!1,pl=null,Ri=-1,pp=5,mp=-1;function hp(){return!(K.unstable_now()-mpe||125r?(e.sortIndex=n,Ha(sn,e),mt(Et)===null&&e===mt(sn)&&(bi?(dp(Ri),Ri=-1):bi=!0,Ka(Wa,n-r))):(e.sortIndex=i,Ha(Et,e),$n||hl||($n=!0,Za(Ga))),e};K.unstable_shouldYield=hp;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 _p=ie((MC,yp)=>{"use strict";yp.exports=gp()});var E0=ie(qe=>{"use strict";var bm=ge(),Qe=_p();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"),yu=Object.prototype.hasOwnProperty,Xv=/^[: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]*$/,vp={},wp={};function qv(e){return yu.call(wp,e)?!0:yu.call(vp,e)?!1:Xv.test(e)?wp[e]=!0:(vp[e]=!0,!1)}function Yv(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 Jv(e,t,n,r){if(t===null||typeof t>"u"||Yv(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 Pe(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 Pe(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 Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ve[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ve[e]=new Pe(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 Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ve[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ve[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ve[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ve[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var uc=/[\-:]([a-z])/g;function cc(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(uc,cc);ve[t]=new Pe(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(uc,cc);ve[t]=new Pe(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(uc,cc);ve[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});ve.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ve[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function fc(e,t,n,r){var i=ve.hasOwnProperty(t)?ve[t]:null;(i!==null?i.type!==0:r||!(2s||i[l]!==o[s]){var u=` -`+i[l].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=s);break}}}finally{Xa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Li(e):""}function ew(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 xu(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 _u:return"Profiler";case dc:return"StrictMode";case vu:return"Suspense";case wu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Tm:return(e.displayName||"Context")+".Consumer";case Cm:return(e._context.displayName||"Context")+".Provider";case pc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mc:return t=e.displayName||null,t!==null?t:xu(e.type)||"Memo";case un:t=e._payload,e=e._init;try{return xu(e(t))}catch{}}return null}function tw(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 xu(t);case 8:return t===dc?"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 Sn(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 nw(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=nw(e))}function Om(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 Gl(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 ku(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function kp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sn(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 Pm(e,t){t=t.checked,t!=null&&fc(e,"checked",t,!1)}function Su(e,t){Pm(e,t);var n=Sn(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")?Eu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Eu(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sp(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 Eu(e,t,n){(t!=="number"||Gl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zi=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},rw=["Webkit","ms","Moz","O"];Object.keys(ji).forEach(function(e){rw.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 Dm(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 iw=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 Cu(e,t){if(t){if(iw[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 Tu(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 Iu=null;function hc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nu=null,zr=null,Mr=null;function Rp(e){if(e=po(e)){if(typeof Nu!="function")throw Error(E(280));var t=e.stateNode;t&&(t=ws(t),Nu(e.stateNode,e.type,t))}}function jm(e){zr?Mr?Mr.push(e):Mr=[e]:zr=e}function Fm(){if(zr){var e=zr,t=Mr;if(Mr=zr=null,Rp(e),t)for(e=0;e>>=0,e===0?32:31-(hw(e)/gw|0)|0}var wl=64,xl=4194304;function Mi(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=Mi(s):(o&=l,o!==0&&(r=Mi(o)))}else l=n&~i,l!==0?r=Mi(l):o!==0&&(r=Mi(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-vt(t),e[t]=n}function ww(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),zp=" ",Mp=!1;function oh(e,t){switch(e){case"keyup":return Kw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Er=!1;function Xw(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return t.which!==32?null:(Mp=!0,zp);case"textInput":return e=t.data,e===zp&&Mp?null:e;default:return null}}function qw(e,t){if(Er)return e==="compositionend"||!Sc&&oh(e,t)?(e=rh(),Dl=wc=pn=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=Fp(n)}}function ch(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ch(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fh(){for(var e=window,t=Gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gl(e.document)}return t}function Ec(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 lx(e){var t=fh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ch(n.ownerDocument.documentElement,n)){if(r!==null&&Ec(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=Up(n,o);var l=Up(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,Mu=null,$i=null,Du=!1;function Bp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Du||br==null||br!==Gl(r)||(r=br,"selectionStart"in r&&Ec(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(Mu,"onSelect"),0Tr||(e.current=Hu[Tr],Hu[Tr]=null,Tr--)}function Q(e,t){Tr++,Hu[Tr]=e.current,e.current=t}var En={},Re=Rn(En),Ue=Rn(!1),Xn=En;function Br(e,t){var n=e.type.contextTypes;if(!n)return En;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 Xp(e,t,n){if(Re.current!==En)throw Error(E(168));Q(Re,t),Q(Ue,n)}function wh(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,tw(e)||"Unknown",i));return re({},n,r)}function ns(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||En,Xn=Re.current,Q(Re,e),Q(Ue,Ue.current),!0}function qp(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=wh(e,t,Xn),r.__reactInternalMemoizedMergedChildContext=e,Y(Ue),Y(Re),Q(Re,e)):Y(Ue),Q(Ue,n)}var Ut=null,xs=!1,au=!1;function xh(e){Ut===null?Ut=[e]:Ut.push(e)}function yx(e){xs=!0,xh(e)}function Cn(){if(!au&&Ut!==null){au=!0;var e=0,t=W;try{var n=Ut;for(W=1;e>=l,i-=l,Bt=1<<32-vt(t)+i|n<b?(N=k,k=null):N=k.sibling;var C=d(h,k,y[b],v);if(C===null){k===null&&(k=N);break}e&&k&&C.alternate===null&&t(h,k),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C,k=N}if(b===y.length)return n(h,k),J&&Hn(h,b),S;if(k===null){for(;bb?(N=k,k=null):N=k.sibling;var O=d(h,k,C.value,v);if(O===null){k===null&&(k=N);break}e&&k&&O.alternate===null&&t(h,k),m=o(O,m,b),R===null?S=O:R.sibling=O,R=O,k=N}if(C.done)return n(h,k),J&&Hn(h,b),S;if(k===null){for(;!C.done;b++,C=y.next())C=f(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(De){return t(h,De)}),J&&Hn(h,b),S}function w(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===un&&im(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===Sr?(m=Qn(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=Ni(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=gu(y,h.mode,v),m.return=h,h=m}return l(h);case un:return R=y._init,w(h,m,R(y._payload),v)}if(zi(y))return g(h,m,y,v);if(Ri(y))return _(h,m,y,v);Pl(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=hu(y,h.mode,v),m.return=h,h=m),l(h)):n(h,m)}return w}var Hr=Ih(!0),Nh=Ih(!1),mo={},It=Rn(mo),io=Rn(mo),oo=Rn(mo);function Zn(e){if(e===mo)throw Error(E(174));return e}function Ac(e,t){switch(Q(oo,t),Q(io,e),Q(It,mo),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ru(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ru(t,e)}Y(It),Q(It,t)}function Vr(){Y(It),Y(io),Y(oo)}function Oh(e){Zn(oo.current);var t=Zn(It.current),n=Ru(t,e.type);t!==n&&(Q(io,e),Q(It,n))}function Lc(e){io.current===e&&(Y(It),Y(io))}var te=Rn(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 uu=[];function zc(){for(var e=0;en?n:4,e(!0);var r=cu.transition;cu.transition={};try{e(!1),t()}finally{W=n,cu.transition=r}}function Zh(){return st().memoizedState}function xx(e,t,n){var r=xn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Kh(e))Qh(t,n);else if(n=bh(e,t,n,r),n!==null){var i=Oe();wt(n,e,r,i),Xh(n,t,r)}}function kx(e,t,n){var r=xn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kh(e))Qh(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,xt(s,l)){var u=t.interleaved;u===null?(i.next=i,Oc(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=bh(e,t,i,r),n!==null&&(i=Oe(),wt(n,e,r,i),Xh(n,t,r))}}function Kh(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Qh(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 Xh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yc(e,n)}}var cs={readContext:lt,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},Sx={readContext:lt,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:lm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Bl(4194308,4,$h.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=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();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=xx.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:om,useDebugValue:Uc,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=om(!1),t=e[0];return e=wx.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=Rt();if(J){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),me===null)throw Error(E(349));Yn&30||Lh(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,lm(Mh.bind(null,r,o,e),[e]),r.flags|=2048,ao(9,zh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Rt(),t=me.identifierPrefix;if(J){var n=$t,r=Bt;n=(r&~(1<<32-vt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=lo++,0")&&(u=u.replace("",e.displayName)),u}while(1<=l&&0<=s);break}}}finally{Xa=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zi(e):""}function ew(e){switch(e.tag){case 5:return zi(e.type);case 16:return zi("Lazy");case 13:return zi("Suspense");case 19:return zi("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 xu(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 _u:return"Profiler";case dc:return"StrictMode";case vu:return"Suspense";case wu:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Tm:return(e.displayName||"Context")+".Consumer";case Cm:return(e._context.displayName||"Context")+".Provider";case pc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mc:return t=e.displayName||null,t!==null?t:xu(e.type)||"Memo";case un:t=e._payload,e=e._init;try{return xu(e(t))}catch{}}return null}function tw(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 xu(t);case 8:return t===dc?"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 Sn(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 nw(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=nw(e))}function Om(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 Gl(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 ku(e,t){var n=t.checked;return re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function kp(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sn(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 Pm(e,t){t=t.checked,t!=null&&fc(e,"checked",t,!1)}function Su(e,t){Pm(e,t);var n=Sn(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")?Eu(e,t.type,n):t.hasOwnProperty("defaultValue")&&Eu(e,t.type,Sn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Sp(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 Eu(e,t,n){(t!=="number"||Gl(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 Qi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fi={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},rw=["Webkit","ms","Moz","O"];Object.keys(Fi).forEach(function(e){rw.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Fi[t]=Fi[e]})});function Mm(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Fi.hasOwnProperty(e)&&Fi[e]?(""+t).trim():t+"px"}function Dm(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 iw=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 Cu(e,t){if(t){if(iw[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 Tu(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 Iu=null;function hc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Nu=null,zr=null,Mr=null;function Rp(e){if(e=mo(e)){if(typeof Nu!="function")throw Error(E(280));var t=e.stateNode;t&&(t=ws(t),Nu(e.stateNode,e.type,t))}}function jm(e){zr?Mr?Mr.push(e):Mr=[e]:zr=e}function Fm(){if(zr){var e=zr,t=Mr;if(Mr=zr=null,Rp(e),t)for(e=0;e>>=0,e===0?32:31-(hw(e)/gw|0)|0}var wl=64,xl=4194304;function Di(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=Di(s):(o&=l,o!==0&&(r=Di(o)))}else l=n&~i,l!==0?r=Di(l):o!==0&&(r=Di(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 fo(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=n}function ww(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=Bi),zp=" ",Mp=!1;function oh(e,t){switch(e){case"keyup":return Kw.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Er=!1;function Xw(e,t){switch(e){case"compositionend":return lh(t);case"keypress":return t.which!==32?null:(Mp=!0,zp);case"textInput":return e=t.data,e===zp&&Mp?null:e;default:return null}}function qw(e,t){if(Er)return e==="compositionend"||!Sc&&oh(e,t)?(e=rh(),Dl=wc=pn=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=Fp(n)}}function ch(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ch(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function fh(){for(var e=window,t=Gl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Gl(e.document)}return t}function Ec(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 lx(e){var t=fh(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ch(n.ownerDocument.documentElement,n)){if(r!==null&&Ec(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=Up(n,o);var l=Up(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,Mu=null,Hi=null,Du=!1;function Bp(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Du||br==null||br!==Gl(r)||(r=br,"selectionStart"in r&&Ec(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}),Hi&&to(Hi,r)||(Hi=r,r=Jl(Mu,"onSelect"),0Tr||(e.current=Hu[Tr],Hu[Tr]=null,Tr--)}function Q(e,t){Tr++,Hu[Tr]=e.current,e.current=t}var En={},Re=Rn(En),Ue=Rn(!1),Xn=En;function Br(e,t){var n=e.type.contextTypes;if(!n)return En;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 Xp(e,t,n){if(Re.current!==En)throw Error(E(168));Q(Re,t),Q(Ue,n)}function wh(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,tw(e)||"Unknown",i));return re({},n,r)}function ns(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||En,Xn=Re.current,Q(Re,e),Q(Ue,Ue.current),!0}function qp(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=wh(e,t,Xn),r.__reactInternalMemoizedMergedChildContext=e,Y(Ue),Y(Re),Q(Re,e)):Y(Ue),Q(Ue,n)}var Ut=null,xs=!1,au=!1;function xh(e){Ut===null?Ut=[e]:Ut.push(e)}function yx(e){xs=!0,xh(e)}function Cn(){if(!au&&Ut!==null){au=!0;var e=0,t=W;try{var n=Ut;for(W=1;e>=l,i-=l,Bt=1<<32-vt(t)+i|n<b?(N=k,k=null):N=k.sibling;var C=d(h,k,y[b],v);if(C===null){k===null&&(k=N);break}e&&k&&C.alternate===null&&t(h,k),m=o(C,m,b),R===null?S=C:R.sibling=C,R=C,k=N}if(b===y.length)return n(h,k),J&&Hn(h,b),S;if(k===null){for(;bb?(N=k,k=null):N=k.sibling;var O=d(h,k,C.value,v);if(O===null){k===null&&(k=N);break}e&&k&&O.alternate===null&&t(h,k),m=o(O,m,b),R===null?S=O:R.sibling=O,R=O,k=N}if(C.done)return n(h,k),J&&Hn(h,b),S;if(k===null){for(;!C.done;b++,C=y.next())C=f(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(De){return t(h,De)}),J&&Hn(h,b),S}function w(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===un&&im(S)===R.type){n(h,R.sibling),m=i(R,y.props),m.ref=Oi(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=Qn(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=Oi(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=gu(y,h.mode,v),m.return=h,h=m}return l(h);case un:return R=y._init,w(h,m,R(y._payload),v)}if(Mi(y))return g(h,m,y,v);if(Ci(y))return _(h,m,y,v);Pl(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=hu(y,h.mode,v),m.return=h,h=m),l(h)):n(h,m)}return w}var Hr=Ih(!0),Nh=Ih(!1),ho={},It=Rn(ho),oo=Rn(ho),lo=Rn(ho);function Zn(e){if(e===ho)throw Error(E(174));return e}function Ac(e,t){switch(Q(lo,t),Q(oo,e),Q(It,ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ru(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ru(t,e)}Y(It),Q(It,t)}function Vr(){Y(It),Y(oo),Y(lo)}function Oh(e){Zn(lo.current);var t=Zn(It.current),n=Ru(t,e.type);t!==n&&(Q(oo,e),Q(It,n))}function Lc(e){oo.current===e&&(Y(It),Y(oo))}var te=Rn(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 uu=[];function zc(){for(var e=0;en?n:4,e(!0);var r=cu.transition;cu.transition={};try{e(!1),t()}finally{W=n,cu.transition=r}}function Zh(){return st().memoizedState}function xx(e,t,n){var r=xn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Kh(e))Qh(t,n);else if(n=bh(e,t,n,r),n!==null){var i=Oe();wt(n,e,r,i),Xh(n,t,r)}}function kx(e,t,n){var r=xn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Kh(e))Qh(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,xt(s,l)){var u=t.interleaved;u===null?(i.next=i,Oc(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=bh(e,t,i,r),n!==null&&(i=Oe(),wt(n,e,r,i),Xh(n,t,r))}}function Kh(e){var t=e.alternate;return e===ne||t!==null&&t===ne}function Qh(e,t){Vi=us=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,yc(e,n)}}var cs={readContext:lt,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},Sx={readContext:lt,useCallback:function(e,t){return Rt().memoizedState=[e,t===void 0?null:t],e},useContext:lt,useEffect:lm,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Bl(4194308,4,$h.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=Rt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rt();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=xx.bind(null,ne,e),[r.memoizedState,e]},useRef:function(e){var t=Rt();return e={current:e},t.memoizedState=e},useState:om,useDebugValue:Uc,useDeferredValue:function(e){return Rt().memoizedState=e},useTransition:function(){var e=om(!1),t=e[0];return e=wx.bind(null,e[1]),Rt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ne,i=Rt();if(J){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),me===null)throw Error(E(349));Yn&30||Lh(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,lm(Mh.bind(null,r,o,e),[e]),r.flags|=2048,uo(9,zh.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Rt(),t=me.identifierPrefix;if(J){var n=$t,r=Bt;n=(r&~(1<<32-vt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=so++,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[Ct]=t,e[ro]=r,o0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Tu(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;iGr&&(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&&!J)return Ee(t),null}else 2*le()-o.renderingStartTime>Gr&&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 Gc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ge&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 Ox(e,t){switch(Rc(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),zc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lc(t),null;case 13:if(Y(te),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(te),null;case 4:return Vr(),null;case 10:return Nc(t.type._context),null;case 22:case 23:return Gc(),null;case 24:return null;default:return null}}var Ll=!1,be=!1,Px=typeof WeakSet=="function"?WeakSet:Set,I=null;function Pr(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 tc(e,t,n){try{n()}catch(r){oe(e,t,r)}}var hm=!1;function Ax(e,t){if(ju=ql,e=fh(),Ec(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,u=-1,a=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=l+i),f!==o||r!==0&&f.nodeType!==3||(u=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++a===i&&(s=l),d===o&&++c===r&&(u=l),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fu={focusedElem:e,selectionRange:n},ql=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;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,w=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?_:gt(t.type,_),w);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,I=e;break}I=t.return}return g=hm,hm=!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&&tc(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 nc(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 a0(e){var t=e.alternate;t!==null&&(e.alternate=null,a0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[ro],delete t[$u],delete t[hx],delete t[gx])),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 u0(e){return e.tag===5||e.tag===3||e.tag===4}function gm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||u0(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 rc(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(rc(e,t,n),e=e.sibling;e!==null;)rc(e,t,n),e=e.sibling}function ic(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(ic(e,t,n),e=e.sibling;e!==null;)ic(e,t,n),e=e.sibling}var ye=null,yt=!1;function an(e,t,n){for(n=n.child;n!==null;)c0(e,t,n),n=n.sibling}function c0(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(gs,n)}catch{}switch(n.tag){case 5:be||Pr(n,t);case 6:var r=ye,i=yt;ye=null,an(e,t,n),ye=r,yt=i,ye!==null&&(yt?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(yt?(e=ye,n=n.stateNode,e.nodeType===8?su(e.parentNode,n):e.nodeType===1&&su(e,n),Yi(e)):su(ye,n.stateNode));break;case 4:r=ye,i=yt,ye=n.stateNode.containerInfo,yt=!0,an(e,t,n),ye=r,yt=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)&&tc(n,t,l),i=i.next}while(i!==r)}an(e,t,n);break;case 1:if(!be&&(Pr(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)}an(e,t,n);break;case 21:an(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,an(e,t,n),be=r):an(e,t,n);break;default:an(e,t,n)}}function ym(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Px),t.forEach(function(r){var i=$x.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ht(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*zx(r/1960))-r,10e?16:e,mn===null)var r=!1;else{if(e=mn,mn=null,ps=0,B&6)throw Error(E(331));var i=B;for(B|=4,I=e.current;I!==null;){var o=I,l=o.child;if(I.flags&16){var s=o.deletions;if(s!==null){for(var u=0;ule()-Vc?Kn(e,0):Hc|=n),$e(e,t)}function _0(e,t){t===0&&(e.mode&1?(t=xl,xl<<=1,!(xl&130023424)&&(xl=4194304)):t=1);var n=Oe();e=Gt(e,t),e!==null&&(co(e,t,n),$e(e,n))}function Bx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_0(e,n)}function $x(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),_0(e,n)}var v0;v0=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,Ix(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,J&&t.flags&1048576&&kh(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=Dc(null,t,r,e,i,n);var o=jc();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,Pc(t),i.updater=ks,t.stateNode=i,i._reactInternals=t,Ku(t,r,e,n),t=qu(null,t,r,!0,o,n)):(t.tag=0,J&&o&&bc(t),Ne(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=Vx(r),e=gt(r,e),i){case 0:t=Xu(null,t,r,e,n);break e;case 1:t=dm(null,t,r,e,n);break e;case 11:t=cm(null,t,r,e,n);break e;case 14:t=fm(null,t,r,gt(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:gt(r,i),Xu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),dm(e,t,r,i,n);case 3:e:{if(n0(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Rh(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=pm(e,t,r,n,i);break e}else if(r!==i){i=Wr(Error(E(424)),t),t=pm(e,t,r,n,i);break e}else for(Ze=_n(t.stateNode.containerInfo.firstChild),Ke=t,J=!0,_t=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}Ne(e,t,r,n)}t=t.child}return t;case 5:return Oh(t),e===null&&Wu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Uu(r,i)?l=null:o!==null&&Uu(r,o)&&(t.flags|=32),t0(e,t),Ne(e,t,l,n),t.child;case 6:return e===null&&Wu(t),null;case 13:return r0(e,t,n);case 4:return Ac(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hr(t,null,r,n):Ne(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),cm(e,t,r,i,n);case 7:return Ne(e,t,t.pendingProps,n),t.child;case 8:return Ne(e,t,t.pendingProps.children,n),t.child;case 12:return Ne(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(xt(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 u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Ht(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Gu(o.return,n,t),s.lanes|=n;break}u=u.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),Gu(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}Ne(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jr(t,n),i=lt(i),r=r(i),t.flags|=1,Ne(e,t,r,n),t.child;case 14:return r=t.type,i=gt(r,t.pendingProps),i=gt(r.type,i),fm(e,t,r,i,n);case 15:return Jh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),$l(e,t),t.tag=1,Be(r)?(e=!0,ns(t)):e=!1,jr(t,n),Th(t,r,i),Ku(t,r,i,n),qu(null,t,r,!0,e,n);case 19:return i0(e,t,n);case 22:return e0(e,t,n)}throw Error(E(156,t.tag))};function w0(e,t){return Gm(e,t)}function Hx(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 it(e,t,n,r){return new Hx(e,t,n,r)}function Kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vx(e){if(typeof e=="function")return Kc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pc)return 11;if(e===mc)return 14}return 2}function kn(e,t){var n=e.alternate;return n===null?(n=it(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")Kc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Sr:return Qn(n.children,i,o,t);case dc:l=8,i|=8;break;case _u:return e=it(12,n,t,i|2),e.elementType=_u,e.lanes=o,e;case vu:return e=it(13,n,t,i),e.elementType=vu,e.lanes=o,e;case wu:return e=it(19,n,t,i),e.elementType=wu,e.lanes=o,e;case Im:return Rs(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cm:l=10;break e;case Tm:l=9;break e;case pc:l=11;break e;case mc:l=14;break e;case un:l=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=it(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Qn(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function Rs(e,t,n,r){return e=it(22,e,r,t),e.elementType=Im,e.lanes=n,e.stateNode={isHidden:!1},e}function hu(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function gu(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wx(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=Ja(0),this.expirationTimes=Ja(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ja(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Qc(e,t,n,r,i,o,l,s,u){return e=new Wx(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=it(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pc(o),e}function Gx(e,t,n){var r=3{"use strict";function b0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b0)}catch(e){console.error(e)}}b0(),R0.exports=E0()});var T0=ie(ef=>{"use strict";var C0=Jc();ef.createRoot=C0.createRoot,ef.hydrateRoot=C0.hydrateRoot;var FC});var N0=ie(nf=>{"use strict";var Yx=Symbol.for("react.fragment");nf.Fragment=Yx;nf.jsxDEV=void 0});var P0=ie((KC,O0)=>{"use strict";O0.exports=N0()});var L0=ie(Os=>{"use strict";var Jx=ge(),ek=Symbol.for("react.element"),tk=Symbol.for("react.fragment"),nk=Object.prototype.hasOwnProperty,rk=Jx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ik={key:!0,ref:!0,__self:!0,__source:!0};function A0(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)nk.call(t,r)&&!ik.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:ek,type:e,key:o,ref:l,props:i,_owner:rk.current}}Os.Fragment=tk;Os.jsx=A0;Os.jsxs=A0});var G=ie((XC,z0)=>{"use strict";z0.exports=L0()});var yf=ie((D3,mg)=>{var dk="Expected a function",lg="__lodash_hash_undefined__",sg=1/0,pk="[object Function]",mk="[object GeneratorFunction]",hk="[object Symbol]",gk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yk=/^\w*$/,_k=/^\./,vk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wk=/[\\^$.*+?()[\]{}|]/g,xk=/\\(\\)?/g,kk=/^\[object .+?Constructor\]$/,Sk=typeof global=="object"&&global&&global.Object===Object&&global,Ek=typeof self=="object"&&self&&self.Object===Object&&self,pf=Sk||Ek||Function("return this")();function bk(e,t){return e?.[t]}function Rk(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Ck=Array.prototype,Tk=Function.prototype,ag=Object.prototype,df=pf["__core-js_shared__"],ng=function(){var e=/[^.]+$/.exec(df&&df.keys&&df.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ug=Tk.toString,mf=ag.hasOwnProperty,cg=ag.toString,Ik=RegExp("^"+ug.call(mf).replace(wk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rg=pf.Symbol,Nk=Ck.splice,Ok=fg(pf,"Map"),yo=fg(Object,"create"),ig=rg?rg.prototype:void 0,og=ig?ig.toString:void 0;function ir(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function Bk(e,t){var n=this.__data__,r=Ls(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Xr.prototype.clear=Dk;Xr.prototype.delete=jk;Xr.prototype.get=Fk;Xr.prototype.has=Uk;Xr.prototype.set=Bk;function or(e){var t=-1,n=e?e.length:0;for(this.clear();++t{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.output=Ae.exists=Ae.hash=Ae.bytes=Ae.bool=Ae.number=void 0;function Ms(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}Ae.number=Ms;function Sg(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}Ae.bool=Sg;function aS(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function vf(e,...t){if(!aS(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}`)}Ae.bytes=vf;function Eg(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ms(e.outputLen),Ms(e.blockLen)}Ae.hash=Eg;function bg(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")}Ae.exists=bg;function Rg(e,t){vf(e);let n=t.outputLen;if(e.length{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.add5L=A.add5H=A.add4H=A.add4L=A.add3H=A.add3L=A.add=A.rotlBL=A.rotlBH=A.rotlSL=A.rotlSH=A.rotr32L=A.rotr32H=A.rotrBL=A.rotrBH=A.rotrSL=A.rotrSH=A.shrSL=A.shrSH=A.toBig=A.split=A.fromBig=void 0;var Ds=BigInt(2**32-1),wf=BigInt(32);function xf(e,t=!1){return t?{h:Number(e&Ds),l:Number(e>>wf&Ds)}:{h:Number(e>>wf&Ds)|0,l:Number(e&Ds)|0}}A.fromBig=xf;function Tg(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);A.toBig=Ig;var Ng=(e,t,n)=>e>>>n;A.shrSH=Ng;var Og=(e,t,n)=>e<<32-n|t>>>n;A.shrSL=Og;var Pg=(e,t,n)=>e>>>n|t<<32-n;A.rotrSH=Pg;var Ag=(e,t,n)=>e<<32-n|t>>>n;A.rotrSL=Ag;var Lg=(e,t,n)=>e<<64-n|t>>>n-32;A.rotrBH=Lg;var zg=(e,t,n)=>e>>>n-32|t<<64-n;A.rotrBL=zg;var Mg=(e,t)=>t;A.rotr32H=Mg;var Dg=(e,t)=>e;A.rotr32L=Dg;var jg=(e,t,n)=>e<>>32-n;A.rotlSH=jg;var Fg=(e,t,n)=>t<>>32-n;A.rotlSL=Fg;var Ug=(e,t,n)=>t<>>64-n;A.rotlBH=Ug;var Bg=(e,t,n)=>e<>>64-n;A.rotlBL=Bg;function $g(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}A.add=$g;var Hg=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);A.add3L=Hg;var Vg=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;A.add3H=Vg;var Wg=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);A.add4L=Wg;var Gg=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;A.add4H=Gg;var Zg=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);A.add5L=Zg;var Kg=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;A.add5H=Kg;var cS={fromBig:xf,split:Tg,toBig:Ig,shrSH:Ng,shrSL:Og,rotrSH:Pg,rotrSL:Ag,rotrBH:Lg,rotrBL:zg,rotr32H:Mg,rotr32L:Dg,rotlSH:jg,rotlSL:Fg,rotlBH:Ug,rotlBL:Bg,add:$g,add3L:Hg,add3H:Vg,add4L:Wg,add4H:Gg,add5H:Kg,add5L:Zg};A.default=cS});var Xg=ie(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.crypto=void 0;js.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var Jg=ie(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.randomBytes=M.wrapXOFConstructorWithOpts=M.wrapConstructorWithOpts=M.wrapConstructor=M.checkOpts=M.Hash=M.concatBytes=M.toBytes=M.utf8ToBytes=M.asyncLoop=M.nextTick=M.hexToBytes=M.bytesToHex=M.isLE=M.rotr=M.createView=M.u32=M.u8=void 0;var kf=Xg(),fS=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);M.u8=fS;var dS=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));M.u32=dS;function Ef(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var pS=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);M.createView=pS;var mS=(e,t)=>e<<32-t|e>>>t;M.rotr=mS;M.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!M.isLE)throw new Error("Non little-endian hardware is not supported");var hS=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function gS(e){if(!Ef(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n=Yt._0&&e<=Yt._9)return e-Yt._0;if(e>=Yt._A&&e<=Yt._F)return e-(Yt._A-10);if(e>=Yt._a&&e<=Yt._f)return e-(Yt._a-10)}function yS(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{};M.nextTick=_S;async function vS(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(Fs(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}M.wrapConstructor=SS;function ES(e){let t=(r,i)=>e(i).update(Fs(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}M.wrapConstructorWithOpts=ES;function bS(e){let t=(r,i)=>e(i).update(Fs(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}M.wrapXOFConstructorWithOpts=bS;function RS(e=32){if(kf.crypto&&typeof kf.crypto.getRandomValues=="function")return kf.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}M.randomBytes=RS});var sy=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 Yr=Cg(),xo=Qg(),wo=Jg(),[ny,ry,iy]=[[],[],[]],CS=BigInt(0),vo=BigInt(1),TS=BigInt(2),IS=BigInt(7),NS=BigInt(256),OS=BigInt(113);for(let e=0,t=vo,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],ny.push(2*(5*r+n)),ry.push((e+1)*(e+2)/2%64);let i=CS;for(let o=0;o<7;o++)t=(t<>IS)*OS)%NS,t&TS&&(i^=vo<<(vo<n>32?(0,xo.rotlBH)(e,t,n):(0,xo.rotlSH)(e,t,n),ty=(e,t,n)=>n>32?(0,xo.rotlBL)(e,t,n):(0,xo.rotlSL)(e,t,n);function oy(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,u=(l+2)%10,a=n[u],c=n[u+1],f=ey(a,c,1)^n[s],d=ty(a,c,1)^n[s+1];for(let p=0;p<50;p+=10)e[l+p]^=f,e[l+p+1]^=d}let i=e[2],o=e[3];for(let l=0;l<24;l++){let s=ry[l],u=ey(i,o,s),a=ty(i,o,s),c=ny[l];i=e[c],o=e[c+1],e[c]=u,e[c+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]^=PS[r],e[1]^=AS[r]}n.fill(0)}X.keccakP=oy;var ko=class e extends wo.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,Yr.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,wo.u32)(this.state)}keccak(){oy(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,Yr.exists)(this);let{blockLen:n,state:r}=this;t=(0,wo.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,Yr.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Yr.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=ko;var Pn=(e,t,n)=>(0,wo.wrapConstructor)(()=>new ko(t,e,n));X.sha3_224=Pn(6,144,224/8);X.sha3_256=Pn(6,136,256/8);X.sha3_384=Pn(6,104,384/8);X.sha3_512=Pn(6,72,512/8);X.keccak_224=Pn(1,144,224/8);X.keccak_256=Pn(1,136,256/8);X.keccak_384=Pn(1,104,384/8);X.keccak_512=Pn(1,72,512/8);var ly=(e,t,n)=>(0,wo.wrapXOFConstructorWithOpts)((r={})=>new ko(t,e,r.dkLen===void 0?n:r.dkLen,!0));X.shake128=ly(31,168,128/8);X.shake256=ly(31,136,256/8)});var hy=ie((dT,An)=>{var{sha3_512:LS}=sy(),uy=24,So=32,bf=(e=4,t=Math.random)=>{let n="";for(;n.lengthcy(LS(e)).toString(36).slice(1),ay=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),zS=e=>ay[Math.floor(e()*ay.length)],dy=({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(So,t):bf(So,t);return fy(r).substring(0,So)},py=e=>()=>e++,MS=476782367,my=({random:e=Math.random,counter:t=py(Math.floor(e()*MS)),length:n=uy,fingerprint:r=dy({random:e})}={})=>function(){let o=zS(e),l=Date.now().toString(36),s=t().toString(36),u=bf(n,e),a=`${l+u+s+r}`;return`${o+fy(a).substring(1,n)}`},DS=my(),jS=(e,{minLength:t=2,maxLength:n=So}={})=>{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:uy,bigLength:So});An.exports.init=my;An.exports.createId=DS;An.exports.bufToBigInt=cy;An.exports.createCounter=py;An.exports.createFingerprint=dy;An.exports.isCuid=jS});var Rf=ie((pT,Eo)=>{var{createId:FS,init:US,getConstants:BS,isCuid:$S}=hy();Eo.exports.createId=FS;Eo.exports.init=US;Eo.exports.getConstants=BS;Eo.exports.isCuid=$S});var My=ie((To,qs)=>{(function(e,t){"use strict";var n="1.0.37",r="",i="?",o="function",l="undefined",s="object",u="string",a="major",c="model",f="name",d="type",p="vendor",g="version",_="architecture",w="console",h="mobile",m="tablet",y="smarttv",v="wearable",S="embedded",R=500,k="Amazon",b="Apple",N="ASUS",C="BlackBerry",O="Browser",De="Chrome",rl="Edge",Dt="Firefox",jt="Google",Fd="Huawei",Ca="LG",Ta="Microsoft",Ud="Motorola",il="Opera",ol="Samsung",Bd="Sharp",ll="Sony",Ia="Xiaomi",Na="Zebra",$d="Facebook",Hd="Chromium OS",Vd="Mac OS",Ev=function(F,V){var z={};for(var Z in F)V[Z]&&V[Z].length%2===0?z[Z]=V[Z].concat(F[Z]):z[Z]=F[Z];return z},sl=function(F){for(var V={},z=0;z0?H.length===2?typeof H[1]==o?this[H[0]]=H[1].call(this,St):this[H[0]]=H[1]:H.length===3?typeof H[1]===o&&!(H[1].exec&&H[1].test)?this[H[0]]=St?H[1].call(this,St,H[2]):t:this[H[0]]=St?St.replace(H[1],H[2]):t:H.length===4&&(this[H[0]]=St?H[3].call(this,St.replace(H[1],H[2])):t):this[H]=St||t;z+=2}},Pa=function(F,V){for(var z in V)if(typeof V[z]===s&&V[z].length>0){for(var Z=0;Z2&&(L[c]="iPad",L[d]=m),L},this.getEngine=function(){var L={};return L[f]=t,L[g]=t,xi.call(L,Z,kt.engine),L},this.getOS=function(){var L={};return L[f]=t,L[g]=t,xi.call(L,Z,kt.os),H&&!L[f]&&ln&&ln.platform!="Unknown"&&(L[f]=ln.platform.replace(/chrome os/i,Hd).replace(/macos/i,Vd)),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 Z},this.setUA=function(L){return Z=typeof L===u&&L.length>R?Oa(L,R):L,this},this.setUA(Z),this};We.VERSION=n,We.BROWSER=sl([f,g,a]),We.CPU=sl([_]),We.DEVICE=sl([c,p,d,w,h,y,m,v,S]),We.ENGINE=We.OS=sl([f,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 z in V)_r.ua[z]=V[z]}}})(typeof window=="object"?window:To)});var j_=ie((UP,D_)=>{var e2=1/0,t2="[object Symbol]",n2=/^\s+|\s+$/g,od="\\ud800-\\udfff",R_="\\u0300-\\u036f\\ufe20-\\ufe23",C_="\\u20d0-\\u20f0",T_="\\ufe0e\\ufe0f",r2="["+od+"]",rd="["+R_+C_+"]",id="\\ud83c[\\udffb-\\udfff]",i2="(?:"+rd+"|"+id+")",I_="[^"+od+"]",N_="(?:\\ud83c[\\udde6-\\uddff]){2}",O_="[\\ud800-\\udbff][\\udc00-\\udfff]",P_="\\u200d",A_=i2+"?",L_="["+T_+"]?",o2="(?:"+P_+"(?:"+[I_,N_,O_].join("|")+")"+L_+A_+")*",l2=L_+A_+o2,s2="(?:"+[I_+rd+"?",rd,N_,O_,r2].join("|")+")",a2=RegExp(id+"(?="+id+")|"+s2+l2,"g"),u2=RegExp("["+P_+od+R_+C_+T_+"]"),c2=typeof global=="object"&&global&&global.Object===Object&&global,f2=typeof self=="object"&&self&&self.Object===Object&&self,d2=c2||f2||Function("return this")();function p2(e){return e.split("")}function m2(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function y2(e,t){for(var n=e.length;n--&&z_(t,e[n],0)>-1;);return n}function _2(e){return u2.test(e)}function k_(e){return _2(e)?v2(e):p2(e)}function v2(e){return e.match(a2)||[]}var w2=Object.prototype,x2=w2.toString,S_=d2.Symbol,E_=S_?S_.prototype:void 0,b_=E_?E_.toString:void 0;function k2(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:k2(e,t,n)}function E2(e){return!!e&&typeof e=="object"}function b2(e){return typeof e=="symbol"||E2(e)&&x2.call(e)==t2}function R2(e){return e==null?"":M_(e)}function C2(e,t,n){if(e=R2(e),e&&(n||t===void 0))return e.replace(n2,"");if(!e||!(t=M_(t)))return e;var r=k_(e),i=k_(t),o=g2(r,i),l=y2(r,i)+1;return S2(r,o,l).join("")}D_.exports=C2});var W_=ie((KP,V_)=>{"use strict";function N2(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 I0=(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 qx=P(ge());var Qt=P(ge()),tf=(0,Qt.createContext)({global:{},render:()=>{}});var Nn=(e,t)=>{let n=(0,Qt.useContext)(tf),{global:r,render:i}=n;r[t]||(r[t]=e),(0,Qt.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,Qt.startTransition)(i)}),o},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 i3=P(ge());var rf=P(ge()),M0=P(Jc()),D0=P(P0()),j0=P(G()),F0=()=>{let e=typeof window=="object"?window:globalThis;e.React=rf.default,e.ReactDOM=M0.default,e.JSXRuntime=j0.default,e.JSXDevRuntime=D0.default,e.Fragment=rf.default.Fragment};var ok={data:""},B0=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ok,$0=e=>{let t=B0(e),n=t.data;return t.data="",n},lk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,sk=/\/\*[^]*?\*\/| +/g,U0=/\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,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):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},Xt={},H0=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+H0(e[n]);return t}return e},ak=(e,t,n,r,i)=>{let o=H0(e),l=Xt[o]||(Xt[o]=(u=>{let a=0,c=11;for(;a>>0;return"go"+c})(o));if(!Xt[l]){let u=o!==e?e:(a=>{let c,f,d=[{}];for(;c=lk.exec(a.replace(sk,""));)c[4]?d.shift():c[3]?(f=c[3].replace(U0," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(U0," ").trim();return d[0]})(e);Xt[l]=rr(i?{["@keyframes "+l]:u}:u,n?"":"."+l)}let s=n&&Xt.g?Xt.g:null;return n&&(Xt.g=Xt[l]),((u,a,c,f)=>{f?a.data=a.data.replace(f,u):a.data.indexOf(u)===-1&&(a.data=c?u+a.data:a.data+u)})(Xt[l],t,r,s),l},uk=(e,t,n)=>e.reduce((r,i,o)=>{let l=t[o];if(l&&l.call){let s=l(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;l=u?"."+u:s&&typeof s=="object"?s.props?"":rr(s,""):s===!1?"":s}return r+i+(l??"")},"");function Ps(e){let t=this||{},n=e.call?e(t.p):e;return ak(n.unshift?n.raw?uk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,B0(t.target),t.g,t.o,t.k)}var YC=Ps.bind({g:1}),JC=Ps.bind({k:1});var V0=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await I0(()=>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=Ps,t.extractCss=$0,t.pathname=n.pathname,t.cx=(...l)=>{let s=[];return l.filter(u=>u?(typeof u=="string"&&u.trim(),!0):!1).forEach(u=>{if(Array.isArray(u))for(let a of u)typeof a=="string"&&a.trim()&&s.push(a.trim());else s.push(u.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 lf(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function sf(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=lf(n);return(i,o)=>r.then(l=>o(l.transaction(t,i).objectStore(t)))}var of;function W0(){return of||(of=sf("keyval-store","keyval")),of}function af(e,t=W0()){return t("readonly",n=>lf(n.get(e)))}function As(e,t,n=W0()){return n("readwrite",r=>(r.put(t,e),lf(r.transaction)))}var wv=P(ge());var G0=/^(?:[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 ck(e){return typeof e=="string"&&G0.test(e)}var uf=ck;var ho=P(G()),cf=({children:e,back:t})=>(0,ho.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,ho.jsx)("div",{children:e}),(0,ho.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});var K0=P(ge());var Ce=P(G()),Z0=window,go=({children:e,className:t,show:n,backdrop:r,note:i,alt:o})=>{let l=Tn({icon:(0,Ce.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,K0.useEffect)(()=>(l.ival=setInterval(()=>{l.value+=.1333,l.value>=1.3&&(l.value=0),l.render()},200),Z0.loadingIcon&&(l.icon=(0,Ce.jsx)("img",{alt:"loading",src:Z0.loadingIcon,className:css` +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function pu(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Qu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Rx=typeof WeakMap=="function"?WeakMap:Map;function qh(e,t,n){n=Ht(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ds||(ds=!0,oc=r),Qu(e,t)},n}function Yh(e,t,n){n=Ht(-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(){Qu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){Qu(e,t),typeof r!="function"&&(wn===null?wn=new Set([this]):wn.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function sm(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rx;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=Ux.bind(null,e,t,n),t.then(e,e))}function am(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 um(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=Ht(-1,1),t.tag=2,vn(n,t,1))),n.lanes|=1),e)}var Cx=Kt.ReactCurrentOwner,Fe=!1;function Ne(e,t,n,r){t.child=e===null?Nh(t,null,n,r):Hr(t,e.child,n,r)}function cm(e,t,n,r,i){n=n.render;var o=t.ref;return jr(t,i),r=Dc(e,t,n,r,o,i),n=jc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Zt(e,t,i)):(J&&n&&bc(t),t.flags|=1,Ne(e,t,r,i),t.child)}function fm(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!Kc(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Jh(e,t,o,r,i)):(e=Wl(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:to,n(l,r)&&e.ref===t.ref)return Zt(e,t,i)}return t.flags|=1,e=kn(o,r),e.ref=t.ref,e.return=t,t.child=e}function Jh(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(to(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 Xu(e,t,n,r,i)}function e0(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,Ge),Ge|=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,Ge),Ge|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Q(Ar,Ge),Ge|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Q(Ar,Ge),Ge|=r;return Ne(e,t,i,n),t.child}function t0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Xu(e,t,n,r,i){var o=Be(n)?Xn:Re.current;return o=Br(t,o),jr(t,i),n=Dc(e,t,n,r,o,i),r=jc(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Zt(e,t,i)):(J&&r&&bc(t),t.flags|=1,Ne(e,t,n,i),t.child)}function dm(e,t,n,r,i){if(Be(n)){var o=!0;ns(t)}else o=!1;if(jr(t,i),t.stateNode===null)$l(e,t),Th(t,n,r),Ku(t,n,r,i),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var u=l.context,a=n.contextType;typeof a=="object"&&a!==null?a=lt(a):(a=Be(n)?Xn:Re.current,a=Br(t,a));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";f||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||u!==a)&&rm(t,l,r,a),cn=!1;var d=t.memoizedState;l.state=d,ss(t,r,l,i),u=t.memoizedState,s!==r||d!==u||Ue.current||cn?(typeof c=="function"&&(Zu(t,n,c,r),u=t.memoizedState),(s=cn||nm(t,n,s,r,d,u,a))?(f||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=u),l.props=r,l.state=u,l.context=a,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,Rh(e,t),s=t.memoizedProps,a=t.type===t.elementType?s:gt(t.type,s),l.props=a,f=t.pendingProps,d=l.context,u=n.contextType,typeof u=="object"&&u!==null?u=lt(u):(u=Be(n)?Xn:Re.current,u=Br(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==f||d!==u)&&rm(t,l,r,u),cn=!1,d=t.memoizedState,l.state=d,ss(t,r,l,i);var g=t.memoizedState;s!==f||d!==g||Ue.current||cn?(typeof p=="function"&&(Zu(t,n,p,r),g=t.memoizedState),(a=cn||nm(t,n,a,r,d,g,u)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,g,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,g,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),l.props=r,l.state=g,l.context=u,r=a):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return qu(e,t,n,r,o,i)}function qu(e,t,n,r,i,o){t0(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return i&&qp(t,n,!1),Zt(e,t,o);r=t.stateNode,Cx.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=Hr(t,e.child,null,o),t.child=Hr(t,null,s,o)):Ne(e,t,s,o),t.memoizedState=r.state,i&&qp(t,n,!0),t.child}function n0(e){var t=e.stateNode;t.pendingContext?Xp(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Xp(e,t.context,!1),Ac(e,t.containerInfo)}function pm(e,t,n,r,i){return $r(),Cc(i),t.flags|=256,Ne(e,t,n,r),t.child}var Yu={dehydrated:null,treeContext:null,retryLane:0};function Ju(e){return{baseLanes:e,cachePool:null,transitions:null}}function r0(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 Wu(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=Rs(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=Ju(n),t.memoizedState=Yu,e):Bc(t,l));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Tx(e,t,l,r,s,i,n);if(o){o=r.fallback,l=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(l&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=kn(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=kn(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?Ju(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Yu,r}return o=e.child,e=o.sibling,r=kn(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 Bc(e,t){return t=Rs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Al(e,t,n,r){return r!==null&&Cc(r),Hr(t,e.child,null,n),e=Bc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Tx(e,t,n,r,i,o,l){if(n)return t.flags&256?(t.flags&=-257,r=pu(Error(E(422))),Al(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Rs({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&&Hr(t,e.child,null,l),t.child.memoizedState=Ju(l),t.memoizedState=Yu,o);if(!(t.mode&1))return Al(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=pu(o,r,void 0),Al(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,Gt(e,i),wt(r,e,i,-1))}return Zc(),r=pu(Error(E(421))),Al(e,t,l,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Bx.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,Ze=_n(i.nextSibling),Ke=t,J=!0,_t=null,e!==null&&(nt[rt++]=Bt,nt[rt++]=$t,nt[rt++]=qn,Bt=e.id,$t=e.overflow,qn=t),t=Bc(t,r.children),t.flags|=4096,t)}function mm(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Gu(e.return,t,n)}function mu(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 i0(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Ne(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&&mm(e,n,t);else if(e.tag===19)mm(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&&as(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),mu(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&&as(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}mu(t,!0,n,null,o);break;case"together":mu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $l(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=kn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=kn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ix(e,t,n){switch(t.tag){case 3:n0(t),$r();break;case 5:Oh(t);break;case 1:Be(t.type)&&ns(t);break;case 4:Ac(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Q(os,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?r0(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 i0(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,e0(e,t,n)}return Zt(e,t,n)}var o0,ec,l0,s0;o0=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}};ec=function(){};l0=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Zn(It.current);var o=null;switch(n){case"input":i=ku(e,i),r=ku(e,r),o=[];break;case"select":i=re({},i,{value:void 0}),r=re({},r,{value:void 0}),o=[];break;case"textarea":i=bu(e,i),r=bu(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=es)}Cu(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"&&(Ki.hasOwnProperty(a)?o||(o=[]):(o=o||[]).push(a,null));for(a in r){var u=r[a];if(s=i?.[a],r.hasOwnProperty(a)&&u!==s&&(u!=null||s!=null))if(a==="style")if(s){for(l in s)!s.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in u)u.hasOwnProperty(l)&&s[l]!==u[l]&&(n||(n={}),n[l]=u[l])}else n||(o||(o=[]),o.push(a,n)),n=u;else a==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(a,u)):a==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(a,""+u):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&(Ki.hasOwnProperty(a)?(u!=null&&a==="onScroll"&&q("scroll",e),o||s===u||(o=[])):(o=o||[]).push(a,u))}n&&(o=o||[]).push("style",n);var a=o;(t.updateQueue=a)&&(t.flags|=4)}};s0=function(e,t,n,r){n!==r&&(t.flags|=4)};function Pi(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 Nx(e,t,n){var r=t.pendingProps;switch(Rc(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)&&ts(),Ee(t),null;case 3:return r=t.stateNode,Vr(),Y(Ue),Y(Re),zc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ol(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_t!==null&&(ac(_t),_t=null))),ec(e,t),Ee(t),null;case 5:Lc(t);var i=Zn(lo.current);if(n=t.type,e!==null&&t.stateNode!=null)l0(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=Zn(It.current),Ol(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ct]=t,r[io]=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[Ct]=t,e[io]=r,o0(e,t,!1,!1),t.stateNode=e;e:{switch(l=Tu(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;iGr&&(t.flags|=128,r=!0,Pi(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),Pi(o,!0),o.tail===null&&o.tailMode==="hidden"&&!l.alternate&&!J)return Ee(t),null}else 2*le()-o.renderingStartTime>Gr&&n!==1073741824&&(t.flags|=128,r=!0,Pi(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 Gc(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ge&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 Ox(e,t){switch(Rc(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),zc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Lc(t),null;case 13:if(Y(te),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(te),null;case 4:return Vr(),null;case 10:return Nc(t.type._context),null;case 22:case 23:return Gc(),null;case 24:return null;default:return null}}var Ll=!1,be=!1,Px=typeof WeakSet=="function"?WeakSet:Set,I=null;function Pr(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 tc(e,t,n){try{n()}catch(r){oe(e,t,r)}}var hm=!1;function Ax(e,t){if(ju=ql,e=fh(),Ec(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,u=-1,a=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=l+i),f!==o||r!==0&&f.nodeType!==3||(u=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++a===i&&(s=l),d===o&&++c===r&&(u=l),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Fu={focusedElem:e,selectionRange:n},ql=!1,I=t;I!==null;)if(t=I,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,I=e;else for(;I!==null;){t=I;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,w=g.memoizedState,h=t.stateNode,m=h.getSnapshotBeforeUpdate(t.elementType===t.type?_:gt(t.type,_),w);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,I=e;break}I=t.return}return g=hm,hm=!1,g}function Wi(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&&tc(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 nc(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 a0(e){var t=e.alternate;t!==null&&(e.alternate=null,a0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[io],delete t[$u],delete t[hx],delete t[gx])),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 u0(e){return e.tag===5||e.tag===3||e.tag===4}function gm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||u0(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 rc(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(rc(e,t,n),e=e.sibling;e!==null;)rc(e,t,n),e=e.sibling}function ic(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(ic(e,t,n),e=e.sibling;e!==null;)ic(e,t,n),e=e.sibling}var ye=null,yt=!1;function an(e,t,n){for(n=n.child;n!==null;)c0(e,t,n),n=n.sibling}function c0(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(gs,n)}catch{}switch(n.tag){case 5:be||Pr(n,t);case 6:var r=ye,i=yt;ye=null,an(e,t,n),ye=r,yt=i,ye!==null&&(yt?(e=ye,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ye.removeChild(n.stateNode));break;case 18:ye!==null&&(yt?(e=ye,n=n.stateNode,e.nodeType===8?su(e.parentNode,n):e.nodeType===1&&su(e,n),Ji(e)):su(ye,n.stateNode));break;case 4:r=ye,i=yt,ye=n.stateNode.containerInfo,yt=!0,an(e,t,n),ye=r,yt=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)&&tc(n,t,l),i=i.next}while(i!==r)}an(e,t,n);break;case 1:if(!be&&(Pr(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)}an(e,t,n);break;case 21:an(e,t,n);break;case 22:n.mode&1?(be=(r=be)||n.memoizedState!==null,an(e,t,n),be=r):an(e,t,n);break;default:an(e,t,n)}}function ym(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Px),t.forEach(function(r){var i=$x.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ht(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*zx(r/1960))-r,10e?16:e,mn===null)var r=!1;else{if(e=mn,mn=null,ps=0,B&6)throw Error(E(331));var i=B;for(B|=4,I=e.current;I!==null;){var o=I,l=o.child;if(I.flags&16){var s=o.deletions;if(s!==null){for(var u=0;ule()-Vc?Kn(e,0):Hc|=n),$e(e,t)}function _0(e,t){t===0&&(e.mode&1?(t=xl,xl<<=1,!(xl&130023424)&&(xl=4194304)):t=1);var n=Oe();e=Gt(e,t),e!==null&&(fo(e,t,n),$e(e,n))}function Bx(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_0(e,n)}function $x(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),_0(e,n)}var v0;v0=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,Ix(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,J&&t.flags&1048576&&kh(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=Dc(null,t,r,e,i,n);var o=jc();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,Pc(t),i.updater=ks,t.stateNode=i,i._reactInternals=t,Ku(t,r,e,n),t=qu(null,t,r,!0,o,n)):(t.tag=0,J&&o&&bc(t),Ne(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=Vx(r),e=gt(r,e),i){case 0:t=Xu(null,t,r,e,n);break e;case 1:t=dm(null,t,r,e,n);break e;case 11:t=cm(null,t,r,e,n);break e;case 14:t=fm(null,t,r,gt(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:gt(r,i),Xu(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),dm(e,t,r,i,n);case 3:e:{if(n0(t),e===null)throw Error(E(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Rh(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=pm(e,t,r,n,i);break e}else if(r!==i){i=Wr(Error(E(424)),t),t=pm(e,t,r,n,i);break e}else for(Ze=_n(t.stateNode.containerInfo.firstChild),Ke=t,J=!0,_t=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}Ne(e,t,r,n)}t=t.child}return t;case 5:return Oh(t),e===null&&Wu(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Uu(r,i)?l=null:o!==null&&Uu(r,o)&&(t.flags|=32),t0(e,t),Ne(e,t,l,n),t.child;case 6:return e===null&&Wu(t),null;case 13:return r0(e,t,n);case 4:return Ac(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Hr(t,null,r,n):Ne(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),cm(e,t,r,i,n);case 7:return Ne(e,t,t.pendingProps,n),t.child;case 8:return Ne(e,t,t.pendingProps.children,n),t.child;case 12:return Ne(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(xt(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 u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Ht(-1,n&-n),u.tag=2;var a=o.updateQueue;if(a!==null){a=a.shared;var c=a.pending;c===null?u.next=u:(u.next=c.next,c.next=u),a.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Gu(o.return,n,t),s.lanes|=n;break}u=u.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),Gu(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}Ne(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,jr(t,n),i=lt(i),r=r(i),t.flags|=1,Ne(e,t,r,n),t.child;case 14:return r=t.type,i=gt(r,t.pendingProps),i=gt(r.type,i),fm(e,t,r,i,n);case 15:return Jh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:gt(r,i),$l(e,t),t.tag=1,Be(r)?(e=!0,ns(t)):e=!1,jr(t,n),Th(t,r,i),Ku(t,r,i,n),qu(null,t,r,!0,e,n);case 19:return i0(e,t,n);case 22:return e0(e,t,n)}throw Error(E(156,t.tag))};function w0(e,t){return Gm(e,t)}function Hx(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 it(e,t,n,r){return new Hx(e,t,n,r)}function Kc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Vx(e){if(typeof e=="function")return Kc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===pc)return 11;if(e===mc)return 14}return 2}function kn(e,t){var n=e.alternate;return n===null?(n=it(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")Kc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Sr:return Qn(n.children,i,o,t);case dc:l=8,i|=8;break;case _u:return e=it(12,n,t,i|2),e.elementType=_u,e.lanes=o,e;case vu:return e=it(13,n,t,i),e.elementType=vu,e.lanes=o,e;case wu:return e=it(19,n,t,i),e.elementType=wu,e.lanes=o,e;case Im:return Rs(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cm:l=10;break e;case Tm:l=9;break e;case pc:l=11;break e;case mc:l=14;break e;case un:l=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=it(l,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Qn(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function Rs(e,t,n,r){return e=it(22,e,r,t),e.elementType=Im,e.lanes=n,e.stateNode={isHidden:!1},e}function hu(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function gu(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wx(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=Ja(0),this.expirationTimes=Ja(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ja(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Qc(e,t,n,r,i,o,l,s,u){return e=new Wx(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=it(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Pc(o),e}function Gx(e,t,n){var r=3{"use strict";function b0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b0)}catch(e){console.error(e)}}b0(),R0.exports=E0()});var T0=ie(ef=>{"use strict";var C0=Jc();ef.createRoot=C0.createRoot,ef.hydrateRoot=C0.hydrateRoot;var FC});var N0=ie(nf=>{"use strict";var Yx=Symbol.for("react.fragment");nf.Fragment=Yx;nf.jsxDEV=void 0});var P0=ie((KC,O0)=>{"use strict";O0.exports=N0()});var L0=ie(Os=>{"use strict";var Jx=ge(),ek=Symbol.for("react.element"),tk=Symbol.for("react.fragment"),nk=Object.prototype.hasOwnProperty,rk=Jx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ik={key:!0,ref:!0,__self:!0,__source:!0};function A0(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)nk.call(t,r)&&!ik.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:ek,type:e,key:o,ref:l,props:i,_owner:rk.current}}Os.Fragment=tk;Os.jsx=A0;Os.jsxs=A0});var G=ie((XC,z0)=>{"use strict";z0.exports=L0()});var yf=ie((D3,mg)=>{var dk="Expected a function",lg="__lodash_hash_undefined__",sg=1/0,pk="[object Function]",mk="[object GeneratorFunction]",hk="[object Symbol]",gk=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yk=/^\w*$/,_k=/^\./,vk=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wk=/[\\^$.*+?()[\]{}|]/g,xk=/\\(\\)?/g,kk=/^\[object .+?Constructor\]$/,Sk=typeof global=="object"&&global&&global.Object===Object&&global,Ek=typeof self=="object"&&self&&self.Object===Object&&self,pf=Sk||Ek||Function("return this")();function bk(e,t){return e?.[t]}function Rk(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var Ck=Array.prototype,Tk=Function.prototype,ag=Object.prototype,df=pf["__core-js_shared__"],ng=function(){var e=/[^.]+$/.exec(df&&df.keys&&df.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ug=Tk.toString,mf=ag.hasOwnProperty,cg=ag.toString,Ik=RegExp("^"+ug.call(mf).replace(wk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),rg=pf.Symbol,Nk=Ck.splice,Ok=fg(pf,"Map"),_o=fg(Object,"create"),ig=rg?rg.prototype:void 0,og=ig?ig.toString:void 0;function ir(e){var t=-1,n=e?e.length:0;for(this.clear();++t-1}function Bk(e,t){var n=this.__data__,r=Ls(n,e);return r<0?n.push([e,t]):n[r][1]=t,this}Xr.prototype.clear=Dk;Xr.prototype.delete=jk;Xr.prototype.get=Fk;Xr.prototype.has=Uk;Xr.prototype.set=Bk;function or(e){var t=-1,n=e?e.length:0;for(this.clear();++t{"use strict";Object.defineProperty(Ae,"__esModule",{value:!0});Ae.output=Ae.exists=Ae.hash=Ae.bytes=Ae.bool=Ae.number=void 0;function Ms(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}Ae.number=Ms;function Sg(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}Ae.bool=Sg;function aS(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function vf(e,...t){if(!aS(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}`)}Ae.bytes=vf;function Eg(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Ms(e.outputLen),Ms(e.blockLen)}Ae.hash=Eg;function bg(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")}Ae.exists=bg;function Rg(e,t){vf(e);let n=t.outputLen;if(e.length{"use strict";Object.defineProperty(A,"__esModule",{value:!0});A.add5L=A.add5H=A.add4H=A.add4L=A.add3H=A.add3L=A.add=A.rotlBL=A.rotlBH=A.rotlSL=A.rotlSH=A.rotr32L=A.rotr32H=A.rotrBL=A.rotrBH=A.rotrSL=A.rotrSH=A.shrSL=A.shrSH=A.toBig=A.split=A.fromBig=void 0;var Ds=BigInt(2**32-1),wf=BigInt(32);function xf(e,t=!1){return t?{h:Number(e&Ds),l:Number(e>>wf&Ds)}:{h:Number(e>>wf&Ds)|0,l:Number(e&Ds)|0}}A.fromBig=xf;function Tg(e,t=!1){let n=new Uint32Array(e.length),r=new Uint32Array(e.length);for(let i=0;iBigInt(e>>>0)<>>0);A.toBig=Ig;var Ng=(e,t,n)=>e>>>n;A.shrSH=Ng;var Og=(e,t,n)=>e<<32-n|t>>>n;A.shrSL=Og;var Pg=(e,t,n)=>e>>>n|t<<32-n;A.rotrSH=Pg;var Ag=(e,t,n)=>e<<32-n|t>>>n;A.rotrSL=Ag;var Lg=(e,t,n)=>e<<64-n|t>>>n-32;A.rotrBH=Lg;var zg=(e,t,n)=>e>>>n-32|t<<64-n;A.rotrBL=zg;var Mg=(e,t)=>t;A.rotr32H=Mg;var Dg=(e,t)=>e;A.rotr32L=Dg;var jg=(e,t,n)=>e<>>32-n;A.rotlSH=jg;var Fg=(e,t,n)=>t<>>32-n;A.rotlSL=Fg;var Ug=(e,t,n)=>t<>>64-n;A.rotlBH=Ug;var Bg=(e,t,n)=>e<>>64-n;A.rotlBL=Bg;function $g(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}A.add=$g;var Hg=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0);A.add3L=Hg;var Vg=(e,t,n,r)=>t+n+r+(e/2**32|0)|0;A.add3H=Vg;var Wg=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0);A.add4L=Wg;var Gg=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0;A.add4H=Gg;var Zg=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0);A.add5L=Zg;var Kg=(e,t,n,r,i,o)=>t+n+r+i+o+(e/2**32|0)|0;A.add5H=Kg;var cS={fromBig:xf,split:Tg,toBig:Ig,shrSH:Ng,shrSL:Og,rotrSH:Pg,rotrSL:Ag,rotrBH:Lg,rotrBL:zg,rotr32H:Mg,rotr32L:Dg,rotlSH:jg,rotlSL:Fg,rotlBH:Ug,rotlBL:Bg,add:$g,add3L:Hg,add3H:Vg,add4L:Wg,add4H:Gg,add5H:Kg,add5L:Zg};A.default=cS});var Xg=ie(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.crypto=void 0;js.crypto=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0});var Jg=ie(M=>{"use strict";Object.defineProperty(M,"__esModule",{value:!0});M.randomBytes=M.wrapXOFConstructorWithOpts=M.wrapConstructorWithOpts=M.wrapConstructor=M.checkOpts=M.Hash=M.concatBytes=M.toBytes=M.utf8ToBytes=M.asyncLoop=M.nextTick=M.hexToBytes=M.bytesToHex=M.isLE=M.rotr=M.createView=M.u32=M.u8=void 0;var kf=Xg(),fS=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);M.u8=fS;var dS=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));M.u32=dS;function Ef(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}var pS=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);M.createView=pS;var mS=(e,t)=>e<<32-t|e>>>t;M.rotr=mS;M.isLE=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!M.isLE)throw new Error("Non little-endian hardware is not supported");var hS=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function gS(e){if(!Ef(e))throw new Error("Uint8Array expected");let t="";for(let n=0;n=Yt._0&&e<=Yt._9)return e-Yt._0;if(e>=Yt._A&&e<=Yt._F)return e-(Yt._A-10);if(e>=Yt._a&&e<=Yt._f)return e-(Yt._a-10)}function yS(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{};M.nextTick=_S;async function vS(e,t,n){let r=Date.now();for(let i=0;i=0&&oe().update(Fs(r)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}M.wrapConstructor=SS;function ES(e){let t=(r,i)=>e(i).update(Fs(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}M.wrapConstructorWithOpts=ES;function bS(e){let t=(r,i)=>e(i).update(Fs(r)).digest(),n=e({});return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=r=>e(r),t}M.wrapXOFConstructorWithOpts=bS;function RS(e=32){if(kf.crypto&&typeof kf.crypto.getRandomValues=="function")return kf.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}M.randomBytes=RS});var sy=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 Yr=Cg(),ko=Qg(),xo=Jg(),[ny,ry,iy]=[[],[],[]],CS=BigInt(0),wo=BigInt(1),TS=BigInt(2),IS=BigInt(7),NS=BigInt(256),OS=BigInt(113);for(let e=0,t=wo,n=1,r=0;e<24;e++){[n,r]=[r,(2*n+3*r)%5],ny.push(2*(5*r+n)),ry.push((e+1)*(e+2)/2%64);let i=CS;for(let o=0;o<7;o++)t=(t<>IS)*OS)%NS,t&TS&&(i^=wo<<(wo<n>32?(0,ko.rotlBH)(e,t,n):(0,ko.rotlSH)(e,t,n),ty=(e,t,n)=>n>32?(0,ko.rotlBL)(e,t,n):(0,ko.rotlSL)(e,t,n);function oy(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,u=(l+2)%10,a=n[u],c=n[u+1],f=ey(a,c,1)^n[s],d=ty(a,c,1)^n[s+1];for(let p=0;p<50;p+=10)e[l+p]^=f,e[l+p+1]^=d}let i=e[2],o=e[3];for(let l=0;l<24;l++){let s=ry[l],u=ey(i,o,s),a=ty(i,o,s),c=ny[l];i=e[c],o=e[c+1],e[c]=u,e[c+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]^=PS[r],e[1]^=AS[r]}n.fill(0)}X.keccakP=oy;var So=class e extends xo.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,Yr.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,xo.u32)(this.state)}keccak(){oy(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){(0,Yr.exists)(this);let{blockLen:n,state:r}=this;t=(0,xo.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,Yr.number)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,Yr.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=So;var Pn=(e,t,n)=>(0,xo.wrapConstructor)(()=>new So(t,e,n));X.sha3_224=Pn(6,144,224/8);X.sha3_256=Pn(6,136,256/8);X.sha3_384=Pn(6,104,384/8);X.sha3_512=Pn(6,72,512/8);X.keccak_224=Pn(1,144,224/8);X.keccak_256=Pn(1,136,256/8);X.keccak_384=Pn(1,104,384/8);X.keccak_512=Pn(1,72,512/8);var ly=(e,t,n)=>(0,xo.wrapXOFConstructorWithOpts)((r={})=>new So(t,e,r.dkLen===void 0?n:r.dkLen,!0));X.shake128=ly(31,168,128/8);X.shake256=ly(31,136,256/8)});var hy=ie((dT,An)=>{var{sha3_512:LS}=sy(),uy=24,Eo=32,bf=(e=4,t=Math.random)=>{let n="";for(;n.lengthcy(LS(e)).toString(36).slice(1),ay=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),zS=e=>ay[Math.floor(e()*ay.length)],dy=({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(Eo,t):bf(Eo,t);return fy(r).substring(0,Eo)},py=e=>()=>e++,MS=476782367,my=({random:e=Math.random,counter:t=py(Math.floor(e()*MS)),length:n=uy,fingerprint:r=dy({random:e})}={})=>function(){let o=zS(e),l=Date.now().toString(36),s=t().toString(36),u=bf(n,e),a=`${l+u+s+r}`;return`${o+fy(a).substring(1,n)}`},DS=my(),jS=(e,{minLength:t=2,maxLength:n=Eo}={})=>{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:uy,bigLength:Eo});An.exports.init=my;An.exports.createId=DS;An.exports.bufToBigInt=cy;An.exports.createCounter=py;An.exports.createFingerprint=dy;An.exports.isCuid=jS});var Rf=ie((pT,bo)=>{var{createId:FS,init:US,getConstants:BS,isCuid:$S}=hy();bo.exports.createId=FS;bo.exports.init=US;bo.exports.getConstants=BS;bo.exports.isCuid=$S});var My=ie((To,qs)=>{(function(e,t){"use strict";var n="1.0.37",r="",i="?",o="function",l="undefined",s="object",u="string",a="major",c="model",f="name",d="type",p="vendor",g="version",_="architecture",w="console",h="mobile",m="tablet",y="smarttv",v="wearable",S="embedded",R=500,k="Amazon",b="Apple",N="ASUS",C="BlackBerry",O="Browser",De="Chrome",rl="Edge",Dt="Firefox",jt="Google",Fd="Huawei",Ca="LG",Ta="Microsoft",Ud="Motorola",il="Opera",ol="Samsung",Bd="Sharp",ll="Sony",Ia="Xiaomi",Na="Zebra",$d="Facebook",Hd="Chromium OS",Vd="Mac OS",Ev=function(F,V){var z={};for(var Z in F)V[Z]&&V[Z].length%2===0?z[Z]=V[Z].concat(F[Z]):z[Z]=F[Z];return z},sl=function(F){for(var V={},z=0;z0?H.length===2?typeof H[1]==o?this[H[0]]=H[1].call(this,St):this[H[0]]=H[1]:H.length===3?typeof H[1]===o&&!(H[1].exec&&H[1].test)?this[H[0]]=St?H[1].call(this,St,H[2]):t:this[H[0]]=St?St.replace(H[1],H[2]):t:H.length===4&&(this[H[0]]=St?H[3].call(this,St.replace(H[1],H[2])):t):this[H]=St||t;z+=2}},Pa=function(F,V){for(var z in V)if(typeof V[z]===s&&V[z].length>0){for(var Z=0;Z2&&(L[c]="iPad",L[d]=m),L},this.getEngine=function(){var L={};return L[f]=t,L[g]=t,ki.call(L,Z,kt.engine),L},this.getOS=function(){var L={};return L[f]=t,L[g]=t,ki.call(L,Z,kt.os),H&&!L[f]&&ln&&ln.platform!="Unknown"&&(L[f]=ln.platform.replace(/chrome os/i,Hd).replace(/macos/i,Vd)),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 Z},this.setUA=function(L){return Z=typeof L===u&&L.length>R?Oa(L,R):L,this},this.setUA(Z),this};We.VERSION=n,We.BROWSER=sl([f,g,a]),We.CPU=sl([_]),We.DEVICE=sl([c,p,d,w,h,y,m,v,S]),We.ENGINE=We.OS=sl([f,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 z in V)_r.ua[z]=V[z]}}})(typeof window=="object"?window:To)});var j_=ie((UP,D_)=>{var e2=1/0,t2="[object Symbol]",n2=/^\s+|\s+$/g,od="\\ud800-\\udfff",R_="\\u0300-\\u036f\\ufe20-\\ufe23",C_="\\u20d0-\\u20f0",T_="\\ufe0e\\ufe0f",r2="["+od+"]",rd="["+R_+C_+"]",id="\\ud83c[\\udffb-\\udfff]",i2="(?:"+rd+"|"+id+")",I_="[^"+od+"]",N_="(?:\\ud83c[\\udde6-\\uddff]){2}",O_="[\\ud800-\\udbff][\\udc00-\\udfff]",P_="\\u200d",A_=i2+"?",L_="["+T_+"]?",o2="(?:"+P_+"(?:"+[I_,N_,O_].join("|")+")"+L_+A_+")*",l2=L_+A_+o2,s2="(?:"+[I_+rd+"?",rd,N_,O_,r2].join("|")+")",a2=RegExp(id+"(?="+id+")|"+s2+l2,"g"),u2=RegExp("["+P_+od+R_+C_+T_+"]"),c2=typeof global=="object"&&global&&global.Object===Object&&global,f2=typeof self=="object"&&self&&self.Object===Object&&self,d2=c2||f2||Function("return this")();function p2(e){return e.split("")}function m2(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function y2(e,t){for(var n=e.length;n--&&z_(t,e[n],0)>-1;);return n}function _2(e){return u2.test(e)}function k_(e){return _2(e)?v2(e):p2(e)}function v2(e){return e.match(a2)||[]}var w2=Object.prototype,x2=w2.toString,S_=d2.Symbol,E_=S_?S_.prototype:void 0,b_=E_?E_.toString:void 0;function k2(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:k2(e,t,n)}function E2(e){return!!e&&typeof e=="object"}function b2(e){return typeof e=="symbol"||E2(e)&&x2.call(e)==t2}function R2(e){return e==null?"":M_(e)}function C2(e,t,n){if(e=R2(e),e&&(n||t===void 0))return e.replace(n2,"");if(!e||!(t=M_(t)))return e;var r=k_(e),i=k_(t),o=g2(r,i),l=y2(r,i)+1;return S2(r,o,l).join("")}D_.exports=C2});var W_=ie((KP,V_)=>{"use strict";function N2(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 I0=(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 qx=P(ge());var Qt=P(ge()),tf=(0,Qt.createContext)({global:{},render:()=>{}});var Nn=(e,t)=>{let n=(0,Qt.useContext)(tf),{global:r,render:i}=n;r[t]||(r[t]=e),(0,Qt.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,Qt.startTransition)(i)}),o},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 i3=P(ge());var rf=P(ge()),M0=P(Jc()),D0=P(P0()),j0=P(G()),F0=()=>{let e=typeof window=="object"?window:globalThis;e.React=rf.default,e.ReactDOM=M0.default,e.JSXRuntime=j0.default,e.JSXDevRuntime=D0.default,e.Fragment=rf.default.Fragment};var ok={data:""},B0=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||ok,$0=e=>{let t=B0(e),n=t.data;return t.data="",n},lk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,sk=/\/\*[^]*?\*\/| +/g,U0=/\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,u=>/&/.test(u)?u.replace(/&/g,s):s?s+" "+u:u)):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},Xt={},H0=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+H0(e[n]);return t}return e},ak=(e,t,n,r,i)=>{let o=H0(e),l=Xt[o]||(Xt[o]=(u=>{let a=0,c=11;for(;a>>0;return"go"+c})(o));if(!Xt[l]){let u=o!==e?e:(a=>{let c,f,d=[{}];for(;c=lk.exec(a.replace(sk,""));)c[4]?d.shift():c[3]?(f=c[3].replace(U0," ").trim(),d.unshift(d[0][f]=d[0][f]||{})):d[0][c[1]]=c[2].replace(U0," ").trim();return d[0]})(e);Xt[l]=rr(i?{["@keyframes "+l]:u}:u,n?"":"."+l)}let s=n&&Xt.g?Xt.g:null;return n&&(Xt.g=Xt[l]),((u,a,c,f)=>{f?a.data=a.data.replace(f,u):a.data.indexOf(u)===-1&&(a.data=c?u+a.data:a.data+u)})(Xt[l],t,r,s),l},uk=(e,t,n)=>e.reduce((r,i,o)=>{let l=t[o];if(l&&l.call){let s=l(n),u=s&&s.props&&s.props.className||/^go/.test(s)&&s;l=u?"."+u:s&&typeof s=="object"?s.props?"":rr(s,""):s===!1?"":s}return r+i+(l??"")},"");function Ps(e){let t=this||{},n=e.call?e(t.p):e;return ak(n.unshift?n.raw?uk(n,[].slice.call(arguments,1),t.p):n.reduce((r,i)=>Object.assign(r,i&&i.call?i(t.p):i),{}):n,B0(t.target),t.g,t.o,t.k)}var YC=Ps.bind({g:1}),JC=Ps.bind({k:1});var V0=async(e=!0)=>{let t=typeof window=="object"?window:globalThis;e&&await I0(()=>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=Ps,t.extractCss=$0,t.pathname=n.pathname,t.cx=(...l)=>{let s=[];return l.filter(u=>u?(typeof u=="string"&&u.trim(),!0):!1).forEach(u=>{if(Array.isArray(u))for(let a of u)typeof a=="string"&&a.trim()&&s.push(a.trim());else s.push(u.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 lf(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function sf(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=lf(n);return(i,o)=>r.then(l=>o(l.transaction(t,i).objectStore(t)))}var of;function W0(){return of||(of=sf("keyval-store","keyval")),of}function af(e,t=W0()){return t("readonly",n=>lf(n.get(e)))}function As(e,t,n=W0()){return n("readwrite",r=>(r.put(t,e),lf(r.transaction)))}var wv=P(ge());var G0=/^(?:[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 ck(e){return typeof e=="string"&&G0.test(e)}var uf=ck;var go=P(G()),cf=({children:e,back:t})=>(0,go.jsxs)("div",{className:"flex items-center justify-center w-full h-full fixed inset-0 flex-col",children:[(0,go.jsx)("div",{children:e}),(0,go.jsxs)("div",{className:"border mt-2 rounded-md p-2 cursor-pointer",onClick:t||(()=>{history.back()}),children:[" ","Go Back"]})]});var K0=P(ge());var Ce=P(G()),Z0=window,yo=({children:e,className:t,show:n,backdrop:r,note:i,alt:o})=>{let l=Tn({icon:(0,Ce.jsx)("div",{className:"px-4 py-1",children:"Loading..."}),value:.111,ival:null},()=>{});return(0,K0.useEffect)(()=>(l.ival=setInterval(()=>{l.value+=.1333,l.value>=1.3&&(l.value=0),l.render()},200),Z0.loadingIcon&&(l.icon=(0,Ce.jsx)("img",{alt:"loading",src:Z0.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` @@ -93,8 +93,8 @@ Error generating stack: `+o.message+` ${gg(e,t.mode)} ${tg(e,t.mode)} ${vg(e,t.mode)} - `,(t?.hover||t?.active)&&_g({item:e,hover:t?.hover,active:t?.active}),eg(e,t.mode)])}catch(n){console.log(n)}return cx([])};var kg=P(G()),_o=(e,t,n,r,i)=>{let o=t.item,l;o.component?.style&&(l={style:o.component.style,className:_f(o.component.style,{mode:e.mode})});let s={className:_f(o,{mode:e.mode}),inherit:l},u={},a=t.item.childs,c;return t.item.type==="text"?(c=null,s.dangerouslySetInnerHTML={__html:t.item.html||""}):c=Array.isArray(a)&&a?.map(f=>{if(!f)return null;let{id:d}=f,p=n?e.layout?.meta[d]:e.meta[d];return p?(0,kg.jsx)(qt,{meta:p,is_layout:n,passprop:{...r},depth:i+1},d):null}),s.children=c,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:u}};var Cy=P(ge());var Ey=P(Rf());var Jr={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Us(e={}){let t={options:e,rootNode:yy(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)gy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>HS(t,n(r)),insert:(r,i)=>gy(t,n(r),i),remove:r=>VS(t,n(r))}}function HS(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,l=null,s=e.rootNode,u=null;for(let a=0;a{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:ZS,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{monaco:null,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 ar=P(ge());var ut=window;var KS=sf("prasi-cache","prasi-cache-store"),bo={timeout:null,store:KS},$s=(e,t)=>{let n=[..._y(t,"navigate(",")"),..._y(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(bo.timeout),bo.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},_y=(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 u=e.indexOf(`${s}${n}`,l+t.length+1),a=e.substring(l+t.length+1,u);r=u+2+n.length,o.push(a)}}if(i===r)break}return o};var sr=P(ge());var wy=P(yf()),lr=P(ge());var Cf=P(G()),xy=(e,t,n,r,i)=>o=>{let[l,s]=(0,lr.useState)({}),u=o.internal_key;n.item.script||(n.item.script={});let a=n.item.script;u&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[u]||(n.item.script_keyed[u]={}),a=n.item.script_keyed[u]),a.passprop||(a.passprop={});let c={};if(a.passprop){let p=!1;for(let[g,_]of Object.entries(o))["children","key"].includes(g)||(p=!0,c[g]=_,a.passprop[g]={end:0,start:0,value:_})}let f={...r,...c};if(!Array.isArray(o.children)&&(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let p=(0,wy.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(p)){let g=!0;for(let _ of p)!(0,lr.isValidElement)(_)&&typeof _=="object"||(g=!1);if(g)return p.map(_=>{let w=e.meta[_.id];if(w||(e.meta[_.id]={item:_},w=e.meta[_.id]),w){if(Object.keys(w.item).length<=3&&w.mitem){let h={...w.item},m=w.mitem.toJSON();w.item={...m,...h}}return(0,Cf.jsx)(qt,{is_layout:t,meta:w,passprop:f,parent_key:o.internal_key,depth:i},_.id)}return null})}}if(!Array.isArray(o.children)&&!(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let p=o.children.id;if(p){let g=e.meta[p];if(!g){e.meta[p]={item:o.children},g=e.meta[p];let _=g.item.component?.id;_&&e.comp.load(_).then(w=>{if(w){for(let[m,y]of Object.entries(w)){let v=g.item;v[m]||(v[m]=y)}let h=g.item.component?.props;for(let[m,y]of Object.entries(w.component?.props||{}))h[m]||(h[m]=y);s({})}})}return(0,Cf.jsx)(qt,{is_layout:t,meta:g,passprop:f,parent_key:o.internal_key,depth:i})}}return Tf(o,f,u?{parent_key:u}: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(vy(o,r,t,n));return i}return vy(r.children,r,t,n)},vy=(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 ti={},ky=(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,u=e.script?.init_local_effect,a=t?e.layout?.meta:e.meta,c=(0,sr.useRef)(ti[o]?ti[o]:r.value),[f,d]=(0,sr.useState)({}),p=c.current;return p.render=()=>{window.prasiContext.render?window.prasiContext.render():d({})},Hs(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[w,h]of Object.entries(_.instances[n.parent.instance_id]))if(h===n.item.id){o=w;break}}}return!u[o]&&(typeof u=="object"&&(u[o]=!0),(async()=>r.effect&&(await r.effect(p),i&&(ti[o]=p)))()),()=>{}},[...r.deps||[],location.pathname]),(0,sr.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 Ro=window,Co=(e,t,n)=>{Ro.prasiEdit||(Ro.prasiEdit={});let r=Ro.prasiEdit[n];r||(Ro.prasiEdit[n]={},r=Ro.prasiEdit[n]);let i=()=>{let l=t.get("id")||"",s=r[l];return s||(r[l]=[],s=r[l]),s},o=t.toJSON();return{...o,edit:{get props(){if(o.component?.props){let l={};for(let[s,u]of Object.entries(o.component.props))if(u.content){let a=t.get("component")?.get("props")?.get(s)?.get("content");a?l[s]={mode:"jsx",value:Co(e,a,n)}:l[s]={mode:"jsx",value:null}}else{let a=typeof u.valueBuilt=="string"?u.valueBuilt.trim():"";a.endsWith(`; -`)&&(a=a.substring(0,a.length-2)),a&&a===u.value.trim()?l[s]={mode:"string",value:JSON.parse(u.value)}:l[s]={mode:"raw",value:u.value,valueBuilt:u.valueBuilt}}return l}},get pending(){return[]},async commit(){let l={};for(let[s,u]of Object.entries(r))if(t){let a=t.toJSON(),c=a?.component?.props,f={};for(let p of u)if(p.type==="prop"&&c)c[p.name]&&(p.mode==="string"?(c[p.name].value=JSON.stringify(p.value),c[p.name].valueBuilt=JSON.stringify(p.value)):p.mode==="raw"?(c[p.name].value=p.value,p.valueBuilt?c[p.name].valueBuilt=p.valueBuilt:f[p.name]=p.value):p.mode==="jsx"&&(c[p.name]||(c[p.name]={meta:{type:"content-element"}}),p.value&&(c[p.name].content=Vs([p.value])[0])));else if(p.type==="set"&&typeof p.value=="object")for(let[g,_]of Object.entries(p.value))a[g]=_;let d=await _api.code_build(f);for(let[p,g]of Object.entries(d))c[p].valueBuilt=g;d[s]=a}t&&t.doc?.transact(()=>{for(let[s,u]of Object.entries(l)){let a=e[s];a.mitem&&syncronize(a.mitem,u)}})},setValue(l,s){let u=i(),a=s;l==="childs"&&(a=Vs(s)),u.push({type:"set",name:l,value:a})},setProp(l,s){let u=i();typeof s=="string"?u.push({type:"prop",mode:"string",name:l,value:s}):s.mode==="string"?u.push({type:"prop",mode:"string",name:l,value:s.value}):s.mode==="raw"?u.push({type:"prop",mode:"raw",name:l,value:s.value,valueBuilt:s.valueBuilt}):s.mode==="jsx"&&u.push({type:"prop",mode:"jsx",name:l,value:s.value})},get childs(){let l=t?.toJSON();return l.childs?l.childs.map(s=>{if(s){let u=e[s.id];if(u&&u.mitem)return Co(e,u.mitem,n)}}):[]},get parent(){if(t){let l=t.parent.toJSON();if(Array.isArray(l)){let s=(t.parent?.parent).get("id"),u=e[s].mitem;if(u)return{item:Co(e,u,n),child_type:"child",child_idx:l.findIndex(a=>a.id===o.id)}}}return null}}}},Vs=e=>e.map(n=>{let r={...n};if(delete r.edit,r.component?.props)for(let[i,o]of Object.entries(r.component.props))o.content&&(o.content=Vs([o.content]));return r.childs&&(r.childs=Vs(r.childs)),r});var If=P(G()),Sy=(e,t,n,r,i,o)=>{let l=_o(e,t,n,r,i);e.visit&&e.visit(t,l),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:ky(e,n,t),PassProp:xy(e,n,t,r,i)};let s=t.script,u=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:()=>{},_item:t.mitem?Co(e.meta,t.mitem,e.page.cur.id):t.item,_meta:e.meta,render:d=>{let p=d;if((0,ar.isValidElement)(d)&&d.props.children){let g=w=>{let h=!1,m=[];if((0,ar.isValidElement)(w)){if(w.type===t.script?.PassProp)return{should_replace:!0,el:{...w,props:{...w.props,internal_key:w.key}}};if(Array.isArray(w.props?.children))for(let y of w.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?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:{...w,props:{...w.props,children:m}}}},_=g(d);_.should_replace&&(p=_.el)}s&&(s.result=(0,If.jsx)(ar.Suspense,{children:p}))},params,...Bs(e),...u,...r};if(typeof r=="object"){for(let[d,p]of Object.entries(r))if(typeof p=="object"&&p&&p._jsx){let g=p;a[d]=(0,If.jsx)(QS,{fn:g.fn,passprop:{...r},meta:t})}}!ut.isEditor&&t.item.adv?.js&&$s(e,t.item.adv.js);let c=t.item.adv?.jsBuilt||"",f=Of(c,Nf)||"";try{new Function(...Object.keys(a),"___js",`// ${t.item.name}: ${t.item.id} + `,(t?.hover||t?.active)&&_g({item:e,hover:t?.hover,active:t?.active}),eg(e,t.mode)])}catch(n){console.log(n)}return cx([])};var kg=P(G()),vo=(e,t,n,r,i)=>{let o=t.item,l;o.component?.style&&(l={style:o.component.style,className:_f(o.component.style,{mode:e.mode})});let s={className:_f(o,{mode:e.mode}),inherit:l},u={},a=t.item.childs,c;return t.item.type==="text"?(c=null,s.dangerouslySetInnerHTML={__html:t.item.html||""}):c=Array.isArray(a)&&a?.map(f=>{if(!f)return null;let{id:d}=f,p=n?e.layout?.meta[d]:e.meta[d];return p?(0,kg.jsx)(qt,{meta:p,is_layout:n,passprop:{...r},depth:i+1},d):null}),s.children=c,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:u}};var Cy=P(ge());var Ey=P(Rf());var Jr={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Us(e={}){let t={options:e,rootNode:yy(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)gy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>HS(t,n(r)),insert:(r,i)=>gy(t,n(r),i),remove:r=>VS(t,n(r))}}function HS(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,l=null,s=e.rootNode,u=null;for(let a=0;a{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:ZS,doc:null,list:{},building:!1,meta:{},entry:[],tree:[],render:()=>{}},comp:{doc:null,item:null,loaded:{},list:{},group:{}},code:{},global_prop:[],ui:{monaco:null,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 ar=P(ge());var ut=window;var KS=sf("prasi-cache","prasi-cache-store"),Ro={timeout:null,store:KS},$s=(e,t)=>{let n=[..._y(t,"navigate(",")"),..._y(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(Ro.timeout),Ro.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},_y=(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 u=e.indexOf(`${s}${n}`,l+t.length+1),a=e.substring(l+t.length+1,u);r=u+2+n.length,o.push(a)}}if(i===r)break}return o};var sr=P(ge());var wy=P(yf()),lr=P(ge());var Cf=P(G()),xy=(e,t,n,r,i)=>o=>{let[l,s]=(0,lr.useState)({}),u=o.internal_key;n.item.script||(n.item.script={});let a=n.item.script;u&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[u]||(n.item.script_keyed[u]={}),a=n.item.script_keyed[u]),a.passprop||(a.passprop={});let c={};if(a.passprop){let p=!1;for(let[g,_]of Object.entries(o))["children","key"].includes(g)||(p=!0,c[g]=_,a.passprop[g]={end:0,start:0,value:_})}let f={...r,...c};if(!Array.isArray(o.children)&&(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let p=(0,wy.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(p)){let g=!0;for(let _ of p)!(0,lr.isValidElement)(_)&&typeof _=="object"||(g=!1);if(g)return p.map(_=>{let w=e.meta[_.id];if(w||(e.meta[_.id]={item:_},w=e.meta[_.id]),w){if(Object.keys(w.item).length<=3&&w.mitem){let h={...w.item},m=w.mitem.toJSON();w.item={...m,...h}}return(0,Cf.jsx)(qt,{is_layout:t,meta:w,passprop:f,parent_key:o.internal_key,depth:i},_.id)}return null})}}if(!Array.isArray(o.children)&&!(0,lr.isValidElement)(o.children)&&typeof o.children=="object"){let p=o.children.id;if(p){let g=e.meta[p];if(!g){e.meta[p]={item:o.children},g=e.meta[p];let _=g.item.component?.id;_&&e.comp.load(_).then(w=>{if(w){for(let[m,y]of Object.entries(w)){let v=g.item;v[m]||(v[m]=y)}let h=g.item.component?.props;for(let[m,y]of Object.entries(w.component?.props||{}))h[m]||(h[m]=y);s({})}})}return(0,Cf.jsx)(qt,{is_layout:t,meta:g,passprop:f,parent_key:o.internal_key,depth:i})}}return Tf(o,f,u?{parent_key:u}: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(vy(o,r,t,n));return i}return vy(r.children,r,t,n)},vy=(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 ti={},ky=(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,u=e.script?.init_local_effect,a=t?e.layout?.meta:e.meta,c=(0,sr.useRef)(ti[o]?ti[o]:r.value),[f,d]=(0,sr.useState)({}),p=c.current;return p.render=()=>{window.prasiContext.render?window.prasiContext.render():d({})},Hs(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[w,h]of Object.entries(_.instances[n.parent.instance_id]))if(h===n.item.id){o=w;break}}}return!u[o]&&(typeof u=="object"&&(u[o]=!0),(async()=>r.effect&&(await r.effect(p),i&&(ti[o]=p)))()),()=>{}},[...r.deps||[],location.pathname]),(0,sr.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 Co=window,ni=(e,t,n)=>{Co.prasiEdit||(Co.prasiEdit={});let r=Co.prasiEdit[n];r||(Co.prasiEdit[n]={},r=Co.prasiEdit[n]);let i=()=>{let l=t.get("id")||"",s=r[l];return s||(r[l]=[],s=r[l]),s},o=t.toJSON();return{...o,edit:{get props(){if(o.component?.props){let l={};for(let[s,u]of Object.entries(o.component.props))if(u.content){let a=t.get("component")?.get("props")?.get(s)?.get("content");a?l[s]={mode:"jsx",value:ni(e,a,n)}:l[s]={mode:"jsx",value:null}}else{let a=typeof u.valueBuilt=="string"?u.valueBuilt.trim():"";a.endsWith(`; +`)&&(a=a.substring(0,a.length-2)),a&&a===u.value.trim()?l[s]={mode:"string",value:JSON.parse(u.value)}:l[s]={mode:"raw",value:u.value,valueBuilt:u.valueBuilt}}return l}},get pending(){return[]},async commit(){let l={};for(let[s,u]of Object.entries(r))if(t){let a=t.toJSON(),c=a?.component?.props,f={};for(let p of u)if(p.type==="prop"&&c)c[p.name]&&(p.mode==="string"?(c[p.name].value=JSON.stringify(p.value),c[p.name].valueBuilt=JSON.stringify(p.value)):p.mode==="raw"?(c[p.name].value=p.value,p.valueBuilt?c[p.name].valueBuilt=p.valueBuilt:f[p.name]=p.value):p.mode==="jsx"&&(c[p.name]||(c[p.name]={meta:{type:"content-element"}}),p.value&&(c[p.name].content=Vs([p.value])[0])));else if(p.type==="set"&&typeof p.value=="object")for(let[g,_]of Object.entries(p.value))a[g]=_;let d=await _api.code_build(f);for(let[p,g]of Object.entries(d))c[p].valueBuilt=g;d[s]=a}t&&t.doc?.transact(()=>{for(let[s,u]of Object.entries(l)){let a=e[s];a.mitem&&syncronize(a.mitem,u)}})},setValue(l,s){let u=i(),a=s;l==="childs"&&(a=Vs(s)),u.push({type:"set",name:l,value:a})},setProp(l,s){let u=i();typeof s=="string"?u.push({type:"prop",mode:"string",name:l,value:s}):s.mode==="string"?u.push({type:"prop",mode:"string",name:l,value:s.value}):s.mode==="raw"?u.push({type:"prop",mode:"raw",name:l,value:s.value,valueBuilt:s.valueBuilt}):s.mode==="jsx"&&u.push({type:"prop",mode:"jsx",name:l,value:s.value})},get childs(){let l=t?.toJSON();if(l.component?.id){if((l.component?.props.child).content){let u=t.get("component")?.get("props")?.get("child")?.get("content");if(u)return[ni(e,u,n)]}return[]}return l.childs?l.childs.map(s=>{if(s){let u=e[s.id];if(u&&u.mitem)return ni(e,u.mitem,n)}}).filter(s=>s):[]},get parent(){if(t){let l=t.parent.toJSON();if(Array.isArray(l)){let s=(t.parent?.parent).get("id"),u=e[s].mitem;if(u)return{item:ni(e,u,n),child_type:"child",child_idx:l.findIndex(a=>a.id===o.id)}}}return null}}}},Vs=e=>e.map(n=>{let r={...n};if(delete r.edit,r.component?.props)for(let[i,o]of Object.entries(r.component.props))o.content&&(o.content=Vs([o.content]));return r.childs&&(r.childs=Vs(r.childs)),r});var If=P(G()),Sy=(e,t,n,r,i,o)=>{let l=vo(e,t,n,r,i);e.visit&&e.visit(t,l),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:ky(e,n,t),PassProp:xy(e,n,t,r,i)};let s=t.script,u=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:()=>{},_item:t.mitem?ni(e.meta,t.mitem,e.page.cur.id):t.item,_meta:e.meta,render:d=>{let p=d;if((0,ar.isValidElement)(d)&&d.props.children){let g=w=>{let h=!1,m=[];if((0,ar.isValidElement)(w)){if(w.type===t.script?.PassProp)return{should_replace:!0,el:{...w,props:{...w.props,internal_key:w.key}}};if(Array.isArray(w.props?.children))for(let y of w.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?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:{...w,props:{...w.props,children:m}}}},_=g(d);_.should_replace&&(p=_.el)}s&&(s.result=(0,If.jsx)(ar.Suspense,{children:p}))},params,...Bs(e),...u,...r};if(typeof r=="object"){for(let[d,p]of Object.entries(r))if(typeof p=="object"&&p&&p._jsx){let g=p;a[d]=(0,If.jsx)(QS,{fn:g.fn,passprop:{...r},meta:t})}}!ut.isEditor&&t.item.adv?.js&&$s(e,t.item.adv.js);let c=t.item.adv?.jsBuilt||"",f=Of(c,Nf)||"";try{new Function(...Object.keys(a),"___js",`// ${t.item.name}: ${t.item.id} try { ${f} } catch(e) { @@ -105,14 +105,14 @@ ${f} return ${g} `);l.props[f]={value:g};let w=_(...Object.values(u));typeof w=="function"&&(l.props[f].fn=w,w=(...h)=>{if(l)return l.props?.[f].fn(...h)}),u[f]=w,c[f]=w,r&&(r[f]=w)}catch{a.add(f)}if(location.pathname.startsWith("/ed/")&&ei.item_id&&t.item.id===ei.item_id){ei.scope={};for(let[f,d]of Object.entries(r))ei.scope[f]=d;ei.scope.self_props=c}}}},ct={timeout:null,set:new WeakSet,map:{},src:{}},XS=(e,t)=>{if(!ct.set.has(e)){ct.set.add(e);let n=(0,Ey.createId)();ct.map[n]={mprop:e},ct.src[n]=t}clearTimeout(ct.timeout),ct.timeout=setTimeout(async()=>{let n=await _api.code_build(ct.src),r=null;for(let[i,o]of Object.entries(n)){let l=ct.map[i].mprop;if(!r&&l.doc){r=l.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))ct.map[i].mprop.set("valueBuilt",o)}),ct.set=new WeakSet,ct.map={},ct.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 u=new Function(...Object.keys(o),`// [${t.item.name}] ${l}: ${t.item.id} return ${s.value||""} - `);s.fn=u(...Object.values(o))}}};var Pf=P(G()),Af=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=Nn(On,"VI"),[l,s]=(0,Cy.useState)({});e.render=()=>{s({})};let u=t;return e.item.component?.id&&(u||(u={}),by(o,e,n,u,i,r)),e.item.adv?.html?(0,Pf.jsx)(Ws,{meta:e,passprop:u,is_layout:n,depth:i}):e.item.adv?.js&&(Sy(o,e,n,u,i,r),e.script)?e.script.result:(0,Pf.jsx)(Ws,{meta:e,passprop:u,is_layout:n,depth:i})};var we=P(G()),qS=70,YS={debug:!!localStorage.getItem("prasi-js-debug")},Gs={enabled:!1,meta:{}},qt=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(Gs.enabled){let o=Gs.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>qS)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(YS.debug){let o="";for(let l=0;l{let o=Nn(On,"VI");if(n&&e.item.name==="children"){let s=[];for(let u of o.entry){let a=o.meta[u];if(a.item.adv?.js||a.item.component?.id)s.push((0,we.jsx)(Nt,{meta:a,children:(0,we.jsx)(Af,{meta:a,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let c=_o(o,a,!1,t,i);o.visit&&o.visit(a,c),s.push((0,we.jsx)("div",{...c.props}))}}return(0,we.jsx)(we.Fragment,{children:s.map((u,a)=>(0,we.jsx)(Ty.Fragment,{children:u},a))})}let l=_o(o,e,n,t,i);return o.visit&&o.visit(e,l),(0,we.jsx)("div",{...l.props})};var Ye=window,Iy=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Ye.notif?.onTap){let l=null,s=0;await new Promise(()=>{l=setInterval(()=>{s++,s>20&&clearInterval(l),o()&&clearInterval(l)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Ye.notif={async send(o){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof o.user_id=="string"?o.user_id:o.user_id.toString(),body:o.body,title:o.title,data:o.data})},async register(o){if(e&&e.site.api&&t.notif?.token)return await e.site.api._notif("register",{type:"register",id:typeof o=="string"?o:o.toString(),token:t.notif.token})},onReceive(o){},onTap(o){}};break;case"notification-tap":if(!Ye.notif?.onTap){i(()=>Ye.notif?.onTap?(Ye.notif?.onTap(r.notif),!0):!1);return}Ye.notif?.onTap&&Ye.notif?.onTap(r.notif);break;case"notification-receive":Ye.notif?.onReceive||i(()=>Ye.notif?.onReceive?(Ye.notif?.onReceive(r.notif),!0):!1),Ye.notif?.onReceive&&Ye.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Ye.notif={async send(n){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof n.user_id=="string"?n.user_id:n.user_id.toString(),body:n.body,title:n.title,data:n.data})}}};var Lf=window;Lf.prasi_ext||(Lf.prasi_ext={});var Zs=Lf.prasi_ext;var Ny=async e=>{let t=Zs[e.site.id];if(t||(Zs[e.site.id]={status:"init"},t=Zs[e.site.id]),t.status==="init"){if(t.status="loading",window.parent!==window){let n=r=>{window.parent.postMessage({mobile:!0,...r},"*")};window.addEventListener("message",async({data:r})=>{console.log(r),typeof r=="object"&&r.mobile}),n({type:"ready"})}await Iy(e,t),t.status="ready"}};var ni=P(G()),Oy=({})=>{let e=Nn(On,"VI"),t=Tn({tick:Date.now()});if(e.tick=t.tick,Ny(e),e.status!=="ready")return(0,ni.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,ni.jsx)(go,{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 Ks=P(G()),ri=window,Py=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:l,visit:s,script:u,page_id:a,render_stat:c,on_status_changed:f,on_preload:d,layout:p,comp_load:g})=>{let _=Nn(On,"VI");return _.mode=o,_.entry=t,_.on_preload=d,_.comp.load=g,ri.siteurl=(w,h)=>{if(w.startsWith("http://")||w.startsWith("https://"))return w;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=w;return y.startsWith("/")||(y="/"+y),ri.prasiContext.siteUrl&&(y=ri.prasiContext.siteUrl(y)),`${m.protocol}//${m.host}${y}`}return w},ri.isMobile=o==="mobile",ri.isDesktop=o==="desktop",ri.preload=(w,h)=>{_.page.navs[a]||(_.page.navs[a]=new Set);let m=typeof w=="string"?[w]:w;for(let y of m)_.page.navs[a].add(y);return clearTimeout(bo.timeout),bo.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=f,c==="disabled"&&(Gs.enabled=!1),_.meta!==e&&(_.meta=e),u&&(_.script.init_local_effect=u.init_local_effect),_.visit=s,_.status==="init"&&(_.site.db=l,_.site.api=i,Q0(_,{api_url:n,site_id:r})),d&&(0,Qs.useEffect)(()=>{setTimeout(()=>{let w=_.page.navs[_.page.cur.id];w&&d({urls:Array.from(w),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,Ks.jsx)(Nt,{children:(0,Ks.jsx)(Qs.Suspense,{children:(0,Ks.jsx)(Oy,{})})})};var zf=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:zf._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:{}}},Ay=()=>{if(!T.root){let e=new URL(location.href);zf._prasi.basepath&&(e.pathname=zf._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 ii=async e=>{let t=T.comp;for(let r of e)r&&r.type!=="text"&&Xs(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 As(`comp-${i}`,o);if(Object.keys(t.pending).length>0){console.warn(`Warning: component not found: ${Object.keys(t.pending)}`);return}await ii(Object.values(r))}catch(r){console.error(r)}},Xs=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&&Xs(i.content);delete t.pending[n]}else if(e.component?.props)for(let r of Object.values(e.component?.props||{}))r.content&&Xs(r.content)}}if(e.childs)for(let n of e.childs){let r=n;r&&r.type!=="text"&&Xs(r)}};var Ly=e=>new Promise(async t=>{let n=!1,r=await af(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(T.url`_prasi/page/${e}`)).json();n||t(i)}),JS=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let l of r){let s=await af(`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)}),zy=async e=>{let t=e.map(r=>T.route.router?.lookup(r)).filter(r=>r&&r.id);return await JS(t.map(r=>r?.id))};var Dy=P(My()),jy=()=>{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,Dy.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 Io(e,t){return function(){return e.apply(t,arguments)}}var{toString:eE}=Object.prototype,{getPrototypeOf:jf}=Object,Js=(e=>t=>{let n=eE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Pt=e=>(e=e.toLowerCase(),t=>Js(t)===e),ea=e=>t=>typeof t===e,{isArray:oi}=Array,No=ea("undefined");function tE(e){return e!==null&&!No(e)&&e.constructor!==null&&!No(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var By=Pt("ArrayBuffer");function nE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&By(e.buffer),t}var rE=ea("string"),ft=ea("function"),$y=ea("number"),ta=e=>e!==null&&typeof e=="object",iE=e=>e===!0||e===!1,Ys=e=>{if(Js(e)!=="object")return!1;let t=jf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},oE=Pt("Date"),lE=Pt("File"),sE=Pt("Blob"),aE=Pt("FileList"),uE=e=>ta(e)&&ft(e.pipe),cE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ft(e.append)&&((t=Js(e))==="formdata"||t==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"))},fE=Pt("URLSearchParams"),dE=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]),oi(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Vy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wy=e=>!No(e)&&e!==Vy;function Df(){let{caseless:e}=Wy(this)&&this||{},t={},n=(r,i)=>{let o=e&&Hy(t,i)||i;Ys(t[o])&&Ys(r)?t[o]=Df(t[o],r):Ys(r)?t[o]=Df({},r):oi(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Oo(t,(i,o)=>{n&&ft(i)?e[o]=Io(i,n):e[o]=i},{allOwnKeys:r}),e),mE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hE=(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)},gE=(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&&jf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yE=(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},_E=e=>{if(!e)return null;if(oi(e))return e;let t=e.length;if(!$y(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},vE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&jf(Uint8Array)),wE=(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])}},xE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},kE=Pt("HTMLFormElement"),SE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Fy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),EE=Pt("RegExp"),Gy=(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)},bE=e=>{Gy(e,(t,n)=>{if(ft(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ft(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+"'")})}})},RE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return oi(e)?r(e):r(String(e).split(t)),n},CE=()=>{},TE=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Mf="abcdefghijklmnopqrstuvwxyz",Uy="0123456789",Zy={DIGIT:Uy,ALPHA:Mf,ALPHA_DIGIT:Mf+Mf.toUpperCase()+Uy},IE=(e=16,t=Zy.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function NE(e){return!!(e&&ft(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var OE=e=>{let t=new Array(10),n=(r,i)=>{if(ta(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=oi(r)?[]:{};return Oo(r,(l,s)=>{let u=n(l,i+1);!No(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},PE=Pt("AsyncFunction"),AE=e=>e&&(ta(e)||ft(e))&&ft(e.then)&&ft(e.catch),x={isArray:oi,isArrayBuffer:By,isBuffer:tE,isFormData:cE,isArrayBufferView:nE,isString:rE,isNumber:$y,isBoolean:iE,isObject:ta,isPlainObject:Ys,isUndefined:No,isDate:oE,isFile:lE,isBlob:sE,isRegExp:EE,isFunction:ft,isStream:uE,isURLSearchParams:fE,isTypedArray:vE,isFileList:aE,forEach:Oo,merge:Df,extend:pE,trim:dE,stripBOM:mE,inherits:hE,toFlatObject:gE,kindOf:Js,kindOfTest:Pt,endsWith:yE,toArray:_E,forEachEntry:wE,matchAll:xE,isHTMLForm:kE,hasOwnProperty:Fy,hasOwnProp:Fy,reduceDescriptors:Gy,freezeMethods:bE,toObjectSet:RE,toCamelCase:SE,noop:CE,toFiniteNumber:TE,findKey:Hy,global:Vy,isContextDefined:Wy,ALPHABET:Zy,generateString:IE,isSpecCompliantForm:NE,toJSONObject:OE,isAsyncFn:PE,isThenable:AE};function li(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)}x.inherits(li,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:x.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Ky=li.prototype,Qy={};["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=>{Qy[e]={value:e}});Object.defineProperties(li,Qy);Object.defineProperty(Ky,"isAxiosError",{value:!0});li.from=(e,t,n,r,i,o)=>{let l=Object.create(Ky);return x.toFlatObject(e,l,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),li.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};var D=li;var na=null;function Ff(e){return x.isPlainObject(e)||x.isArray(e)}function qy(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function Xy(e,t,n){return e?e.concat(t).map(function(i,o){return i=qy(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function LE(e){return x.isArray(e)&&!e.some(Ff)}var zE=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function ME(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(na||FormData),n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,w){return!x.isUndefined(w[_])});let r=n.metaTokens,i=n.visitor||c,o=n.dots,l=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(x.isDate(g))return g.toISOString();if(!u&&x.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(g)||x.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,_,w){let h=g;if(g&&!w&&typeof g=="object"){if(x.endsWith(_,"{}"))_=r?_:_.slice(0,-2),g=JSON.stringify(g);else if(x.isArray(g)&&LE(g)||(x.isFileList(g)||x.endsWith(_,"[]"))&&(h=x.toArray(g)))return _=qy(_),h.forEach(function(y,v){!(x.isUndefined(y)||y===null)&&t.append(l===!0?Xy([_],v,o):l===null?_:_+"[]",a(y))}),!1}return Ff(g)?!0:(t.append(Xy(w,_,o),a(g)),!1)}let f=[],d=Object.assign(zE,{defaultVisitor:c,convertValue:a,isVisitable:Ff});function p(g,_){if(!x.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));f.push(g),x.forEach(g,function(h,m){(!(x.isUndefined(h)||h===null)&&i.call(t,h,x.isString(m)?m.trim():m,_,d))===!0&&p(h,_?_.concat(m):[m])}),f.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return p(e),t}var Ln=ME;function Yy(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Jy(e,t){this._pairs=[],e&&Ln(e,this,t)}var e_=Jy.prototype;e_.append=function(t,n){this._pairs.push([t,n])};e_.toString=function(t){let n=t?function(r){return t.call(this,r,Yy)}:Yy;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var ra=Jy;function DE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Po(e,t,n){if(!t)return e;let r=n&&n.encode||DE,i=n&&n.serialize,o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new ra(t,n).toString(r),o){let l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Uf=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){x.forEach(this.handlers,function(r){r!==null&&t(r)})}},Bf=Uf;var ia={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var t_=typeof URLSearchParams<"u"?URLSearchParams:ra;var n_=typeof FormData<"u"?FormData:null;var r_=typeof Blob<"u"?Blob:null;var i_={isBrowser:!0,classes:{URLSearchParams:t_,FormData:n_,Blob:r_},protocols:["http","https","file","blob","url","data"]};var $f={};Pv($f,{hasBrowserEnv:()=>o_,hasStandardBrowserEnv:()=>jE,hasStandardBrowserWebWorkerEnv:()=>FE});var o_=typeof window<"u"&&typeof document<"u",jE=(e=>o_&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),FE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Le={...$f,...i_};function Hf(e,t){return Ln(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Le.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function UE(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function BE(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return l=!l&&x.isArray(i)?i.length:l,u?(x.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!x.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&x.isArray(i[l])&&(i[l]=BE(i[l])),!s)}if(x.isFormData(e)&&x.isFunction(e.entries)){let n={};return x.forEachEntry(e,(r,i)=>{t(UE(r),i,n,0)}),n}return null}var oa=$E;function HE(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Vf={transitional:ia,adapter:["xhr","http"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(oa(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.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 Hf(t,this.formSerializer).toString();if((s=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return Ln(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),HE(t)):t}],transformResponse:[function(t){let n=this.transitional||Vf.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&x.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}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Vf.headers[e]={}});var si=Vf;var VE=x.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"]),l_=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]&&VE[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var s_=Symbol("internals");function Ao(e){return e&&String(e).trim().toLowerCase()}function la(e){return e===!1||e==null?e:x.isArray(e)?e.map(la):String(e)}function WE(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 GE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wf(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function ZE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function KE(e,t){let n=x.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 ai=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(s,u,a){let c=Ao(u);if(!c)throw new Error("header name must be a non-empty string");let f=x.findKey(i,c);(!f||i[f]===void 0||a===!0||a===void 0&&i[f]!==!1)&&(i[f||u]=la(s))}let l=(s,u)=>x.forEach(s,(a,c)=>o(a,c,u));return x.isPlainObject(t)||t instanceof this.constructor?l(t,n):x.isString(t)&&(t=t.trim())&&!GE(t)?l(l_(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Ao(t),t){let r=x.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return WE(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ao(t),t){let r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Wf(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(l){if(l=Ao(l),l){let s=x.findKey(r,l);s&&(!n||Wf(r,r[s],s,n))&&(delete r[s],i=!0)}}return x.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||Wf(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return x.forEach(this,(i,o)=>{let l=x.findKey(r,o);if(l){n[l]=la(i),delete n[o];return}let s=t?ZE(o):String(o).trim();s!==o&&delete n[o],n[s]=la(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.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[s_]=this[s_]={accessors:{}}).accessors,i=this.prototype;function o(l){let s=Ao(l);r[s]||(KE(i,l),r[s]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};ai.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ai.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(ai);var ze=ai;function Lo(e,t){let n=this||si,r=t||n,i=ze.from(r.headers),o=r.data;return x.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function zo(e){return!!(e&&e.__CANCEL__)}function a_(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(a_,D,{__CANCEL__:!0});var zn=a_;function Gf(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 u_=Le.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let l=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),x.isString(r)&&l.push("path="+r),x.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 Kf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Mo(e,t){return e&&!Zf(t)?Kf(e,t):t}var c_=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=x.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Qf(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function QE(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(u){let a=Date.now(),c=r[o];l||(l=a),n[i]=u,r[i]=a;let f=o,d=0;for(;f!==i;)d+=n[f++],f=f%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,u=r(s),a=o<=l;n=o;let c={loaded:o,total:l,progress:l?o/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&a?(l-o)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}var XE=typeof XMLHttpRequest<"u",p_=XE&&function(e){return new Promise(function(n,r){let i=e.data,o=ze.from(e.headers).normalize(),{responseType:l,withXSRFToken:s}=e,u;function a(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let c;if(x.isFormData(i)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((c=o.getContentType())!==!1){let[_,...w]=c?c.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([_||"multipart/form-data",...w].join("; "))}}let f=new XMLHttpRequest;if(e.auth){let _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+w))}let d=Mo(e.baseURL,e.url);f.open(e.method.toUpperCase(),Po(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function p(){if(!f)return;let _=ze.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),h={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:_,config:e,request:f};Gf(function(y){n(y),a()},function(y){r(y),a()},h),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(r(new D("Request aborted",D.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",h=e.transitional||ia;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),r(new D(w,h.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,f)),f=null},Le.hasStandardBrowserEnv&&(s&&x.isFunction(s)&&(s=s(e)),s||s!==!1&&c_(d))){let _=e.xsrfHeaderName&&e.xsrfCookieName&&u_.read(e.xsrfCookieName);_&&o.set(e.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in f&&x.forEach(o.toJSON(),function(w,h){f.setRequestHeader(h,w)}),x.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),l&&l!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",d_(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",d_(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=_=>{f&&(r(!_||_.type?new zn(null,e,f):_),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));let g=Qf(d);if(g&&Le.protocols.indexOf(g)===-1){r(new D("Unsupported protocol "+g+":",D.ERR_BAD_REQUEST,e));return}f.send(i||null)})};var Xf={http:na,xhr:p_};x.forEach(Xf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var m_=e=>`- ${e}`,qE=e=>x.isFunction(e)||e===null||e===!1,sa={getAdapter:e=>{e=x.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build")),l=t?o.length>1?`since : + `);s.fn=u(...Object.values(o))}}};var Pf=P(G()),Af=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=Nn(On,"VI"),[l,s]=(0,Cy.useState)({});e.render=()=>{s({})};let u=t;return e.item.component?.id&&(u||(u={}),by(o,e,n,u,i,r)),e.item.adv?.html?(0,Pf.jsx)(Ws,{meta:e,passprop:u,is_layout:n,depth:i}):e.item.adv?.js&&(Sy(o,e,n,u,i,r),e.script)?e.script.result:(0,Pf.jsx)(Ws,{meta:e,passprop:u,is_layout:n,depth:i})};var we=P(G()),qS=70,YS={debug:!!localStorage.getItem("prasi-js-debug")},Gs={enabled:!1,meta:{}},qt=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(Gs.enabled){let o=Gs.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>qS)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(YS.debug){let o="";for(let l=0;l{let o=Nn(On,"VI");if(n&&e.item.name==="children"){let s=[];for(let u of o.entry){let a=o.meta[u];if(a.item.adv?.js||a.item.component?.id)s.push((0,we.jsx)(Nt,{meta:a,children:(0,we.jsx)(Af,{meta:a,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let c=vo(o,a,!1,t,i);o.visit&&o.visit(a,c),s.push((0,we.jsx)("div",{...c.props}))}}return(0,we.jsx)(we.Fragment,{children:s.map((u,a)=>(0,we.jsx)(Ty.Fragment,{children:u},a))})}let l=vo(o,e,n,t,i);return o.visit&&o.visit(e,l),(0,we.jsx)("div",{...l.props})};var Ye=window,Iy=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Ye.notif?.onTap){let l=null,s=0;await new Promise(()=>{l=setInterval(()=>{s++,s>20&&clearInterval(l),o()&&clearInterval(l)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Ye.notif={async send(o){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof o.user_id=="string"?o.user_id:o.user_id.toString(),body:o.body,title:o.title,data:o.data})},async register(o){if(e&&e.site.api&&t.notif?.token)return await e.site.api._notif("register",{type:"register",id:typeof o=="string"?o:o.toString(),token:t.notif.token})},onReceive(o){},onTap(o){}};break;case"notification-tap":if(!Ye.notif?.onTap){i(()=>Ye.notif?.onTap?(Ye.notif?.onTap(r.notif),!0):!1);return}Ye.notif?.onTap&&Ye.notif?.onTap(r.notif);break;case"notification-receive":Ye.notif?.onReceive||i(()=>Ye.notif?.onReceive?(Ye.notif?.onReceive(r.notif),!0):!1),Ye.notif?.onReceive&&Ye.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Ye.notif={async send(n){if(e&&e.site.api)return await e.site.api._notif("send",{type:"send",id:typeof n.user_id=="string"?n.user_id:n.user_id.toString(),body:n.body,title:n.title,data:n.data})}}};var Lf=window;Lf.prasi_ext||(Lf.prasi_ext={});var Zs=Lf.prasi_ext;var Ny=async e=>{let t=Zs[e.site.id];if(t||(Zs[e.site.id]={status:"init"},t=Zs[e.site.id]),t.status==="init"){if(t.status="loading",window.parent!==window){let n=r=>{window.parent.postMessage({mobile:!0,...r},"*")};window.addEventListener("message",async({data:r})=>{console.log(r),typeof r=="object"&&r.mobile}),n({type:"ready"})}await Iy(e,t),t.status="ready"}};var ri=P(G()),Oy=({})=>{let e=Nn(On,"VI"),t=Tn({tick:Date.now()});if(e.tick=t.tick,Ny(e),e.status!=="ready")return(0,ri.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,ri.jsx)(yo,{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,ri.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,ri.jsx)(Nt,{children:(0,ri.jsx)(qt,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Ks=P(G()),ii=window,Py=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:l,visit:s,script:u,page_id:a,render_stat:c,on_status_changed:f,on_preload:d,layout:p,comp_load:g})=>{let _=Nn(On,"VI");return _.mode=o,_.entry=t,_.on_preload=d,_.comp.load=g,ii.siteurl=(w,h)=>{if(w.startsWith("http://")||w.startsWith("https://"))return w;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=w;return y.startsWith("/")||(y="/"+y),ii.prasiContext.siteUrl&&(y=ii.prasiContext.siteUrl(y)),`${m.protocol}//${m.host}${y}`}return w},ii.isMobile=o==="mobile",ii.isDesktop=o==="desktop",ii.preload=(w,h)=>{_.page.navs[a]||(_.page.navs[a]=new Set);let m=typeof w=="string"?[w]:w;for(let y of m)_.page.navs[a].add(y);return clearTimeout(Ro.timeout),Ro.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=f,c==="disabled"&&(Gs.enabled=!1),_.meta!==e&&(_.meta=e),u&&(_.script.init_local_effect=u.init_local_effect),_.visit=s,_.status==="init"&&(_.site.db=l,_.site.api=i,Q0(_,{api_url:n,site_id:r})),d&&(0,Qs.useEffect)(()=>{setTimeout(()=>{let w=_.page.navs[_.page.cur.id];w&&d({urls:Array.from(w),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,Ks.jsx)(Nt,{children:(0,Ks.jsx)(Qs.Suspense,{children:(0,Ks.jsx)(Oy,{})})})};var zf=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:zf._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:{}}},Ay=()=>{if(!T.root){let e=new URL(location.href);zf._prasi.basepath&&(e.pathname=zf._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 oi=async e=>{let t=T.comp;for(let r of e)r&&r.type!=="text"&&Xs(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 As(`comp-${i}`,o);if(Object.keys(t.pending).length>0){console.warn(`Warning: component not found: ${Object.keys(t.pending)}`);return}await oi(Object.values(r))}catch(r){console.error(r)}},Xs=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&&Xs(i.content);delete t.pending[n]}else if(e.component?.props)for(let r of Object.values(e.component?.props||{}))r.content&&Xs(r.content)}}if(e.childs)for(let n of e.childs){let r=n;r&&r.type!=="text"&&Xs(r)}};var Ly=e=>new Promise(async t=>{let n=!1,r=await af(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(T.url`_prasi/page/${e}`)).json();n||t(i)}),JS=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let l of r){let s=await af(`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)}),zy=async e=>{let t=e.map(r=>T.route.router?.lookup(r)).filter(r=>r&&r.id);return await JS(t.map(r=>r?.id))};var Dy=P(My()),jy=()=>{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,Dy.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 Io(e,t){return function(){return e.apply(t,arguments)}}var{toString:eE}=Object.prototype,{getPrototypeOf:jf}=Object,Js=(e=>t=>{let n=eE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Pt=e=>(e=e.toLowerCase(),t=>Js(t)===e),ea=e=>t=>typeof t===e,{isArray:li}=Array,No=ea("undefined");function tE(e){return e!==null&&!No(e)&&e.constructor!==null&&!No(e.constructor)&&ft(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var By=Pt("ArrayBuffer");function nE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&By(e.buffer),t}var rE=ea("string"),ft=ea("function"),$y=ea("number"),ta=e=>e!==null&&typeof e=="object",iE=e=>e===!0||e===!1,Ys=e=>{if(Js(e)!=="object")return!1;let t=jf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},oE=Pt("Date"),lE=Pt("File"),sE=Pt("Blob"),aE=Pt("FileList"),uE=e=>ta(e)&&ft(e.pipe),cE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ft(e.append)&&((t=Js(e))==="formdata"||t==="object"&&ft(e.toString)&&e.toString()==="[object FormData]"))},fE=Pt("URLSearchParams"),dE=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]),li(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Vy=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Wy=e=>!No(e)&&e!==Vy;function Df(){let{caseless:e}=Wy(this)&&this||{},t={},n=(r,i)=>{let o=e&&Hy(t,i)||i;Ys(t[o])&&Ys(r)?t[o]=Df(t[o],r):Ys(r)?t[o]=Df({},r):li(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Oo(t,(i,o)=>{n&&ft(i)?e[o]=Io(i,n):e[o]=i},{allOwnKeys:r}),e),mE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),hE=(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)},gE=(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&&jf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},yE=(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},_E=e=>{if(!e)return null;if(li(e))return e;let t=e.length;if(!$y(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},vE=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&jf(Uint8Array)),wE=(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])}},xE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},kE=Pt("HTMLFormElement"),SE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Fy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),EE=Pt("RegExp"),Gy=(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)},bE=e=>{Gy(e,(t,n)=>{if(ft(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ft(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+"'")})}})},RE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return li(e)?r(e):r(String(e).split(t)),n},CE=()=>{},TE=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Mf="abcdefghijklmnopqrstuvwxyz",Uy="0123456789",Zy={DIGIT:Uy,ALPHA:Mf,ALPHA_DIGIT:Mf+Mf.toUpperCase()+Uy},IE=(e=16,t=Zy.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function NE(e){return!!(e&&ft(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var OE=e=>{let t=new Array(10),n=(r,i)=>{if(ta(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=li(r)?[]:{};return Oo(r,(l,s)=>{let u=n(l,i+1);!No(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},PE=Pt("AsyncFunction"),AE=e=>e&&(ta(e)||ft(e))&&ft(e.then)&&ft(e.catch),x={isArray:li,isArrayBuffer:By,isBuffer:tE,isFormData:cE,isArrayBufferView:nE,isString:rE,isNumber:$y,isBoolean:iE,isObject:ta,isPlainObject:Ys,isUndefined:No,isDate:oE,isFile:lE,isBlob:sE,isRegExp:EE,isFunction:ft,isStream:uE,isURLSearchParams:fE,isTypedArray:vE,isFileList:aE,forEach:Oo,merge:Df,extend:pE,trim:dE,stripBOM:mE,inherits:hE,toFlatObject:gE,kindOf:Js,kindOfTest:Pt,endsWith:yE,toArray:_E,forEachEntry:wE,matchAll:xE,isHTMLForm:kE,hasOwnProperty:Fy,hasOwnProp:Fy,reduceDescriptors:Gy,freezeMethods:bE,toObjectSet:RE,toCamelCase:SE,noop:CE,toFiniteNumber:TE,findKey:Hy,global:Vy,isContextDefined:Wy,ALPHABET:Zy,generateString:IE,isSpecCompliantForm:NE,toJSONObject:OE,isAsyncFn:PE,isThenable:AE};function si(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)}x.inherits(si,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:x.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var Ky=si.prototype,Qy={};["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=>{Qy[e]={value:e}});Object.defineProperties(si,Qy);Object.defineProperty(Ky,"isAxiosError",{value:!0});si.from=(e,t,n,r,i,o)=>{let l=Object.create(Ky);return x.toFlatObject(e,l,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),si.call(l,e.message,t,n,r,i),l.cause=e,l.name=e.name,o&&Object.assign(l,o),l};var D=si;var na=null;function Ff(e){return x.isPlainObject(e)||x.isArray(e)}function qy(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function Xy(e,t,n){return e?e.concat(t).map(function(i,o){return i=qy(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function LE(e){return x.isArray(e)&&!e.some(Ff)}var zE=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function ME(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(na||FormData),n=x.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,w){return!x.isUndefined(w[_])});let r=n.metaTokens,i=n.visitor||c,o=n.dots,l=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function a(g){if(g===null)return"";if(x.isDate(g))return g.toISOString();if(!u&&x.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(g)||x.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,_,w){let h=g;if(g&&!w&&typeof g=="object"){if(x.endsWith(_,"{}"))_=r?_:_.slice(0,-2),g=JSON.stringify(g);else if(x.isArray(g)&&LE(g)||(x.isFileList(g)||x.endsWith(_,"[]"))&&(h=x.toArray(g)))return _=qy(_),h.forEach(function(y,v){!(x.isUndefined(y)||y===null)&&t.append(l===!0?Xy([_],v,o):l===null?_:_+"[]",a(y))}),!1}return Ff(g)?!0:(t.append(Xy(w,_,o),a(g)),!1)}let f=[],d=Object.assign(zE,{defaultVisitor:c,convertValue:a,isVisitable:Ff});function p(g,_){if(!x.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));f.push(g),x.forEach(g,function(h,m){(!(x.isUndefined(h)||h===null)&&i.call(t,h,x.isString(m)?m.trim():m,_,d))===!0&&p(h,_?_.concat(m):[m])}),f.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return p(e),t}var Ln=ME;function Yy(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Jy(e,t){this._pairs=[],e&&Ln(e,this,t)}var e_=Jy.prototype;e_.append=function(t,n){this._pairs.push([t,n])};e_.toString=function(t){let n=t?function(r){return t.call(this,r,Yy)}:Yy;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var ra=Jy;function DE(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Po(e,t,n){if(!t)return e;let r=n&&n.encode||DE,i=n&&n.serialize,o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new ra(t,n).toString(r),o){let l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Uf=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){x.forEach(this.handlers,function(r){r!==null&&t(r)})}},Bf=Uf;var ia={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var t_=typeof URLSearchParams<"u"?URLSearchParams:ra;var n_=typeof FormData<"u"?FormData:null;var r_=typeof Blob<"u"?Blob:null;var i_={isBrowser:!0,classes:{URLSearchParams:t_,FormData:n_,Blob:r_},protocols:["http","https","file","blob","url","data"]};var $f={};Pv($f,{hasBrowserEnv:()=>o_,hasStandardBrowserEnv:()=>jE,hasStandardBrowserWebWorkerEnv:()=>FE});var o_=typeof window<"u"&&typeof document<"u",jE=(e=>o_&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),FE=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function";var Le={...$f,...i_};function Hf(e,t){return Ln(e,new Le.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Le.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function UE(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function BE(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return l=!l&&x.isArray(i)?i.length:l,u?(x.hasOwnProp(i,l)?i[l]=[i[l],r]:i[l]=r,!s):((!i[l]||!x.isObject(i[l]))&&(i[l]=[]),t(n,r,i[l],o)&&x.isArray(i[l])&&(i[l]=BE(i[l])),!s)}if(x.isFormData(e)&&x.isFunction(e.entries)){let n={};return x.forEachEntry(e,(r,i)=>{t(UE(r),i,n,0)}),n}return null}var oa=$E;function HE(e,t,n){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var Vf={transitional:ia,adapter:["xhr","http"],transformRequest:[function(t,n){let r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=x.isObject(t);if(o&&x.isHTMLForm(t)&&(t=new FormData(t)),x.isFormData(t))return i?JSON.stringify(oa(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t))return t;if(x.isArrayBufferView(t))return t.buffer;if(x.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 Hf(t,this.formSerializer).toString();if((s=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){let u=this.env&&this.env.FormData;return Ln(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),HE(t)):t}],transformResponse:[function(t){let n=this.transitional||Vf.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&x.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}}};x.forEach(["delete","get","head","post","put","patch"],e=>{Vf.headers[e]={}});var ai=Vf;var VE=x.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"]),l_=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]&&VE[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var s_=Symbol("internals");function Ao(e){return e&&String(e).trim().toLowerCase()}function la(e){return e===!1||e==null?e:x.isArray(e)?e.map(la):String(e)}function WE(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 GE=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wf(e,t,n,r,i){if(x.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!x.isString(t)){if(x.isString(r))return t.indexOf(r)!==-1;if(x.isRegExp(r))return r.test(t)}}function ZE(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function KE(e,t){let n=x.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 ui=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(s,u,a){let c=Ao(u);if(!c)throw new Error("header name must be a non-empty string");let f=x.findKey(i,c);(!f||i[f]===void 0||a===!0||a===void 0&&i[f]!==!1)&&(i[f||u]=la(s))}let l=(s,u)=>x.forEach(s,(a,c)=>o(a,c,u));return x.isPlainObject(t)||t instanceof this.constructor?l(t,n):x.isString(t)&&(t=t.trim())&&!GE(t)?l(l_(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Ao(t),t){let r=x.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return WE(i);if(x.isFunction(n))return n.call(this,i,r);if(x.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ao(t),t){let r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Wf(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(l){if(l=Ao(l),l){let s=x.findKey(r,l);s&&(!n||Wf(r,r[s],s,n))&&(delete r[s],i=!0)}}return x.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||Wf(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){let n=this,r={};return x.forEach(this,(i,o)=>{let l=x.findKey(r,o);if(l){n[l]=la(i),delete n[o];return}let s=t?ZE(o):String(o).trim();s!==o&&delete n[o],n[s]=la(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){let n=Object.create(null);return x.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&x.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[s_]=this[s_]={accessors:{}}).accessors,i=this.prototype;function o(l){let s=Ao(l);r[s]||(KE(i,l),r[s]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};ui.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(ui.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(ui);var ze=ui;function Lo(e,t){let n=this||ai,r=t||n,i=ze.from(r.headers),o=r.data;return x.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function zo(e){return!!(e&&e.__CANCEL__)}function a_(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(a_,D,{__CANCEL__:!0});var zn=a_;function Gf(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 u_=Le.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let l=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),x.isString(r)&&l.push("path="+r),x.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 Kf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Mo(e,t){return e&&!Zf(t)?Kf(e,t):t}var c_=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=x.isString(l)?i(l):l;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}();function Qf(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function QE(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(u){let a=Date.now(),c=r[o];l||(l=a),n[i]=u,r[i]=a;let f=o,d=0;for(;f!==i;)d+=n[f++],f=f%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,u=r(s),a=o<=l;n=o;let c={loaded:o,total:l,progress:l?o/l:void 0,bytes:s,rate:u||void 0,estimated:u&&l&&a?(l-o)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}var XE=typeof XMLHttpRequest<"u",p_=XE&&function(e){return new Promise(function(n,r){let i=e.data,o=ze.from(e.headers).normalize(),{responseType:l,withXSRFToken:s}=e,u;function a(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}let c;if(x.isFormData(i)){if(Le.hasStandardBrowserEnv||Le.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if((c=o.getContentType())!==!1){let[_,...w]=c?c.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([_||"multipart/form-data",...w].join("; "))}}let f=new XMLHttpRequest;if(e.auth){let _=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(_+":"+w))}let d=Mo(e.baseURL,e.url);f.open(e.method.toUpperCase(),Po(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function p(){if(!f)return;let _=ze.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),h={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:_,config:e,request:f};Gf(function(y){n(y),a()},function(y){r(y),a()},h),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(r(new D("Request aborted",D.ECONNABORTED,e,f)),f=null)},f.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",h=e.transitional||ia;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),r(new D(w,h.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,f)),f=null},Le.hasStandardBrowserEnv&&(s&&x.isFunction(s)&&(s=s(e)),s||s!==!1&&c_(d))){let _=e.xsrfHeaderName&&e.xsrfCookieName&&u_.read(e.xsrfCookieName);_&&o.set(e.xsrfHeaderName,_)}i===void 0&&o.setContentType(null),"setRequestHeader"in f&&x.forEach(o.toJSON(),function(w,h){f.setRequestHeader(h,w)}),x.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),l&&l!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",d_(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",d_(e.onUploadProgress)),(e.cancelToken||e.signal)&&(u=_=>{f&&(r(!_||_.type?new zn(null,e,f):_),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u)));let g=Qf(d);if(g&&Le.protocols.indexOf(g)===-1){r(new D("Unsupported protocol "+g+":",D.ERR_BAD_REQUEST,e));return}f.send(i||null)})};var Xf={http:na,xhr:p_};x.forEach(Xf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var m_=e=>`- ${e}`,qE=e=>x.isFunction(e)||e===null||e===!1,sa={getAdapter:e=>{e=x.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build")),l=t?o.length>1?`since : `+o.map(m_).join(` -`):" "+m_(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:Xf};function qf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zn(null,e)}function aa(e){return qf(e),e.headers=ze.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),sa.getAdapter(e.adapter||si.adapter)(e).then(function(r){return qf(e),r.data=Lo.call(e,e.transformResponse,r),r.headers=ze.from(r.headers),r},function(r){return zo(r)||(qf(e),r&&r.response&&(r.response.data=Lo.call(e,e.transformResponse,r.response),r.response.headers=ze.from(r.response.headers))),Promise.reject(r)})}var h_=e=>e instanceof ze?{...e}:e;function Jt(e,t){t=t||{};let n={};function r(a,c,f){return x.isPlainObject(a)&&x.isPlainObject(c)?x.merge.call({caseless:f},a,c):x.isPlainObject(c)?x.merge({},c):x.isArray(c)?c.slice():c}function i(a,c,f){if(x.isUndefined(c)){if(!x.isUndefined(a))return r(void 0,a,f)}else return r(a,c,f)}function o(a,c){if(!x.isUndefined(c))return r(void 0,c)}function l(a,c){if(x.isUndefined(c)){if(!x.isUndefined(a))return r(void 0,a)}else return r(void 0,c)}function s(a,c,f){if(f in t)return r(a,c);if(f in e)return r(void 0,a)}let u={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,c)=>i(h_(a),h_(c),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(c){let f=u[c]||i,d=f(e[c],t[c],c);x.isUndefined(d)&&f!==s||(n[c]=d)}),n}var ua="1.6.8";var Yf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var g_={};Yf.transitional=function(t,n,r){function i(o,l){return"[Axios v"+ua+"] 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&&!g_[l]&&(g_[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 YE(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],u=s===void 0||l(s,o,e);if(u!==!0)throw new D("option "+o+" must be "+u,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}var ca={assertOptions:YE,validators:Yf};var Mn=ca.validators,ui=class{constructor(t){this.defaults=t,this.interceptors={request:new Bf,response:new Bf}}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=Jt(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&ca.assertOptions(r,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:ca.assertOptions(i,{encode:Mn.function,serialize:Mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=ze.concat(l,o);let s=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(u=u&&_.synchronous,s.unshift(_.fulfilled,_.rejected))});let a=[];this.interceptors.response.forEach(function(_){a.push(_.fulfilled,_.rejected)});let c,f=0,d;if(!u){let g=[aa.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,a),d=g.length,c=Promise.resolve(n);f{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}}},y_=Jf;function ed(e){return function(n){return e.apply(null,n)}}function td(e){return x.isObject(e)&&e.isAxiosError===!0}var nd={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(nd).forEach(([e,t])=>{nd[t]=e});var __=nd;function v_(e){let t=new Do(e),n=Io(Do.prototype.request,t);return x.extend(n,Do.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return v_(Jt(e,i))},n}var ue=v_(si);ue.Axios=Do;ue.CanceledError=zn;ue.CancelToken=y_;ue.isCancel=zo;ue.VERSION=ua;ue.toFormData=Ln;ue.AxiosError=D;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=ed;ue.isAxiosError=td;ue.mergeConfig=Jt;ue.AxiosHeaders=ze;ue.formToJSON=e=>oa(x.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=sa.getAdapter;ue.HttpStatusCode=__;ue.default=ue;var fa=ue;var{Axios:xP,AxiosError:kP,CanceledError:SP,isCancel:EP,CancelToken:bP,VERSION:RP,all:CP,Cancel:TP,isAxiosError:IP,spread:NP,toFormData:OP,AxiosHeaders:PP,HttpStatusCode:AP,formToJSON:LP,getAdapter:zP,mergeConfig:MP}=fa;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var JE=typeof window<"u"?window:null,w_=typeof global<"u"?global:void 0,ci=async(e,t,n)=>{let r={...n},i=null,o=!1,l=null,s=[];if(Array.isArray(t))for(let f of t)f instanceof File&&(s.push(f),o=!0),typeof f=="function"&&(l=f);else t instanceof File&&(o=!0,s.push(t));if(!o)i=JSON.stringify(t),r["content-type"]="aplication/json";else{let f=new FormData;for(let d of s)f.append(d.name,d);i=f,delete r["content-type"],r.enctype="multipart/form-data;"}let u=new URL(e);if(JE!==null){let f=new URL(location.href),d="";if(u.host===f.host||w_&&typeof w_.server_hook=="function"?d=u.toString():d=`${f.protocol}//${f.host}/_proxy/${encodeURIComponent(u.toString())}`,d){if(l)return(await fa({method:t?"post":void 0,url:d,data:i,onUploadProgress:l})).data;{let g=await(await fetch(d,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(g,x_)}catch{return g}}}}let c=await(await fetch(u,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(c,x_)}catch{return c}},x_=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;var F_=P(j_());var U_=async(e,t)=>{let n=(0,F_.default)(e,"/"),r=await ci(I2(n,"/_prasi/_")),i="";r&&r.prasi&&(i=r.prasi);let o=T2(n);if(i==="v2")await new Promise(l=>{let s=document,u=s.createElement("script");u.onload=async()=>{l()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let a=localStorage.getItem("api-ts-"+n);t?u.src=`${o}/_prasi/load.js?url=${n}&v3&dev=1&ts=${a}`:u.src=`${o}/_prasi/load.js?url=${n}&v3&ts=${a}`,document.querySelector(`script[src="${u.src}"]`)?l():s.body.appendChild(u)});else{let l=await fetch(o+"/_prasi/api-entry");if(ut.prasiApi[n]={apiEntry:(await l.json()).srv},t){let s=await fetch(o+"/_prasi/api-types");ut.prasiApi[n].apiTypes=await s.text(),ut.prasiApi[n].prismaTypes={"prisma.d.ts":await ld(`${o}/_prasi/prisma/index.d.ts`),"runtime/index.d.ts":await ld(`${o}/_prasi/prisma/runtime/index.d.ts`),"runtime/library.d.ts":await ld(`${o}/_prasi/prisma/runtime/library.d.ts`)}}}},T2=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`},I2=(e,t)=>{let n=new URL(e);return n.pathname=t,n.toString()},ld=async(e,t)=>await(await fetch(e)).text();var jo={},$_=e=>{ut.prasiApi||(ut.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return ut.prasiApi[n]||jo[n]||(jo[n]=U_(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(l,s)=>{let u=new URL(n);u.pathname=l.split("/").filter(f=>f).join("/");let a=new URL(location.href),c="";return u.host===a.host||s===!1?c=u.toString():c=`${a.protocol}//${a.host}/_proxy/${encodeURIComponent(u.toString())}`,c};let o=l=>function(...s){return new Promise(async(u,a)=>{try{let c=ut.prasiApi[n];if(!c&&jo&&typeof jo[n]=="object"&&(await jo[n],c=ut.prasiApi[n]),c){if(l==="_raw"){let p=s[0],g=`${n}${p}`,_=await B_(g,s.slice(1));u(_);return}if(c.apiEntry||(c.apiEntry={}),c.apiEntry&&!c.apiEntry[l]){a(`API ${l.toString()} not found, existing API: +`):" "+m_(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:Xf};function qf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zn(null,e)}function aa(e){return qf(e),e.headers=ze.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),sa.getAdapter(e.adapter||ai.adapter)(e).then(function(r){return qf(e),r.data=Lo.call(e,e.transformResponse,r),r.headers=ze.from(r.headers),r},function(r){return zo(r)||(qf(e),r&&r.response&&(r.response.data=Lo.call(e,e.transformResponse,r.response),r.response.headers=ze.from(r.response.headers))),Promise.reject(r)})}var h_=e=>e instanceof ze?{...e}:e;function Jt(e,t){t=t||{};let n={};function r(a,c,f){return x.isPlainObject(a)&&x.isPlainObject(c)?x.merge.call({caseless:f},a,c):x.isPlainObject(c)?x.merge({},c):x.isArray(c)?c.slice():c}function i(a,c,f){if(x.isUndefined(c)){if(!x.isUndefined(a))return r(void 0,a,f)}else return r(a,c,f)}function o(a,c){if(!x.isUndefined(c))return r(void 0,c)}function l(a,c){if(x.isUndefined(c)){if(!x.isUndefined(a))return r(void 0,a)}else return r(void 0,c)}function s(a,c,f){if(f in t)return r(a,c);if(f in e)return r(void 0,a)}let u={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,c)=>i(h_(a),h_(c),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(c){let f=u[c]||i,d=f(e[c],t[c],c);x.isUndefined(d)&&f!==s||(n[c]=d)}),n}var ua="1.6.8";var Yf={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Yf[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var g_={};Yf.transitional=function(t,n,r){function i(o,l){return"[Axios v"+ua+"] 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&&!g_[l]&&(g_[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 YE(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],u=s===void 0||l(s,o,e);if(u!==!0)throw new D("option "+o+" must be "+u,D.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new D("Unknown option "+o,D.ERR_BAD_OPTION)}}var ca={assertOptions:YE,validators:Yf};var Mn=ca.validators,ci=class{constructor(t){this.defaults=t,this.interceptors={request:new Bf,response:new Bf}}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=Jt(this.defaults,n);let{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&ca.assertOptions(r,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),i!=null&&(x.isFunction(i)?n.paramsSerializer={serialize:i}:ca.assertOptions(i,{encode:Mn.function,serialize:Mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&x.merge(o.common,o[n.method]);o&&x.forEach(["delete","get","head","post","put","patch","common"],g=>{delete o[g]}),n.headers=ze.concat(l,o);let s=[],u=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(n)===!1||(u=u&&_.synchronous,s.unshift(_.fulfilled,_.rejected))});let a=[];this.interceptors.response.forEach(function(_){a.push(_.fulfilled,_.rejected)});let c,f=0,d;if(!u){let g=[aa.bind(this),void 0];for(g.unshift.apply(g,s),g.push.apply(g,a),d=g.length,c=Promise.resolve(n);f{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}}},y_=Jf;function ed(e){return function(n){return e.apply(null,n)}}function td(e){return x.isObject(e)&&e.isAxiosError===!0}var nd={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(nd).forEach(([e,t])=>{nd[t]=e});var __=nd;function v_(e){let t=new Do(e),n=Io(Do.prototype.request,t);return x.extend(n,Do.prototype,t,{allOwnKeys:!0}),x.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return v_(Jt(e,i))},n}var ue=v_(ai);ue.Axios=Do;ue.CanceledError=zn;ue.CancelToken=y_;ue.isCancel=zo;ue.VERSION=ua;ue.toFormData=Ln;ue.AxiosError=D;ue.Cancel=ue.CanceledError;ue.all=function(t){return Promise.all(t)};ue.spread=ed;ue.isAxiosError=td;ue.mergeConfig=Jt;ue.AxiosHeaders=ze;ue.formToJSON=e=>oa(x.isHTMLForm(e)?new FormData(e):e);ue.getAdapter=sa.getAdapter;ue.HttpStatusCode=__;ue.default=ue;var fa=ue;var{Axios:xP,AxiosError:kP,CanceledError:SP,isCancel:EP,CancelToken:bP,VERSION:RP,all:CP,Cancel:TP,isAxiosError:IP,spread:NP,toFormData:OP,AxiosHeaders:PP,HttpStatusCode:AP,formToJSON:LP,getAdapter:zP,mergeConfig:MP}=fa;BigInt.prototype.toJSON=function(){return"BigInt::"+this.toString()};var JE=typeof window<"u"?window:null,w_=typeof global<"u"?global:void 0,fi=async(e,t,n)=>{let r={...n},i=null,o=!1,l=null,s=[];if(Array.isArray(t))for(let f of t)f instanceof File&&(s.push(f),o=!0),typeof f=="function"&&(l=f);else t instanceof File&&(o=!0,s.push(t));if(!o)i=JSON.stringify(t),r["content-type"]="aplication/json";else{let f=new FormData;for(let d of s)f.append(d.name,d);i=f,delete r["content-type"],r.enctype="multipart/form-data;"}let u=new URL(e);if(JE!==null){let f=new URL(location.href),d="";if(u.host===f.host||w_&&typeof w_.server_hook=="function"?d=u.toString():d=`${f.protocol}//${f.host}/_proxy/${encodeURIComponent(u.toString())}`,d){if(l)return(await fa({method:t?"post":void 0,url:d,data:i,onUploadProgress:l})).data;{let g=await(await fetch(d,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(g,x_)}catch{return g}}}}let c=await(await fetch(u,t?{method:"POST",body:i,headers:r}:void 0)).text();try{return JSON.parse(c,x_)}catch{return c}},x_=(e,t)=>typeof t=="string"&&t.startsWith("BigInt::")?BigInt(t.substring(8)):t;var F_=P(j_());var U_=async(e,t)=>{let n=(0,F_.default)(e,"/"),r=await fi(I2(n,"/_prasi/_")),i="";r&&r.prasi&&(i=r.prasi);let o=T2(n);if(i==="v2")await new Promise(l=>{let s=document,u=s.createElement("script");u.onload=async()=>{l()},localStorage.getItem("api-ts-"+n)||localStorage.setItem("api-ts-"+n,Date.now().toString());let a=localStorage.getItem("api-ts-"+n);t?u.src=`${o}/_prasi/load.js?url=${n}&v3&dev=1&ts=${a}`:u.src=`${o}/_prasi/load.js?url=${n}&v3&ts=${a}`,document.querySelector(`script[src="${u.src}"]`)?l():s.body.appendChild(u)});else{let l=await fetch(o+"/_prasi/api-entry");if(ut.prasiApi[n]={apiEntry:(await l.json()).srv},t){let s=await fetch(o+"/_prasi/api-types");ut.prasiApi[n].apiTypes=await s.text(),ut.prasiApi[n].prismaTypes={"prisma.d.ts":await ld(`${o}/_prasi/prisma/index.d.ts`),"runtime/index.d.ts":await ld(`${o}/_prasi/prisma/runtime/index.d.ts`),"runtime/library.d.ts":await ld(`${o}/_prasi/prisma/runtime/library.d.ts`)}}}},T2=e=>{let t=new URL(e);return`${t.protocol}//${t.host}`},I2=(e,t)=>{let n=new URL(e);return n.pathname=t,n.toString()},ld=async(e,t)=>await(await fetch(e)).text();var jo={},$_=e=>{ut.prasiApi||(ut.prasiApi={});try{let t=new URL(e),n=`${t.protocol}//${t.host}`;return ut.prasiApi[n]||jo[n]||(jo[n]=U_(n,location.hostname.includes("prasi"))),new Proxy({},{get:(r,i)=>{if(i==="_url")return(l,s)=>{let u=new URL(n);u.pathname=l.split("/").filter(f=>f).join("/");let a=new URL(location.href),c="";return u.host===a.host||s===!1?c=u.toString():c=`${a.protocol}//${a.host}/_proxy/${encodeURIComponent(u.toString())}`,c};let o=l=>function(...s){return new Promise(async(u,a)=>{try{let c=ut.prasiApi[n];if(!c&&jo&&typeof jo[n]=="object"&&(await jo[n],c=ut.prasiApi[n]),c){if(l==="_raw"){let p=s[0],g=`${n}${p}`,_=await B_(g,s.slice(1));u(_);return}if(c.apiEntry||(c.apiEntry={}),c.apiEntry&&!c.apiEntry[l]){a(`API ${l.toString()} not found, existing API: - ${Object.keys(c.apiEntry||{}).join(` - - `)}`);return}let f=c.apiEntry[l].url,d=c.apiEntry[l].args;if(f&&d){if(s.length>0&&d.length>0)for(let[_,w]of Object.entries(s)){let h=d[parseInt(_)];d&&d.includes(h)&&w&&typeof w!="string"&&typeof w!="number"||(f=f.replace(`:${h}?`,w+""),f=f.replace(`:${h}`,w+""))}let p=`${n}${f}`,g=await B_(p,s);u(g)}else console.error(`API Not Found: ${l.toString()}`)}else a("Failed to load API [Proxy]: "+n)}catch(c){a(c)}})};return i==="then"?new Proxy({},{get:(l,s)=>o(s)}):o(i)}})}catch{return null}},B_=async(e,t)=>await ci(e,t,{"content-type":"application/json"});var dv=P(W_());function gi(e){let t=e.length;for(;--t>=0;)e[t]=0}var L2=0,N1=1,z2=2,M2=3,D2=258,Nd=29,Jo=256,Wo=Jo+1+Nd,pi=30,Od=19,O1=2*Wo+1,ur=15,sd=16,j2=7,Pd=256,P1=16,A1=17,L1=18,xd=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]),ya=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]),F2=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),z1=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),U2=512,nn=new Array((Wo+2)*2);gi(nn);var $o=new Array(pi*2);gi($o);var Go=new Array(U2);gi(Go);var Zo=new Array(D2-M2+1);gi(Zo);var Ad=new Array(Nd);gi(Ad);var _a=new Array(pi);gi(_a);function ad(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 M1,D1,j1;function ud(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var F1=e=>e<256?Go[e]:Go[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>sd-n?(e.bi_buf|=t<>sd-e.bi_valid,e.bi_valid+=n-sd):(e.bi_buf|=t<{Ve(e,n[t*2],n[t*2+1])},U1=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},B2=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)},$2=(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,u=t.stat_desc.max_length,a,c,f,d,p,g,_=0;for(d=0;d<=ur;d++)e.bl_count[d]=0;for(n[e.heap[e.heap_max]*2+1]=0,a=e.heap_max+1;au&&(d=u,_++),n[c*2+1]=d,!(c>r)&&(e.bl_count[d]++,p=0,c>=s&&(p=l[c-s]),g=n[c*2],e.opt_len+=g*(d+p),o&&(e.static_len+=g*(i[c*2+1]+p)));if(_!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,_-=2}while(_>0);for(d=u;d!==0;d--)for(c=e.bl_count[d];c!==0;)f=e.heap[--a],!(f>r)&&(n[f*2+1]!==d&&(e.opt_len+=(d-n[f*2+1])*n[f*2],n[f*2+1]=d),c--)}},B1=(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]=U1(r[s]++,s))}},H2=()=>{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{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},G_=(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?Lt(e,i,t):(l=Zo[i],Lt(e,l+Jo+1,t),s=xd[l],s!==0&&(i-=Ad[l],Ve(e,i,s)),r--,l=F1(r),Lt(e,l,n),s=ya[l],s!==0&&(r-=_a[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,u=-1,a;for(e.heap_len=0,e.heap_max=O1,l=0;l>1;l>=1;l--)cd(e,n,l);a=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],cd(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++,cd(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],$2(e,t),B1(n,u,e.bl_count)},K_=(e,t,n)=>{let r,i=-1,o,l=t[0*2+1],s=0,u=7,a=4;for(l===0&&(u=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,u=7,a=4;for(l===0&&(u=138,a=3),r=0;r<=n;r++)if(o=l,l=t[(r+1)*2+1],!(++s{let t;for(K_(e,e.dyn_ltree,e.l_desc.max_code),K_(e,e.dyn_dtree,e.d_desc.max_code),kd(e,e.bl_desc),t=Od-1;t>=3&&e.bl_tree[z1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},W2=(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{X_||(H2(),X_=!0),e.l_desc=new ud(e.dyn_ltree,M1),e.d_desc=new ud(e.dyn_dtree,D1),e.bl_desc=new ud(e.bl_tree,j1),e.bi_buf=0,e.bi_valid=0,$1(e)},V1=(e,t,n,r)=>{Ve(e,(L2<<1)+(r?1:0),3),H1(e),Ko(e,n),Ko(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},K2=e=>{Ve(e,N1<<1,3),Lt(e,Pd,nn),B2(e)},Q2=(e,t,n,r)=>{let i,o,l=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=G2(e)),kd(e,e.l_desc),kd(e,e.d_desc),l=V2(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?V1(e,t,n,r):e.strategy===4||o===i?(Ve(e,(N1<<1)+(r?1:0),3),Z_(e,nn,$o)):(Ve(e,(z2<<1)+(r?1:0),3),W2(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),Z_(e,e.dyn_ltree,e.dyn_dtree)),$1(e),r&&H1(e)},X2=(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[(Zo[n]+Jo+1)*2]++,e.dyn_dtree[F1(t)*2]++),e.sym_next===e.sym_end),q2=Z2,Y2=V1,J2=Q2,eb=X2,tb=K2,nb={_tr_init:q2,_tr_stored_block:Y2,_tr_flush_block:J2,_tr_tally:eb,_tr_align:tb},rb=(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=rb,ib=()=>{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},ob=new Uint32Array(ib()),lb=(e,t,n,r)=>{let i=ob,o=r+n;e^=-1;for(let l=r;l>>8^i[(e^t[l])&255];return e^-1},he=lb,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:sb,_tr_stored_block:Sd,_tr_flush_block:ab,_tr_tally:Fn,_tr_align:ub}=nb,{Z_NO_FLUSH:Un,Z_PARTIAL_FLUSH:cb,Z_FULL_FLUSH:fb,Z_FINISH:dt,Z_BLOCK:q_,Z_OK:xe,Z_STREAM_END:Y_,Z_STREAM_ERROR:zt,Z_DATA_ERROR:db,Z_BUF_ERROR:fd,Z_DEFAULT_COMPRESSION:pb,Z_FILTERED:mb,Z_HUFFMAN_ONLY:da,Z_RLE:hb,Z_FIXED:gb,Z_DEFAULT_STRATEGY:yb,Z_UNKNOWN:_b,Z_DEFLATED:xa}=hr,vb=9,wb=15,xb=8,kb=29,Sb=256,Ed=Sb+1+kb,Eb=30,bb=19,Rb=2*Ed+1,Cb=15,U=3,jn=258,Mt=jn+U+1,Tb=32,mi=42,Ld=57,bd=69,Rd=73,Cd=91,Td=103,cr=113,Uo=666,Me=1,yi=2,pr=3,_i=4,Ib=3,fr=(e,t)=>(e.msg=dr[t],t),J_=e=>e*2-(e>4?9:0),Dn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Nb=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)},Ob=(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))},et=(e,t)=>{ab(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Je(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},Id=(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)},W1=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,l=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Mt?e.strstart-(e.w_size-Mt):0,a=e.window,c=e.w_mask,f=e.prev,d=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=f[t&c])>u&&--n!==0);return l<=e.lookahead?l:e.lookahead},hi=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),Nb(e),r+=t),e.strm.avail_in===0)break;if(n=Id(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,Je(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&&(Id(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&&(Id(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===dt)&&t!==Un&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,l=t===dt&&e.strm.avail_in===0&&r===i?1:0,Sd(e,e.block_start,r,l),e.block_start+=r,Je(e.strm)),l?pr:Me)},dd=(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-Mt&&(e.match_length=W1(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&&(et(e,!1),e.strm.avail_out===0))return Me}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&&(et(e,!1),e.strm.avail_out===0))return Me}else if(e.match_available){if(r=Fn(e,0,e.window[e.strstart-1]),r&&et(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Me}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(hi(e),e.lookahead<=jn&&t===Un)return Me;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&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?pr:_i):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:yi},Ab=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(hi(e),e.lookahead===0)){if(t===Un)return Me;break}if(e.match_length=0,n=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?pr:_i):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:yi};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,G1),new At(4,4,8,4,dd),new At(4,5,16,8,dd),new At(4,6,32,32,dd),new At(4,4,16,16,fi),new At(8,16,32,32,fi),new At(8,16,128,128,fi),new At(8,32,128,256,fi),new At(32,128,258,1024,fi),new At(32,258,258,4096,fi)],Lb=e=>{e.window_size=2*e.w_size,Dn(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 zb(){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=xa,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(Rb*2),this.dyn_dtree=new Uint16Array((2*Eb+1)*2),this.bl_tree=new Uint16Array((2*bb+1)*2),Dn(this.dyn_ltree),Dn(this.dyn_dtree),Dn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Cb+1),this.heap=new Uint16Array(2*Ed+1),Dn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Ed+1),Dn(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!==mi&&t.status!==Ld&&t.status!==bd&&t.status!==Rd&&t.status!==Cd&&t.status!==Td&&t.status!==cr&&t.status!==Uo?1:0},Z1=e=>{if(el(e))return fr(e,zt);e.total_in=e.total_out=0,e.data_type=_b;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Ld:t.wrap?mi:cr,e.adler=t.wrap===2?0:1,t.last_flush=-2,sb(t),xe},K1=e=>{let t=Z1(e);return t===xe&&Lb(e.state),t},Mb=(e,t)=>el(e)||e.state.wrap!==2?zt:(e.state.gzhead=t,xe),Q1=(e,t,n,r,i,o)=>{if(!e)return zt;let l=1;if(t===pb&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>vb||n!==xa||r<8||r>15||t<0||t>9||o<0||o>gb||r===8&&l!==1)return fr(e,zt);r===8&&(r=9);let s=new zb;return e.state=s,s.strm=e,s.status=mi,s.wrap=l,s.gzhead=null,s.w_bits=r,s.w_size=1<Q1(e,t,xa,wb,xb,yb),jb=(e,t)=>{if(el(e)||t>q_||t<0)return e?fr(e,zt):zt;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Uo&&t!==dt)return fr(e,e.avail_out===0?fd:zt);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Je(e),e.avail_out===0)return n.last_flush=-1,xe}else if(e.avail_in===0&&J_(t)<=J_(r)&&t!==dt)return fr(e,fd);if(n.status===Uo&&e.avail_in!==0)return fr(e,fd);if(n.status===mi&&n.wrap===0&&(n.status=cr),n.status===mi){let i=xa+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=da||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=Tb),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=cr,Je(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===Ld){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>=da||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=bd;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,n.level===9?2:n.strategy>=da||n.level<2?4:0),$(n,Ib),n.status=cr,Je(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===bd){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,Je(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=Rd}if(n.status===Rd){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)),Je(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=Cd}if(n.status===Cd){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)),Je(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=Td}if(n.status===Td){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Je(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,Je(e),n.pending!==0)return n.last_flush=-1,xe}if(e.avail_in!==0||n.lookahead!==0||t!==Un&&n.status!==Uo){let i=n.level===0?G1(n,t):n.strategy===da?Ab(n,t):n.strategy===hb?Pb(n,t):Bo[n.level].func(n,t);if((i===pr||i===_i)&&(n.status=Uo),i===Me||i===pr)return e.avail_out===0&&(n.last_flush=-1),xe;if(i===yi&&(t===cb?ub(n):t!==q_&&(Sd(n,0,0,!1),t===fb&&(Dn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Je(e),e.avail_out===0))return n.last_flush=-1,xe}return t!==dt?xe:n.wrap<=0?Y_:(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)),Je(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?xe:Y_)},Fb=e=>{if(el(e))return zt;let t=e.state.status;return e.state=null,t===cr?fr(e,db):xe},Ub=(e,t)=>{let n=t.length;if(el(e))return zt;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==mi||r.lookahead)return zt;if(i===1&&(e.adler=Qo(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Dn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,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,hi(r);r.lookahead>=U;){let u=r.strstart,a=r.lookahead-(U-1);do r.ins_h=Bn(r,r.ins_h,r.window[u+U-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--a);r.strstart=u,r.lookahead=U-1,hi(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},Bb=Db,$b=Q1,Hb=K1,Vb=Z1,Wb=Mb,Gb=jb,Zb=Fb,Kb=Ub,Qb="pako deflate (from Nodeca project)",Ho={deflateInit:Bb,deflateInit2:$b,deflateReset:Hb,deflateResetKeep:Vb,deflateSetHeader:Wb,deflate:Gb,deflateEnd:Zb,deflateSetDictionary:Kb,deflateInfo:Qb},Xb=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),qb=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)Xb(n,r)&&(e[r]=n[r])}}return e},Yb=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 Jb=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},eR=(e,t)=>{if(t<65534&&e.subarray&&X1)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 eR(o,i)},nR=(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:Jb,buf2string:tR,utf8border:nR};function rR(){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 q1=rR,Y1=Object.prototype.toString,{Z_NO_FLUSH:iR,Z_SYNC_FLUSH:oR,Z_FULL_FLUSH:lR,Z_FINISH:sR,Z_OK:va,Z_STREAM_END:aR,Z_DEFAULT_COMPRESSION:uR,Z_DEFAULT_STRATEGY:cR,Z_DEFLATED:fR}=hr;function tl(e){this.options=ka.assign({level:uR,method:fR,chunkSize:16384,windowBits:15,memLevel:8,strategy:cR},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 q1,this.strm.avail_out=0;let n=Ho.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==va)throw new Error(dr[n]);if(t.header&&Ho.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=qo.string2buf(t.dictionary):Y1.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ho.deflateSetDictionary(this.strm,r),n!==va)throw new Error(dr[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?sR:iR,typeof e=="string"?n.input=qo.string2buf(e):Y1.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===oR||o===lR)&&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===aR)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===va;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===va&&(this.result=ka.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function zd(e,t){let n=new tl(t);if(n.push(e,!0),n.err)throw n.msg||dr[n.err];return n.result}function dR(e,t){return t=t||{},t.raw=!0,zd(e,t)}function pR(e,t){return t=t||{},t.gzip=!0,zd(e,t)}var mR=tl,hR=zd,gR=dR,yR=pR,_R=hr,vR={Deflate:mR,deflate:hR,deflateRaw:gR,gzip:yR,constants:_R},pa=16209,wR=16191,xR=function(t,n){let r,i,o,l,s,u,a,c,f,d,p,g,_,w,h,m,y,v,S,R,k,b,N,C,O=t.state;r=t.next_in,N=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),u=O.dmax,a=O.wsize,c=O.whave,f=O.wnext,d=O.window,p=O.hold,g=O.bits,_=O.lencode,w=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+=N[r++]<>>24,p>>>=v,g-=v,v=y>>>16&255,v&16){if(R=y&65535,v&=15,gu){t.msg="invalid distance too far back",O.mode=pa;break e}if(p>>>=v,g-=v,v=o-l,R>v){if(v=R-v,v>c&&O.sane){t.msg="invalid distance too far back",O.mode=pa;break e}if(k=0,b=d,f===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=pa;break e}else{y=w[(y&65535)+(p&(1<>3,r-=S,g-=S<<3,p&=(1<{let u=s.bits,a=0,c=0,f=0,d=0,p=0,g=0,_=0,w=0,h=0,m=0,y,v,S,R,k,b=null,N,C=new Uint16Array(di+1),O=new Uint16Array(di+1),De=null,rl,Dt,jt;for(a=0;a<=di;a++)C[a]=0;for(c=0;c=1&&C[d]===0;d--);if(p>d&&(p=d),d===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f0&&(e===n1||d!==1))return-1;for(O[1]=0,a=1;ae1||e===r1&&h>t1)return 1;for(;;){rl=a-_,l[c]+1=N?(Dt=De[l[c]-N],jt=b[l[c]-N]):(Dt=96,jt=0),y=1<>_)+v]=rl<<24|Dt<<16|jt|0;while(v!==0);for(y=1<>=1;if(y!==0?(m&=y-1,m+=y):m=0,c++,--C[a]===0){if(a===d)break;a=t[n+l[c]]}if(a>p&&(m&R)!==S){for(_===0&&(_=p),k+=f,g=a-_,w=1<e1||e===r1&&h>t1)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=RR,CR=0,J1=1,ev=2,{Z_FINISH:i1,Z_BLOCK:TR,Z_TREES:ma,Z_OK:mr,Z_STREAM_END:IR,Z_NEED_DICT:NR,Z_STREAM_ERROR:pt,Z_DATA_ERROR:tv,Z_MEM_ERROR:nv,Z_BUF_ERROR:OR,Z_DEFLATED:o1}=hr,Sa=16180,l1=16181,s1=16182,a1=16183,u1=16184,c1=16185,f1=16186,d1=16187,p1=16188,m1=16189,wa=16190,tn=16191,md=16192,h1=16193,hd=16194,g1=16195,y1=16196,_1=16197,v1=16198,ha=16199,ga=16200,w1=16201,x1=16202,k1=16203,S1=16204,E1=16205,gd=16206,b1=16207,R1=16208,ee=16209,rv=16210,iv=16211,PR=852,AR=592,LR=15,zR=LR,C1=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function MR(){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.modeiv?1:0},ov=e=>{if(gr(e))return pt;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=Sa,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(PR),t.distcode=t.distdyn=new Int32Array(AR),t.sane=1,t.back=-1,mr},lv=e=>{if(gr(e))return pt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ov(e)},sv=(e,t)=>{let n;if(gr(e))return pt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?pt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,lv(e))},av=(e,t)=>{if(!e)return pt;let n=new MR;e.state=n,n.strm=e,n.window=null,n.mode=Sa;let r=sv(e,t);return r!==mr&&(e.state=null),r},DR=e=>av(e,zR),T1=!0,yd,_d,jR=e=>{if(T1){yd=new Int32Array(512),_d=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(J1,e.lens,0,288,yd,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vo(ev,e.lens,0,32,_d,0,e.work,{bits:5}),T1=!1}e.lencode=yd,e.lenbits=9,e.distcode=_d,e.distbits=5},uv=(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,u,a,c,f,d,p,g,_,w=0,h,m,y,v,S,R,k,b,N=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(gr(e)||!e.output||!e.input&&e.avail_in!==0)return pt;n=e.state,n.mode===tn&&(n.mode=md),l=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,c=n.bits,f=s,d=u,b=mr;e:for(;;)switch(n.mode){case Sa:if(n.wrap===0){n.mode=md;break}for(;c<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,N,2,0),a=0,c=0,n.mode=l1;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)!==o1){e.msg="unknown compression method",n.mode=ee;break}if(a>>>=4,c-=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&&(N[0]=a&255,N[1]=a>>>8&255,n.check=he(n.check,N,2,0)),a=0,c=0,n.mode=s1;case s1:for(;c<32;){if(s===0)break e;s--,a+=r[o++]<>>8&255,N[2]=a>>>16&255,N[3]=a>>>24&255,n.check=he(n.check,N,4,0)),a=0,c=0,n.mode=a1;case a1:for(;c<16;){if(s===0)break e;s--,a+=r[o++]<>8),n.flags&512&&n.wrap&4&&(N[0]=a&255,N[1]=a>>>8&255,n.check=he(n.check,N,2,0)),a=0,c=0,n.mode=u1;case u1:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,N,2,0)),a=0,c=0}else n.head&&(n.head.extra=null);n.mode=c1;case c1: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=f1;case f1: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=tn;break;case m1:for(;c<32;){if(s===0)break e;s--,a+=r[o++]<>>=c&7,c-=c&7,n.mode=gd;break}for(;c<3;){if(s===0)break e;s--,a+=r[o++]<>>=1,c-=1,a&3){case 0:n.mode=h1;break;case 1:if(jR(n),n.mode=ha,t===ma){a>>>=2,c-=2;break e}break;case 2:n.mode=y1;break;case 3:e.msg="invalid block type",n.mode=ee}a>>>=2,c-=2;break;case h1:for(a>>>=c&7,c-=c&7;c<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,c=0,n.mode=hd,t===ma)break e;case hd:n.mode=g1;case g1:if(p=n.length,p){if(p>s&&(p=s),p>u&&(p=u),p===0)break e;i.set(r.subarray(o,o+p),l),s-=p,o+=p,u-=p,l+=p,n.length-=p;break}n.mode=tn;break;case y1:for(;c<14;){if(s===0)break e;s--,a+=r[o++]<>>=5,c-=5,n.ndist=(a&31)+1,a>>>=5,c-=5,n.ncode=(a&15)+4,a>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ee;break}n.have=0,n.mode=_1;case _1:for(;n.have>>=3,c-=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(CR,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=v1;case v1:for(;n.have>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,a+=r[o++]<>>=h,c-=h,n.lens[n.have++]=y;else{if(y===16){for(O=h+2;c>>=h,c-=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,c-=2}else if(y===17){for(O=h+3;c>>=h,c-=h,k=0,p=3+(a&7),a>>>=3,c-=3}else{for(O=h+7;c>>=h,c-=h,k=0,p=11+(a&127),a>>>=7,c-=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=Vo(J1,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=Vo(ev,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=ha,t===ma)break e;case ha:n.mode=ga;case ga:if(s>=6&&u>=258){e.next_out=l,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=a,n.bits=c,xR(e,d),l=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,c=n.bits,n.mode===tn&&(n.back=-1);break}for(n.back=0;w=n.lencode[a&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,a+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=c);){if(s===0)break e;s--,a+=r[o++]<>>=v,c-=v,n.back+=v}if(a>>>=h,c-=h,n.back+=h,n.length=y,m===0){n.mode=E1;break}if(m&32){n.back=-1,n.mode=tn;break}if(m&64){e.msg="invalid literal/length code",n.mode=ee;break}n.extra=m&15,n.mode=w1;case w1:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=x1;case x1:for(;w=n.distcode[a&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,a+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=c);){if(s===0)break e;s--,a+=r[o++]<>>=v,c-=v,n.back+=v}if(a>>>=h,c-=h,n.back+=h,m&64){e.msg="invalid distance code",n.mode=ee;break}n.offset=y,n.extra=m&15,n.mode=k1;case k1:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ee;break}n.mode=S1;case S1:if(u===0)break e;if(p=d-u,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>u&&(p=u),u-=p,n.length-=p;do i[l++]=_[g++];while(--p);n.length===0&&(n.mode=ga);break;case E1:if(u===0)break e;i[l++]=n.length,u--,n.mode=ga;break;case gd:if(n.wrap){for(;c<32;){if(s===0)break e;s--,a|=r[o++]<{if(gr(e))return pt;let t=e.state;return t.window&&(t.window=null),e.state=null,mr},BR=(e,t)=>{if(gr(e))return pt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,mr):pt},$R=(e,t)=>{let n=t.length,r,i,o;return gr(e)||(r=e.state,r.wrap!==0&&r.mode!==wa)?pt:r.mode===wa&&(i=1,i=Qo(i,t,n,0),i!==r.check)?tv:(o=uv(e,t,n,n),o?(r.mode=rv,nv):(r.havedict=1,mr))},HR=lv,VR=sv,WR=ov,GR=DR,ZR=av,KR=FR,QR=UR,XR=BR,qR=$R,YR="pako inflate (from Nodeca project)",rn={inflateReset:HR,inflateReset2:VR,inflateResetKeep:WR,inflateInit:GR,inflateInit2:ZR,inflate:KR,inflateEnd:QR,inflateGetHeader:XR,inflateSetDictionary:qR,inflateInfo:YR};function JR(){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 eC=JR,cv=Object.prototype.toString,{Z_NO_FLUSH:tC,Z_FINISH:nC,Z_OK:Yo,Z_STREAM_END:vd,Z_NEED_DICT:wd,Z_STREAM_ERROR:rC,Z_DATA_ERROR:I1,Z_MEM_ERROR:iC}=hr;function nl(e){this.options=ka.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 q1,this.strm.avail_out=0;let n=rn.inflateInit2(this.strm,t.windowBits);if(n!==Yo)throw new Error(dr[n]);if(this.header=new eC,rn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=qo.string2buf(t.dictionary):cv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=rn.inflateSetDictionary(this.strm,t.dictionary),n!==Yo)))throw new Error(dr[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?nC:tC,cv.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=rn.inflate(n,l),o===wd&&i&&(o=rn.inflateSetDictionary(n,i),o===Yo?o=rn.inflate(n,l):o===I1&&(o=wd));n.avail_in>0&&o===vd&&n.state.wrap>0&&e[n.next_in]!==0;)rn.inflateReset(n),o=rn.inflate(n,l);switch(o){case rC:case I1:case wd:case iC:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===vd))if(this.options.to==="string"){let u=qo.utf8border(n.output,n.next_out),a=n.next_out-u,c=qo.buf2string(n.output,u);n.next_out=a,n.avail_out=r-a,a&&n.output.set(n.output.subarray(u,u+a),0),this.onData(c)}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===vd)return o=rn.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=ka.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||dr[n.err];return n.result}function oC(e,t){return t=t||{},t.raw=!0,Md(e,t)}var lC=nl,sC=Md,aC=oC,uC=Md,cC=hr,fC={Inflate:lC,inflate:sC,inflateRaw:aC,ungzip:uC,constants:cC},{Deflate:dC,deflate:pC,deflateRaw:mC,gzip:hC}=vR,{Inflate:gC,inflate:yC,inflateRaw:_C,ungzip:vC}=fC,wC=dC,xC=pC,kC=mC,SC=hC,EC=gC,bC=yC,RC=_C,CC=vC,TC=hr,fv={Deflate:wC,deflate:xC,deflateRaw:kC,gzip:SC,Inflate:EC,inflate:bC,inflateRaw:RC,ungzip:CC,constants:TC};var pv=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>yr({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>yr({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>yr({name:t,action:"schema_tables",table:"",params:[]},e),columns:async i=>yr({name:t,action:"schema_columns",table:i,params:[]},e),rels:async i=>yr({name:t,action:"schema_rels",table:i,params:[]},e)}:r.startsWith("$")?(...i)=>{let o=fv.gzip(JSON.stringify(i));return yr({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 yr({name:t,action:o,table:r,params:l},e))}})}})},Ea={},yr=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,dv.default)(e),o=Ea[i];if(!o||o&&Date.now()-o.timestamp>1e3){Ea[i]={timestamp:Date.now(),promise:ci(r,e,{"content-type":"application/json"}),result:null};let l=await Ea[i].promise;return Ea[i].result=l,l}return await o.promise}catch{}};var mv=P(Rf());var hv=e=>{let{item:t,item_comp:n,ids:r}=e,i=In(n);if(gv(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},gv=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,mv.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)gv(n,t)};var yv=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 ba=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 _v=(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]),hv({item:n,item_comp:r,ids:l})}let o={item:ba(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),yv({item:n,item_comp:r,instance:i?i[n.id]:{},each(l,s){let u=n.component?.id;s.meta?.type==="content-element"&&u&&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:u,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){_v(e,t);return}let r={item:ba(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 IC=()=>new Promise(async e=>{let t=!1,n=await(await fetch(T.url`_prasi/route`)).json();t||e(n)}),vv=async()=>{let e=Us(),t=[];try{let n=await IC();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 ii(T.layout.root.childs),Ra(T.layout.meta,T.layout.root))),T.site=n.site,T.site.code={mode:"vsc"},await NC(),T.site.api=$_(T.site.api_url),T.site.db=pv(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}},NC=()=>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)}),Ra=(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 on=P(G()),jd=()=>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",xv=()=>{let e=Tn({page_id:""}),[t,n]=(0,wv.useState)({}),r=()=>n({});se.prasiContext.render=r;let i=tf.Provider,o=jd()&&location.pathname.startsWith("/prod");if(T.route.status!=="ready")return T.route.status==="init"&&(T.route.status="loading",vv().then(async({router:c,pages:f})=>{jy(),T.route.status="ready",T.route.router=c,T.route.pages=f;let d=se._prasi.basepath,p=`${d.endsWith("/")?d:`${d}/`}_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(w=>{_(h=>{for(let[m,y]of Object.entries(h))se[m]=y;w()})}),r()})),(0,on.jsx)(go,{});let l=T.route.router;if(!l)return(0,on.jsx)(cf,{children:"Failed to create Router"});let s="";if(o){let c=location.pathname.split("/");uf(c[3])&&(s=c[3])}let u=null;if(se._prasi.page_id)l.insert(T.pathname,{id:se._prasi.page_id,url:T.pathname}),u={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(u=l.lookup(T.pathname),s){let c=T.route.pages.find(f=>s===f.id);c&&(u=c)}u&&se._prasi.routed&&se._prasi.routed.page_id===u.id&&se._prasi.routed.params&&(u.params=se._prasi.routed.params)}if(!u)return(0,on.jsx)(cf,{children:"Page Not Found"});u.id!==e.page_id&&(T.init_local_effect={}),se.params=u.params||{},T.page.id=u.id,T.page.url=u.url;let a=T.page.cache[u.id];if(a)T.page.root=a.root,T.page.meta=a.meta;else return Ly(u.id).then(async({root:c})=>{if(u){let f={id:u.id,url:u.url,root:c,meta:{}};await ii(c.childs),Ra(f.meta,c),T.page.cache[f.id]=f,r()}}).catch(()=>{r()}),(0,on.jsx)(go,{note:"Loading page"});return(0,on.jsx)(i,{value:se.prasiContext,children:(0,on.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,on.jsx)("div",{className:cx("absolute flex flex-col items-stretch flex-1 bg-white main-content-preview",T.mode==="mobile"?css` + - `)}`);return}let f=c.apiEntry[l].url,d=c.apiEntry[l].args;if(f&&d){if(s.length>0&&d.length>0)for(let[_,w]of Object.entries(s)){let h=d[parseInt(_)];d&&d.includes(h)&&w&&typeof w!="string"&&typeof w!="number"||(f=f.replace(`:${h}?`,w+""),f=f.replace(`:${h}`,w+""))}let p=`${n}${f}`,g=await B_(p,s);u(g)}else console.error(`API Not Found: ${l.toString()}`)}else a("Failed to load API [Proxy]: "+n)}catch(c){a(c)}})};return i==="then"?new Proxy({},{get:(l,s)=>o(s)}):o(i)}})}catch{return null}},B_=async(e,t)=>await fi(e,t,{"content-type":"application/json"});var dv=P(W_());function yi(e){let t=e.length;for(;--t>=0;)e[t]=0}var L2=0,N1=1,z2=2,M2=3,D2=258,Nd=29,Jo=256,Wo=Jo+1+Nd,mi=30,Od=19,O1=2*Wo+1,ur=15,sd=16,j2=7,Pd=256,P1=16,A1=17,L1=18,xd=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]),ya=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]),F2=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),z1=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),U2=512,nn=new Array((Wo+2)*2);yi(nn);var $o=new Array(mi*2);yi($o);var Go=new Array(U2);yi(Go);var Zo=new Array(D2-M2+1);yi(Zo);var Ad=new Array(Nd);yi(Ad);var _a=new Array(mi);yi(_a);function ad(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 M1,D1,j1;function ud(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var F1=e=>e<256?Go[e]:Go[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>sd-n?(e.bi_buf|=t<>sd-e.bi_valid,e.bi_valid+=n-sd):(e.bi_buf|=t<{Ve(e,n[t*2],n[t*2+1])},U1=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},B2=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)},$2=(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,u=t.stat_desc.max_length,a,c,f,d,p,g,_=0;for(d=0;d<=ur;d++)e.bl_count[d]=0;for(n[e.heap[e.heap_max]*2+1]=0,a=e.heap_max+1;au&&(d=u,_++),n[c*2+1]=d,!(c>r)&&(e.bl_count[d]++,p=0,c>=s&&(p=l[c-s]),g=n[c*2],e.opt_len+=g*(d+p),o&&(e.static_len+=g*(i[c*2+1]+p)));if(_!==0){do{for(d=u-1;e.bl_count[d]===0;)d--;e.bl_count[d]--,e.bl_count[d+1]+=2,e.bl_count[u]--,_-=2}while(_>0);for(d=u;d!==0;d--)for(c=e.bl_count[d];c!==0;)f=e.heap[--a],!(f>r)&&(n[f*2+1]!==d&&(e.opt_len+=(d-n[f*2+1])*n[f*2],n[f*2+1]=d),c--)}},B1=(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]=U1(r[s]++,s))}},H2=()=>{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{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},G_=(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?Lt(e,i,t):(l=Zo[i],Lt(e,l+Jo+1,t),s=xd[l],s!==0&&(i-=Ad[l],Ve(e,i,s)),r--,l=F1(r),Lt(e,l,n),s=ya[l],s!==0&&(r-=_a[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,u=-1,a;for(e.heap_len=0,e.heap_max=O1,l=0;l>1;l>=1;l--)cd(e,n,l);a=o;do l=e.heap[1],e.heap[1]=e.heap[e.heap_len--],cd(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++,cd(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],$2(e,t),B1(n,u,e.bl_count)},K_=(e,t,n)=>{let r,i=-1,o,l=t[0*2+1],s=0,u=7,a=4;for(l===0&&(u=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,u=7,a=4;for(l===0&&(u=138,a=3),r=0;r<=n;r++)if(o=l,l=t[(r+1)*2+1],!(++s{let t;for(K_(e,e.dyn_ltree,e.l_desc.max_code),K_(e,e.dyn_dtree,e.d_desc.max_code),kd(e,e.bl_desc),t=Od-1;t>=3&&e.bl_tree[z1[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},W2=(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{X_||(H2(),X_=!0),e.l_desc=new ud(e.dyn_ltree,M1),e.d_desc=new ud(e.dyn_dtree,D1),e.bl_desc=new ud(e.bl_tree,j1),e.bi_buf=0,e.bi_valid=0,$1(e)},V1=(e,t,n,r)=>{Ve(e,(L2<<1)+(r?1:0),3),H1(e),Ko(e,n),Ko(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},K2=e=>{Ve(e,N1<<1,3),Lt(e,Pd,nn),B2(e)},Q2=(e,t,n,r)=>{let i,o,l=0;e.level>0?(e.strm.data_type===2&&(e.strm.data_type=G2(e)),kd(e,e.l_desc),kd(e,e.d_desc),l=V2(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?V1(e,t,n,r):e.strategy===4||o===i?(Ve(e,(N1<<1)+(r?1:0),3),Z_(e,nn,$o)):(Ve(e,(z2<<1)+(r?1:0),3),W2(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),Z_(e,e.dyn_ltree,e.dyn_dtree)),$1(e),r&&H1(e)},X2=(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[(Zo[n]+Jo+1)*2]++,e.dyn_dtree[F1(t)*2]++),e.sym_next===e.sym_end),q2=Z2,Y2=V1,J2=Q2,eb=X2,tb=K2,nb={_tr_init:q2,_tr_stored_block:Y2,_tr_flush_block:J2,_tr_tally:eb,_tr_align:tb},rb=(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=rb,ib=()=>{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},ob=new Uint32Array(ib()),lb=(e,t,n,r)=>{let i=ob,o=r+n;e^=-1;for(let l=r;l>>8^i[(e^t[l])&255];return e^-1},he=lb,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:sb,_tr_stored_block:Sd,_tr_flush_block:ab,_tr_tally:Fn,_tr_align:ub}=nb,{Z_NO_FLUSH:Un,Z_PARTIAL_FLUSH:cb,Z_FULL_FLUSH:fb,Z_FINISH:dt,Z_BLOCK:q_,Z_OK:xe,Z_STREAM_END:Y_,Z_STREAM_ERROR:zt,Z_DATA_ERROR:db,Z_BUF_ERROR:fd,Z_DEFAULT_COMPRESSION:pb,Z_FILTERED:mb,Z_HUFFMAN_ONLY:da,Z_RLE:hb,Z_FIXED:gb,Z_DEFAULT_STRATEGY:yb,Z_UNKNOWN:_b,Z_DEFLATED:xa}=hr,vb=9,wb=15,xb=8,kb=29,Sb=256,Ed=Sb+1+kb,Eb=30,bb=19,Rb=2*Ed+1,Cb=15,U=3,jn=258,Mt=jn+U+1,Tb=32,hi=42,Ld=57,bd=69,Rd=73,Cd=91,Td=103,cr=113,Uo=666,Me=1,_i=2,pr=3,vi=4,Ib=3,fr=(e,t)=>(e.msg=dr[t],t),J_=e=>e*2-(e>4?9:0),Dn=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Nb=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)},Ob=(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))},et=(e,t)=>{ab(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Je(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},Id=(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)},W1=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,o,l=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-Mt?e.strstart-(e.w_size-Mt):0,a=e.window,c=e.w_mask,f=e.prev,d=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=f[t&c])>u&&--n!==0);return l<=e.lookahead?l:e.lookahead},gi=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),Nb(e),r+=t),e.strm.avail_in===0)break;if(n=Id(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,Je(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&&(Id(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&&(Id(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===dt)&&t!==Un&&e.strm.avail_in===0&&i<=o)&&(r=i>o?o:i,l=t===dt&&e.strm.avail_in===0&&r===i?1:0,Sd(e,e.block_start,r,l),e.block_start+=r,Je(e.strm)),l?pr:Me)},dd=(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-Mt&&(e.match_length=W1(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&&(et(e,!1),e.strm.avail_out===0))return Me}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&&(et(e,!1),e.strm.avail_out===0))return Me}else if(e.match_available){if(r=Fn(e,0,e.window[e.strstart-1]),r&&et(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Me}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(gi(e),e.lookahead<=jn&&t===Un)return Me;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&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?pr:vi):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:_i},Ab=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(gi(e),e.lookahead===0)){if(t===Un)return Me;break}if(e.match_length=0,n=Fn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(et(e,!1),e.strm.avail_out===0))return Me}return e.insert=0,t===dt?(et(e,!0),e.strm.avail_out===0?pr:vi):e.sym_next&&(et(e,!1),e.strm.avail_out===0)?Me:_i};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,G1),new At(4,4,8,4,dd),new At(4,5,16,8,dd),new At(4,6,32,32,dd),new At(4,4,16,16,di),new At(8,16,32,32,di),new At(8,16,128,128,di),new At(8,32,128,256,di),new At(32,128,258,1024,di),new At(32,258,258,4096,di)],Lb=e=>{e.window_size=2*e.w_size,Dn(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 zb(){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=xa,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(Rb*2),this.dyn_dtree=new Uint16Array((2*Eb+1)*2),this.bl_tree=new Uint16Array((2*bb+1)*2),Dn(this.dyn_ltree),Dn(this.dyn_dtree),Dn(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Cb+1),this.heap=new Uint16Array(2*Ed+1),Dn(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*Ed+1),Dn(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!==hi&&t.status!==Ld&&t.status!==bd&&t.status!==Rd&&t.status!==Cd&&t.status!==Td&&t.status!==cr&&t.status!==Uo?1:0},Z1=e=>{if(el(e))return fr(e,zt);e.total_in=e.total_out=0,e.data_type=_b;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?Ld:t.wrap?hi:cr,e.adler=t.wrap===2?0:1,t.last_flush=-2,sb(t),xe},K1=e=>{let t=Z1(e);return t===xe&&Lb(e.state),t},Mb=(e,t)=>el(e)||e.state.wrap!==2?zt:(e.state.gzhead=t,xe),Q1=(e,t,n,r,i,o)=>{if(!e)return zt;let l=1;if(t===pb&&(t=6),r<0?(l=0,r=-r):r>15&&(l=2,r-=16),i<1||i>vb||n!==xa||r<8||r>15||t<0||t>9||o<0||o>gb||r===8&&l!==1)return fr(e,zt);r===8&&(r=9);let s=new zb;return e.state=s,s.strm=e,s.status=hi,s.wrap=l,s.gzhead=null,s.w_bits=r,s.w_size=1<Q1(e,t,xa,wb,xb,yb),jb=(e,t)=>{if(el(e)||t>q_||t<0)return e?fr(e,zt):zt;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===Uo&&t!==dt)return fr(e,e.avail_out===0?fd:zt);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Je(e),e.avail_out===0)return n.last_flush=-1,xe}else if(e.avail_in===0&&J_(t)<=J_(r)&&t!==dt)return fr(e,fd);if(n.status===Uo&&e.avail_in!==0)return fr(e,fd);if(n.status===hi&&n.wrap===0&&(n.status=cr),n.status===hi){let i=xa+(n.w_bits-8<<4)<<8,o=-1;if(n.strategy>=da||n.level<2?o=0:n.level<6?o=1:n.level===6?o=2:o=3,i|=o<<6,n.strstart!==0&&(i|=Tb),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=cr,Je(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===Ld){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>=da||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=bd;else if($(n,0),$(n,0),$(n,0),$(n,0),$(n,0),$(n,n.level===9?2:n.strategy>=da||n.level<2?4:0),$(n,Ib),n.status=cr,Je(e),n.pending!==0)return n.last_flush=-1,xe}if(n.status===bd){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,Je(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=Rd}if(n.status===Rd){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)),Je(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=Cd}if(n.status===Cd){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)),Je(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=Td}if(n.status===Td){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Je(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,Je(e),n.pending!==0)return n.last_flush=-1,xe}if(e.avail_in!==0||n.lookahead!==0||t!==Un&&n.status!==Uo){let i=n.level===0?G1(n,t):n.strategy===da?Ab(n,t):n.strategy===hb?Pb(n,t):Bo[n.level].func(n,t);if((i===pr||i===vi)&&(n.status=Uo),i===Me||i===pr)return e.avail_out===0&&(n.last_flush=-1),xe;if(i===_i&&(t===cb?ub(n):t!==q_&&(Sd(n,0,0,!1),t===fb&&(Dn(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Je(e),e.avail_out===0))return n.last_flush=-1,xe}return t!==dt?xe:n.wrap<=0?Y_:(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)),Je(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?xe:Y_)},Fb=e=>{if(el(e))return zt;let t=e.state.status;return e.state=null,t===cr?fr(e,db):xe},Ub=(e,t)=>{let n=t.length;if(el(e))return zt;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==hi||r.lookahead)return zt;if(i===1&&(e.adler=Qo(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Dn(r.head),r.strstart=0,r.block_start=0,r.insert=0);let u=new Uint8Array(r.w_size);u.set(t.subarray(n-r.w_size,n),0),t=u,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,gi(r);r.lookahead>=U;){let u=r.strstart,a=r.lookahead-(U-1);do r.ins_h=Bn(r,r.ins_h,r.window[u+U-1]),r.prev[u&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=u,u++;while(--a);r.strstart=u,r.lookahead=U-1,gi(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},Bb=Db,$b=Q1,Hb=K1,Vb=Z1,Wb=Mb,Gb=jb,Zb=Fb,Kb=Ub,Qb="pako deflate (from Nodeca project)",Ho={deflateInit:Bb,deflateInit2:$b,deflateReset:Hb,deflateResetKeep:Vb,deflateSetHeader:Wb,deflate:Gb,deflateEnd:Zb,deflateSetDictionary:Kb,deflateInfo:Qb},Xb=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),qb=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)Xb(n,r)&&(e[r]=n[r])}}return e},Yb=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 Jb=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},eR=(e,t)=>{if(t<65534&&e.subarray&&X1)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 eR(o,i)},nR=(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:Jb,buf2string:tR,utf8border:nR};function rR(){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 q1=rR,Y1=Object.prototype.toString,{Z_NO_FLUSH:iR,Z_SYNC_FLUSH:oR,Z_FULL_FLUSH:lR,Z_FINISH:sR,Z_OK:va,Z_STREAM_END:aR,Z_DEFAULT_COMPRESSION:uR,Z_DEFAULT_STRATEGY:cR,Z_DEFLATED:fR}=hr;function tl(e){this.options=ka.assign({level:uR,method:fR,chunkSize:16384,windowBits:15,memLevel:8,strategy:cR},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 q1,this.strm.avail_out=0;let n=Ho.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==va)throw new Error(dr[n]);if(t.header&&Ho.deflateSetHeader(this.strm,t.header),t.dictionary){let r;if(typeof t.dictionary=="string"?r=qo.string2buf(t.dictionary):Y1.call(t.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(t.dictionary):r=t.dictionary,n=Ho.deflateSetDictionary(this.strm,r),n!==va)throw new Error(dr[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?sR:iR,typeof e=="string"?n.input=qo.string2buf(e):Y1.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===oR||o===lR)&&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===aR)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===va;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===va&&(this.result=ka.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function zd(e,t){let n=new tl(t);if(n.push(e,!0),n.err)throw n.msg||dr[n.err];return n.result}function dR(e,t){return t=t||{},t.raw=!0,zd(e,t)}function pR(e,t){return t=t||{},t.gzip=!0,zd(e,t)}var mR=tl,hR=zd,gR=dR,yR=pR,_R=hr,vR={Deflate:mR,deflate:hR,deflateRaw:gR,gzip:yR,constants:_R},pa=16209,wR=16191,xR=function(t,n){let r,i,o,l,s,u,a,c,f,d,p,g,_,w,h,m,y,v,S,R,k,b,N,C,O=t.state;r=t.next_in,N=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),u=O.dmax,a=O.wsize,c=O.whave,f=O.wnext,d=O.window,p=O.hold,g=O.bits,_=O.lencode,w=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+=N[r++]<>>24,p>>>=v,g-=v,v=y>>>16&255,v&16){if(R=y&65535,v&=15,gu){t.msg="invalid distance too far back",O.mode=pa;break e}if(p>>>=v,g-=v,v=o-l,R>v){if(v=R-v,v>c&&O.sane){t.msg="invalid distance too far back",O.mode=pa;break e}if(k=0,b=d,f===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=pa;break e}else{y=w[(y&65535)+(p&(1<>3,r-=S,g-=S<<3,p&=(1<{let u=s.bits,a=0,c=0,f=0,d=0,p=0,g=0,_=0,w=0,h=0,m=0,y,v,S,R,k,b=null,N,C=new Uint16Array(pi+1),O=new Uint16Array(pi+1),De=null,rl,Dt,jt;for(a=0;a<=pi;a++)C[a]=0;for(c=0;c=1&&C[d]===0;d--);if(p>d&&(p=d),d===0)return i[o++]=1<<24|64<<16|0,i[o++]=1<<24|64<<16|0,s.bits=1,0;for(f=1;f0&&(e===n1||d!==1))return-1;for(O[1]=0,a=1;ae1||e===r1&&h>t1)return 1;for(;;){rl=a-_,l[c]+1=N?(Dt=De[l[c]-N],jt=b[l[c]-N]):(Dt=96,jt=0),y=1<>_)+v]=rl<<24|Dt<<16|jt|0;while(v!==0);for(y=1<>=1;if(y!==0?(m&=y-1,m+=y):m=0,c++,--C[a]===0){if(a===d)break;a=t[n+l[c]]}if(a>p&&(m&R)!==S){for(_===0&&(_=p),k+=f,g=a-_,w=1<e1||e===r1&&h>t1)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=RR,CR=0,J1=1,ev=2,{Z_FINISH:i1,Z_BLOCK:TR,Z_TREES:ma,Z_OK:mr,Z_STREAM_END:IR,Z_NEED_DICT:NR,Z_STREAM_ERROR:pt,Z_DATA_ERROR:tv,Z_MEM_ERROR:nv,Z_BUF_ERROR:OR,Z_DEFLATED:o1}=hr,Sa=16180,l1=16181,s1=16182,a1=16183,u1=16184,c1=16185,f1=16186,d1=16187,p1=16188,m1=16189,wa=16190,tn=16191,md=16192,h1=16193,hd=16194,g1=16195,y1=16196,_1=16197,v1=16198,ha=16199,ga=16200,w1=16201,x1=16202,k1=16203,S1=16204,E1=16205,gd=16206,b1=16207,R1=16208,ee=16209,rv=16210,iv=16211,PR=852,AR=592,LR=15,zR=LR,C1=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function MR(){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.modeiv?1:0},ov=e=>{if(gr(e))return pt;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=Sa,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(PR),t.distcode=t.distdyn=new Int32Array(AR),t.sane=1,t.back=-1,mr},lv=e=>{if(gr(e))return pt;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ov(e)},sv=(e,t)=>{let n;if(gr(e))return pt;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?pt:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,lv(e))},av=(e,t)=>{if(!e)return pt;let n=new MR;e.state=n,n.strm=e,n.window=null,n.mode=Sa;let r=sv(e,t);return r!==mr&&(e.state=null),r},DR=e=>av(e,zR),T1=!0,yd,_d,jR=e=>{if(T1){yd=new Int32Array(512),_d=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(J1,e.lens,0,288,yd,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Vo(ev,e.lens,0,32,_d,0,e.work,{bits:5}),T1=!1}e.lencode=yd,e.lenbits=9,e.distcode=_d,e.distbits=5},uv=(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,u,a,c,f,d,p,g,_,w=0,h,m,y,v,S,R,k,b,N=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(gr(e)||!e.output||!e.input&&e.avail_in!==0)return pt;n=e.state,n.mode===tn&&(n.mode=md),l=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,c=n.bits,f=s,d=u,b=mr;e:for(;;)switch(n.mode){case Sa:if(n.wrap===0){n.mode=md;break}for(;c<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,N,2,0),a=0,c=0,n.mode=l1;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)!==o1){e.msg="unknown compression method",n.mode=ee;break}if(a>>>=4,c-=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&&(N[0]=a&255,N[1]=a>>>8&255,n.check=he(n.check,N,2,0)),a=0,c=0,n.mode=s1;case s1:for(;c<32;){if(s===0)break e;s--,a+=r[o++]<>>8&255,N[2]=a>>>16&255,N[3]=a>>>24&255,n.check=he(n.check,N,4,0)),a=0,c=0,n.mode=a1;case a1:for(;c<16;){if(s===0)break e;s--,a+=r[o++]<>8),n.flags&512&&n.wrap&4&&(N[0]=a&255,N[1]=a>>>8&255,n.check=he(n.check,N,2,0)),a=0,c=0,n.mode=u1;case u1:if(n.flags&1024){for(;c<16;){if(s===0)break e;s--,a+=r[o++]<>>8&255,n.check=he(n.check,N,2,0)),a=0,c=0}else n.head&&(n.head.extra=null);n.mode=c1;case c1: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=f1;case f1: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=tn;break;case m1:for(;c<32;){if(s===0)break e;s--,a+=r[o++]<>>=c&7,c-=c&7,n.mode=gd;break}for(;c<3;){if(s===0)break e;s--,a+=r[o++]<>>=1,c-=1,a&3){case 0:n.mode=h1;break;case 1:if(jR(n),n.mode=ha,t===ma){a>>>=2,c-=2;break e}break;case 2:n.mode=y1;break;case 3:e.msg="invalid block type",n.mode=ee}a>>>=2,c-=2;break;case h1:for(a>>>=c&7,c-=c&7;c<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,c=0,n.mode=hd,t===ma)break e;case hd:n.mode=g1;case g1:if(p=n.length,p){if(p>s&&(p=s),p>u&&(p=u),p===0)break e;i.set(r.subarray(o,o+p),l),s-=p,o+=p,u-=p,l+=p,n.length-=p;break}n.mode=tn;break;case y1:for(;c<14;){if(s===0)break e;s--,a+=r[o++]<>>=5,c-=5,n.ndist=(a&31)+1,a>>>=5,c-=5,n.ncode=(a&15)+4,a>>>=4,c-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ee;break}n.have=0,n.mode=_1;case _1:for(;n.have>>=3,c-=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(CR,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=v1;case v1:for(;n.have>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,a+=r[o++]<>>=h,c-=h,n.lens[n.have++]=y;else{if(y===16){for(O=h+2;c>>=h,c-=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,c-=2}else if(y===17){for(O=h+3;c>>=h,c-=h,k=0,p=3+(a&7),a>>>=3,c-=3}else{for(O=h+7;c>>=h,c-=h,k=0,p=11+(a&127),a>>>=7,c-=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=Vo(J1,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=Vo(ev,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=ha,t===ma)break e;case ha:n.mode=ga;case ga:if(s>=6&&u>=258){e.next_out=l,e.avail_out=u,e.next_in=o,e.avail_in=s,n.hold=a,n.bits=c,xR(e,d),l=e.next_out,i=e.output,u=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,a=n.hold,c=n.bits,n.mode===tn&&(n.back=-1);break}for(n.back=0;w=n.lencode[a&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,a+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=c);){if(s===0)break e;s--,a+=r[o++]<>>=v,c-=v,n.back+=v}if(a>>>=h,c-=h,n.back+=h,n.length=y,m===0){n.mode=E1;break}if(m&32){n.back=-1,n.mode=tn;break}if(m&64){e.msg="invalid literal/length code",n.mode=ee;break}n.extra=m&15,n.mode=w1;case w1:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=x1;case x1:for(;w=n.distcode[a&(1<>>24,m=w>>>16&255,y=w&65535,!(h<=c);){if(s===0)break e;s--,a+=r[o++]<>v)],h=w>>>24,m=w>>>16&255,y=w&65535,!(v+h<=c);){if(s===0)break e;s--,a+=r[o++]<>>=v,c-=v,n.back+=v}if(a>>>=h,c-=h,n.back+=h,m&64){e.msg="invalid distance code",n.mode=ee;break}n.offset=y,n.extra=m&15,n.mode=k1;case k1:if(n.extra){for(O=n.extra;c>>=n.extra,c-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ee;break}n.mode=S1;case S1:if(u===0)break e;if(p=d-u,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>u&&(p=u),u-=p,n.length-=p;do i[l++]=_[g++];while(--p);n.length===0&&(n.mode=ga);break;case E1:if(u===0)break e;i[l++]=n.length,u--,n.mode=ga;break;case gd:if(n.wrap){for(;c<32;){if(s===0)break e;s--,a|=r[o++]<{if(gr(e))return pt;let t=e.state;return t.window&&(t.window=null),e.state=null,mr},BR=(e,t)=>{if(gr(e))return pt;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,mr):pt},$R=(e,t)=>{let n=t.length,r,i,o;return gr(e)||(r=e.state,r.wrap!==0&&r.mode!==wa)?pt:r.mode===wa&&(i=1,i=Qo(i,t,n,0),i!==r.check)?tv:(o=uv(e,t,n,n),o?(r.mode=rv,nv):(r.havedict=1,mr))},HR=lv,VR=sv,WR=ov,GR=DR,ZR=av,KR=FR,QR=UR,XR=BR,qR=$R,YR="pako inflate (from Nodeca project)",rn={inflateReset:HR,inflateReset2:VR,inflateResetKeep:WR,inflateInit:GR,inflateInit2:ZR,inflate:KR,inflateEnd:QR,inflateGetHeader:XR,inflateSetDictionary:qR,inflateInfo:YR};function JR(){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 eC=JR,cv=Object.prototype.toString,{Z_NO_FLUSH:tC,Z_FINISH:nC,Z_OK:Yo,Z_STREAM_END:vd,Z_NEED_DICT:wd,Z_STREAM_ERROR:rC,Z_DATA_ERROR:I1,Z_MEM_ERROR:iC}=hr;function nl(e){this.options=ka.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 q1,this.strm.avail_out=0;let n=rn.inflateInit2(this.strm,t.windowBits);if(n!==Yo)throw new Error(dr[n]);if(this.header=new eC,rn.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=qo.string2buf(t.dictionary):cv.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=rn.inflateSetDictionary(this.strm,t.dictionary),n!==Yo)))throw new Error(dr[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?nC:tC,cv.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=rn.inflate(n,l),o===wd&&i&&(o=rn.inflateSetDictionary(n,i),o===Yo?o=rn.inflate(n,l):o===I1&&(o=wd));n.avail_in>0&&o===vd&&n.state.wrap>0&&e[n.next_in]!==0;)rn.inflateReset(n),o=rn.inflate(n,l);switch(o){case rC:case I1:case wd:case iC:return this.onEnd(o),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||o===vd))if(this.options.to==="string"){let u=qo.utf8border(n.output,n.next_out),a=n.next_out-u,c=qo.buf2string(n.output,u);n.next_out=a,n.avail_out=r-a,a&&n.output.set(n.output.subarray(u,u+a),0),this.onData(c)}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===vd)return o=rn.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=ka.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||dr[n.err];return n.result}function oC(e,t){return t=t||{},t.raw=!0,Md(e,t)}var lC=nl,sC=Md,aC=oC,uC=Md,cC=hr,fC={Inflate:lC,inflate:sC,inflateRaw:aC,ungzip:uC,constants:cC},{Deflate:dC,deflate:pC,deflateRaw:mC,gzip:hC}=vR,{Inflate:gC,inflate:yC,inflateRaw:_C,ungzip:vC}=fC,wC=dC,xC=pC,kC=mC,SC=hC,EC=gC,bC=yC,RC=_C,CC=vC,TC=hr,fv={Deflate:wC,deflate:xC,deflateRaw:kC,gzip:SC,Inflate:EC,inflate:bC,inflateRaw:RC,ungzip:CC,constants:TC};var pv=e=>{let t="";return new Proxy({},{get(n,r){return r==="_batch"?{update:async i=>yr({name:t,action:"batch_update",table:"",params:{batch:i}},e),upsert:async i=>yr({name:t,action:"batch_upsert",table:"",params:{arg:i}},e)}:r==="_schema"?{tables:async()=>yr({name:t,action:"schema_tables",table:"",params:[]},e),columns:async i=>yr({name:t,action:"schema_columns",table:i,params:[]},e),rels:async i=>yr({name:t,action:"schema_rels",table:i,params:[]},e)}:r.startsWith("$")?(...i)=>{let o=fv.gzip(JSON.stringify(i));return yr({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 yr({name:t,action:o,table:r,params:l},e))}})}})},Ea={},yr=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,dv.default)(e),o=Ea[i];if(!o||o&&Date.now()-o.timestamp>1e3){Ea[i]={timestamp:Date.now(),promise:fi(r,e,{"content-type":"application/json"}),result:null};let l=await Ea[i].promise;return Ea[i].result=l,l}return await o.promise}catch{}};var mv=P(Rf());var hv=e=>{let{item:t,item_comp:n,ids:r}=e,i=In(n);if(gv(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},gv=(e,t)=>{if(e.originalId=e.id,t[e.id]||(t[e.id]=(0,mv.createId)()),e.id=t[e.id],e.childs)for(let n of e.childs)gv(n,t)};var yv=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 ba=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 _v=(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]),hv({item:n,item_comp:r,ids:l})}let o={item:ba(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),yv({item:n,item_comp:r,instance:i?i[n.id]:{},each(l,s){let u=n.component?.id;s.meta?.type==="content-element"&&u&&s.content&&(s.content.name=l,wi({...e},{item:s.content,root:t.root||s.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:u,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&&wi({...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 wi=(e,t)=>{let n=t.item;if(n.type==="item"&&n.component?.id&&t.ignore_first_component!==!0){_v(e,t);return}let r={item:ba(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}),wi(e,l)}}};var IC=()=>new Promise(async e=>{let t=!1,n=await(await fetch(T.url`_prasi/route`)).json();t||e(n)}),vv=async()=>{let e=Us(),t=[];try{let n=await IC();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 oi(T.layout.root.childs),Ra(T.layout.meta,T.layout.root))),T.site=n.site,T.site.code={mode:"vsc"},await NC(),T.site.api=$_(T.site.api_url),T.site.db=pv(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}},NC=()=>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)}),Ra=(e,t)=>{for(let n of t.childs)wi({set_meta:!0,comps:T.comp.list,meta:e,mode:"page"},{item:n})};var se=window;var on=P(G()),jd=()=>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",xv=()=>{let e=Tn({page_id:""}),[t,n]=(0,wv.useState)({}),r=()=>n({});se.prasiContext.render=r;let i=tf.Provider,o=jd()&&location.pathname.startsWith("/prod");if(T.route.status!=="ready")return T.route.status==="init"&&(T.route.status="loading",vv().then(async({router:c,pages:f})=>{jy(),T.route.status="ready",T.route.router=c,T.route.pages=f;let d=se._prasi.basepath,p=`${d.endsWith("/")?d:`${d}/`}_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(w=>{_(h=>{for(let[m,y]of Object.entries(h))se[m]=y;w()})}),r()})),(0,on.jsx)(yo,{});let l=T.route.router;if(!l)return(0,on.jsx)(cf,{children:"Failed to create Router"});let s="";if(o){let c=location.pathname.split("/");uf(c[3])&&(s=c[3])}let u=null;if(se._prasi.page_id)l.insert(T.pathname,{id:se._prasi.page_id,url:T.pathname}),u={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(u=l.lookup(T.pathname),s){let c=T.route.pages.find(f=>s===f.id);c&&(u=c)}u&&se._prasi.routed&&se._prasi.routed.page_id===u.id&&se._prasi.routed.params&&(u.params=se._prasi.routed.params)}if(!u)return(0,on.jsx)(cf,{children:"Page Not Found"});u.id!==e.page_id&&(T.init_local_effect={}),se.params=u.params||{},T.page.id=u.id,T.page.url=u.url;let a=T.page.cache[u.id];if(a)T.page.root=a.root,T.page.meta=a.meta;else return Ly(u.id).then(async({root:c})=>{if(u){let f={id:u.id,url:u.url,root:c,meta:{}};await oi(c.childs),Ra(f.meta,c),T.page.cache[f.id]=f,r()}}).catch(()=>{r()}),(0,on.jsx)(yo,{note:"Loading page"});return(0,on.jsx)(i,{value:se.prasiContext,children:(0,on.jsx)("div",{className:cx("relative flex flex-1 items-center justify-center"),children:(0,on.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; @@ -131,7 +131,7 @@ ${f} } `:"inset-0 overflow-auto",css` contain: content; - `),children:(0,on.jsx)(Py,{api_url:T.site.api_url,entry:Object.values(T.page.root.childs).filter(c=>c).map(c=>c.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 c=>{let f=T.comp;if(f.list[c])return f.list[c];try{let d=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[c]})})).json();for(let[p,g]of Object.entries(d))delete f.pending[p],f.list[p]=g,await As(`comp-${p}`,g)}catch{}return f.list[c]},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(c=>c).map(c=>c.id)}:void 0,script:{init_local_effect:T.init_local_effect},on_preload:async({urls:c,opt:f})=>{let d=[],p={};if(T.cache.urls)for(let g of c)T.cache.urls.has(g)||(d.push(g),T.cache.urls.add(g));if(d.length>0){let g=await zy(d);if(f?.on_load&&f.on_load(g,OC),Array.isArray(g))for(let _ of g){let w={id:_.id,url:_.url,root:_.root,meta:{}};await ii(_.root.childs),Ra(w.meta,_.root),T.page.cache[w.id]=w}}}})})})})},OC=(e,t)=>{for(let n of e)for(let r of n.root.childs)Dd(r,t)},Dd=(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&&Dd(n.content,t);for(let n of e.childs)Dd(n,t)}};var Sv=P(G());(async()=>{Ay();let e=document.getElementById("root");if(e){let t=(0,kv.createRoot)(e);await V0(!1),F0(),se.navigateOverride=n=>(n&&n.startsWith("/")&&jd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.render((0,Sv.jsx)(xv,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); + `),children:(0,on.jsx)(Py,{api_url:T.site.api_url,entry:Object.values(T.page.root.childs).filter(c=>c).map(c=>c.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 c=>{let f=T.comp;if(f.list[c])return f.list[c];try{let d=await(await fetch(T.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[c]})})).json();for(let[p,g]of Object.entries(d))delete f.pending[p],f.list[p]=g,await As(`comp-${p}`,g)}catch{}return f.list[c]},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(c=>c).map(c=>c.id)}:void 0,script:{init_local_effect:T.init_local_effect},on_preload:async({urls:c,opt:f})=>{let d=[],p={};if(T.cache.urls)for(let g of c)T.cache.urls.has(g)||(d.push(g),T.cache.urls.add(g));if(d.length>0){let g=await zy(d);if(f?.on_load&&f.on_load(g,OC),Array.isArray(g))for(let _ of g){let w={id:_.id,url:_.url,root:_.root,meta:{}};await oi(_.root.childs),Ra(w.meta,_.root),T.page.cache[w.id]=w}}}})})})})},OC=(e,t)=>{for(let n of e)for(let r of n.root.childs)Dd(r,t)},Dd=(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&&Dd(n.content,t);for(let n of e.childs)Dd(n,t)}};var Sv=P(G());(async()=>{Ay();let e=document.getElementById("root");if(e){let t=(0,kv.createRoot)(e);await V0(!1),F0(),se.navigateOverride=n=>(n&&n.startsWith("/")&&jd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.render((0,Sv.jsx)(xv,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); /*! Bundled license information: react/cjs/react.production.min.js: diff --git a/app/srv/ws/sync/code/utlis/ensure-files.ts b/app/srv/ws/sync/code/utlis/ensure-files.ts index 5dc61ea7..d6112659 100644 --- a/app/srv/ws/sync/code/utlis/ensure-files.ts +++ b/app/srv/ws/sync/code/utlis/ensure-files.ts @@ -15,6 +15,65 @@ export const ensureFiles = async (path: string, id_site: string) => { }); try { + const pkg = Bun.file(dir.data(`${path}/package.json`)); + if (!(await pkg.exists())) { + await Bun.write( + pkg, + JSON.stringify({ + name: "site-" + id_site, + scripts: { + startup: + "ulimit -c 0; tailwindcss --watch -i ./app/css/global.css -o ./app/css/build.css --minify", + }, + dependencies: {}, + }) + ); + const imports = [ + "@floating-ui/react", + "@paralleldrive/cuid2", + "@radix-ui/react-dropdown-menu", + "@radix-ui/react-label", + "@radix-ui/react-navigation-menu", + "@radix-ui/react-popover", + "@radix-ui/react-slider", + "@radix-ui/react-slot", + "@radix-ui/react-switch", + "@radix-ui/react-tabs", + "@types/file-saver", + "@types/lodash.capitalize", + "@types/lodash.get", + "@types/react", + "@types/react-dom", + "any-date-parser", + "chart.js", + "class-variance-authority", + "clsx", + "date-fns", + "embla-carousel-react", + "exceljs", + "lodash.capitalize", + "lodash.get", + "lucide-react", + "next-themes", + "quill", + "react", + "react-arborist", + "react-chartjs-2", + "react-data-grid", + "react-day-picker", + "react-resizable-panels", + "sonner", + "tailwind-merge", + ]; + + let proc = Bun.spawn([`npm`, `install`, ...imports], { + stdio: ["inherit", "pipe", "pipe"], + cwd: dir.data(path), + }); + + await proc.exited; + } + for await (const t of templates) { const f = t.replaceAll("_", "."); const to = dir.data(path + `/${f}`); diff --git a/app/static-br/ed.31e5ec2b.js b/app/static-br/ed.31e5ec2b.js new file mode 100644 index 00000000..9f61a35d Binary files /dev/null and b/app/static-br/ed.31e5ec2b.js differ diff --git a/app/static-br/ed.3253f060.js b/app/static-br/ed.3253f060.js deleted file mode 100644 index 48616ea4..00000000 Binary files a/app/static-br/ed.3253f060.js and /dev/null differ diff --git a/app/static-br/index.js b/app/static-br/index.js index 7c7117c3..7a54b780 100644 Binary files a/app/static-br/index.js and b/app/static-br/index.js differ diff --git a/app/static-br/sworker.js b/app/static-br/sworker.js index 58c6df10..ef38197e 100644 Binary files a/app/static-br/sworker.js and b/app/static-br/sworker.js differ diff --git a/app/static/ed.3253f060.js b/app/static/ed.31e5ec2b.js similarity index 96% rename from app/static/ed.3253f060.js rename to app/static/ed.31e5ec2b.js index 3e770d86..41ee0a0b 100644 --- a/app/static/ed.3253f060.js +++ b/app/static/ed.31e5ec2b.js @@ -1,7 +1,7 @@ !function(A,e,t,i,I){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof r[i]&&r[i],n=o.cache||{},g="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(e,t){if(!n[e]){if(!A[e]){var I="function"==typeof r[i]&&r[i];if(!t&&I)return I(e,!0);if(o)return o(e,!0);if(g&&"string"==typeof e)return g(e);var s=Error("Cannot find module '"+e+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(t){var i=A[e][1][t];return null!=i?i:t},c.cache={};var B=n[e]=new a.Module(e);A[e][0].call(B.exports,c,B,B.exports,this)}return n[e].exports;function c(A){var e=c.resolve(A);return!1===e?{}:a(e)}}a.isParcelRequire=!0,a.Module=function(A){this.id=A,this.bundle=a,this.exports={}},a.modules=A,a.cache=n,a.parent=o,a.register=function(e,t){A[e]=[function(A,e){e.exports=t},{}]},Object.defineProperty(a,"root",{get:function(){return r[i]}}),r[i]=a;for(var s=0;sr.default),i.export(t,"v3",()=>n.default),i.export(t,"v4",()=>a.default),i.export(t,"v5",()=>B.default),i.export(t,"NIL",()=>Q.default),i.export(t,"version",()=>C.default),i.export(t,"validate",()=>h.default),i.export(t,"stringify",()=>p.default),i.export(t,"parse",()=>u.default);var I=A("./v1.js"),r=i.interopDefault(I),o=A("./v3.js"),n=i.interopDefault(o),g=A("./v4.js"),a=i.interopDefault(g),s=A("./v5.js"),B=i.interopDefault(s),c=A("./nil.js"),Q=i.interopDefault(c),l=A("./version.js"),C=i.interopDefault(l),d=A("./validate.js"),h=i.interopDefault(d),E=A("./stringify.js"),p=i.interopDefault(E),f=A("./parse.js"),u=i.interopDefault(f)},{"./v1.js":!1,"./v3.js":!1,"./v4.js":!1,"./v5.js":!1,"./nil.js":!1,"./version.js":!1,"./validate.js":"46Luh","./stringify.js":!1,"./parse.js":!1,"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"46Luh":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t);var I=A("./regex.js"),r=i.interopDefault(I);t.default=function(A){return"string"==typeof A&&(0,r.default).test(A)}},{"./regex.js":"S5fxt","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],S5fxt:[function(A,e,t){A("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(t),t.default=/^(?:[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},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],pbgs4:[function(A,e,t){let i;var I=A("@parcel/transformer-js/src/esmodule-helpers.js");function r(A,e){return i=A.exports,o.__wbindgen_wasm_module=e,i}async function o(e){void 0===e&&(e=new URL(A("b92ad0a4bafe26c9"))),("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));let{instance:t,module:i}=await async function(A,e){if("function"==typeof Response&&A instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(A,e)}catch(e){if("application/wasm"==A.headers.get("Content-Type"))throw e;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",e)}let t=await A.arrayBuffer();return await WebAssembly.instantiate(t,e)}{let t=await WebAssembly.instantiate(A,e);return t instanceof WebAssembly.Instance?{instance:t,module:A}:t}}(await e,{wbg:{}});return r(t,i)}I.defineInteropFlag(t),I.export(t,"DecompressionError",()=>B),I.export(t,"compress",()=>d),I.export(t,"decompress",()=>h),I.export(t,"default",()=>a),I.export(t,"freeBuffer",()=>E),I.export(t,"initSync",()=>s);let n=null,g=!1;async function a(A){if(g||n)return;g=!0;let e=await o(A);n||(n=e)}function s(A){var e;n||((e=A)instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),n=r(new WebAssembly.Instance(e,{wbg:{}}),e))}class B extends Error{constructor(A){super(A),this.name="DecompressionError"}}let c=0,Q=null,l=null;function C(A,e,t){let i;if(t){i=A.malloc_u8(e);let I=new Uint8Array(A.memory.buffer,i,e);try{t(I)}catch(t){throw A.free_u8(i,e),t}return c=e,i}if("string"==typeof e){let t=c=function(A){let e=0,t=0,i=0,I=A.length;for(;e>>0;n.free_u8(t,c);let I=n.buffer()>>>0;return new Uint8Array(n.memory.buffer,I,i)}function h(A,e){p(n);let t=C(n,A,e),i=n.gzip_decompress(t,c)>>>0;if(n.free_u8(t,c),4294967295===i){let A=n.error_message(),e=n.error_message_len(),t=new Uint8Array(n.memory.buffer,A,e);throw new B((new TextDecoder).decode(t))}let I=n.buffer()>>>0;return new Uint8Array(n.memory.buffer,I,i)}function E(){p(n),n.deallocate_buffer()}function p(A){if(!A)throw Error("WASM not initialized")}},{b92ad0a4bafe26c9:"j0BMB","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],j0BMB:[function(A,e,t){e.exports=A("7ea44c582fa226c5").getBundleURL("c4w0A")+"wasm_gzip_bg.cbb08a7b.wasm"},{"7ea44c582fa226c5":"5zgRV"}],"5zgRV":[function(A,e,t){var i={};function I(A){return(""+A).replace(/^((?:https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/.+)\/[^/]+$/,"$1")+"/"}t.getBundleURL=function(A){var e=i[A];return e||(e=function(){try{throw Error()}catch(e){var A=(""+e.stack).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^)\n]+/g);if(A)return I(A[2])}return"/"}(),i[A]=e),e},t.getBaseURL=I,t.getOrigin=function(A){var e=(""+A).match(/(https?|file|ftp|(chrome|moz|safari-web)-extension):\/\/[^/]+/);if(!e)throw Error("Origin not found");return e[0]}},{}],xGtCA:[function(A,e,t){var i,I,r,o=e.exports={};function n(){throw Error("setTimeout has not been defined")}function g(){throw Error("clearTimeout has not been defined")}function a(A){if(i===setTimeout)return setTimeout(A,0);if((i===n||!i)&&setTimeout)return i=setTimeout,setTimeout(A,0);try{return i(A,0)}catch(e){try{return i.call(null,A,0)}catch(e){return i.call(this,A,0)}}}!function(){try{i="function"==typeof setTimeout?setTimeout:n}catch(A){i=n}try{I="function"==typeof clearTimeout?clearTimeout:g}catch(A){I=g}}();var s=[],B=!1,c=-1;function Q(){B&&r&&(B=!1,r.length?s=r.concat(s):c=-1,s.length&&l())}function l(){if(!B){var A=a(Q);B=!0;for(var e=s.length;e;){for(r=s,s=[];++c1)for(var t=1;t-1},H.prototype.set=function(A,e){var t=this.__data__,i=J(t,A);return i<0?t.push([A,e]):t[i][1]=e,this},x.prototype.clear=function(){this.__data__={hash:new N,map:new(k||H),string:new N}},x.prototype.delete=function(A){return q(this,A).delete(A)},x.prototype.get=function(A){return q(this,A).get(A)},x.prototype.has=function(A){return q(this,A).has(A)},x.prototype.set=function(A,e){return q(this,A).set(A,e),this};var M=R(function(A){A=null==(e=A)?"":function(A){if("string"==typeof A)return A;if(j(A))return G?G.call(A):"";var e=A+"";return"0"==e&&1/A==-o?"-0":e}(e);var e,t=[];return a.test(A)&&t.push(""),A.replace(s,function(A,e,i,I){t.push(i?I.replace(B,"$1"):e||A)}),t});function R(A,e){if("function"!=typeof A||e&&"function"!=typeof e)throw TypeError("Expected a function");var t=function(){var i=arguments,I=e?e.apply(this,i):i[0],r=t.cache;if(r.has(I))return r.get(I);var o=A.apply(this,i);return t.cache=r.set(I,o),o};return t.cache=new(R.Cache||x),t}R.Cache=x;var K=Array.isArray;function v(A){var e=typeof A;return!!A&&("object"==e||"function"==e)}function j(A){return"symbol"==typeof A||!!A&&"object"==typeof A&&"[object Symbol]"==y.call(A)}e.exports=function(A,e,t){var i=null==A?void 0:function(A,e){var t;e=!function(A,e){if(K(A))return!1;var t=typeof A;return!!("number"==t||"symbol"==t||"boolean"==t||null==A||j(A))||g.test(A)||!n.test(A)||null!=e&&A in Object(e)}(e,A)?K(t=e)?t:M(t):[e];for(var i=0,I=e.length;null!=A&&i{let t="";for(;t.lengthg(I(A)).toString(36).slice(1),s=Array.from({length:26},(A,e)=>String.fromCharCode(e+97)),B=A=>s[Math.floor(A()*s.length)],c=({globalObj:A=void 0!==i?i:"undefined"!=typeof window?window:{},random:e=Math.random}={})=>{let t=Object.keys(A).toString();return a(t.length?t+n(o,e):n(o,e)).substring(0,o)},Q=A=>()=>A++,l=476782367,C=({random:A=Math.random,counter:e=Q(Math.floor(A()*l)),length:t=r,fingerprint:i=c({random:A})}={})=>function(){let I=B(A),r=Date.now().toString(36),o=e().toString(36),g=n(t,A),s=`${r+g+o+i}`;return`${I+a(s).substring(1,t)}`},d=C();e.exports.getConstants=()=>({defaultLength:r,bigLength:o}),e.exports.init=C,e.exports.createId=d,e.exports.bufToBigInt=g,e.exports.createCounter=Q,e.exports.createFingerprint=c,e.exports.isCuid=(A,{minLength:e=2,maxLength:t=o}={})=>{let i=A.length;return!!("string"==typeof A&&i>=e&&i<=t&&/^[0-9a-z]+$/.test(A))}},{d0dc733fdfe478ab:"eHLpP"}],eHLpP:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;let i=A("b5d8367685d2f01a"),I=A("a1dd24a362368716"),r=A("4f25a63eeb3984c4"),[o,n,g]=[[],[],[]],a=BigInt(0),s=BigInt(1),B=BigInt(2),c=BigInt(7),Q=BigInt(256),l=BigInt(113);for(let A=0,e=s,t=1,i=0;A<24;A++){[t,i]=[i,(2*t+3*i)%5],o.push(2*(5*i+t)),n.push((A+1)*(A+2)/2%64);let I=a;for(let A=0;A<7;A++)(e=(e<>c)*l)%Q)&B&&(I^=s<<(s<t>32?(0,I.rotlBH)(A,e,t):(0,I.rotlSH)(A,e,t),E=(A,e,t)=>t>32?(0,I.rotlBL)(A,e,t):(0,I.rotlSL)(A,e,t);function p(A,e=24){let t=new Uint32Array(10);for(let i=24-e;i<24;i++){for(let e=0;e<10;e++)t[e]=A[e]^A[e+10]^A[e+20]^A[e+30]^A[e+40];for(let e=0;e<10;e+=2){let i=(e+8)%10,I=(e+2)%10,r=t[I],o=t[I+1],n=h(r,o,1)^t[i],g=E(r,o,1)^t[i+1];for(let t=0;t<50;t+=10)A[e+t]^=n,A[e+t+1]^=g}let e=A[2],I=A[3];for(let t=0;t<24;t++){let i=n[t],r=h(e,I,i),g=E(e,I,i),a=o[t];e=A[a],I=A[a+1],A[a]=r,A[a+1]=g}for(let e=0;e<50;e+=10){for(let i=0;i<10;i++)t[i]=A[e+i];for(let i=0;i<10;i++)A[e+i]^=~t[(i+2)%10]&t[(i+4)%10]}A[0]^=C[i],A[1]^=d[i]}t.fill(0)}t.keccakP=p;class f extends r.Hash{constructor(A,e,t,I=!1,o=24){if(super(),this.blockLen=A,this.suffix=e,this.outputLen=t,this.enableXOF=I,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,i.number)(t),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,r.u32)(this.state)}keccak(){p(this.state32,this.rounds),this.posOut=0,this.pos=0}update(A){(0,i.exists)(this);let{blockLen:e,state:t}=this,I=(A=(0,r.toBytes)(A)).length;for(let i=0;i=t&&this.keccak();let r=Math.min(t-this.posOut,I-i);A.set(e.subarray(this.posOut,this.posOut+r),i),this.posOut+=r,i+=r}return A}xofInto(A){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(A)}xof(A){return(0,i.number)(A),this.xofInto(new Uint8Array(A))}digestInto(A){if((0,i.output)(A,this),this.finished)throw Error("digest() was already called");return this.writeInto(A),this.destroy(),A}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(A){let{blockLen:e,suffix:t,outputLen:i,rounds:I,enableXOF:r}=this;return A||(A=new f(e,t,i,r,I)),A.state32.set(this.state32),A.pos=this.pos,A.posOut=this.posOut,A.finished=this.finished,A.rounds=I,A.suffix=t,A.outputLen=i,A.enableXOF=r,A.destroyed=this.destroyed,A}}t.Keccak=f;let u=(A,e,t)=>(0,r.wrapConstructor)(()=>new f(e,A,t));t.sha3_224=u(6,144,28),t.sha3_256=u(6,136,32),t.sha3_384=u(6,104,48),t.sha3_512=u(6,72,64),t.keccak_224=u(1,144,28),t.keccak_256=u(1,136,32),t.keccak_384=u(1,104,48),t.keccak_512=u(1,72,64);let w=(A,e,t)=>(0,r.wrapXOFConstructorWithOpts)((i={})=>new f(e,A,void 0===i.dkLen?t:i.dkLen,!0));t.shake128=w(31,168,16),t.shake256=w(31,136,32)},{b5d8367685d2f01a:"4aHtO",a1dd24a362368716:"c7SUF","4f25a63eeb3984c4":"don3l"}],"4aHtO":[function(A,e,t){function i(A){if(!Number.isSafeInteger(A)||A<0)throw Error(`Wrong positive integer: ${A}`)}function I(A){if("boolean"!=typeof A)throw Error(`Expected boolean, not ${A}`)}function r(A,...e){if(!(A instanceof Uint8Array||null!=A&&"object"==typeof A&&"Uint8Array"===A.constructor.name))throw Error("Expected Uint8Array");if(e.length>0&&!e.includes(A.length))throw Error(`Expected Uint8Array of length ${e}, not of length=${A.length}`)}function o(A){if("function"!=typeof A||"function"!=typeof A.create)throw Error("Hash should be wrapped by utils.wrapConstructor");i(A.outputLen),i(A.blockLen)}function n(A,e=!0){if(A.destroyed)throw Error("Hash instance has been destroyed");if(e&&A.finished)throw Error("Hash#digest() has already been called")}function g(A,e){r(A);let t=e.outputLen;if(A.length>I&i)}:{h:0|Number(A>>I&i),l:0|Number(A&i)}}function o(A,e=!1){let t=new Uint32Array(A.length),i=new Uint32Array(A.length);for(let I=0;IBigInt(A>>>0)<>>0);t.toBig=n;let g=(A,e,t)=>A>>>t;t.shrSH=g;let a=(A,e,t)=>A<<32-t|e>>>t;t.shrSL=a;let s=(A,e,t)=>A>>>t|e<<32-t;t.rotrSH=s;let B=(A,e,t)=>A<<32-t|e>>>t;t.rotrSL=B;let c=(A,e,t)=>A<<64-t|e>>>t-32;t.rotrBH=c;let Q=(A,e,t)=>A>>>t-32|e<<64-t;t.rotrBL=Q;let l=(A,e)=>e;t.rotr32H=l;let C=(A,e)=>A;t.rotr32L=C;let d=(A,e,t)=>A<>>32-t;t.rotlSH=d;let h=(A,e,t)=>e<>>32-t;t.rotlSL=h;let E=(A,e,t)=>e<>>64-t;t.rotlBH=E;let p=(A,e,t)=>A<>>64-t;function f(A,e,t,i){let I=(e>>>0)+(i>>>0);return{h:A+t+(I/4294967296|0)|0,l:0|I}}t.rotlBL=p,t.add=f;let u=(A,e,t)=>(A>>>0)+(e>>>0)+(t>>>0);t.add3L=u;let w=(A,e,t,i)=>e+t+i+(A/4294967296|0)|0;t.add3H=w;let y=(A,e,t,i)=>(A>>>0)+(e>>>0)+(t>>>0)+(i>>>0);t.add4L=y;let F=(A,e,t,i,I)=>e+t+i+I+(A/4294967296|0)|0;t.add4H=F;let D=(A,e,t,i,I)=>(A>>>0)+(e>>>0)+(t>>>0)+(i>>>0)+(I>>>0);t.add5L=D;let m=(A,e,t,i,I,r)=>e+t+i+I+r+(A/4294967296|0)|0;t.add5H=m,t.default={fromBig:r,split:o,toBig:n,shrSH:g,shrSL:a,rotrSH:s,rotrSL:B,rotrBH:c,rotrBL:Q,rotr32H:l,rotr32L:C,rotlSH:d,rotlSL:h,rotlBH:E,rotlBL:p,add:f,add3L:u,add3H:w,add4L:y,add4H:F,add5H:m,add5L:D}},{}],don3l:[function(A,e,t){/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;let i=A("59719913569e95e6");function I(A){return A instanceof Uint8Array||null!=A&&"object"==typeof A&&"Uint8Array"===A.constructor.name}if(t.u8=A=>new Uint8Array(A.buffer,A.byteOffset,A.byteLength),t.u32=A=>new Uint32Array(A.buffer,A.byteOffset,Math.floor(A.byteLength/4)),t.createView=A=>new DataView(A.buffer,A.byteOffset,A.byteLength),t.rotr=(A,e)=>A<<32-e|A>>>e,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw Error("Non little-endian hardware is not supported");let r=Array.from({length:256},(A,e)=>e.toString(16).padStart(2,"0"));t.bytesToHex=function(A){if(!I(A))throw Error("Uint8Array expected");let e="";for(let t=0;t=o._0&&A<=o._9?A-o._0:A>=o._A&&A<=o._F?A-(o._A-10):A>=o._a&&A<=o._f?A-(o._a-10):void 0}t.hexToBytes=function(A){if("string"!=typeof A)throw Error("hex string expected, got "+typeof A);let e=A.length,t=e/2;if(e%2)throw Error("padded hex string expected, got unpadded hex of length "+e);let i=new Uint8Array(t);for(let e=0,I=0;e{};async function a(A,e,i){let I=Date.now();for(let r=0;r=0&&AA().update(B(e)).digest(),t=A();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>A(),e},t.wrapConstructorWithOpts=function(A){let e=(e,t)=>A(t).update(B(e)).digest(),t=A({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=e=>A(e),e},t.wrapXOFConstructorWithOpts=function(A){let e=(e,t)=>A(t).update(B(e)).digest(),t=A({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=e=>A(e),e},t.randomBytes=function(A=32){if(i.crypto&&"function"==typeof i.crypto.getRandomValues)return i.crypto.getRandomValues(new Uint8Array(A));throw Error("crypto.getRandomValues must be defined")}},{"59719913569e95e6":"ejPGf"}],ejPGf:[function(A,e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},{}],dNllk:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"treeCacheBuild",()=>c),i.export(t,"treeRebuild",()=>Q);var I=A("idb-keyval"),r=A("../../../vi/meta/comp/init-comp-load"),o=A("../../../vi/meta/meta"),n=A("../../../vi/render/script/extract-nav"),g=A("../comp/load"),a=A("../ed-global"),s=A("./assign-mitem"),B=A("./build/push-tree");let c=async(A,e)=>{let t=A.preview.page_cache[e];if(t){let i={meta:{},entry:[],url:t.url};for(let e of(await (0,r.initLoadComp)({comps:A.comp.loaded,meta:i.meta,mode:"page"},t.root,{async load(e){if(!A.sync)return;let t=e.filter(e=>!A.comp.loaded[e]);for(let[e,i]of Object.entries(await A.sync.comp.load(t,!0))){let t=await (0,I.get)(`comp-${e}`,n.nav.store);t&&(A.comp.loaded[e]=t),i&&i.snapshot&&!A.comp.list[e]&&(A.comp.loaded[e]?(0,g.loadCompSnapshot)(A,e,i.snapshot).then(()=>{A.comp.loaded[e]&&(0,I.set)(`comp-${e}`,A.comp.loaded[e],n.nav.store)}):(await (0,g.loadCompSnapshot)(A,e,i.snapshot),A.comp.loaded[e]&&(0,I.set)(`comp-${e}`,A.comp.loaded[e],n.nav.store)))}}}),t.root.childs))i.entry.push(e.id),(0,o.genMeta)({note:"cache-rebuild",comps:A.comp.loaded,meta:i.meta,mode:"page"},{item:e});A.preview.meta_cache[e]=i,(0,I.set)(`page-${e}`,i,n.nav.store)}},Q=async(A,e)=>{if(document.activeElement){let A=document.activeElement;if("DIV"===A.tagName&&"true"===A.getAttribute("contenteditable"))return}a.active.should_render_main=!0;let t=A.site.layout&&A.site.layout.id===A.page.cur.id&&e?.note==="load-layout page-init";for(let[e,t]of Object.entries(A.comp.list))if(!A.comp.loaded[e]){let i=t.doc.getMap("map").get("root"),I=i?.toJSON();I&&(A.comp.loaded[e]=I)}let i=A.page.doc?.getMap("map").get("root"),I=[];i?.get("childs")?.forEach(A=>I.push(A));let n={};for(let e of(A.page.tree=[],I)){let i=e.toJSON();i&&(await (0,r.initLoadComp)({comps:A.comp.loaded,meta:n,mode:"page"},i,{async load(e){for(let t of e)await (0,g.loadComponent)(A,t)}}),(0,o.genMeta)({note:"tree-rebuild",comps:A.comp.loaded,meta:n,mode:"page",on:{async visit(I){t||((I.parent?.instance_id!==I.parent?.id||I.jsx_prop)&&(0,B.pushTreeNode)(A,I,n,A.page.tree),(0,s.assignMitem)({m:I,root:i,mitem:e,meta:n,new_prop_jsx(A,e,t,i){if(!e.get(t)){let A=new Y.Map;syncronize(A,i),e.set(t,A)}}}))}}},{item:i}))}if(t)A.site.layout.meta=n;else{let e="root";if(A.site.layout&&A.site.layout.meta){for(let[t,i]of Object.entries(A.site.layout.meta))if("content"===i.item.name){e=i.item.id;break}A.page.root_id=e}if(A.site.layout&&A.site.layout.id===A.page.cur.id)A.page.meta=n;else if("root"!==e){for(let A of Object.values(n))A.parent?.id==="root"&&(A.parent.id=e);A.page.meta={...A.site.layout.meta,...n}}else A.page.meta=n}}},{"idb-keyval":"hfWoV","../../../vi/meta/comp/init-comp-load":"61w0n","../../../vi/meta/meta":"g3IOK","../../../vi/render/script/extract-nav":"hXbWs","../comp/load":"aigu6","../ed-global":"6QDfO","./assign-mitem":"3QMWf","./build/push-tree":"GvsT4","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],hfWoV:[function(A,e,t){var i,I=A("@parcel/transformer-js/src/esmodule-helpers.js");function r(A,e){(null==e||e>A.length)&&(e=A.length);for(var t=0,i=Array(e);t1&&void 0!==arguments[1]?arguments[1]:g();return e("readonly",function(e){return o(e.get(A))})}function s(A,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g();return t("readwrite",function(t){return t.put(e,A),o(t.transaction)})}function B(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g();return e("readwrite",function(e){return A.forEach(function(A){return e.put(A[1],A[0])}),o(e.transaction)})}function c(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g();return e("readonly",function(e){return Promise.all(A.map(function(A){return o(e.get(A))}))})}function Q(A,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:g();return t("readwrite",function(t){return new Promise(function(i,I){t.get(A).onsuccess=function(){try{t.put(e(this.result),A),i(o(t.transaction))}catch(A){I(A)}}})})}function l(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g();return e("readwrite",function(e){return e.delete(A),o(e.transaction)})}function C(A){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g();return e("readwrite",function(e){return A.forEach(function(A){return e.delete(A)}),o(e.transaction)})}function d(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g();return A("readwrite",function(A){return A.clear(),o(A.transaction)})}function h(A,e){return A.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},o(A.transaction)}function E(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g();return A("readonly",function(A){if(A.getAllKeys)return o(A.getAllKeys());var e=[];return h(A,function(A){return e.push(A.key)}).then(function(){return e})})}function p(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g();return A("readonly",function(A){if(A.getAll)return o(A.getAll());var e=[];return h(A,function(A){return e.push(A.value)}).then(function(){return e})})}function f(){var A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:g();return A("readonly",function(e){if(e.getAll&&e.getAllKeys)return Promise.all([o(e.getAllKeys()),o(e.getAll())]).then(function(A){var e=function(A){if(Array.isArray(A))return A}(A)||function(A,e){var t,i,I=null==A?null:"undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(null!=I){var r=[],o=!0,n=!1;try{for(I=I.call(A);!(o=(t=I.next()).done)&&(r.push(t.value),2!==r.length);o=!0);}catch(A){n=!0,i=A}finally{try{o||null==I.return||I.return()}finally{if(n)throw i}}return r}}(A,2)||function(A,e){if(A){if("string"==typeof A)return r(A,2);var t=Object.prototype.toString.call(A).slice(8,-1);if("Object"===t&&A.constructor&&(t=A.constructor.name),"Map"===t||"Set"===t)return Array.from(A);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(A,2)}}(A,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),t=e[0],i=e[1];return t.map(function(A,e){return[A,i[e]]})});var t=[];return A("readonly",function(A){return h(A,function(A){return t.push([A.key,A.value])}).then(function(){return t})})})}I.defineInteropFlag(t),I.export(t,"clear",()=>d),I.export(t,"createStore",()=>n),I.export(t,"del",()=>l),I.export(t,"delMany",()=>C),I.export(t,"entries",()=>f),I.export(t,"get",()=>a),I.export(t,"getMany",()=>c),I.export(t,"keys",()=>E),I.export(t,"promisifyRequest",()=>o),I.export(t,"set",()=>s),I.export(t,"setMany",()=>B),I.export(t,"update",()=>Q),I.export(t,"values",()=>p)},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"61w0n":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"initLoadComp",()=>r);var I=A("../meta");let r=async(A,e,t,i)=>{let o=new Set,n={root:e},g=[];(0,I.genMeta)({...A,on:{visit_component:({component:e})=>{if(e){let{id:t}=e;A.comps[t]||i&&(!i||i.has(t))||o.add(t),g.push(e)}},visit(A,e){t.visit&&t.visit(A,e,n)}},set_meta:!1,note:"init-load-comp"},{item:e,ignore_first_component:!0}),t.done&&t.done(n);let a=i;if(a||(a=new Set),o.size>0)for(let e of(await t.load([...o]),o.forEach(A=>{a&&a.add(A)}),[...a])){let i=A.comps[e];i&&await r(A,i,t,a)}for(let e of g)for(let i of Object.values(e.props))i.meta?.type==="content-element"&&i.content&&await r(A,i.content,t,a)}},{"../meta":"g3IOK","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],g3IOK:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"genMeta",()=>o);var I=A("./comp"),r=A("./simplify");let o=(A,e)=>{let t=e.item;if("item"===t.type&&t.component?.id&&!0!==e.ignore_first_component){(0,I.genComp)(A,e);return}let i={item:(0,r.simplifyItemChild)(t),parent:{id:e.parent?.item.id||"root",instance_id:e.parent?.instance_id,comp_id:e.parent?.comp?.component?.id}};if(e.jsx_prop&&(i.jsx_prop=e.jsx_prop),A.on?.visit&&A.on.visit(i,t,e.root||e.item),t.id&&!1!==A.set_meta&&(A.meta[i.item.id]=i),t.childs){for(let[I,r]of Object.entries(t.childs))if(r.id){let t={item:r,is_root:!1,root:e.root||e.item,parent:{item:i.item,instance_id:e.parent?.instance_id,comp:e.parent?.comp,root_instances:e.parent?.root_instances}};e.jsx_prop&&(t.jsx_prop={...e.jsx_prop,is_root:!1}),o(A,t)}}}},{"./comp":"7i2vZ","./simplify":"d8LMr","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"7i2vZ":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"genComp",()=>g);var I=A("./comp/instantiate"),r=A("./comp/walk-prop"),o=A("./meta"),n=A("./simplify");let g=(A,e)=>{let{item:t}=e;if("item"===t.type&&t.component?.id&&e.parent?.item.id){let i=A.comps[t.component.id];if(A.on?.visit_component&&A.on.visit_component(t,e.root||e.item),!i)return;if(i){let g;if("page"===A.mode?(t.component.instances||(t.component.instances={}),g=t.component.instances):g=e.parent?.root_instances,g){let A=g[t.id];g[t.id]||(g[t.id]={},A=g[t.id]),(0,I.instantiate)({item:t,item_comp:i,ids:A})}let a={item:(0,n.simplifyItemChild)(t),jsx_prop:e.jsx_prop,parent:{id:e.parent.item.id,comp_id:e.parent?.comp?.component?.id,instance_id:e.parent?.instance_id},instances:g};for(let I of(A.on?.visit&&A.on.visit(a,t,e.root||e.item),t.id&&!1!==A.set_meta&&(A.meta[t.id]=a),(0,r.walkProp)({item:t,item_comp:i,instance:g?g[t.id]:{},each(I,r){let n=t.component?.id;r.meta?.type==="content-element"&&n&&r.content&&(r.content.name=I,(0,o.genMeta)({...A},{item:r.content,root:e.root||r.content,is_root:!1,jsx_prop:{is_root:!0,comp_id:n,name:I},parent:{item:a.item,instance_id:t.id,comp:i,root_instances:g}}))}}),Object.values(t.childs)))!I?.name?.startsWith("jsx:")&&I&&Object.keys(I).length>3&&(0,o.genMeta)({...A,mode:"comp"},{item:I,is_root:!1,root:e.root||e.item,parent:{item:t,instance_id:t.id,root_instances:g,comp:i}})}}}},{"./comp/instantiate":"8QXzu","./comp/walk-prop":"hTtrx","./meta":"g3IOK","./simplify":"d8LMr","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"8QXzu":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"instantiate",()=>o),i.export(t,"walkChild",()=>n);var I=A("@paralleldrive/cuid2"),r=A("web-utils");let o=A=>{let{item:e,item_comp:t,ids:i}=A,I=(0,r.deepClone)(t);if(n(I,i),e.id&&(I.id=e.id),I.hidden=e.hidden,I.component){if(I.component.props&&e.component)for(let A of Object.keys(I.component.props)){let t=e.component.props[A],i=I.component.props[A];t&&(i.value=t.value,i.valueBuilt=t.valueBuilt,i.jsxCalledBy=t.jsxCalledBy,i.content=t.content)}I.component.instances=e.component?.instances,I.component.style=e.component?.style}for(let A of Object.keys(e))delete e[A];for(let[A,t]of Object.entries(I))e[A]=t},n=(A,e)=>{if(A.originalId=A.id,e[A.id]||(e[A.id]=(0,I.createId)()),A.id=e[A.id],A.childs)for(let t of A.childs)n(t,e)}},{"@paralleldrive/cuid2":"5ALsg","web-utils":"1hi6H","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],hTtrx:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"walkProp",()=>r);var I=A("web-utils");let r=A=>{for(let[e,t]of Object.entries(A.item_comp.component?.props||{}).sort((A,e)=>A[1].idx-e[1].idx)){let i=(0,I.deepClone)(t),r=A.item.component?.props;r&&r[e]&&(i.value=r[e].value,i.valueBuilt=r[e].valueBuilt,r[e].content&&(i.content=r[e].content)),i&&A.each(e,i)}}},{"web-utils":"1hi6H","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],d8LMr:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"simplifyItemChild",()=>I),i.export(t,"simplifyMeta",()=>r);let I=A=>{let e={};for(let[t,i]of Object.entries(A))if("childs"===t){if(e.childs=[],i&&Array.isArray(i))for(let A of i)"item"===A.type&&A.component?e.childs.push(A):e.childs.push({name:A.name,id:A.id,originalId:A.originalId})}else e[t]=i;return e},r=A=>{let e={};for(let[t,i]of Object.entries(A))e[t]={id:i.item.id,parent:i.parent?{id:i.parent.id,comp_id:i.parent.comp_id,instance_id:i.parent.instance_id}:void 0,comp:i.item.component&&i.instances?{id:i.item.component.id,instances:i.instances}:void 0};return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],hXbWs:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"nav",()=>I),i.export(t,"extractNavigate",()=>r);let I={timeout:null,store:(0,A("idb-keyval").createStore)("prasi-cache","prasi-cache-store")},r=(A,e)=>{let t=[...o(e,"navigate(",")"),...o(e,"href = ",";")],i=A.page.cur.id;for(let e of(A.page.navs[i]||(A.page.navs[i]=new Set),t))A.page.navs[i].add(e);clearTimeout(I.timeout),I.timeout=setTimeout(()=>{A.on_nav_loaded&&A.on_nav_loaded({urls:Array.from(A.page.navs[i])})},100)},o=(A,e,t)=>{let i=0,I=0,r=[];for(;;){let o=A.indexOf(e,i);if(I=i,o>=0){let I=A[o+e.length];if('"'===I||"'"===I||"`"===I){let n=A.indexOf(`${I}${t}`,o+e.length+1),g=A.substring(o+e.length+1,n);i=n+2+t.length,r.push(g)}}if(I===i)break}return r}},{"idb-keyval":"hfWoV","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],aigu6:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"loadcomp",()=>Q),i.export(t,"loadComponent",()=>l),i.export(t,"loadCompSnapshot",()=>C),i.export(t,"updateComponentMeta",()=>d);var I=A("@paralleldrive/cuid2"),r=A("wasm-gzip"),o=A("../../../vi/meta/comp/init-comp-load"),n=A("../../../vi/meta/meta"),g=A("../active/is-editing"),a=A("../tree/assign-mitem"),s=A("../tree/build"),B=A("../tree/build/push-tree"),c=A("2c077da2988489ba").Buffer;let Q={timeout:0,pending:new Set},l=async(A,e,t)=>new Promise(i=>{if(A.comp.list[e]){i(!0);return}Q.pending.add(e),clearTimeout(Q.timeout),Q.timeout=setTimeout(async()=>{let e=await A.sync?.comp.load([...Q.pending],t);if(e){let t=Object.entries(e);for(let[e,i]of t)i&&i.snapshot&&await C(A,e,i.snapshot);Q.pending.clear(),i(t.length>0)}else i(!1)},150)}),C=async(A,e,t)=>{if(A.comp.list[e])return;let i=new Y.Doc;Y.applyUpdate(i,(0,r.decompress)(t));let I=i.getMap("map").get("root");if(I){A.comp.loaded[e]=I.toJSON(),"function"==typeof A.comp.list[e]?.on_update&&i.off("update",A.comp.list[e].on_update);let o=await d(A,i,e);if(o){let{meta:I,tree:n}=o;A.comp.list[e]?(A.comp.list[e].meta=I,A.comp.list[e].tree=n):(A.comp.list[e]={comp:{id:e,snapshot:t},doc:i,meta:I,tree:n,async on_update(t,I){if("sv_remote"===I||"local"===I)return;let o=await A.sync?.yjs.sv_local("comp",e,c.from(r.compress(t)));if(o){let t=Y.encodeStateAsUpdate(i,(0,r.decompress)(o.sv));Y.applyUpdate(i,(0,r.decompress)(o.diff),"local"),await A.sync?.yjs.diff_local("comp",e,c.from(r.compress(t)));let I=await d(A,A.comp.list[e].doc,e);if(I&&(A.comp.list[e].meta=I.meta,A.comp.list[e].tree=I.tree),A.comp.loaded[e]=i.getMap("map").get("root")?.toJSON(),(0,g.isTextEditing)())return;(0,s.treeRebuild)(A),A.render()}}},i.on("update",A.comp.list[e].on_update))}}},d=async(A,e,t)=>{let i=e.getMap("map").get("root");if(!i)return;let r={},g=[],s=i.toJSON();return A.comp.loaded[t]=s,await (0,o.initLoadComp)({comps:A.comp.loaded,meta:r,set_meta:!1,mode:"comp"},s,{load:async e=>{let t=e.filter(e=>!A.comp.loaded[e]),i=await A.sync?.comp.load(t,!0);if(i)for(let[e,t]of Object.entries(i))t&&t.snapshot&&!A.comp.list[e]&&await C(A,e,t.snapshot)}}),(0,n.genMeta)({comps:A.comp.loaded,meta:r,mode:"comp",on:{async visit(e){(0,B.pushTreeNode)(A,e,r,g),(0,a.assignMitem)({m:e,root:s,mitem:i,meta:r,new_prop_jsx(A,e,t,i){h.list.push(()=>{let A=new Y.Map;i.content&&(i.content.id=(0,I.createId)()),syncronize(A,i),e.set(t,A)})}})}},note:"load-comp-scan-meta"},{item:s,ignore_first_component:!0}),h.list.length>0&&A.page.doc?.transact(()=>{for(let A of h.list)A()}),A.comp.loaded[t]=s,{meta:r,tree:g,item:s}},h={list:[]}},{"2c077da2988489ba":"9Gw3v","@paralleldrive/cuid2":"5ALsg","wasm-gzip":"pbgs4","../../../vi/meta/comp/init-comp-load":"61w0n","../../../vi/meta/meta":"g3IOK","../active/is-editing":"dhggL","../tree/assign-mitem":"3QMWf","../tree/build":"dNllk","../tree/build/push-tree":"GvsT4","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],dhggL:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"isTextEditing",()=>I);let I=()=>{let A=document.activeElement;return!!(A&&A.attributes.getNamedItem("contenteditable"))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"3QMWf":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"assignMitem",()=>r);var I=A("@paralleldrive/cuid2");let r=A=>{let{m:e,root:t,mitem:i,meta:r}=A;if(e.jsx_prop&&e.parent?.instance_id){let A=r[e.parent?.instance_id];if(A&&e.jsx_prop.is_root){let t=A.item.component?.props[e.jsx_prop.name];t&&(t.content=e.item)}}if(e.parent){if("root"===e.parent.id)e.item.id===t.id&&(e.mitem=i);else{let t=r[e.parent.id];if(!t.mitem&&e.parent.instance_id&&r[e.parent.instance_id]&&(t=r[e.parent.instance_id]),t.mitem){if(e.jsx_prop?.is_root===!0){let A=t.mitem.get("component")?.get("props");if(A){let t=A.get(e.jsx_prop.name);if(t){let A=t.get("content");if(!A){let A=new Y.Map;syncronize(A,{id:(0,I.createId)(),name:e.jsx_prop.name,type:"item",dim:{w:"full",h:"full"},childs:[],adv:{css:""}}),t.set("content",A)}A&&(e.mitem=A)}}}else t.mitem.get("childs")?.forEach(A=>{let t=A&&A.get&&A.get("id");"string"==typeof t&&t===e.item.id&&(e.mitem=A)})}if(e.item.component?.props)for(let[t,i]of Object.entries(e.item.component.props)){let I=e.mitem?.get("component")?.get("props")?.get(t);if(!I){let I=e.mitem?.get("component")?.get("props");I&&A.new_prop_jsx(e,I,t,i)}if(i.content){if(I){let A=r[i.content.id];A&&(A.mitem=I.get("content"))}else{let I=e.mitem?.get("component")?.get("props");I&&A.new_prop_jsx(e,I,t,i)}}}}}}},{"@paralleldrive/cuid2":"5ALsg","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],GvsT4:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"pushTreeNode",()=>I);let I=(A,e,t,i)=>{if(e.parent?.id==="root")A.page.doc?.getMap("map").get("root")?.get("childs")?.forEach(A=>{A.get("id")===e.item.id&&(e.mitem=A)});else{let A=t[e.parent?.id||""];A&&A.mitem&&A.mitem.get("childs")?.forEach(A=>{A&&A.get&&A.get("id")===e.item.id&&(e.mitem=A)})}if(!e.item||!e.item.id)return console.warn("Emptry Tree Item ",e),null;if(i.find(A=>A.id===e.item.id))console.warn("Double Tree Item: ",e.item.id,e.item.name);else if(e.parent?.comp_id){if(e.jsx_prop){if(e.jsx_prop.is_root)"child"!==e.jsx_prop.name&&i.push({id:e.item.id,parent:e.parent?.instance_id||"root",text:e.jsx_prop.name,data:e});else{if("child"===e.jsx_prop.name&&e.parent.instance_id){let A=t[e.parent.instance_id],I=A.item.component?.props?.child?.content?.id;I&&A.mitem&&t[I].item.childs.find(A=>e.item.id===A.id)&&i.push({id:e.item.id,parent:e.parent?.instance_id||"root",text:e.item.name,data:e})}e.parent.id!==e.parent.instance_id&&i.push({id:e.item.id,parent:e.parent?.id||"root",text:e.item.name,data:e})}}}else i.push({id:e.item.id,parent:e.parent?.id||"root",text:e.item.name,data:e})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"80IRG":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"AbsolutePosition",()=>AG),i.export(t,"AbstractConnector",()=>y),i.export(t,"AbstractStruct",()=>tJ),i.export(t,"AbstractType",()=>eW),i.export(t,"Array",()=>tg),i.export(t,"ContentAny",()=>tO),i.export(t,"ContentBinary",()=>tb),i.export(t,"ContentDeleted",()=>tM),i.export(t,"ContentDoc",()=>tK),i.export(t,"ContentEmbed",()=>tv),i.export(t,"ContentFormat",()=>tY),i.export(t,"ContentJSON",()=>tj),i.export(t,"ContentString",()=>tL),i.export(t,"ContentType",()=>t$),i.export(t,"Doc",()=>K),i.export(t,"GC",()=>tq),i.export(t,"ID",()=>AE),i.export(t,"Item",()=>t1),i.export(t,"Map",()=>ts),i.export(t,"PermanentUserData",()=>Am),i.export(t,"RelativePosition",()=>Ak),i.export(t,"Skip",()=>t9),i.export(t,"Snapshot",()=>Av),i.export(t,"Text",()=>tk),i.export(t,"Transaction",()=>ee),i.export(t,"UndoManager",()=>eQ),i.export(t,"UpdateDecoderV1",()=>j),i.export(t,"UpdateDecoderV2",()=>L),i.export(t,"UpdateEncoderV1",()=>X),i.export(t,"UpdateEncoderV2",()=>Z),i.export(t,"XmlElement",()=>tG),i.export(t,"XmlFragment",()=>tU),i.export(t,"XmlHook",()=>tH),i.export(t,"XmlText",()=>tx),i.export(t,"YArrayEvent",()=>tn),i.export(t,"YEvent",()=>eK),i.export(t,"YMapEvent",()=>ta),i.export(t,"YTextEvent",()=>tm),i.export(t,"YXmlEvent",()=>tN),i.export(t,"applyUpdate",()=>Ai),i.export(t,"applyUpdateV2",()=>At),i.export(t,"cleanupYTextFormatting",()=>ty),i.export(t,"compareIDs",()=>Ap),i.export(t,"compareRelativePositions",()=>AK),i.export(t,"convertUpdateFormatV1ToV2",()=>eb),i.export(t,"convertUpdateFormatV2ToV1",()=>eM),i.export(t,"createAbsolutePositionFromRelativePosition",()=>AR),i.export(t,"createDeleteSet",()=>H),i.export(t,"createDeleteSetFromStructStore",()=>x),i.export(t,"createDocFromSnapshot",()=>AT),i.export(t,"createID",()=>Af),i.export(t,"createRelativePositionFromJSON",()=>AU),i.export(t,"createRelativePositionFromTypeIndex",()=>Ax),i.export(t,"createSnapshot",()=>AX),i.export(t,"decodeRelativePosition",()=>AM),i.export(t,"decodeSnapshot",()=>AV),i.export(t,"decodeSnapshotV2",()=>AL),i.export(t,"decodeStateVector",()=>Ag),i.export(t,"decodeUpdate",()=>eh),i.export(t,"decodeUpdateV2",()=>eE),i.export(t,"diffUpdate",()=>eS),i.export(t,"diffUpdateV2",()=>ek),i.export(t,"emptySnapshot",()=>Az),i.export(t,"encodeRelativePosition",()=>Aq),i.export(t,"encodeSnapshot",()=>AO),i.export(t,"encodeSnapshotV2",()=>Aj),i.export(t,"encodeStateAsUpdate",()=>Ao),i.export(t,"encodeStateAsUpdateV2",()=>Ar),i.export(t,"encodeStateVector",()=>Ac),i.export(t,"encodeStateVectorFromUpdate",()=>ew),i.export(t,"encodeStateVectorFromUpdateV2",()=>eu),i.export(t,"equalDeleteSets",()=>M),i.export(t,"equalSnapshots",()=>AY),i.export(t,"findIndexSS",()=>A4),i.export(t,"findRootTypeKey",()=>Ay),i.export(t,"getItem",()=>A1),i.export(t,"getState",()=>A8),i.export(t,"getTypeChildren",()=>eZ),i.export(t,"isDeleted",()=>S),i.export(t,"isParentOf",()=>AF),i.export(t,"iterateDeletedStructs",()=>m),i.export(t,"logType",()=>AD),i.export(t,"logUpdate",()=>eC),i.export(t,"logUpdateV2",()=>ed),i.export(t,"mergeUpdates",()=>ef),i.export(t,"mergeUpdatesV2",()=>em),i.export(t,"obfuscateUpdate",()=>eJ),i.export(t,"obfuscateUpdateV2",()=>eq),i.export(t,"parseUpdateMeta",()=>eF),i.export(t,"parseUpdateMetaV2",()=>ey),i.export(t,"readUpdate",()=>Ae),i.export(t,"readUpdateV2",()=>AA),i.export(t,"relativePositionToJSON",()=>AS),i.export(t,"snapshot",()=>AZ),i.export(t,"snapshotContainsUpdate",()=>A$),i.export(t,"transact",()=>ea),i.export(t,"tryGc",()=>en),i.export(t,"typeListToArraySnapshot",()=>e$),i.export(t,"typeMapGetAllSnapshot",()=>tr),i.export(t,"typeMapGetSnapshot",()=>tI);var I=A("lib0/observable"),r=A("lib0/array"),o=A("lib0/math"),n=A("lib0/map"),g=A("lib0/encoding"),a=A("lib0/decoding"),s=A("lib0/random"),B=A("lib0/promise"),c=A("lib0/buffer"),Q=A("lib0/error"),l=A("lib0/binary"),C=A("lib0/function"),d=A("lib0/set"),h=A("lib0/logging"),E=A("lib0/time"),p=A("lib0/string"),f=A("lib0/iterator"),u=A("lib0/object"),w=arguments[3];class y extends I.Observable{constructor(A,e){super(),this.doc=A,this.awareness=e}}class F{constructor(A,e){this.clock=A,this.len=e}}class D{constructor(){this.clients=new Map}}let m=(A,e,t)=>e.clients.forEach((e,i)=>{let I=A.doc.store.clients.get(i);for(let i=0;i{let t=0,i=A.length-1;for(;t<=i;){let I=o.floor((t+i)/2),r=A[I],n=r.clock;if(n<=e){if(e{let t=A.clients.get(e.client);return void 0!==t&&null!==k(t,e.clock)},U=A=>{A.clients.forEach(A=>{let e,t;for(A.sort((A,e)=>A.clock-e.clock),e=1,t=1;e=I.clock?i.len=o.max(i.len,I.clock+I.len-i.clock):(t{let e=new D;for(let t=0;t{if(!e.clients.has(I)){let o=i.slice();for(let e=t+1;e{n.setIfUndefined(A.clients,e,()=>[]).push(new F(t,i))},H=()=>new D,x=A=>{let e=H();return A.clients.forEach((A,t)=>{let i=[];for(let e=0;e0&&e.clients.set(t,i)}),e},J=(A,e)=>{g.writeVarUint(A.restEncoder,e.clients.size),r.from(e.clients.entries()).sort((A,e)=>e[0]-A[0]).forEach(([e,t])=>{A.resetDsCurVal(),g.writeVarUint(A.restEncoder,e);let i=t.length;g.writeVarUint(A.restEncoder,i);for(let e=0;e{let e=new D,t=a.readVarUint(A.restDecoder);for(let i=0;i0){let I=n.setIfUndefined(e.clients,t,()=>[]);for(let e=0;e{let i=new D,I=a.readVarUint(A.restDecoder);for(let r=0;r0){let A=new Z;return g.writeVarUint(A.restEncoder,0),J(A,i),A.toUint8Array()}return null},M=(A,e)=>{if(A.clients.size!==e.clients.size)return!1;for(let[t,i]of A.clients.entries()){let A=e.clients.get(t);if(void 0===A||i.length!==A.length)return!1;for(let e=0;e!0,meta:I=null,autoLoad:r=!1,shouldLoad:o=!0}={}){super(),this.gc=t,this.gcFilter=i,this.clientID=R(),this.guid=A,this.collectionid=e,this.share=new Map,this.store=new A0,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=o,this.autoLoad=r,this.meta=I,this.isLoaded=!1,this.isSynced=!1,this.whenLoaded=B.create(A=>{this.on("load",()=>{this.isLoaded=!0,A(this)})});let n=()=>B.create(A=>{let e=t=>{(void 0===t||!0===t)&&(this.off("sync",e),A())};this.on("sync",e)});this.on("sync",A=>{!1===A&&this.isSynced&&(this.whenSynced=n()),this.isSynced=void 0===A||!0===A,this.isSynced&&!this.isLoaded&&this.emit("load",[])}),this.whenSynced=n()}load(){let A=this._item;null===A||this.shouldLoad||ea(A.parent.doc,A=>{A.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(r.from(this.subdocs).map(A=>A.guid))}transact(A,e=null){return ea(this,A,e)}get(A,e=eW){let t=n.setIfUndefined(this.share,A,()=>{let A=new e;return A._integrate(this,null),A}),i=t.constructor;if(e!==eW&&i!==e){if(i===eW){let i=new e;i._map=t._map,t._map.forEach(A=>{for(;null!==A;A=A.left)A.parent=i}),i._start=t._start;for(let A=i._start;null!==A;A=A.right)A.parent=i;return i._length=t._length,this.share.set(A,i),i._integrate(this,null),i}throw Error(`Type with the name ${A} has already been defined with a different constructor`)}return t}getArray(A=""){return this.get(A,tg)}getText(A=""){return this.get(A,tk)}getMap(A=""){return this.get(A,ts)}getXmlFragment(A=""){return this.get(A,tU)}toJSON(){let A={};return this.share.forEach((e,t)=>{A[t]=e.toJSON()}),A}destroy(){r.from(this.subdocs).forEach(A=>A.destroy());let A=this._item;if(null!==A){this._item=null;let e=A.content;e.doc=new K({guid:this.guid,...e.opts,shouldLoad:!1}),e.doc._item=A,ea(A.parent.doc,t=>{let i=e.doc;A.deleted||t.subdocsAdded.add(i),t.subdocsRemoved.add(this)},null,!0)}this.emit("destroyed",[!0]),this.emit("destroy",[this]),super.destroy()}on(A,e){super.on(A,e)}off(A,e){super.off(A,e)}}class v{constructor(A){this.restDecoder=A}resetDsCurVal(){}readDsClock(){return a.readVarUint(this.restDecoder)}readDsLen(){return a.readVarUint(this.restDecoder)}}class j extends v{readLeftID(){return Af(a.readVarUint(this.restDecoder),a.readVarUint(this.restDecoder))}readRightID(){return Af(a.readVarUint(this.restDecoder),a.readVarUint(this.restDecoder))}readClient(){return a.readVarUint(this.restDecoder)}readInfo(){return a.readUint8(this.restDecoder)}readString(){return a.readVarString(this.restDecoder)}readParentInfo(){return 1===a.readVarUint(this.restDecoder)}readTypeRef(){return a.readVarUint(this.restDecoder)}readLen(){return a.readVarUint(this.restDecoder)}readAny(){return a.readAny(this.restDecoder)}readBuf(){return c.copyUint8Array(a.readVarUint8Array(this.restDecoder))}readJSON(){return JSON.parse(a.readVarString(this.restDecoder))}readKey(){return a.readVarString(this.restDecoder)}}class O{constructor(A){this.dsCurrVal=0,this.restDecoder=A}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=a.readVarUint(this.restDecoder),this.dsCurrVal}readDsLen(){let A=a.readVarUint(this.restDecoder)+1;return this.dsCurrVal+=A,A}}class L extends O{constructor(A){super(A),this.keys=[],a.readVarUint(A),this.keyClockDecoder=new a.IntDiffOptRleDecoder(a.readVarUint8Array(A)),this.clientDecoder=new a.UintOptRleDecoder(a.readVarUint8Array(A)),this.leftClockDecoder=new a.IntDiffOptRleDecoder(a.readVarUint8Array(A)),this.rightClockDecoder=new a.IntDiffOptRleDecoder(a.readVarUint8Array(A)),this.infoDecoder=new a.RleDecoder(a.readVarUint8Array(A),a.readUint8),this.stringDecoder=new a.StringDecoder(a.readVarUint8Array(A)),this.parentInfoDecoder=new a.RleDecoder(a.readVarUint8Array(A),a.readUint8),this.typeRefDecoder=new a.UintOptRleDecoder(a.readVarUint8Array(A)),this.lenDecoder=new a.UintOptRleDecoder(a.readVarUint8Array(A))}readLeftID(){return new AE(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new AE(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return 1===this.parentInfoDecoder.read()}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return a.readAny(this.restDecoder)}readBuf(){return a.readVarUint8Array(this.restDecoder)}readJSON(){return a.readAny(this.restDecoder)}readKey(){let A=this.keyClockDecoder.read();if(A{i=o.max(i,e[0].id.clock);let I=A4(e,i);g.writeVarUint(A.restEncoder,e.length-I),A.writeClient(t),g.writeVarUint(A.restEncoder,i);let r=e[I];r.write(A,i-r.id.clock);for(let t=I+1;t{let i=new Map;t.forEach((A,t)=>{A8(e,t)>A&&i.set(t,A)}),A3(e).forEach((A,e)=>{t.has(e)||i.set(e,0)}),g.writeVarUint(A.restEncoder,i.size),r.from(i.entries()).sort((A,e)=>e[0]-A[0]).forEach(([t,i])=>{P(A,e.clients.get(t),t,i)})},T=(A,e)=>{let t=n.create(),i=a.readVarUint(A.restDecoder);for(let I=0;I{let i=[],I=r.from(t.keys()).sort((A,e)=>A-e);if(0===I.length)return null;let o=()=>{if(0===I.length)return null;let A=t.get(I[I.length-1]);for(;A.refs.length===A.i;){if(I.pop(),!(I.length>0))return null;A=t.get(I[I.length-1])}return A},a=o();if(null===a)return null;let s=new A0,B=new Map,c=(A,e)=>{let t=B.get(A);(null==t||t>e)&&B.set(A,e)},Q=a.refs[a.i++],l=new Map,C=()=>{for(let A of i){let e=A.id.client,i=t.get(e);i?(i.i--,s.clients.set(e,i.refs.slice(i.i)),t.delete(e),i.i=0,i.refs=[]):s.clients.set(e,[A]),I=I.filter(A=>A!==e)}i.length=0};for(;;){if(Q.constructor!==t9){let I=n.setIfUndefined(l,Q.id.client,()=>A8(e,Q.id.client))-Q.id.clock;if(I<0)i.push(Q),c(Q.id.client,Q.id.clock-1),C();else{let r=Q.getMissing(A,e);if(null!==r){i.push(Q);let A=t.get(r)||{refs:[],i:0};if(A.refs.length===A.i)c(r,A8(e,r)),C();else{Q=A.refs[A.i++];continue}}else(0===I||I0)Q=i.pop();else if(null!==a&&a.i0){let A=new Z;return W(A,s,new Map),g.writeVarUint(A.restEncoder,0),{missing:B,update:A.toUint8Array()}}return null},$=(A,e)=>W(A,e.doc.store,e.beforeState),AA=(A,e,t,i=new L(A))=>ea(e,A=>{A.local=!1;let e=!1,t=A.doc,I=t.store,r=_(A,I,T(i,t)),o=I.pendingStructs;if(o){for(let[A,t]of o.missing)if(te)&&o.missing.set(A,e)}o.update=em([o.update,r.update])}}else I.pendingStructs=r;let n=b(i,A,I);if(I.pendingDs){let e=new L(a.createDecoder(I.pendingDs));a.readVarUint(e.restDecoder);let t=b(e,A,I);n&&t?I.pendingDs=em([n,t]):I.pendingDs=n||t}else I.pendingDs=n;if(e){let e=I.pendingStructs.update;I.pendingStructs=null,At(A.doc,e)}},t,!1),Ae=(A,e,t)=>AA(A,e,t,new j(A)),At=(A,e,t,i=L)=>{let I=a.createDecoder(e);AA(I,A,t,new i(I))},Ai=(A,e,t)=>At(A,e,t,j),AI=(A,e,t=new Map)=>{W(A,e.store,t),J(A,x(e.store))},Ar=(A,e=new Uint8Array([0]),t=new Z)=>{AI(t,A,Ag(e));let i=[t.toUint8Array()];if(A.store.pendingDs&&i.push(A.store.pendingDs),A.store.pendingStructs&&i.push(ek(A.store.pendingStructs.update,e)),i.length>1){if(t.constructor===X)return ef(i.map((A,e)=>0===e?A:eM(A)));if(t.constructor===Z)return em(i)}return i[0]},Ao=(A,e)=>Ar(A,e,new X),An=A=>{let e=new Map,t=a.readVarUint(A.restDecoder);for(let i=0;iAn(new v(a.createDecoder(A))),Aa=(A,e)=>(g.writeVarUint(A.restEncoder,e.size),r.from(e.entries()).sort((A,e)=>e[0]-A[0]).forEach(([e,t])=>{g.writeVarUint(A.restEncoder,e),g.writeVarUint(A.restEncoder,t)}),A),As=(A,e)=>Aa(A,A3(e.store)),AB=(A,e=new z)=>(A instanceof Map?Aa(e,A):As(e,A),e.toUint8Array()),Ac=A=>AB(A,new V);class AQ{constructor(){this.l=[]}}let Al=()=>new AQ,AC=(A,e)=>A.l.push(e),Ad=(A,e)=>{let t=A.l,i=t.length;A.l=t.filter(A=>e!==A),i===A.l.length&&console.error("[yjs] Tried to remove event handler that doesn't exist.")},Ah=(A,e,t)=>C.callAll(A.l,[e,t]);class AE{constructor(A,e){this.client=A,this.clock=e}}let Ap=(A,e)=>A===e||null!==A&&null!==e&&A.client===e.client&&A.clock===e.clock,Af=(A,e)=>new AE(A,e),Au=(A,e)=>{g.writeVarUint(A,e.client),g.writeVarUint(A,e.clock)},Aw=A=>Af(a.readVarUint(A),a.readVarUint(A)),Ay=A=>{for(let[e,t]of A.doc.share.entries())if(t===A)return e;throw Q.unexpectedCase()},AF=(A,e)=>{for(;null!==e;){if(e.parent===A)return!0;e=e.parent._item}return!1},AD=A=>{let e=[],t=A._start;for(;t;)e.push(t),t=t.right;console.log("Children: ",e),console.log("Children content: ",e.filter(A=>!A.deleted).map(A=>A.content))};class Am{constructor(A,e=A.getMap("users")){let t=new Map;this.yusers=e,this.doc=A,this.clients=new Map,this.dss=t;let i=(A,e)=>{let t=A.get("ds"),i=A.get("ids"),I=A=>this.clients.set(A,e);t.observe(A=>{A.changes.added.forEach(A=>{A.content.getContent().forEach(A=>{A instanceof Uint8Array&&this.dss.set(e,G([this.dss.get(e)||H(),q(new v(a.createDecoder(A)))]))})})}),this.dss.set(e,G(t.map(A=>q(new v(a.createDecoder(A)))))),i.observe(A=>A.changes.added.forEach(A=>A.content.getContent().forEach(I))),i.forEach(I)};e.observe(A=>{A.keysChanged.forEach(A=>i(e.get(A),A))}),e.forEach(i)}setUserMapping(A,e,t,{filter:i=()=>!0}={}){let I=this.yusers,r=I.get(t);r||((r=new ts).set("ids",new tg),r.set("ds",new tg),I.set(t,r)),r.get("ids").push([e]),I.observe(A=>{setTimeout(()=>{let A=I.get(t);if(A!==r){r=A,this.clients.forEach((A,e)=>{t===A&&r.get("ids").push([e])});let e=new V,i=this.dss.get(t);i&&(J(e,i),r.get("ds").push([e.toUint8Array()]))}},0)}),A.on("afterTransaction",A=>{setTimeout(()=>{let e=r.get("ds"),t=A.deleteSet;if(A.local&&t.clients.size>0&&i(A,t)){let A=new V;J(A,t),e.push([A.toUint8Array()])}})})}getUserByClientId(A){return this.clients.get(A)||null}getUserByDeletedId(A){for(let[e,t]of this.dss.entries())if(S(t,A))return e;return null}}class Ak{constructor(A,e,t,i=0){this.type=A,this.tname=e,this.item=t,this.assoc=i}}let AS=A=>{let e={};return A.type&&(e.type=A.type),A.tname&&(e.tname=A.tname),A.item&&(e.item=A.item),null!=A.assoc&&(e.assoc=A.assoc),e},AU=A=>new Ak(null==A.type?null:Af(A.type.client,A.type.clock),A.tname||null,null==A.item?null:Af(A.item.client,A.item.clock),null==A.assoc?0:A.assoc);class AG{constructor(A,e,t=0){this.type=A,this.index=e,this.assoc=t}}let AN=(A,e,t=0)=>new AG(A,e,t),AH=(A,e,t)=>{let i=null,I=null;return null===A._item?I=Ay(A):i=Af(A._item.id.client,A._item.id.clock),new Ak(i,I,e,t)},Ax=(A,e,t=0)=>{let i=A._start;if(t<0){if(0===e)return AH(A,null,t);e--}for(;null!==i;){if(!i.deleted&&i.countable){if(i.length>e)return AH(A,Af(i.id.client,i.id.clock+e),t);e-=i.length}if(null===i.right&&t<0)return AH(A,i.lastId,t);i=i.right}return AH(A,null,t)},AJ=(A,e)=>{let{type:t,tname:i,item:I,assoc:r}=e;if(null!==I)g.writeVarUint(A,0),Au(A,I);else if(null!==i)g.writeUint8(A,1),g.writeVarString(A,i);else if(null!==t)g.writeUint8(A,2),Au(A,t);else throw Q.unexpectedCase();return g.writeVarInt(A,r),A},Aq=A=>{let e=g.createEncoder();return AJ(e,A),g.toUint8Array(e)},Ab=A=>{let e=null,t=null,i=null;switch(a.readVarUint(A)){case 0:i=Aw(A);break;case 1:t=a.readVarString(A);break;case 2:e=Aw(A)}return new Ak(e,t,i,a.hasContent(A)?a.readVarInt(A):0)},AM=A=>Ab(a.createDecoder(A)),AR=(A,e)=>{let t=e.store,i=A.item,I=A.type,r=A.tname,o=A.assoc,n=null,g=0;if(null!==i){if(A8(t,i.client)<=i.clock)return null;let A=t0(t,i),e=A.item;if(!(e instanceof t1))return null;if(null===(n=e.parent)._item||!n._item.deleted){g=e.deleted||!e.countable?0:A.diff+(o>=0?0:1);let t=e.left;for(;null!==t;)!t.deleted&&t.countable&&(g+=t.length),t=t.left}}else{if(null!==r)n=e.get(r);else if(null!==I){if(A8(t,I.client)<=I.clock)return null;let{item:A}=t0(t,I);if(!(A instanceof t1)||!(A.content instanceof t$))return null;n=A.content.type}else throw Q.unexpectedCase();g=o>=0?n._length:0}return AN(n,g,A.assoc)},AK=(A,e)=>A===e||null!==A&&null!==e&&A.tname===e.tname&&Ap(A.item,e.item)&&Ap(A.type,e.type)&&A.assoc===e.assoc;class Av{constructor(A,e){this.ds=A,this.sv=e}}let AY=(A,e)=>{let t=A.ds.clients,i=e.ds.clients,I=A.sv,r=e.sv;if(I.size!==r.size||t.size!==i.size)return!1;for(let[A,e]of I.entries())if(r.get(A)!==e)return!1;for(let[A,e]of t.entries()){let t=i.get(A)||[];if(e.length!==t.length)return!1;for(let A=0;A(J(e,A.ds),Aa(e,A.sv),e.toUint8Array()),AO=A=>Aj(A,new V),AL=(A,e=new O(a.createDecoder(A)))=>new Av(q(e),An(e)),AV=A=>AL(A,new v(a.createDecoder(A))),AX=(A,e)=>new Av(A,e),Az=AX(H(),new Map),AZ=A=>AX(x(A.store),A3(A.store)),AP=(A,e)=>void 0===e?!A.deleted:e.sv.has(A.id.client)&&(e.sv.get(A.id.client)||0)>A.id.clock&&!S(e.ds,A.id),AW=(A,e)=>{let t=n.setIfUndefined(A.meta,AW,d.create),i=A.doc.store;t.has(e)||(e.sv.forEach((e,t)=>{e{}),t.add(e))},AT=(A,e,t=new K)=>{if(A.gc)throw Error("Garbage-collection must be disabled in `originDoc`!");let{sv:i,ds:I}=e,r=new Z;return A.transact(e=>{let t=0;for(let[I,o]of(i.forEach(A=>{A>0&&t++}),g.writeVarUint(r.restEncoder,t),i)){if(0===o)continue;o{let i=new t(a.createDecoder(e)),I=new el(i,!1);for(let e=I.curr;null!==e;e=I.next())if((A.sv.get(e.id.client)||0)A_(A,e,j);class A0{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}let A3=A=>{let e=new Map;return A.clients.forEach((A,t)=>{let i=A[A.length-1];e.set(t,i.id.clock+i.length)}),e},A8=(A,e)=>{let t=A.clients.get(e);if(void 0===t)return 0;let i=t[t.length-1];return i.id.clock+i.length},A2=(A,e)=>{let t=A.clients.get(e.id.client);if(void 0===t)t=[],A.clients.set(e.id.client,t);else{let A=t[t.length-1];if(A.id.clock+A.length!==e.id.clock)throw Q.unexpectedCase()}t.push(e)},A4=(A,e)=>{let t=0,i=A.length-1,I=A[i],r=I.id.clock;if(r===e)return i;let n=o.floor(e/(r+I.length-1)*i);for(;t<=i;){if((r=(I=A[n]).id.clock)<=e){if(e{let t=A.clients.get(e.client);return t[A4(t,e.clock)]},A6=(A,e,t)=>{let i=A4(e,t),I=e[i];return I.id.clock{let t=A.doc.store.clients.get(e.client);return t[A6(A,t,e.clock)]},A9=(A,e,t)=>{let i=e.clients.get(t.client),I=A4(i,t.clock),r=i[I];return t.clock!==r.id.clock+r.length-1&&r.constructor!==tq&&i.splice(I+1,0,t8(A,r,t.clock-r.id.clock+1)),r},A7=(A,e,t)=>{let i=A.clients.get(e.id.client);i[A4(i,e.id.clock)]=t},eA=(A,e,t,i,I)=>{let r;if(0===i)return;let o=t+i,n=A6(A,e,t);do o<(r=e[n++]).id.clock+r.length&&A6(A,e,o),I(r);while(n!!(0!==e.deleteSet.clients.size||n.any(e.afterState,(A,t)=>e.beforeState.get(t)!==A))&&(U(e.deleteSet),$(A,e),J(A,e.deleteSet),!0),ei=(A,e,t)=>{let i=e._item;(null===i||i.id.clock<(A.beforeState.get(i.id.client)||0)&&!i.deleted)&&n.setIfUndefined(A.changed,e,d.create).add(t)},eI=(A,e)=>{let t=A[e],i=A[e-1],I=e;for(;I>0;t=i,i=A[--I-1]){if(i.deleted===t.deleted&&i.constructor===t.constructor&&i.mergeWith(t)){t instanceof t1&&null!==t.parentSub&&t.parent._map.get(t.parentSub)===t&&t.parent._map.set(t.parentSub,i);continue}break}let r=e-I;return r&&A.splice(e+1-r,r),r},er=(A,e,t)=>{for(let[i,I]of A.clients.entries()){let A=e.clients.get(i);for(let i=I.length-1;i>=0;i--){let r=I[i],o=r.clock+r.len;for(let i=A4(A,r.clock),I=A[i];i{A.clients.forEach((A,t)=>{let i=e.clients.get(t);for(let e=A.length-1;e>=0;e--){let t=A[e],I=o.min(i.length-1,1+A4(i,t.clock+t.len-1));for(let A=I,e=i[A];A>0&&e.id.clock>=t.clock;e=i[A])A-=1+eI(i,A)}})},en=(A,e,t)=>{er(A,e,t),eo(A,e)},eg=(A,e)=>{if(eA.push(()=>{null!==i._item&&i._item.deleted||i._callObserver(t,e)})),A.push(()=>{t.changedParentTypes.forEach((A,e)=>{e._dEH.l.length>0&&(null===e._item||!e._item.deleted)&&((A=A.filter(A=>null===A.target._item||!A.target._item.deleted)).forEach(A=>{A.currentTarget=e,A._path=null}),A.sort((A,e)=>A.path.length-e.path.length),Ah(e._dEH,A,t))})}),A.push(()=>i.emit("afterTransaction",[t,i])),(0,C.callAll)(A,[]),t._needFormattingCleanup&&tF(t)}finally{i.gc&&er(r,I,i.gcFilter),eo(r,I),t.afterState.forEach((A,e)=>{let i=t.beforeState.get(e)||0;if(i!==A){let A=I.clients.get(e),t=o.max(A4(A,i),1);for(let e=A.length-1;e>=t;)e-=1+eI(A,e)}});for(let A=n.length-1;A>=0;A--){let{client:e,clock:t}=n[A].id,i=I.clients.get(e),r=A4(i,t);!(r+11)&&r>0&&eI(i,r)}if(t.local||t.afterState.get(i.clientID)===t.beforeState.get(i.clientID)||(h.print(h.ORANGE,h.BOLD,"[yjs] ",h.UNBOLD,h.RED,"Changed the client-id because another client seems to be using it."),i.clientID=R()),i.emit("afterTransactionCleanup",[t,i]),i._observers.has("update")){let A=new X;et(A,t)&&i.emit("update",[A.toUint8Array(),t.origin,i,t])}if(i._observers.has("updateV2")){let A=new Z;et(A,t)&&i.emit("updateV2",[A.toUint8Array(),t.origin,i,t])}let{subdocsAdded:g,subdocsLoaded:a,subdocsRemoved:s}=t;(g.size>0||s.size>0||a.size>0)&&(g.forEach(A=>{A.clientID=i.clientID,null==A.collectionid&&(A.collectionid=i.collectionid),i.subdocs.add(A)}),s.forEach(A=>i.subdocs.delete(A)),i.emit("subdocs",[{loaded:a,added:g,removed:s},i,t]),s.forEach(A=>A.destroy())),A.length<=e+1?(i._transactionCleanups=[],i.emit("afterAllTransactions",[i,A])):eg(A,e+1)}}},ea=(A,e,t=null,i=!0)=>{let I=A._transactionCleanups,r=!1,o=null;null===A._transaction&&(r=!0,A._transaction=new ee(A,t,i),I.push(A._transaction),1===I.length&&A.emit("beforeAllTransactions",[A]),A.emit("beforeTransaction",[A._transaction,A]));try{o=e(A._transaction)}finally{if(r){let e=A._transaction===I[0];A._transaction=null,e&&eg(I,0)}}return o};class es{constructor(A,e){this.insertions=e,this.deletions=A,this.meta=new Map}}let eB=(A,e,t)=>{m(A,t.deletions,A=>{A instanceof t1&&e.scope.some(e=>AF(e,A))&&t3(A,!1)})},ec=(A,e,t)=>{let i=null,I=null,r=A.doc,o=A.scope;if(ea(r,t=>{for(;e.length>0&&null===i;){let I=r.store,n=e.pop(),g=new Set,a=[],s=!1;m(t,n.insertions,A=>{if(A instanceof t1){if(null!==A.redone){let{item:e,diff:i}=t0(I,A.id);i>0&&(e=A5(t,Af(e.id.client,e.id.clock+i))),A=e}!A.deleted&&o.some(e=>AF(e,A))&&a.push(A)}}),m(t,n.deletions,A=>{A instanceof t1&&o.some(e=>AF(e,A))&&!S(n.insertions,A.id)&&g.add(A)}),g.forEach(e=>{s=null!==t4(t,e,g,n.insertions,A.ignoreRemoteMapChanges,A)||s});for(let e=a.length-1;e>=0;e--){let i=a[e];A.deleteFilter(i)&&(i.delete(t),s=!0)}i=s?n:null}t.changed.forEach((A,e)=>{A.has(null)&&e._searchMarker&&(e._searchMarker.length=0)}),I=t},A),null!=i){let e=I.changedParentTypes;A.emit("stack-item-popped",[{stackItem:i,type:t,changedParentTypes:e},A])}return i};class eQ extends I.Observable{constructor(A,{captureTimeout:e=500,captureTransaction:t=A=>!0,deleteFilter:i=()=>!0,trackedOrigins:I=new Set([null]),ignoreRemoteMapChanges:o=!1,doc:n=r.isArray(A)?A[0].doc:A.doc}={}){super(),this.scope=[],this.doc=n,this.addToScope(A),this.deleteFilter=i,I.add(this),this.trackedOrigins=I,this.captureTransaction=t,this.undoStack=[],this.redoStack=[],this.undoing=!1,this.redoing=!1,this.lastChange=0,this.ignoreRemoteMapChanges=o,this.captureTimeout=e,this.afterTransactionHandler=A=>{if(!this.captureTransaction(A)||!this.scope.some(e=>A.changedParentTypes.has(e))||!this.trackedOrigins.has(A.origin)&&(!A.origin||!this.trackedOrigins.has(A.origin.constructor)))return;let e=this.undoing,t=this.redoing,i=e?this.redoStack:this.undoStack;e?this.stopCapturing():t||this.clear(!1,!0);let I=new D;A.afterState.forEach((e,t)=>{let i=A.beforeState.get(t)||0,r=e-i;r>0&&N(I,t,i,r)});let r=E.getUnixTime(),o=!1;if(this.lastChange>0&&r-this.lastChange0&&!e&&!t){let e=i[i.length-1];e.deletions=G([e.deletions,A.deleteSet]),e.insertions=G([e.insertions,I])}else i.push(new es(A.deleteSet,I)),o=!0;e||t||(this.lastChange=r),m(A,A.deleteSet,A=>{A instanceof t1&&this.scope.some(e=>AF(e,A))&&t3(A,!0)});let n=[{stackItem:i[i.length-1],origin:A.origin,type:e?"redo":"undo",changedParentTypes:A.changedParentTypes},this];o?this.emit("stack-item-added",n):this.emit("stack-item-updated",n)},this.doc.on("afterTransaction",this.afterTransactionHandler),this.doc.on("destroy",()=>{this.destroy()})}addToScope(A){(A=r.isArray(A)?A:[A]).forEach(A=>{this.scope.every(e=>e!==A)&&(A.doc!==this.doc&&h.warn("[yjs#509] Not same Y.Doc"),this.scope.push(A))})}addTrackedOrigin(A){this.trackedOrigins.add(A)}removeTrackedOrigin(A){this.trackedOrigins.delete(A)}clear(A=!0,e=!0){(A&&this.canUndo()||e&&this.canRedo())&&this.doc.transact(t=>{A&&(this.undoStack.forEach(A=>eB(t,this,A)),this.undoStack=[]),e&&(this.redoStack.forEach(A=>eB(t,this,A)),this.redoStack=[]),this.emit("stack-cleared",[{undoStackCleared:A,redoStackCleared:e}])})}stopCapturing(){this.lastChange=0}undo(){let A;this.undoing=!0;try{A=ec(this,this.undoStack,"undo")}finally{this.undoing=!1}return A}redo(){let A;this.redoing=!0;try{A=ec(this,this.redoStack,"redo")}finally{this.redoing=!1}return A}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}destroy(){this.trackedOrigins.delete(this),this.doc.off("afterTransaction",this.afterTransactionHandler),super.destroy()}}class el{constructor(A,e){this.gen=function*(A){let e=a.readVarUint(A.restDecoder);for(let t=0;ted(A,j),ed=(A,e=L)=>{let t=[],i=new e(a.createDecoder(A)),I=new el(i,!1);for(let A=I.curr;null!==A;A=I.next())t.push(A);h.print("Structs: ",t);let r=q(i);h.print("DeleteSet: ",r)},eh=A=>eE(A,j),eE=(A,e=L)=>{let t=[],i=new e(a.createDecoder(A)),I=new el(i,!1);for(let A=I.curr;null!==A;A=I.next())t.push(A);return{structs:t,ds:q(i)}};class ep{constructor(A){this.currClient=0,this.startClock=0,this.written=0,this.encoder=A,this.clientStructs=[]}}let ef=A=>em(A,j,X),eu=(A,e=z,t=L)=>{let i=new e,I=new el(new t(a.createDecoder(A)),!1),r=I.curr;if(null===r)return g.writeVarUint(i.restEncoder,0),i.toUint8Array();{let A=0,e=r.id.client,t=0!==r.id.clock,o=t?0:r.id.clock+r.length;for(;null!==r;r=I.next())e!==r.id.client&&(0!==o&&(A++,g.writeVarUint(i.restEncoder,e),g.writeVarUint(i.restEncoder,o)),e=r.id.client,o=0,t=0!==r.id.clock),r.constructor===t9&&(t=!0),t||(o=r.id.clock+r.length);0!==o&&(A++,g.writeVarUint(i.restEncoder,e),g.writeVarUint(i.restEncoder,o));let n=g.createEncoder();return g.writeVarUint(n,A),g.writeBinaryEncoder(n,i.restEncoder),i.restEncoder=n,i.toUint8Array()}},ew=A=>eu(A,V,j),ey=(A,e=L)=>{let t=new Map,i=new Map,I=new el(new e(a.createDecoder(A)),!1),r=I.curr;if(null!==r){let A=r.id.client,e=r.id.clock;for(t.set(A,e);null!==r;r=I.next())A!==r.id.client&&(i.set(A,e),t.set(r.id.client,r.id.clock),A=r.id.client),e=r.id.clock+r.length;i.set(A,e)}return{from:t,to:i}},eF=A=>ey(A,j),eD=(A,e)=>{if(A.constructor===tq){let{client:t,clock:i}=A.id;return new tq(Af(t,i+e),A.length-e)}if(A.constructor===t9){let{client:t,clock:i}=A.id;return new t9(Af(t,i+e),A.length-e)}{let{client:t,clock:i}=A.id;return new t1(Af(t,i+e),null,Af(t,i+e-1),null,A.rightOrigin,A.parent,A.parentSub,A.content.splice(e))}},em=(A,e=L,t=Z)=>{if(1===A.length)return A[0];let i=A.map(A=>new e(a.createDecoder(A))),I=i.map(A=>new el(A,!0)),r=null,o=new t,n=new ep(o);for(;(I=I.filter(A=>null!==A.curr)).sort((A,e)=>{if(A.curr.id.client!==e.curr.id.client)return e.curr.id.client-A.curr.id.client;{let t=A.curr.id.clock-e.curr.id.clock;return 0===t?A.curr.constructor===e.curr.constructor?0:A.curr.constructor===t9?1:-1:t}}),0!==I.length;){let A=I[0],e=A.curr.id.client;if(null!==r){let t=A.curr,i=!1;for(;null!==t&&t.id.clock+t.length<=r.struct.id.clock+r.struct.length&&t.id.client>=r.struct.id.client;)t=A.next(),i=!0;if(null===t||t.id.client!==e||i&&t.id.clock>r.struct.id.clock+r.struct.length)continue;if(e!==r.struct.id.client)eG(n,r.struct,r.offset),r={struct:t,offset:0},A.next();else if(r.struct.id.clock+r.struct.length0&&(r.struct.constructor===t9?r.struct.length-=e:t=eD(t,e)),r.struct.mergeWith(t)||(eG(n,r.struct,r.offset),r={struct:t,offset:0},A.next())}}else r={struct:A.curr,offset:0},A.next();for(let t=A.curr;null!==t&&t.id.client===e&&t.id.clock===r.struct.id.clock+r.struct.length&&t.constructor!==t9;t=A.next())eG(n,r.struct,r.offset),r={struct:t,offset:0}}return null!==r&&(eG(n,r.struct,r.offset),r=null),eN(n),J(o,G(i.map(A=>q(A)))),o.toUint8Array()},ek=(A,e,t=L,i=Z)=>{let I=Ag(e),r=new i,n=new ep(r),g=new t(a.createDecoder(A)),s=new el(g,!1);for(;s.curr;){let A=s.curr,e=A.id.client,t=I.get(e)||0;if(s.curr.constructor===t9){s.next();continue}if(A.id.clock+A.length>t)for(eG(n,A,o.max(t-A.id.clock,0)),s.next();s.curr&&s.curr.id.client===e;)eG(n,s.curr,0),s.next();else for(;s.curr&&s.curr.id.client===e&&s.curr.id.clock+s.curr.length<=t;)s.next()}return eN(n),J(r,q(g)),r.toUint8Array()},eS=(A,e)=>ek(A,e,j,X),eU=A=>{A.written>0&&(A.clientStructs.push({written:A.written,restEncoder:g.toUint8Array(A.encoder.restEncoder)}),A.encoder.restEncoder=g.createEncoder(),A.written=0)},eG=(A,e,t)=>{A.written>0&&A.currClient!==e.id.client&&eU(A),0===A.written&&(A.currClient=e.id.client,A.encoder.writeClient(e.id.client),g.writeVarUint(A.encoder.restEncoder,e.id.clock+t)),e.write(A.encoder,t),A.written++},eN=A=>{eU(A);let e=A.encoder.restEncoder;g.writeVarUint(e,A.clientStructs.length);for(let t=0;t{let I=new t(a.createDecoder(A)),r=new el(I,!1),o=new i,n=new ep(o);for(let A=r.curr;null!==A;A=r.next())eG(n,e(A),0);return eN(n),J(o,q(I)),o.toUint8Array()},ex=({formatting:A=!0,subdocs:e=!0,yxml:t=!0}={})=>{let i=0,I=n.create(),r=n.create(),o=n.create(),g=n.create();return g.set(null,null),a=>{switch(a.constructor){case tq:case t9:return a;case t1:{let s=a.content;switch(s.constructor){case tM:break;case t$:if(t){let A=s.type;A instanceof tG&&(A.nodeName=n.setIfUndefined(r,A.nodeName,()=>"node-"+i)),A instanceof tH&&(A.hookName=n.setIfUndefined(r,A.hookName,()=>"hook-"+i))}break;case tO:s.arr=s.arr.map(()=>i);break;case tb:s.content=new Uint8Array([i]);break;case tK:e&&(s.opts={},s.doc.guid=i+"");break;case tv:s.embed={};break;case tY:A&&(s.key=n.setIfUndefined(o,s.key,()=>i+""),s.value=n.setIfUndefined(g,s.value,()=>({i})));break;case tj:s.arr=s.arr.map(()=>i);break;case tL:s.str=p.repeat(i%10+"",s.str.length);break;default:Q.unexpectedCase()}return a.parentSub&&(a.parentSub=n.setIfUndefined(I,a.parentSub,()=>i+"")),i++,a}default:Q.unexpectedCase()}}},eJ=(A,e)=>eH(A,ex(e),j,X),eq=(A,e)=>eH(A,ex(e),L,Z),eb=A=>eH(A,C.id,j,Z),eM=A=>eH(A,C.id,L,X),eR="You must not compute changes after the event-handler fired.";class eK{constructor(A,e){this.target=A,this.currentTarget=A,this.transaction=e,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=ev(this.currentTarget,this.target))}deletes(A){return S(this.transaction.deleteSet,A.id)}get keys(){if(null===this._keys){if(0===this.transaction.doc._transactionCleanups.length)throw Q.create(eR);let A=new Map,e=this.target;this.transaction.changed.get(e).forEach(t=>{if(null!==t){let i,I;let o=e._map.get(t);if(this.adds(o)){let A=o.left;for(;null!==A&&this.adds(A);)A=A.left;if(this.deletes(o)){if(!(null!==A&&this.deletes(A)))return;i="delete",I=r.last(A.content.getContent())}else null!==A&&this.deletes(A)?(i="update",I=r.last(A.content.getContent())):(i="add",I=void 0)}else{if(!this.deletes(o))return;i="delete",I=r.last(o.content.getContent())}A.set(t,{action:i,oldValue:I})}}),this._keys=A}return this._keys}get delta(){return this.changes.delta}adds(A){return A.id.clock>=(this.transaction.beforeState.get(A.id.client)||0)}get changes(){let A=this._changes;if(null===A){if(0===this.transaction.doc._transactionCleanups.length)throw Q.create(eR);let e=this.target,t=d.create(),i=d.create(),I=[];if(A={added:t,deleted:i,delta:I,keys:this.keys},this.transaction.changed.get(e).has(null)){let A=null,r=()=>{A&&I.push(A)};for(let I=e._start;null!==I;I=I.right)I.deleted?this.deletes(I)&&!this.adds(I)&&((null===A||void 0===A.delete)&&(r(),A={delete:0}),A.delete+=I.length,i.add(I)):this.adds(I)?((null===A||void 0===A.insert)&&(r(),A={insert:[]}),A.insert=A.insert.concat(I.content.getContent()),t.add(I)):((null===A||void 0===A.retain)&&(r(),A={retain:0}),A.retain+=I.length);null!==A&&void 0===A.retain&&r()}this._changes=A}return A}}let ev=(A,e)=>{let t=[];for(;null!==e._item&&e!==A;){if(null!==e._item.parentSub)t.unshift(e._item.parentSub);else{let A=0,i=e._item.parent._start;for(;i!==e._item&&null!==i;)!i.deleted&&A++,i=i.right;t.unshift(A)}e=e._item.parent}return t},eY=0;class ej{constructor(A,e){A.marker=!0,this.p=A,this.index=e,this.timestamp=eY++}}let eO=A=>{A.timestamp=eY++},eL=(A,e,t)=>{A.p.marker=!1,A.p=e,e.marker=!0,A.index=t,A.timestamp=eY++},eV=(A,e,t)=>{if(A.length>=80){let i=A.reduce((A,e)=>A.timestamp{if(null===A._start||0===e||null===A._searchMarker)return null;let t=0===A._searchMarker.length?null:A._searchMarker.reduce((A,t)=>o.abs(e-A.index)e;)!(i=i.left).deleted&&i.countable&&(I-=i.length);for(;null!==i.left&&i.left.id.client===i.id.client&&i.left.id.clock+i.left.length===i.id.clock;)!(i=i.left).deleted&&i.countable&&(I-=i.length);return null!==t&&o.abs(t.index-I){for(let i=A.length-1;i>=0;i--){let I=A[i];if(t>0){let e=I.p;for(e.marker=!1;e&&(e.deleted||!e.countable);)(e=e.left)&&!e.deleted&&e.countable&&(I.index-=e.length);if(null===e||!0===e.marker){A.splice(i,1);continue}I.p=e,e.marker=!0}(e0&&e===I.index)&&(I.index=o.max(e,I.index+t))}},eZ=A=>{let e=A._start,t=[];for(;e;)t.push(e),e=e.right;return t},eP=(A,e,t)=>{let i=A,I=e.changedParentTypes;for(;n.setIfUndefined(I,A,()=>[]).push(t),null!==A._item;)A=A._item.parent;Ah(i._eH,t,e)};class eW{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=Al(),this._dEH=Al(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(A,e){this.doc=A,this._item=e}_copy(){throw Q.methodUnimplemented()}clone(){throw Q.methodUnimplemented()}_write(A){}get _first(){let A=this._start;for(;null!==A&&A.deleted;)A=A.right;return A}_callObserver(A,e){!A.local&&this._searchMarker&&(this._searchMarker.length=0)}observe(A){AC(this._eH,A)}observeDeep(A){AC(this._dEH,A)}unobserve(A){Ad(this._eH,A)}unobserveDeep(A){Ad(this._dEH,A)}toJSON(){}}let eT=(A,e,t)=>{e<0&&(e=A._length+e),t<0&&(t=A._length+t);let i=t-e,I=[],r=A._start;for(;null!==r&&i>0;){if(r.countable&&!r.deleted){let A=r.content.getContent();if(A.length<=e)e-=A.length;else{for(let t=e;t0;t++)I.push(A[t]),i--;e=0}}r=r.right}return I},e_=A=>{let e=[],t=A._start;for(;null!==t;){if(t.countable&&!t.deleted){let A=t.content.getContent();for(let t=0;t{let t=[],i=A._start;for(;null!==i;){if(i.countable&&AP(i,e)){let A=i.content.getContent();for(let e=0;e{let t=0,i=A._start;for(;null!==i;){if(i.countable&&!i.deleted){let I=i.content.getContent();for(let i=0;i{let t=[];return e0(A,(i,I)=>{t.push(e(i,I,A))}),t},e8=A=>{let e=A._start,t=null,i=0;return{[Symbol.iterator](){return this},next:()=>{if(null===t){for(;null!==e&&e.deleted;)e=e.right;if(null===e)return{done:!0,value:void 0};t=e.content.getContent(),i=0,e=e.right}let A=t[i++];return t.length<=i&&(t=null),{done:!1,value:A}}}},e2=(A,e)=>{let t=eX(A,e),i=A._start;for(null!==t&&(i=t.p,e-=t.index);null!==i;i=i.right)if(!i.deleted&&i.countable){if(e{let I=t,r=A.doc,o=r.clientID,n=r.store,g=null===t?e._start:t.right,a=[],s=()=>{a.length>0&&((I=new t1(Af(o,A8(n,o)),I,I&&I.lastId,g,g&&g.id,e,null,new tO(a))).integrate(A,0),a=[])};i.forEach(t=>{if(null===t)a.push(t);else switch(t.constructor){case Number:case Object:case Boolean:case Array:case String:a.push(t);break;default:switch(s(),t.constructor){case Uint8Array:case ArrayBuffer:(I=new t1(Af(o,A8(n,o)),I,I&&I.lastId,g,g&&g.id,e,null,new tb(new Uint8Array(t)))).integrate(A,0);break;case K:(I=new t1(Af(o,A8(n,o)),I,I&&I.lastId,g,g&&g.id,e,null,new tK(t))).integrate(A,0);break;default:if(t instanceof eW)(I=new t1(Af(o,A8(n,o)),I,I&&I.lastId,g,g&&g.id,e,null,new t$(t))).integrate(A,0);else throw Error("Unexpected content type in insert operation")}}}),s()},e1=()=>Q.create("Length exceeded!"),e6=(A,e,t,i)=>{if(t>e._length)throw e1();if(0===t)return e._searchMarker&&ez(e._searchMarker,t,i.length),e4(A,e,null,i);let I=t,r=eX(e,t),o=e._start;for(null!==r&&(o=r.p,0==(t-=r.index)&&(t+=(o=o.prev)&&o.countable&&!o.deleted?o.length:0));null!==o;o=o.right)if(!o.deleted&&o.countable){if(t<=o.length){t{let i=(e._searchMarker||[]).reduce((A,e)=>e.index>A.index?e:A,{index:0,p:e._start}).p;if(i)for(;i.right;)i=i.right;return e4(A,e,i,t)},e9=(A,e,t,i)=>{if(0===i)return;let I=t,r=i,o=eX(e,t),n=e._start;for(null!==o&&(n=o.p,t-=o.index);null!==n&&t>0;n=n.right)!n.deleted&&n.countable&&(t0&&null!==n;)n.deleted||(i0)throw e1();e._searchMarker&&ez(e._searchMarker,I,-r+i)},e7=(A,e,t)=>{let i=e._map.get(t);void 0!==i&&i.delete(A)},tA=(A,e,t,i)=>{let I;let r=e._map.get(t)||null,o=A.doc,n=o.clientID;if(null==i)I=new tO([i]);else switch(i.constructor){case Number:case Object:case Boolean:case Array:case String:I=new tO([i]);break;case Uint8Array:I=new tb(i);break;case K:I=new tK(i);break;default:if(i instanceof eW)I=new t$(i);else throw Error("Unexpected content type")}new t1(Af(n,A8(o.store,n)),r,r&&r.lastId,null,null,e,t,I).integrate(A,0)},te=(A,e)=>{let t=A._map.get(e);return void 0===t||t.deleted?void 0:t.content.getContent()[t.length-1]},tt=A=>{let e={};return A._map.forEach((A,t)=>{A.deleted||(e[t]=A.content.getContent()[A.length-1])}),e},ti=(A,e)=>{let t=A._map.get(e);return void 0!==t&&!t.deleted},tI=(A,e,t)=>{let i=A._map.get(e)||null;for(;null!==i&&(!t.sv.has(i.id.client)||i.id.clock>=(t.sv.get(i.id.client)||0));)i=i.left;return null!==i&&AP(i,t)?i.content.getContent()[i.length-1]:void 0},tr=(A,e)=>{let t={};return A._map.forEach((A,i)=>{let I=A;for(;null!==I&&(!e.sv.has(I.id.client)||I.id.clock>=(e.sv.get(I.id.client)||0));)I=I.left;null!==I&&AP(I,e)&&(t[i]=I.content.getContent()[I.length-1])}),t},to=A=>f.iteratorFilter(A.entries(),A=>!A[1].deleted);class tn extends eK{constructor(A,e){super(A,e),this._transaction=e}}class tg extends eW{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(A){let e=new tg;return e.push(A),e}_integrate(A,e){super._integrate(A,e),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new tg}clone(){let A=new tg;return A.insert(0,this.toArray().map(A=>A instanceof eW?A.clone():A)),A}get length(){return null===this._prelimContent?this._length:this._prelimContent.length}_callObserver(A,e){super._callObserver(A,e),eP(this,A,new tn(this,A))}insert(A,e){null!==this.doc?ea(this.doc,t=>{e6(t,this,A,e)}):this._prelimContent.splice(A,0,...e)}push(A){null!==this.doc?ea(this.doc,e=>{e5(e,this,A)}):this._prelimContent.push(...A)}unshift(A){this.insert(0,A)}delete(A,e=1){null!==this.doc?ea(this.doc,t=>{e9(t,this,A,e)}):this._prelimContent.splice(A,e)}get(A){return e2(this,A)}toArray(){return e_(this)}slice(A=0,e=this.length){return eT(this,A,e)}toJSON(){return this.map(A=>A instanceof eW?A.toJSON():A)}map(A){return e3(this,A)}forEach(A){e0(this,A)}[Symbol.iterator](){return e8(this)}_write(A){A.writeTypeRef(tX)}}class ta extends eK{constructor(A,e,t){super(A,e),this.keysChanged=t}}class ts extends eW{constructor(A){super(),this._prelimContent=null,void 0===A?this._prelimContent=new Map:this._prelimContent=new Map(A)}_integrate(A,e){super._integrate(A,e),this._prelimContent.forEach((A,e)=>{this.set(e,A)}),this._prelimContent=null}_copy(){return new ts}clone(){let A=new ts;return this.forEach((e,t)=>{A.set(t,e instanceof eW?e.clone():e)}),A}_callObserver(A,e){eP(this,A,new ta(this,A,e))}toJSON(){let A={};return this._map.forEach((e,t)=>{if(!e.deleted){let i=e.content.getContent()[e.length-1];A[t]=i instanceof eW?i.toJSON():i}}),A}get size(){return[...to(this._map)].length}keys(){return f.iteratorMap(to(this._map),A=>A[0])}values(){return f.iteratorMap(to(this._map),A=>A[1].content.getContent()[A[1].length-1])}entries(){return f.iteratorMap(to(this._map),A=>[A[0],A[1].content.getContent()[A[1].length-1]])}forEach(A){this._map.forEach((e,t)=>{e.deleted||A(e.content.getContent()[e.length-1],t,this)})}[Symbol.iterator](){return this.entries()}delete(A){null!==this.doc?ea(this.doc,e=>{e7(e,this,A)}):this._prelimContent.delete(A)}set(A,e){return null!==this.doc?ea(this.doc,t=>{tA(t,this,A,e)}):this._prelimContent.set(A,e),e}get(A){return te(this,A)}has(A){return ti(this,A)}clear(){null!==this.doc?ea(this.doc,A=>{this.forEach(function(e,t,i){e7(A,i,t)})}):this._prelimContent.clear()}_write(A){A.writeTypeRef(tz)}}let tB=(A,e)=>A===e||"object"==typeof A&&"object"==typeof e&&A&&e&&u.equalFlat(A,e);class tc{constructor(A,e,t,i){this.left=A,this.right=e,this.index=t,this.currentAttributes=i}forward(){(null===this.right&&Q.unexpectedCase(),this.right.content.constructor===tY)?this.right.deleted||td(this.currentAttributes,this.right.content):this.right.deleted||(this.index+=this.right.length),this.left=this.right,this.right=this.right.right}}let tQ=(A,e,t)=>{for(;null!==e.right&&t>0;)e.right.content.constructor===tY?e.right.deleted||td(e.currentAttributes,e.right.content):e.right.deleted||(t{let i=new Map,I=eX(e,t);return I?tQ(A,new tc(I.p.left,I.p,I.index,i),t-I.index):tQ(A,new tc(null,e._start,0,i),t)},tC=(A,e,t,i)=>{for(;null!==t.right&&(!0===t.right.deleted||t.right.content.constructor===tY&&tB(i.get(t.right.content.key),t.right.content.value));)t.right.deleted||i.delete(t.right.content.key),t.forward();let I=A.doc,r=I.clientID;i.forEach((i,o)=>{let n=t.left,g=t.right,a=new t1(Af(r,A8(I.store,r)),n,n&&n.lastId,g,g&&g.id,e,null,new tY(o,i));a.integrate(A,0),t.right=a,t.forward()})},td=(A,e)=>{let{key:t,value:i}=e;null===i?A.delete(t):A.set(t,i)},th=(A,e)=>{for(;null!==A.right&&(A.right.deleted||A.right.content.constructor===tY&&tB(e[A.right.content.key]||null,A.right.content.value));)A.forward()},tE=(A,e,t,i)=>{let I=A.doc,r=I.clientID,o=new Map;for(let n in i){let g=i[n],a=t.currentAttributes.get(n)||null;if(!tB(a,g)){o.set(n,a);let{left:i,right:s}=t;t.right=new t1(Af(r,A8(I.store,r)),i,i&&i.lastId,s,s&&s.id,e,null,new tY(n,g)),t.right.integrate(A,0),t.forward()}}return o},tp=(A,e,t,i,I)=>{t.currentAttributes.forEach((A,e)=>{void 0===I[e]&&(I[e]=null)});let r=A.doc,o=r.clientID;th(t,I);let n=tE(A,e,t,I),g=i.constructor===String?new tL(i):i instanceof eW?new t$(i):new tv(i),{left:a,right:s,index:B}=t;e._searchMarker&&ez(e._searchMarker,t.index,g.getLength()),(s=new t1(Af(o,A8(r.store,o)),a,a&&a.lastId,s,s&&s.id,e,null,g)).integrate(A,0),t.right=s,t.index=B,t.forward(),tC(A,e,t,n)},tf=(A,e,t,i,I)=>{let r=A.doc,o=r.clientID;th(t,I);let n=tE(A,e,t,I);for(;null!==t.right&&(i>0||n.size>0&&(t.right.deleted||t.right.content.constructor===tY));){if(!t.right.deleted){if(t.right.content.constructor===tY){let{key:e,value:r}=t.right.content,o=I[e];if(void 0!==o){if(tB(o,r))n.delete(e);else{if(0===i)break;n.set(e,r)}t.right.delete(A)}else t.currentAttributes.set(e,r)}else i0){let I="";for(;i>0;i--)I+="\n";t.right=new t1(Af(o,A8(r.store,o)),t.left,t.left&&t.left.lastId,t.right,t.right&&t.right.id,e,null,new tL(I)),t.right.integrate(A,0),t.forward()}tC(A,e,t,n)},tu=(A,e,t,i,I)=>{let r=e,o=n.create();for(;r&&(!r.countable||r.deleted);){if(!r.deleted&&r.content.constructor===tY){let A=r.content;o.set(A.key,A)}r=r.right}let g=0,a=!1;for(;e!==r;){if(t===e&&(a=!0),!e.deleted){let t=e.content;if(t.constructor===tY){let{key:r,value:n}=t,s=i.get(r)||null;o.get(r)===t&&s!==n||(e.delete(A),g++,a||(I.get(r)||null)!==n||s===n||(null===s?I.delete(r):I.set(r,s))),a||e.deleted||td(I,t)}}e=e.right}return g},tw=(A,e)=>{for(;e&&e.right&&(e.right.deleted||!e.right.countable);)e=e.right;let t=new Set;for(;e&&(e.deleted||!e.countable);){if(!e.deleted&&e.content.constructor===tY){let i=e.content.key;t.has(i)?e.delete(A):t.add(i)}e=e.left}},ty=A=>{let e=0;return ea(A.doc,t=>{let i=A._start,I=A._start,r=n.create(),o=n.copy(r);for(;I;)!1===I.deleted&&(I.content.constructor===tY?td(o,I.content):(e+=tu(t,i,I,r,o),r=n.copy(o),i=I)),I=I.right}),e},tF=A=>{let e=new Set,t=A.doc;for(let[i,I]of A.afterState.entries()){let r=A.beforeState.get(i)||0;I!==r&&eA(A,t.store.clients.get(i),r,I,A=>{A.deleted||A.content.constructor!==tY||A.constructor===tq||e.add(A.parent)})}ea(t,t=>{for(let i of(m(A,A.deleteSet,A=>{if(A instanceof tq||!A.parent._hasFormatting||e.has(A.parent))return;let i=A.parent;A.content.constructor===tY?e.add(i):tw(t,A)}),e))ty(i)})},tD=(A,e,t)=>{let i=t,I=n.copy(e.currentAttributes),r=e.right;for(;t>0&&null!==e.right;){if(!1===e.right.deleted)switch(e.right.content.constructor){case t$:case tv:case tL:t{null===A?this.childListChanged=!0:this.keysChanged.add(A)})}get changes(){if(null===this._changes){let A={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=A}return this._changes}get delta(){if(null===this._delta){let A=this.target.doc,e=[];ea(A,A=>{let t=new Map,i=new Map,I=this.target._start,r=null,o={},n="",g=0,a=0,s=()=>{if(null!==r){let A=null;switch(r){case"delete":a>0&&(A={delete:a}),a=0;break;case"insert":("object"==typeof n||n.length>0)&&(A={insert:n},t.size>0&&(A.attributes={},t.forEach((e,t)=>{null!==e&&(A.attributes[t]=e)}))),n="";break;case"retain":g>0&&(A={retain:g},u.isEmpty(o)||(A.attributes=u.assign({},o))),g=0}A&&e.push(A),r=null}};for(;null!==I;){switch(I.content.constructor){case t$:case tv:this.adds(I)?this.deletes(I)||(s(),r="insert",n=I.content.getContent()[0],s()):this.deletes(I)?("delete"!==r&&(s(),r="delete"),a+=1):I.deleted||("retain"!==r&&(s(),r="retain"),g+=1);break;case tL:this.adds(I)?this.deletes(I)||("insert"!==r&&(s(),r="insert"),n+=I.content.str):this.deletes(I)?("delete"!==r&&(s(),r="delete"),a+=I.length):I.deleted||("retain"!==r&&(s(),r="retain"),g+=I.length);break;case tY:{let{key:e,value:n}=I.content;if(this.adds(I))this.deletes(I)||(tB(t.get(e)||null,n)?null!==n&&I.delete(A):("retain"===r&&s(),tB(n,i.get(e)||null)?delete o[e]:o[e]=n));else if(this.deletes(I)){i.set(e,n);let A=t.get(e)||null;tB(A,n)||("retain"===r&&s(),o[e]=A)}else if(!I.deleted){i.set(e,n);let t=o[e];void 0!==t&&(tB(t,n)?null!==t&&I.delete(A):("retain"===r&&s(),null===n?delete o[e]:o[e]=n))}I.deleted||("insert"===r&&s(),td(t,I.content))}}I=I.right}for(s();e.length>0;){let A=e[e.length-1];if(void 0!==A.retain&&void 0===A.attributes)e.pop();else break}}),this._delta=e}return this._delta}}class tk extends eW{constructor(A){super(),this._pending=void 0!==A?[()=>this.insert(0,A)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this._length}_integrate(A,e){super._integrate(A,e);try{this._pending.forEach(A=>A())}catch(A){console.error(A)}this._pending=null}_copy(){return new tk}clone(){let A=new tk;return A.applyDelta(this.toDelta()),A}_callObserver(A,e){super._callObserver(A,e);let t=new tm(this,A,e);eP(this,A,t),!A.local&&this._hasFormatting&&(A._needFormattingCleanup=!0)}toString(){let A="",e=this._start;for(;null!==e;)!e.deleted&&e.countable&&e.content.constructor===tL&&(A+=e.content.str),e=e.right;return A}toJSON(){return this.toString()}applyDelta(A,{sanitize:e=!0}={}){null!==this.doc?ea(this.doc,t=>{let i=new tc(null,this._start,0,new Map);for(let I=0;I0)&&tp(t,this,i,o,r.attributes||{})}else void 0!==r.retain?tf(t,this,i,r.retain,r.attributes||{}):void 0!==r.delete&&tD(t,i,r.delete)}}):this._pending.push(()=>this.applyDelta(A))}toDelta(A,e,t){let i=[],I=new Map,r=this.doc,o="",n=this._start;function g(){if(o.length>0){let A={},e=!1;I.forEach((t,i)=>{e=!0,A[i]=t});let t={insert:o};e&&(t.attributes=A),i.push(t),o=""}}let a=()=>{for(;null!==n;){if(AP(n,A)||void 0!==e&&AP(n,e))switch(n.content.constructor){case tL:{let i=I.get("ychange");void 0===A||AP(n,A)?void 0===e||AP(n,e)?void 0!==i&&(g(),I.delete("ychange")):(void 0===i||i.user!==n.id.client||"added"!==i.type)&&(g(),I.set("ychange",t?t("added",n.id):{type:"added"})):(void 0===i||i.user!==n.id.client||"removed"!==i.type)&&(g(),I.set("ychange",t?t("removed",n.id):{type:"removed"})),o+=n.content.str;break}case t$:case tv:{g();let A={insert:n.content.getContent()[0]};if(I.size>0){let e={};A.attributes=e,I.forEach((A,t)=>{e[t]=A})}i.push(A);break}case tY:AP(n,A)&&(g(),td(I,n.content))}n=n.right}g()};return A||e?ea(r,t=>{A&&AW(t,A),e&&AW(t,e),a()},"cleanup"):a(),i}insert(A,e,t){if(e.length<=0)return;let i=this.doc;null!==i?ea(i,i=>{let I=tl(i,this,A);t||(t={},I.currentAttributes.forEach((A,e)=>{t[e]=A})),tp(i,this,I,e,t)}):this._pending.push(()=>this.insert(A,e,t))}insertEmbed(A,e,t={}){let i=this.doc;null!==i?ea(i,i=>{let I=tl(i,this,A);tp(i,this,I,e,t)}):this._pending.push(()=>this.insertEmbed(A,e,t))}delete(A,e){if(0===e)return;let t=this.doc;null!==t?ea(t,t=>{tD(t,tl(t,this,A),e)}):this._pending.push(()=>this.delete(A,e))}format(A,e,t){if(0===e)return;let i=this.doc;null!==i?ea(i,i=>{let I=tl(i,this,A);null!==I.right&&tf(i,this,I,e,t)}):this._pending.push(()=>this.format(A,e,t))}removeAttribute(A){null!==this.doc?ea(this.doc,e=>{e7(e,this,A)}):this._pending.push(()=>this.removeAttribute(A))}setAttribute(A,e){null!==this.doc?ea(this.doc,t=>{tA(t,this,A,e)}):this._pending.push(()=>this.setAttribute(A,e))}getAttribute(A){return te(this,A)}getAttributes(){return tt(this)}_write(A){A.writeTypeRef(tZ)}}class tS{constructor(A,e=()=>!0){this._filter=e,this._root=A,this._currentNode=A._start,this._firstCall=!0}[Symbol.iterator](){return this}next(){let A=this._currentNode,e=A&&A.content&&A.content.type;if(null!==A&&(!this._firstCall||A.deleted||!this._filter(e)))do if(e=A.content.type,A.deleted||e.constructor!==tG&&e.constructor!==tU||null===e._start)for(;null!==A;){if(null!==A.right){A=A.right;break}A=A.parent===this._root?null:A.parent._item}else A=e._start;while(null!==A&&(A.deleted||!this._filter(A.content.type)))return(this._firstCall=!1,null===A)?{value:void 0,done:!0}:(this._currentNode=A,{value:A.content.type,done:!1})}}class tU extends eW{constructor(){super(),this._prelimContent=[]}get firstChild(){let A=this._first;return A?A.content.getContent()[0]:null}_integrate(A,e){super._integrate(A,e),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new tU}clone(){let A=new tU;return A.insert(0,this.toArray().map(A=>A instanceof eW?A.clone():A)),A}get length(){return null===this._prelimContent?this._length:this._prelimContent.length}createTreeWalker(A){return new tS(this,A)}querySelector(A){A=A.toUpperCase();let e=new tS(this,e=>e.nodeName&&e.nodeName.toUpperCase()===A).next();return e.done?null:e.value}querySelectorAll(A){return A=A.toUpperCase(),r.from(new tS(this,e=>e.nodeName&&e.nodeName.toUpperCase()===A))}_callObserver(A,e){eP(this,A,new tN(this,e,A))}toString(){return e3(this,A=>A.toString()).join("")}toJSON(){return this.toString()}toDOM(A=document,e={},t){let i=A.createDocumentFragment();return void 0!==t&&t._createAssociation(i,this),e0(this,I=>{i.insertBefore(I.toDOM(A,e,t),null)}),i}insert(A,e){null!==this.doc?ea(this.doc,t=>{e6(t,this,A,e)}):this._prelimContent.splice(A,0,...e)}insertAfter(A,e){if(null!==this.doc)ea(this.doc,t=>{e4(t,this,A&&A instanceof eW?A._item:A,e)});else{let t=this._prelimContent,i=null===A?0:t.findIndex(e=>e===A)+1;if(0===i&&null!==A)throw Q.create("Reference item not found");t.splice(i,0,...e)}}delete(A,e=1){null!==this.doc?ea(this.doc,t=>{e9(t,this,A,e)}):this._prelimContent.splice(A,e)}toArray(){return e_(this)}push(A){this.insert(this.length,A)}unshift(A){this.insert(0,A)}get(A){return e2(this,A)}slice(A=0,e=this.length){return eT(this,A,e)}forEach(A){e0(this,A)}_write(A){A.writeTypeRef(tW)}}class tG extends tU{constructor(A="UNDEFINED"){super(),this.nodeName=A,this._prelimAttrs=new Map}get nextSibling(){let A=this._item?this._item.next:null;return A?A.content.type:null}get prevSibling(){let A=this._item?this._item.prev:null;return A?A.content.type:null}_integrate(A,e){super._integrate(A,e),this._prelimAttrs.forEach((A,e)=>{this.setAttribute(e,A)}),this._prelimAttrs=null}_copy(){return new tG(this.nodeName)}clone(){let A=new tG(this.nodeName),e=this.getAttributes();return u.forEach(e,(e,t)=>{"string"==typeof e&&A.setAttribute(t,e)}),A.insert(0,this.toArray().map(A=>A instanceof eW?A.clone():A)),A}toString(){let A=this.getAttributes(),e=[],t=[];for(let e in A)t.push(e);t.sort();let i=t.length;for(let I=0;I0?" "+e.join(" "):"";return`<${I}${r}>${super.toString()}`}removeAttribute(A){null!==this.doc?ea(this.doc,e=>{e7(e,this,A)}):this._prelimAttrs.delete(A)}setAttribute(A,e){null!==this.doc?ea(this.doc,t=>{tA(t,this,A,e)}):this._prelimAttrs.set(A,e)}getAttribute(A){return te(this,A)}hasAttribute(A){return ti(this,A)}getAttributes(A){return A?tr(this,A):tt(this)}toDOM(A=document,e={},t){let i=A.createElement(this.nodeName),I=this.getAttributes();for(let A in I){let e=I[A];"string"==typeof e&&i.setAttribute(A,e)}return e0(this,I=>{i.appendChild(I.toDOM(A,e,t))}),void 0!==t&&t._createAssociation(i,this),i}_write(A){A.writeTypeRef(tP),A.writeKey(this.nodeName)}}class tN extends eK{constructor(A,e,t){super(A,t),this.childListChanged=!1,this.attributesChanged=new Set,e.forEach(A=>{null===A?this.childListChanged=!0:this.attributesChanged.add(A)})}}class tH extends ts{constructor(A){super(),this.hookName=A}_copy(){return new tH(this.hookName)}clone(){let A=new tH(this.hookName);return this.forEach((e,t)=>{A.set(t,e)}),A}toDOM(A=document,e={},t){let i;let I=e[this.hookName];return(i=void 0!==I?I.createDom(this):document.createElement(this.hookName)).setAttribute("data-yjs-hook",this.hookName),void 0!==t&&t._createAssociation(i,this),i}_write(A){A.writeTypeRef(tT),A.writeKey(this.hookName)}}class tx extends tk{get nextSibling(){let A=this._item?this._item.next:null;return A?A.content.type:null}get prevSibling(){let A=this._item?this._item.prev:null;return A?A.content.type:null}_copy(){return new tx}clone(){let A=new tx;return A.applyDelta(this.toDelta()),A}toDOM(A=document,e,t){let i=A.createTextNode(this.toString());return void 0!==t&&t._createAssociation(i,this),i}toString(){return this.toDelta().map(A=>{let e=[];for(let t in A.attributes){let i=[];for(let e in A.attributes[t])i.push({key:e,value:A.attributes[t][e]});i.sort((A,e)=>A.keyA.nodeName=0;A--)t+=``;return t}).join("")}toJSON(){return this.toString()}_write(A){A.writeTypeRef(t_)}}class tJ{constructor(A,e){this.id=A,this.length=e}get deleted(){throw Q.methodUnimplemented()}mergeWith(A){return!1}write(A,e,t){throw Q.methodUnimplemented()}integrate(A,e){throw Q.methodUnimplemented()}}class tq extends tJ{get deleted(){return!0}delete(){}mergeWith(A){return this.constructor===A.constructor&&(this.length+=A.length,!0)}integrate(A,e){e>0&&(this.id.clock+=e,this.length-=e),A2(A.doc.store,this)}write(A,e){A.writeInfo(0),A.writeLen(this.length-e)}getMissing(A,e){return null}}class tb{constructor(A){this.content=A}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new tb(this.content)}splice(A){throw Q.methodUnimplemented()}mergeWith(A){return!1}integrate(A,e){}delete(A){}gc(A){}write(A,e){A.writeBuf(this.content)}getRef(){return 3}}class tM{constructor(A){this.len=A}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new tM(this.len)}splice(A){let e=new tM(this.len-A);return this.len=A,e}mergeWith(A){return this.len+=A.len,!0}integrate(A,e){N(A.deleteSet,e.id.client,e.id.clock,this.len),e.markDeleted()}delete(A){}gc(A){}write(A,e){A.writeLen(this.len-e)}getRef(){return 1}}let tR=(A,e)=>new K({guid:A,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1});class tK{constructor(A){A._item&&console.error("This document was already integrated as a sub-document. You should create a second instance instead with the same guid."),this.doc=A;let e={};this.opts=e,A.gc||(e.gc=!1),A.autoLoad&&(e.autoLoad=!0),null!==A.meta&&(e.meta=A.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new tK(tR(this.doc.guid,this.opts))}splice(A){throw Q.methodUnimplemented()}mergeWith(A){return!1}integrate(A,e){this.doc._item=e,A.subdocsAdded.add(this.doc),this.doc.shouldLoad&&A.subdocsLoaded.add(this.doc)}delete(A){A.subdocsAdded.has(this.doc)?A.subdocsAdded.delete(this.doc):A.subdocsRemoved.add(this.doc)}gc(A){}write(A,e){A.writeString(this.doc.guid),A.writeAny(this.opts)}getRef(){return 9}}class tv{constructor(A){this.embed=A}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new tv(this.embed)}splice(A){throw Q.methodUnimplemented()}mergeWith(A){return!1}integrate(A,e){}delete(A){}gc(A){}write(A,e){A.writeJSON(this.embed)}getRef(){return 5}}class tY{constructor(A,e){this.key=A,this.value=e}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new tY(this.key,this.value)}splice(A){throw Q.methodUnimplemented()}mergeWith(A){return!1}integrate(A,e){let t=e.parent;t._searchMarker=null,t._hasFormatting=!0}delete(A){}gc(A){}write(A,e){A.writeKey(this.key),A.writeJSON(this.value)}getRef(){return 6}}class tj{constructor(A){this.arr=A}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new tj(this.arr)}splice(A){let e=new tj(this.arr.slice(A));return this.arr=this.arr.slice(0,A),e}mergeWith(A){return this.arr=this.arr.concat(A.arr),!0}integrate(A,e){}delete(A){}gc(A){}write(A,e){let t=this.arr.length;A.writeLen(t-e);for(let i=e;i=55296&&t<=56319&&(this.str=this.str.slice(0,A-1)+"�",e.str="�"+e.str.slice(1)),e}mergeWith(A){return this.str+=A.str,!0}integrate(A,e){}delete(A){}gc(A){}write(A,e){A.writeString(0===e?this.str:this.str.slice(e))}getRef(){return 4}}let tV=[A=>new tg,A=>new ts,A=>new tk,A=>new tG(A.readKey()),A=>new tU,A=>new tH(A.readKey()),A=>new tx],tX=0,tz=1,tZ=2,tP=3,tW=4,tT=5,t_=6;class t${constructor(A){this.type=A}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new t$(this.type._copy())}splice(A){throw Q.methodUnimplemented()}mergeWith(A){return!1}integrate(A,e){this.type._integrate(A.doc,e)}delete(A){let e=this.type._start;for(;null!==e;)e.deleted?e.id.clock<(A.beforeState.get(e.id.client)||0)&&A._mergeStructs.push(e):e.delete(A),e=e.right;this.type._map.forEach(e=>{e.deleted?e.id.clock<(A.beforeState.get(e.id.client)||0)&&A._mergeStructs.push(e):e.delete(A)}),A.changed.delete(this.type)}gc(A){let e=this.type._start;for(;null!==e;)e.gc(A,!0),e=e.right;this.type._start=null,this.type._map.forEach(e=>{for(;null!==e;)e.gc(A,!0),e=e.left}),this.type._map=new Map}write(A,e){this.type._write(A)}getRef(){return 7}}let t0=(A,e)=>{let t,i=e,I=0;do I>0&&(i=Af(i.client,i.clock+I)),t=A1(A,i),I=i.clock-t.id.clock,i=t.redone;while(null!==i&&t instanceof t1)return{item:t,diff:I}},t3=(A,e)=>{for(;null!==A&&A.keep!==e;)A.keep=e,A=A.parent._item},t8=(A,e,t)=>{let{client:i,clock:I}=e.id,r=new t1(Af(i,I+t),e,Af(i,I+t-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(t));return e.deleted&&r.markDeleted(),e.keep&&(r.keep=!0),null!==e.redone&&(r.redone=Af(e.redone.client,e.redone.clock+t)),e.right=r,null!==r.right&&(r.right.left=r),A._mergeStructs.push(r),null!==r.parentSub&&null===r.right&&r.parent._map.set(r.parentSub,r),e.length=t,r},t2=(A,e)=>r.some(A,A=>S(A.deletions,e)),t4=(A,e,t,i,I,r)=>{let o;let n=A.doc,g=n.store,a=n.clientID,s=e.redone;if(null!==s)return A5(A,s);let B=e.parent._item,c=null;if(null!==B&&!0===B.deleted){if(null===B.redone&&(!t.has(B)||null===t4(A,B,t,i,I,r)))return null;for(;null!==B.redone;)B=A5(A,B.redone)}let Q=null===B?e.parent:B.content.type;if(null===e.parentSub){for(c=e.left,o=e;null!==c;){let e=c;for(;null!==e&&e.parent._item!==B;)e=null===e.redone?null:A5(A,e.redone);if(null!==e&&e.parent._item===B){c=e;break}c=c.left}for(;null!==o;){let e=o;for(;null!==e&&e.parent._item!==B;)e=null===e.redone?null:A5(A,e.redone);if(null!==e&&e.parent._item===B){o=e;break}o=o.right}}else if(o=null,e.right&&!I){for(c=e;null!==c&&null!==c.right&&(c.right.redone||S(i,c.right.id)||t2(r.undoStack,c.right.id)||t2(r.redoStack,c.right.id));)for(c=c.right;c.redone;)c=A5(A,c.redone);if(c&&null!==c.right)return null}else c=Q._map.get(e.parentSub)||null;let l=A8(g,a),C=Af(a,l),d=new t1(C,c,c&&c.lastId,o,o&&o.id,Q,e.parentSub,e.content.copy());return e.redone=C,t3(d,!0),d.integrate(A,0),d};class t1 extends tJ{constructor(A,e,t,i,I,r,o,n){super(A,n.getLength()),this.origin=t,this.left=e,this.right=i,this.rightOrigin=I,this.parent=r,this.parentSub=o,this.redone=null,this.content=n,this.info=this.content.isCountable()?l.BIT2:0}set marker(A){(this.info&l.BIT4)>0!==A&&(this.info^=l.BIT4)}get marker(){return(this.info&l.BIT4)>0}get keep(){return(this.info&l.BIT1)>0}set keep(A){this.keep!==A&&(this.info^=l.BIT1)}get countable(){return(this.info&l.BIT2)>0}get deleted(){return(this.info&l.BIT3)>0}set deleted(A){this.deleted!==A&&(this.info^=l.BIT3)}markDeleted(){this.info|=l.BIT3}getMissing(A,e){if(this.origin&&this.origin.client!==this.id.client&&this.origin.clock>=A8(e,this.origin.client))return this.origin.client;if(this.rightOrigin&&this.rightOrigin.client!==this.id.client&&this.rightOrigin.clock>=A8(e,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&&this.parent.constructor===AE&&this.id.client!==this.parent.client&&this.parent.clock>=A8(e,this.parent.client))return this.parent.client;if(this.origin&&(this.left=A9(A,e,this.origin),this.origin=this.left.lastId),this.rightOrigin&&(this.right=A5(A,this.rightOrigin),this.rightOrigin=this.right.id),this.left&&this.left.constructor===tq||this.right&&this.right.constructor===tq)this.parent=null;else if(this.parent){if(this.parent.constructor===AE){let A=A1(e,this.parent);A.constructor===tq?this.parent=null:this.parent=A.content.type}}else this.left&&this.left.constructor===t1&&(this.parent=this.left.parent,this.parentSub=this.left.parentSub),this.right&&this.right.constructor===t1&&(this.parent=this.right.parent,this.parentSub=this.right.parentSub);return null}integrate(A,e){if(e>0&&(this.id.clock+=e,this.left=A9(A,A.doc.store,Af(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(e),this.length-=e),this.parent){if(!this.left&&(!this.right||null!==this.right.left)||this.left&&this.left.right!==this.right){let e,t=this.left;if(null!==t)e=t.right;else if(null!==this.parentSub)for(e=this.parent._map.get(this.parentSub)||null;null!==e&&null!==e.left;)e=e.left;else e=this.parent._start;let i=new Set,I=new Set;for(;null!==e&&e!==this.right;){if(I.add(e),i.add(e),Ap(this.origin,e.origin)){if(e.id.client{e.p===A&&(e.p=this,!this.deleted&&this.countable&&(e.index-=this.length))}),A.keep&&(this.keep=!0),this.right=A.right,null!==this.right&&(this.right.left=this),this.length+=A.length,!0}return!1}delete(A){if(!this.deleted){let e=this.parent;this.countable&&null===this.parentSub&&(e._length-=this.length),this.markDeleted(),N(A.deleteSet,this.id.client,this.id.clock,this.length),ei(A,e,this.parentSub),this.content.delete(A)}}gc(A,e){if(!this.deleted)throw Q.unexpectedCase();this.content.gc(A),e?A7(A,this,new tq(this.id,this.length)):this.content=new tM(this.length)}write(A,e){let t=e>0?Af(this.id.client,this.id.clock+e-1):this.origin,i=this.rightOrigin,I=this.parentSub,r=this.content.getRef()&l.BITS5|(null===t?0:l.BIT8)|(null===i?0:l.BIT7)|(null===I?0:l.BIT6);if(A.writeInfo(r),null!==t&&A.writeLeftID(t),null!==i&&A.writeRightID(i),null===t&&null===i){let e=this.parent;if(void 0!==e._item){let t=e._item;if(null===t){let t=Ay(e);A.writeParentInfo(!0),A.writeString(t)}else A.writeParentInfo(!1),A.writeLeftID(t.id)}else e.constructor===String?(A.writeParentInfo(!0),A.writeString(e)):e.constructor===AE?(A.writeParentInfo(!1),A.writeLeftID(e)):Q.unexpectedCase();null!==I&&A.writeString(I)}this.content.write(A,e)}}let t6=(A,e)=>t5[e&l.BITS5](A),t5=[()=>{Q.unexpectedCase()},A=>new tM(A.readLen()),A=>{let e=A.readLen(),t=[];for(let i=0;inew tb(A.readBuf()),A=>new tL(A.readString()),A=>new tv(A.readJSON()),A=>new tY(A.readKey(),A.readJSON()),A=>new t$(tV[A.readTypeRef()](A)),A=>{let e=A.readLen(),t=[];for(let i=0;inew tK(tR(A.readString(),A.readAny())),()=>{Q.unexpectedCase()}];class t9 extends tJ{get deleted(){return!0}delete(){}mergeWith(A){return this.constructor===A.constructor&&(this.length+=A.length,!0)}integrate(A,e){Q.unexpectedCase()}write(A,e){A.writeInfo(10),g.writeVarUint(A.restEncoder,this.length-e)}getMissing(A,e){return null}}let t7="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==w?w:{},iA="__ $YJS$ __";!0===t7[iA]&&console.error("Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438"),t7[iA]=!0},{"lib0/observable":"gyXla","lib0/array":"fN0F8","lib0/math":"9dFUW","lib0/map":"dUNWE","lib0/encoding":"kMXFZ","lib0/decoding":"emP0R","lib0/random":"jyeTf","lib0/promise":"1gshw","lib0/buffer":"51iOX","lib0/error":"kXEV6","lib0/binary":"jZNY6","lib0/function":"gbKoX","lib0/set":"5nbfR","lib0/logging":"8NeYz","lib0/time":"h82oW","lib0/string":"gn2XI","lib0/iterator":"f0JW3","lib0/object":"79VLp","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],gyXla:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"ObservableV2",()=>n),i.export(t,"Observable",()=>g);var I=A("./map.js"),r=A("./set.js"),o=A("./array.js");class n{constructor(){this._observers=I.create()}on(A,e){return I.setIfUndefined(this._observers,A,r.create).add(e),e}once(A,e){let t=(...i)=>{this.off(A,t),e(...i)};this.on(A,t)}off(A,e){let t=this._observers.get(A);void 0!==t&&(t.delete(e),0===t.size&&this._observers.delete(A))}emit(A,e){return o.from((this._observers.get(A)||I.create()).values()).forEach(A=>A(...e))}destroy(){this._observers=I.create()}}class g{constructor(){this._observers=I.create()}on(A,e){I.setIfUndefined(this._observers,A,r.create).add(e)}once(A,e){let t=(...i)=>{this.off(A,t),e(...i)};this.on(A,t)}off(A,e){let t=this._observers.get(A);void 0!==t&&(t.delete(e),0===t.size&&this._observers.delete(A))}emit(A,e){return o.from((this._observers.get(A)||I.create()).values()).forEach(A=>A(...e))}destroy(){this._observers=I.create()}}},{"./map.js":"dUNWE","./set.js":"5nbfR","./array.js":"fN0F8","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],dUNWE:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"create",()=>I),i.export(t,"copy",()=>r),i.export(t,"setIfUndefined",()=>o),i.export(t,"map",()=>n),i.export(t,"any",()=>g),i.export(t,"all",()=>a);let I=()=>new Map,r=A=>{let e=I();return A.forEach((A,t)=>{e.set(t,A)}),e},o=(A,e,t)=>{let i=A.get(e);return void 0===i&&A.set(e,i=t()),i},n=(A,e)=>{let t=[];for(let[i,I]of A)t.push(e(I,i));return t},g=(A,e)=>{for(let[t,i]of A)if(e(i,t))return!0;return!1},a=(A,e)=>{for(let[t,i]of A)if(!e(i,t))return!1;return!0}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"5nbfR":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"create",()=>I),i.export(t,"toArray",()=>r),i.export(t,"first",()=>o),i.export(t,"from",()=>n);let I=()=>new Set,r=A=>Array.from(A),o=A=>A.values().next().value||void 0,n=A=>new Set(A)},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],fN0F8:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"last",()=>r),i.export(t,"create",()=>o),i.export(t,"copy",()=>n),i.export(t,"appendTo",()=>g),i.export(t,"from",()=>a),i.export(t,"every",()=>s),i.export(t,"some",()=>B),i.export(t,"equalFlat",()=>c),i.export(t,"flatten",()=>Q),i.export(t,"unfold",()=>l),i.export(t,"fold",()=>C),i.export(t,"isArray",()=>d),i.export(t,"unique",()=>h),i.export(t,"uniqueBy",()=>E),i.export(t,"map",()=>p);var I=A("./set.js");let r=A=>A[A.length-1],o=()=>[],n=A=>A.slice(),g=(A,e)=>{for(let t=0;t{for(let t=0;t{for(let t=0;tA.length===e.length&&s(A,(A,t)=>A===e[t]),Q=A=>C(A,[],(A,e)=>A.concat(e)),l=(A,e)=>{let t=Array(A);for(let i=0;iA.reduce(t,e),d=Array.isArray,h=A=>a(I.from(A)),E=(A,e)=>{let t=I.create(),i=[];for(let I=0;I{let t=Array(A.length);for(let i=0;iI),i.export(t,"ceil",()=>r),i.export(t,"abs",()=>o),i.export(t,"imul",()=>n),i.export(t,"round",()=>g),i.export(t,"log10",()=>a),i.export(t,"log2",()=>s),i.export(t,"log",()=>B),i.export(t,"sqrt",()=>c),i.export(t,"add",()=>Q),i.export(t,"min",()=>l),i.export(t,"max",()=>C),i.export(t,"isNaN",()=>d),i.export(t,"pow",()=>h),i.export(t,"exp10",()=>E),i.export(t,"sign",()=>p),i.export(t,"isNegativeZero",()=>f);let I=Math.floor,r=Math.ceil,o=Math.abs,n=Math.imul,g=Math.round,a=Math.log10,s=Math.log2,B=Math.log,c=Math.sqrt,Q=(A,e)=>A+e,l=(A,e)=>AA>e?A:e,d=Number.isNaN,h=Math.pow,E=A=>Math.pow(10,A),p=Math.sign,f=A=>0!==A?A<0:1/A<0},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],kMXFZ:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"Encoder",()=>a),i.export(t,"createEncoder",()=>s),i.export(t,"encode",()=>B),i.export(t,"length",()=>c),i.export(t,"hasContent",()=>Q),i.export(t,"toUint8Array",()=>l),i.export(t,"verifyLen",()=>C),i.export(t,"write",()=>d),i.export(t,"set",()=>h),i.export(t,"writeUint8",()=>E),i.export(t,"setUint8",()=>p),i.export(t,"writeUint16",()=>f),i.export(t,"setUint16",()=>u),i.export(t,"writeUint32",()=>w),i.export(t,"writeUint32BigEndian",()=>y),i.export(t,"setUint32",()=>F),i.export(t,"writeVarUint",()=>D),i.export(t,"writeVarInt",()=>m),i.export(t,"_writeVarStringNative",()=>U),i.export(t,"_writeVarStringPolyfill",()=>G),i.export(t,"writeVarString",()=>N),i.export(t,"writeTerminatedString",()=>H),i.export(t,"writeTerminatedUint8Array",()=>x),i.export(t,"writeBinaryEncoder",()=>J),i.export(t,"writeUint8Array",()=>q),i.export(t,"writeVarUint8Array",()=>b),i.export(t,"writeOnDataView",()=>M),i.export(t,"writeFloat32",()=>R),i.export(t,"writeFloat64",()=>K),i.export(t,"writeBigInt64",()=>v),i.export(t,"writeBigUint64",()=>j),i.export(t,"writeAny",()=>V),i.export(t,"RleEncoder",()=>X),i.export(t,"IntDiffEncoder",()=>z),i.export(t,"RleIntDiffEncoder",()=>Z),i.export(t,"UintOptRleEncoder",()=>W),i.export(t,"IncUintOptRleEncoder",()=>T),i.export(t,"IntDiffOptRleEncoder",()=>$),i.export(t,"StringEncoder",()=>AA);var I=A("./math.js"),r=A("./number.js"),o=A("./binary.js"),n=A("./string.js"),g=A("./array.js");class a{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}let s=()=>new a,B=A=>{let e=s();return A(e),l(e)},c=A=>{let e=A.cpos;for(let t=0;tA.cpos>0||A.bufs.length>0,l=A=>{let e=new Uint8Array(c(A)),t=0;for(let i=0;i{let t=A.cbuf.length;t-A.cpos{let t=A.cbuf.length;A.cpos===t&&(A.bufs.push(A.cbuf),A.cbuf=new Uint8Array(2*t),A.cpos=0),A.cbuf[A.cpos++]=e},h=(A,e,t)=>{let i=null;for(let t=0;t{d(A,e&o.BITS8),d(A,e>>>8&o.BITS8)},u=(A,e,t)=>{h(A,e,t&o.BITS8),h(A,e+1,t>>>8&o.BITS8)},w=(A,e)=>{for(let t=0;t<4;t++)d(A,e&o.BITS8),e>>>=8},y=(A,e)=>{for(let t=3;t>=0;t--)d(A,e>>>8*t&o.BITS8)},F=(A,e,t)=>{for(let i=0;i<4;i++)h(A,e+i,t&o.BITS8),t>>>=8},D=(A,e)=>{for(;e>o.BITS7;)d(A,o.BIT8|o.BITS7&e),e=I.floor(e/128);d(A,o.BITS7&e)},m=(A,e)=>{let t=I.isNegativeZero(e);for(t&&(e=-e),d(A,(e>o.BITS6?o.BIT8:0)|(t?o.BIT7:0)|o.BITS6&e),e=I.floor(e/64);e>0;)d(A,(e>o.BITS7?o.BIT8:0)|o.BITS7&e),e=I.floor(e/128)},k=new Uint8Array(3e4),S=k.length/3,U=(A,e)=>{if(e.length{let t=unescape(encodeURIComponent(e)),i=t.length;D(A,i);for(let e=0;ex(A,n.encodeUtf8(e)),x=(A,e)=>{for(let t=0;tq(A,l(e)),q=(A,e)=>{let t=A.cbuf.length,i=A.cpos,r=I.min(t-i,e.length),o=e.length-r;A.cbuf.set(e.subarray(0,r),i),A.cpos+=r,o>0&&(A.bufs.push(A.cbuf),A.cbuf=new Uint8Array(I.max(2*t,o)),A.cbuf.set(e.subarray(r)),A.cpos=o)},b=(A,e)=>{D(A,e.byteLength),q(A,e)},M=(A,e)=>{C(A,e);let t=new DataView(A.cbuf.buffer,A.cpos,e);return A.cpos+=e,t},R=(A,e)=>M(A,4).setFloat32(0,e,!1),K=(A,e)=>M(A,8).setFloat64(0,e,!1),v=(A,e)=>M(A,8).setBigInt64(0,e,!1),j=(A,e)=>M(A,8).setBigUint64(0,e,!1),O=new DataView(new ArrayBuffer(4)),L=A=>(O.setFloat32(0,A),O.getFloat32(0)===A),V=(A,e)=>{switch(typeof e){case"string":d(A,119),N(A,e);break;case"number":r.isInteger(e)&&I.abs(e)<=o.BITS31?(d(A,125),m(A,e)):L(e)?(d(A,124),R(A,e)):(d(A,123),K(A,e));break;case"bigint":d(A,122),v(A,e);break;case"object":if(null===e)d(A,126);else if(g.isArray(e)){d(A,117),D(A,e.length);for(let t=0;t0&&D(this,this.count-1),this.count=1,this.w(this,A),this.s=A)}}class z extends a{constructor(A){super(),this.s=A}write(A){m(this,A-this.s),this.s=A}}class Z extends a{constructor(A){super(),this.s=A,this.count=0}write(A){this.s===A&&this.count>0?this.count++:(this.count>0&&D(this,this.count-1),this.count=1,m(this,A-this.s),this.s=A)}}let P=A=>{A.count>0&&(m(A.encoder,1===A.count?A.s:-A.s),A.count>1&&D(A.encoder,A.count-2))};class W{constructor(){this.encoder=new a,this.s=0,this.count=0}write(A){this.s===A?this.count++:(P(this),this.count=1,this.s=A)}toUint8Array(){return P(this),l(this.encoder)}}class T{constructor(){this.encoder=new a,this.s=0,this.count=0}write(A){this.s+this.count===A?this.count++:(P(this),this.count=1,this.s=A)}toUint8Array(){return P(this),l(this.encoder)}}let _=A=>{if(A.count>0){let e=2*A.diff+(1===A.count?0:1);m(A.encoder,e),A.count>1&&D(A.encoder,A.count-2)}};class ${constructor(){this.encoder=new a,this.s=0,this.count=0,this.diff=0}write(A){this.diff===A-this.s?(this.s=A,this.count++):(_(this),this.count=1,this.diff=A-this.s,this.s=A)}toUint8Array(){return _(this),l(this.encoder)}}class AA{constructor(){this.sarr=[],this.s="",this.lensE=new W}write(A){this.s+=A,this.s.length>19&&(this.sarr.push(this.s),this.s=""),this.lensE.write(A.length)}toUint8Array(){let A=new a;return this.sarr.push(this.s),this.s="",N(A,this.sarr.join("")),q(A,this.lensE.toUint8Array()),l(A)}}},{"./math.js":"9dFUW","./number.js":"3RI7t","./binary.js":"jZNY6","./string.js":"gn2XI","./array.js":"fN0F8","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"3RI7t":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"MAX_SAFE_INTEGER",()=>o),i.export(t,"MIN_SAFE_INTEGER",()=>n),i.export(t,"LOWEST_INT32",()=>g),i.export(t,"HIGHEST_INT32",()=>a),i.export(t,"HIGHEST_UINT32",()=>s),i.export(t,"isInteger",()=>B),i.export(t,"isNaN",()=>c),i.export(t,"parseInt",()=>Q),i.export(t,"countBits",()=>l);var I=A("./math.js"),r=A("./binary.js");let o=Number.MAX_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,g=-2147483648,a=r.BITS31,s=r.BITS32,B=Number.isInteger||(A=>"number"==typeof A&&isFinite(A)&&I.floor(A)===A),c=Number.isNaN,Q=Number.parseInt,l=A=>{A&=r.BITS32;let e=0;for(;A;)A&=A-1,e++;return e}},{"./math.js":"9dFUW","./binary.js":"jZNY6","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],jZNY6:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"BIT1",()=>I),i.export(t,"BIT2",()=>r),i.export(t,"BIT3",()=>o),i.export(t,"BIT4",()=>n),i.export(t,"BIT5",()=>g),i.export(t,"BIT6",()=>a),i.export(t,"BIT7",()=>s),i.export(t,"BIT8",()=>B),i.export(t,"BIT9",()=>c),i.export(t,"BIT10",()=>Q),i.export(t,"BIT11",()=>l),i.export(t,"BIT12",()=>C),i.export(t,"BIT13",()=>d),i.export(t,"BIT14",()=>h),i.export(t,"BIT15",()=>E),i.export(t,"BIT16",()=>p),i.export(t,"BIT17",()=>f),i.export(t,"BIT18",()=>u),i.export(t,"BIT19",()=>w),i.export(t,"BIT20",()=>y),i.export(t,"BIT21",()=>F),i.export(t,"BIT22",()=>D),i.export(t,"BIT23",()=>m),i.export(t,"BIT24",()=>k),i.export(t,"BIT25",()=>S),i.export(t,"BIT26",()=>U),i.export(t,"BIT27",()=>G),i.export(t,"BIT28",()=>N),i.export(t,"BIT29",()=>H),i.export(t,"BIT30",()=>x),i.export(t,"BIT31",()=>J),i.export(t,"BIT32",()=>q),i.export(t,"BITS0",()=>b),i.export(t,"BITS1",()=>M),i.export(t,"BITS2",()=>R),i.export(t,"BITS3",()=>K),i.export(t,"BITS4",()=>v),i.export(t,"BITS5",()=>j),i.export(t,"BITS6",()=>O),i.export(t,"BITS7",()=>L),i.export(t,"BITS8",()=>V),i.export(t,"BITS9",()=>X),i.export(t,"BITS10",()=>z),i.export(t,"BITS11",()=>Z),i.export(t,"BITS12",()=>P),i.export(t,"BITS13",()=>W),i.export(t,"BITS14",()=>T),i.export(t,"BITS15",()=>_),i.export(t,"BITS16",()=>$),i.export(t,"BITS17",()=>AA),i.export(t,"BITS18",()=>Ae),i.export(t,"BITS19",()=>At),i.export(t,"BITS20",()=>Ai),i.export(t,"BITS21",()=>AI),i.export(t,"BITS22",()=>Ar),i.export(t,"BITS23",()=>Ao),i.export(t,"BITS24",()=>An),i.export(t,"BITS25",()=>Ag),i.export(t,"BITS26",()=>Aa),i.export(t,"BITS27",()=>As),i.export(t,"BITS28",()=>AB),i.export(t,"BITS29",()=>Ac),i.export(t,"BITS30",()=>AQ),i.export(t,"BITS31",()=>Al),i.export(t,"BITS32",()=>AC);let I=1,r=2,o=4,n=8,g=16,a=32,s=64,B=128,c=256,Q=512,l=1024,C=2048,d=4096,h=8192,E=16384,p=32768,f=65536,u=131072,w=262144,y=524288,F=1048576,D=2097152,m=4194304,k=8388608,S=16777216,U=33554432,G=67108864,N=134217728,H=268435456,x=536870912,J=1073741824,q=-2147483648,b=0,M=1,R=3,K=7,v=15,j=31,O=63,L=127,V=255,X=511,z=1023,Z=2047,P=4095,W=8191,T=16383,_=32767,$=65535,AA=131071,Ae=262143,At=524287,Ai=1048575,AI=2097151,Ar=4194303,Ao=8388607,An=16777215,Ag=33554431,Aa=67108863,As=134217727,AB=268435455,Ac=536870911,AQ=1073741823,Al=2147483647,AC=4294967295},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],gn2XI:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"fromCharCode",()=>r),i.export(t,"fromCodePoint",()=>o),i.export(t,"MAX_UTF16_CHARACTER",()=>n),i.export(t,"trimLeft",()=>s),i.export(t,"fromCamelCase",()=>c),i.export(t,"utf8ByteLength",()=>Q),i.export(t,"_encodeUtf8Polyfill",()=>l),i.export(t,"utf8TextEncoder",()=>C),i.export(t,"_encodeUtf8Native",()=>d),i.export(t,"encodeUtf8",()=>h),i.export(t,"_decodeUtf8Polyfill",()=>E),i.export(t,"utf8TextDecoder",()=>p),i.export(t,"_decodeUtf8Native",()=>f),i.export(t,"decodeUtf8",()=>u),i.export(t,"splice",()=>w),i.export(t,"repeat",()=>y);var I=A("./array.js");let r=String.fromCharCode,o=String.fromCodePoint,n=r(65535),g=A=>A.toLowerCase(),a=/^\s*/g,s=A=>A.replace(a,""),B=/([A-Z])/g,c=(A,e)=>s(A.replace(B,A=>`${e}${g(A)}`)),Q=A=>unescape(encodeURIComponent(A)).length,l=A=>{let e=unescape(encodeURIComponent(A)),t=e.length,i=new Uint8Array(t);for(let A=0;AC.encode(A),h=C?d:l,E=A=>{let e=A.length,t="",i=0;for(;e>0;){let I=e<1e4?e:1e4,r=A.subarray(i,i+I);i+=I,t+=String.fromCodePoint.apply(null,r),e-=I}return decodeURIComponent(escape(t))},p="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0});p&&1===p.decode(new Uint8Array).length&&(p=null);let f=A=>p.decode(A),u=p?f:E,w=(A,e,t,i="")=>A.slice(0,e)+i+A.slice(e+t),y=(A,e)=>I.unfold(e,()=>A).join("")},{"./array.js":"fN0F8","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],emP0R:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"Decoder",()=>c),i.export(t,"createDecoder",()=>Q),i.export(t,"hasContent",()=>l),i.export(t,"clone",()=>C),i.export(t,"readUint8Array",()=>d),i.export(t,"readVarUint8Array",()=>h),i.export(t,"readTailAsUint8Array",()=>E),i.export(t,"skip8",()=>p),i.export(t,"readUint8",()=>f),i.export(t,"readUint16",()=>u),i.export(t,"readUint32",()=>w),i.export(t,"readUint32BigEndian",()=>y),i.export(t,"peekUint8",()=>F),i.export(t,"peekUint16",()=>D),i.export(t,"peekUint32",()=>m),i.export(t,"readVarUint",()=>k),i.export(t,"readVarInt",()=>S),i.export(t,"peekVarUint",()=>U),i.export(t,"peekVarInt",()=>G),i.export(t,"_readVarStringPolyfill",()=>N),i.export(t,"_readVarStringNative",()=>H),i.export(t,"readVarString",()=>x),i.export(t,"readTerminatedUint8Array",()=>J),i.export(t,"readTerminatedString",()=>q),i.export(t,"peekVarString",()=>b),i.export(t,"readFromDataView",()=>M),i.export(t,"readFloat32",()=>R),i.export(t,"readFloat64",()=>K),i.export(t,"readBigInt64",()=>v),i.export(t,"readBigUint64",()=>j),i.export(t,"readAny",()=>L),i.export(t,"RleDecoder",()=>V),i.export(t,"IntDiffDecoder",()=>X),i.export(t,"RleIntDiffDecoder",()=>z),i.export(t,"UintOptRleDecoder",()=>Z),i.export(t,"IncUintOptRleDecoder",()=>P),i.export(t,"IntDiffOptRleDecoder",()=>W),i.export(t,"StringDecoder",()=>T);var I=A("./binary.js"),r=A("./math.js"),o=A("./number.js"),n=A("./string.js"),g=A("./error.js"),a=A("./encoding.js");let s=g.create("Unexpected end of array"),B=g.create("Integer out of Range");class c{constructor(A){this.arr=A,this.pos=0}}let Q=A=>new c(A),l=A=>A.pos!==A.arr.length,C=(A,e=A.pos)=>{let t=Q(A.arr);return t.pos=e,t},d=(A,e)=>{let t=new Uint8Array(A.arr.buffer,A.pos+A.arr.byteOffset,e);return A.pos+=e,t},h=A=>d(A,k(A)),E=A=>d(A,A.arr.length-A.pos),p=A=>A.pos++,f=A=>A.arr[A.pos++],u=A=>{let e=A.arr[A.pos]+(A.arr[A.pos+1]<<8);return A.pos+=2,e},w=A=>{let e=A.arr[A.pos]+(A.arr[A.pos+1]<<8)+(A.arr[A.pos+2]<<16)+(A.arr[A.pos+3]<<24)>>>0;return A.pos+=4,e},y=A=>{let e=A.arr[A.pos+3]+(A.arr[A.pos+2]<<8)+(A.arr[A.pos+1]<<16)+(A.arr[A.pos]<<24)>>>0;return A.pos+=4,e},F=A=>A.arr[A.pos],D=A=>A.arr[A.pos]+(A.arr[A.pos+1]<<8),m=A=>A.arr[A.pos]+(A.arr[A.pos+1]<<8)+(A.arr[A.pos+2]<<16)+(A.arr[A.pos+3]<<24)>>>0,k=A=>{let e=0,t=1,i=A.arr.length;for(;A.poso.MAX_SAFE_INTEGER)throw B}throw s},S=A=>{let e=A.arr[A.pos++],t=e&I.BITS6,i=64,r=(e&I.BIT7)>0?-1:1;if((e&I.BIT8)==0)return r*t;let n=A.arr.length;for(;A.poso.MAX_SAFE_INTEGER)throw B}throw s},U=A=>{let e=A.pos,t=k(A);return A.pos=e,t},G=A=>{let e=A.pos,t=S(A);return A.pos=e,t},N=A=>{let e=k(A);if(0===e)return"";{let t=String.fromCodePoint(f(A));if(--e<100)for(;e--;)t+=String.fromCodePoint(f(A));else for(;e>0;){let i=e<1e4?e:1e4,I=A.arr.subarray(A.pos,A.pos+i);A.pos+=i,t+=String.fromCodePoint.apply(null,I),e-=i}return decodeURIComponent(escape(t))}},H=A=>n.utf8TextDecoder.decode(h(A)),x=n.utf8TextDecoder?H:N,J=A=>{let e;let t=a.createEncoder();for(;;){if(0===(e=f(A)))return a.toUint8Array(t);1===e&&(e=f(A)),a.write(t,e)}},q=A=>n.decodeUtf8(J(A)),b=A=>{let e=A.pos,t=x(A);return A.pos=e,t},M=(A,e)=>{let t=new DataView(A.arr.buffer,A.arr.byteOffset+A.pos,e);return A.pos+=e,t},R=A=>M(A,4).getFloat32(0,!1),K=A=>M(A,8).getFloat64(0,!1),v=A=>M(A,8).getBigInt64(0,!1),j=A=>M(A,8).getBigUint64(0,!1),O=[A=>void 0,A=>null,S,R,K,v,A=>!1,A=>!0,x,A=>{let e=k(A),t={};for(let i=0;i{let e=k(A),t=[];for(let i=0;iO[127-f(A)](A);class V extends c{constructor(A,e){super(A),this.reader=e,this.s=null,this.count=0}read(){return 0===this.count&&(this.s=this.reader(this),l(this)?this.count=k(this)+1:this.count=-1),this.count--,this.s}}class X extends c{constructor(A,e){super(A),this.s=e}read(){return this.s+=S(this),this.s}}class z extends c{constructor(A,e){super(A),this.s=e,this.count=0}read(){return 0===this.count&&(this.s+=S(this),l(this)?this.count=k(this)+1:this.count=-1),this.count--,this.s}}class Z extends c{constructor(A){super(A),this.s=0,this.count=0}read(){if(0===this.count){this.s=S(this);let A=r.isNegativeZero(this.s);this.count=1,A&&(this.s=-this.s,this.count=k(this)+2)}return this.count--,this.s}}class P extends c{constructor(A){super(A),this.s=0,this.count=0}read(){if(0===this.count){this.s=S(this);let A=r.isNegativeZero(this.s);this.count=1,A&&(this.s=-this.s,this.count=k(this)+2)}return this.count--,this.s++}}class W extends c{constructor(A){super(A),this.s=0,this.count=0,this.diff=0}read(){if(0===this.count){let A=S(this);this.diff=r.floor(A/2),this.count=1,1&A&&(this.count=k(this)+2)}return this.s+=this.diff,this.count--,this.s}}class T{constructor(A){this.decoder=new Z(A),this.str=x(this.decoder),this.spos=0}read(){let A=this.spos+this.decoder.read(),e=this.str.slice(this.spos,A);return this.spos=A,e}}},{"./binary.js":"jZNY6","./math.js":"9dFUW","./number.js":"3RI7t","./string.js":"gn2XI","./error.js":"kXEV6","./encoding.js":"kMXFZ","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],kXEV6:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"create",()=>I),i.export(t,"methodUnimplemented",()=>r),i.export(t,"unexpectedCase",()=>o);let I=A=>Error(A),r=()=>{throw I("Method unimplemented")},o=()=>{throw I("Unexpected case")}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],jyeTf:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"rand",()=>n),i.export(t,"uint32",()=>g),i.export(t,"uint53",()=>a),i.export(t,"oneOf",()=>s),i.export(t,"uuidv4",()=>B);var I=A("./math.js"),r=A("./binary.js"),o=A("lib0/webcrypto");let n=Math.random,g=()=>(0,o.getRandomValues)(new Uint32Array(1))[0],a=()=>{let A=(0,o.getRandomValues)(new Uint32Array(8));return(A[0]&r.BITS21)*(r.BITS32+1)+(A[1]>>>0)},s=A=>A[I.floor(n()*A.length)],B=()=>"10000000-1000-4000-8000-100000000000".replace(/[018]/g,A=>(A^g()&15>>A/4).toString(16))},{"./math.js":"9dFUW","./binary.js":"jZNY6","lib0/webcrypto":"clLRI","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],clLRI:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"subtle",()=>I),i.export(t,"getRandomValues",()=>r);let I=crypto.subtle,r=crypto.getRandomValues.bind(crypto)},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"1gshw":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"create",()=>r),i.export(t,"createEmpty",()=>o),i.export(t,"all",()=>n),i.export(t,"reject",()=>g),i.export(t,"resolve",()=>a),i.export(t,"resolveWith",()=>s),i.export(t,"until",()=>B),i.export(t,"wait",()=>c),i.export(t,"isPromise",()=>Q);var I=A("./time.js");let r=A=>new Promise(A),o=A=>new Promise(A),n=Promise.all.bind(Promise),g=A=>Promise.reject(A),a=A=>Promise.resolve(A),s=A=>Promise.resolve(A),B=(A,e,t=10)=>r((i,r)=>{let o=I.getUnixTime(),n=A>0,g=setInterval(()=>{e()?(clearInterval(g),i()):n&&I.getUnixTime()-o>A&&(clearInterval(g),r(Error("Timeout")))},t)}),c=A=>r((e,t)=>setTimeout(e,A)),Q=A=>A instanceof Promise||A&&A.then&&A.catch&&A.finally},{"./time.js":"h82oW","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],h82oW:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"getDate",()=>o),i.export(t,"getUnixTime",()=>n),i.export(t,"humanizeDuration",()=>g);var I=A("./metric.js"),r=A("./math.js");let o=()=>new Date,n=Date.now,g=A=>{if(A<6e4){let e=I.prefix(A,-1);return r.round(100*e.n)/100+e.prefix+"s"}let e=(A=r.floor(A/1e3))%60,t=r.floor(A/60)%60,i=r.floor(A/3600)%24,o=r.floor(A/86400);return o>0?o+"d"+(i>0||t>30?" "+(t>30?i+1:i)+"h":""):i>0?i+"h"+(t>0||e>30?" "+(e>30?t+1:t)+"min":""):t+"min"+(e>0?" "+e+"s":"")}},{"./metric.js":"azwXc","./math.js":"9dFUW","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],azwXc:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"yotta",()=>r),i.export(t,"zetta",()=>o),i.export(t,"exa",()=>n),i.export(t,"peta",()=>g),i.export(t,"tera",()=>a),i.export(t,"giga",()=>s),i.export(t,"mega",()=>B),i.export(t,"kilo",()=>c),i.export(t,"hecto",()=>Q),i.export(t,"deca",()=>l),i.export(t,"deci",()=>C),i.export(t,"centi",()=>d),i.export(t,"milli",()=>h),i.export(t,"micro",()=>E),i.export(t,"nano",()=>p),i.export(t,"pico",()=>f),i.export(t,"femto",()=>u),i.export(t,"atto",()=>w),i.export(t,"zepto",()=>y),i.export(t,"yocto",()=>F),i.export(t,"prefix",()=>k);var I=A("./math.js");let r=1e24,o=1e21,n=1e18,g=1e15,a=1e12,s=1e9,B=1e6,c=1e3,Q=100,l=10,C=.1,d=.01,h=.001,E=1e-6,p=1e-9,f=1e-12,u=1e-15,w=1e-18,y=1e-21,F=1e-24,D=["","k","M","G","T","P","E","Z","Y"],m=["","m","μ","n","p","f","a","z","y"],k=(A,e=0)=>{let t=0===A?0:I.log10(A),i=0;for(;t<3*i&&e>-8;)e--,i--;for(;t>=3+3*i&&e<8;)e++,i++;let r=e<0?m[-e]:D[e];return{n:I.round((i>0?A/I.exp10(3*i):A*I.exp10(-3*i))*1e12)/1e12,prefix:r}}},{"./math.js":"9dFUW","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"51iOX":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"createUint8ArrayFromLen",()=>B),i.export(t,"createUint8ArrayViewFromArrayBuffer",()=>c),i.export(t,"createUint8ArrayFromArrayBuffer",()=>Q),i.export(t,"toBase64",()=>l),i.export(t,"fromBase64",()=>C),i.export(t,"toBase64UrlEncoded",()=>d),i.export(t,"fromBase64UrlEncoded",()=>h),i.export(t,"toHexString",()=>E),i.export(t,"fromHexString",()=>p),i.export(t,"copyUint8Array",()=>f),i.export(t,"encodeAny",()=>u),i.export(t,"decodeAny",()=>w),i.export(t,"shiftNBitsLeft",()=>y);var I=A("./string.js"),r=A("./environment.js"),o=A("./array.js"),n=A("./math.js"),g=A("./encoding.js"),a=A("./decoding.js"),s=A("f3dd72291113e2d0").Buffer;let B=A=>new Uint8Array(A),c=(A,e,t)=>new Uint8Array(A,e,t),Q=A=>new Uint8Array(A),l=r.isBrowser?A=>{let e="";for(let t=0;ts.from(A.buffer,A.byteOffset,A.byteLength).toString("base64"),C=r.isBrowser?A=>{let e=atob(A),t=B(e.length);for(let A=0;A{let e=s.from(A,"base64");return c(e.buffer,e.byteOffset,e.byteLength)},d=A=>l(A).replaceAll("+","-").replaceAll("/","_").replaceAll("=",""),h=A=>C(A.replaceAll("-","+").replaceAll("_","/")),E=A=>o.map(A,A=>A.toString(16).padStart(2,"0")).join(""),p=A=>{let e=A.length,t=new Uint8Array(n.ceil(e/2));for(let i=0;i{let e=B(A.byteLength);return e.set(A),e},u=A=>g.encode(e=>g.writeAny(e,A)),w=A=>a.readAny(a.createDecoder(A)),y=(A,e)=>{if(0===e)return A;A=new Uint8Array(A),A[0]<<=e;for(let t=1;t>>8-e,A[t]<<=e;return A}},{f3dd72291113e2d0:"9Gw3v","./string.js":"gn2XI","./environment.js":"fx9cT","./array.js":"fN0F8","./math.js":"9dFUW","./encoding.js":"kMXFZ","./decoding.js":"emP0R","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],fx9cT:[function(A,e,t){let i;var I=A("@parcel/transformer-js/src/esmodule-helpers.js");I.defineInteropFlag(t),I.export(t,"isNode",()=>B),I.export(t,"isBrowser",()=>c),I.export(t,"isMac",()=>Q),I.export(t,"hasParam",()=>d),I.export(t,"getParam",()=>h),I.export(t,"getVariable",()=>E),I.export(t,"getConf",()=>p),I.export(t,"hasConf",()=>f),I.export(t,"production",()=>u),I.export(t,"supportsColor",()=>y);var r=A("./map.js"),o=A("./string.js"),n=A("./conditions.js"),g=A("./storage.js"),a=A("./function.js"),s=A("7bffcb6793b3d5d2");let B=void 0!==s&&s.release&&/node|io\.js/.test(s.release.name)&&"[object process]"===Object.prototype.toString.call(void 0!==s?s:0),c="undefined"!=typeof window&&"undefined"!=typeof document&&!B,Q="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l=[],C=()=>{if(void 0===i){if(B){i=r.create();let A=s.argv,e=null;for(let t=0;t{if(0!==A.length){let[e,t]=A.split("=");i.set(`--${o.fromCamelCase(e,"-")}`,t),i.set(`-${o.fromCamelCase(e,"-")}`,t)}})):i=r.create()}return i},d=A=>C().has(A),h=(A,e)=>C().get(A)||e,E=A=>B?n.undefinedToNull(s.env[A.toUpperCase()]):n.undefinedToNull(g.varStorage.getItem(A)),p=A=>C().get("--"+A)||E(A),f=A=>d("--"+A)||null!==E(A),u=f("production"),w=B&&a.isOneOf(void 0,["true","1","2"]),y=!d("no-colors")&&(!B||s.stdout.isTTY||w)&&(!B||d("color")||w||null!==E("COLORTERM")||(E("TERM")||"").includes("color"))},{"7bffcb6793b3d5d2":"xGtCA","./map.js":"dUNWE","./string.js":"gn2XI","./conditions.js":"8KD0b","./storage.js":"j0PYf","./function.js":"gbKoX","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"8KD0b":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"undefinedToNull",()=>I);let I=A=>void 0===A?null:A},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],j0PYf:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"varStorage",()=>o),i.export(t,"onChange",()=>n),i.export(t,"offChange",()=>g);let I=new class{constructor(){this.map=new Map}setItem(A,e){this.map.set(A,e)}getItem(A){return this.map.get(A)}},r=!0;try{"undefined"!=typeof localStorage&&localStorage&&(I=localStorage,r=!1)}catch(A){}let o=I,n=A=>r||addEventListener("storage",A),g=A=>r||removeEventListener("storage",A)},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],gbKoX:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"callAll",()=>o),i.export(t,"nop",()=>n),i.export(t,"apply",()=>g),i.export(t,"id",()=>a),i.export(t,"equalityStrict",()=>s),i.export(t,"equalityFlat",()=>B),i.export(t,"equalityDeep",()=>c),i.export(t,"isOneOf",()=>Q),i.export(t,"isArray",()=>l),i.export(t,"isString",()=>C),i.export(t,"isNumber",()=>d),i.export(t,"is",()=>h),i.export(t,"isTemplate",()=>E);var I=A("./array.js"),r=A("./object.js");let o=(A,e,t=0)=>{try{for(;t{},g=A=>A(),a=A=>A,s=(A,e)=>A===e,B=(A,e)=>A===e||null!=A&&null!=e&&A.constructor===e.constructor&&(I.isArray(A)&&I.equalFlat(A,e)||"object"==typeof A&&r.equalFlat(A,e)),c=(A,e)=>{if(null==A||null==e)return s(A,e);if(A.constructor!==e.constructor)return!1;if(A===e)return!0;switch(A.constructor){case ArrayBuffer:A=new Uint8Array(A),e=new Uint8Array(e);case Uint8Array:if(A.byteLength!==e.byteLength)return!1;for(let t=0;te.includes(A),l=I.isArray,C=A=>A&&A.constructor===String,d=A=>null!=A&&A.constructor===Number,h=(A,e)=>A&&A.constructor===e,E=A=>e=>e&&e.constructor===A},{"./array.js":"fN0F8","./object.js":"79VLp","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"79VLp":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"create",()=>I),i.export(t,"assign",()=>r),i.export(t,"keys",()=>o),i.export(t,"forEach",()=>n),i.export(t,"map",()=>g),i.export(t,"length",()=>a),i.export(t,"some",()=>s),i.export(t,"isEmpty",()=>B),i.export(t,"every",()=>c),i.export(t,"hasProperty",()=>Q),i.export(t,"equalFlat",()=>l);let I=()=>Object.create(null),r=Object.assign,o=Object.keys,n=(A,e)=>{for(let t in A)e(A[t],t)},g=(A,e)=>{let t=[];for(let i in A)t.push(e(A[i],i));return t},a=A=>o(A).length,s=(A,e)=>{for(let t in A)if(e(A[t],t))return!0;return!1},B=A=>{for(let e in A)return!1;return!0},c=(A,e)=>{for(let t in A)if(!e(A[t],t))return!1;return!0},Q=(A,e)=>Object.prototype.hasOwnProperty.call(A,e),l=(A,e)=>A===e||a(A)===a(e)&&c(A,(A,t)=>(void 0!==A||Q(e,t))&&e[t]===A)},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"8NeYz":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"BOLD",()=>c.BOLD),i.export(t,"UNBOLD",()=>c.UNBOLD),i.export(t,"BLUE",()=>c.BLUE),i.export(t,"GREY",()=>c.GREY),i.export(t,"GREEN",()=>c.GREEN),i.export(t,"RED",()=>c.RED),i.export(t,"PURPLE",()=>c.PURPLE),i.export(t,"ORANGE",()=>c.ORANGE),i.export(t,"UNCOLOR",()=>c.UNCOLOR),i.export(t,"print",()=>C),i.export(t,"warn",()=>d),i.export(t,"printError",()=>h),i.export(t,"printImg",()=>E),i.export(t,"printImgBase64",()=>p),i.export(t,"group",()=>f),i.export(t,"groupCollapsed",()=>u),i.export(t,"groupEnd",()=>w),i.export(t,"printDom",()=>y),i.export(t,"printCanvas",()=>F),i.export(t,"vconsoles",()=>D),i.export(t,"VConsole",()=>S),i.export(t,"createVConsole",()=>U),i.export(t,"createModuleLogger",()=>G);var I=A("./environment.js"),r=A("./set.js"),o=A("./pair.js"),n=A("./dom.js"),g=A("./json.js"),a=A("./map.js"),s=A("./eventloop.js"),B=A("./math.js"),c=A("./logging.common.js");let Q={[c.BOLD]:o.create("font-weight","bold"),[c.UNBOLD]:o.create("font-weight","normal"),[c.BLUE]:o.create("color","blue"),[c.GREEN]:o.create("color","green"),[c.GREY]:o.create("color","grey"),[c.RED]:o.create("color","red"),[c.PURPLE]:o.create("color","purple"),[c.ORANGE]:o.create("color","orange"),[c.UNCOLOR]:o.create("color","black")},l=I.supportsColor?A=>{let e=[],t=[],i=a.create(),I=[],r=0;for(;r0||A.length>0?(e.push("%c"+I),t.push(A)):e.push(I)}else break}for(r>0&&(I=t).unshift(e.join(""));r{console.log(...l(A)),D.forEach(e=>e.print(A))},d=(...A)=>{console.warn(...l(A)),A.unshift(c.ORANGE),D.forEach(e=>e.print(A))},h=A=>{console.error(A),D.forEach(e=>e.printError(A))},E=(A,e)=>{I.isBrowser&&console.log("%c ",`font-size: ${e}px; background-size: contain; background-repeat: no-repeat; background-image: url(${A})`),D.forEach(t=>t.printImg(A,e))},p=(A,e)=>E(`data:image/gif;base64,${A}`,e),f=(...A)=>{console.group(...l(A)),D.forEach(e=>e.group(A))},u=(...A)=>{console.groupCollapsed(...l(A)),D.forEach(e=>e.groupCollapsed(A))},w=()=>{console.groupEnd(),D.forEach(A=>A.groupEnd())},y=A=>D.forEach(e=>e.printDom(A())),F=(A,e)=>E(A.toDataURL(),e),D=r.create(),m=A=>{let e=[],t=new Map,i=0;for(;i{let t=n.element("span",[o.create("hidden",e),o.create("style","color:grey;font-size:120%;")],[n.text("▼")]),i=n.element("span",[o.create("hidden",!e),o.create("style","color:grey;font-size:125%;")],[n.text("▶")]),I=n.element("div",[o.create("style",`${k};padding-left:${10*this.depth}px`)],[t,i,n.text(" ")].concat(m(A))),r=n.element("div",[o.create("hidden",e)]),g=n.element("div",[],[I,r]);n.append(this.ccontainer,[g]),this.ccontainer=r,this.depth++,n.addEventListener(I,"click",A=>{r.toggleAttribute("hidden"),t.toggleAttribute("hidden"),i.toggleAttribute("hidden")})})}groupCollapsed(A){this.group(A,!0)}groupEnd(){s.enqueue(()=>{this.depth>0&&(this.depth--,this.ccontainer=this.ccontainer.parentElement.parentElement)})}print(A){s.enqueue(()=>{n.append(this.ccontainer,[n.element("div",[o.create("style",`${k};padding-left:${10*this.depth}px`)],m(A))])})}printError(A){this.print([c.RED,c.BOLD,A.toString()])}printImg(A,e){s.enqueue(()=>{n.append(this.ccontainer,[n.element("img",[o.create("src",A),o.create("height",`${B.round(1.5*e)}px`)])])})}printDom(A){s.enqueue(()=>{n.append(this.ccontainer,[A])})}destroy(){s.enqueue(()=>{D.delete(this)})}}let U=A=>new S(A),G=A=>c.createModuleLogger(C,A)},{"./environment.js":"fx9cT","./set.js":"5nbfR","./pair.js":"gQxRb","./dom.js":"iUfLM","./json.js":"emME5","./map.js":"dUNWE","./eventloop.js":"eZM8P","./math.js":"9dFUW","./logging.common.js":"g3rgM","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],gQxRb:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"Pair",()=>I),i.export(t,"create",()=>r),i.export(t,"createReversed",()=>o),i.export(t,"forEach",()=>n),i.export(t,"map",()=>g);class I{constructor(A,e){this.left=A,this.right=e}}let r=(A,e)=>new I(A,e),o=(A,e)=>new I(e,A),n=(A,e)=>A.forEach(A=>e(A.left,A.right)),g=(A,e)=>A.map(A=>e(A.left,A.right))},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],iUfLM:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"doc",()=>o),i.export(t,"createElement",()=>n),i.export(t,"createDocumentFragment",()=>g),i.export(t,"createTextNode",()=>a),i.export(t,"domParser",()=>s),i.export(t,"emitCustomEvent",()=>B),i.export(t,"setAttributes",()=>c),i.export(t,"setAttributesMap",()=>Q),i.export(t,"fragment",()=>l),i.export(t,"append",()=>C),i.export(t,"remove",()=>d),i.export(t,"addEventListener",()=>h),i.export(t,"removeEventListener",()=>E),i.export(t,"addEventListeners",()=>p),i.export(t,"removeEventListeners",()=>f),i.export(t,"element",()=>u),i.export(t,"canvas",()=>w),i.export(t,"text",()=>y),i.export(t,"pairToStyleString",()=>F),i.export(t,"pairsToStyleString",()=>D),i.export(t,"mapToStyleString",()=>m),i.export(t,"querySelector",()=>k),i.export(t,"querySelectorAll",()=>S),i.export(t,"getElementById",()=>U),i.export(t,"parseFragment",()=>N),i.export(t,"parseElement",()=>H),i.export(t,"replaceWith",()=>x),i.export(t,"insertBefore",()=>J),i.export(t,"appendChild",()=>q),i.export(t,"ELEMENT_NODE",()=>b),i.export(t,"TEXT_NODE",()=>M),i.export(t,"CDATA_SECTION_NODE",()=>R),i.export(t,"COMMENT_NODE",()=>K),i.export(t,"DOCUMENT_NODE",()=>v),i.export(t,"DOCUMENT_TYPE_NODE",()=>j),i.export(t,"DOCUMENT_FRAGMENT_NODE",()=>O),i.export(t,"checkNodeType",()=>L),i.export(t,"isParentOf",()=>V);var I=A("./pair.js"),r=A("./map.js");let o="undefined"!=typeof document?document:{},n=A=>o.createElement(A),g=()=>o.createDocumentFragment(),a=A=>o.createTextNode(A),s="undefined"!=typeof DOMParser?new DOMParser:null,B=(A,e,t)=>A.dispatchEvent(new CustomEvent(e,t)),c=(A,e)=>(I.forEach(e,(e,t)=>{!1===t?A.removeAttribute(e):!0===t?A.setAttribute(e,""):A.setAttribute(e,t)}),A),Q=(A,e)=>(e.forEach((e,t)=>{A.setAttribute(t,e)}),A),l=A=>{let e=g();for(let t=0;t(q(A,l(e)),A),d=A=>A.remove(),h=(A,e,t)=>A.addEventListener(e,t),E=(A,e,t)=>A.removeEventListener(e,t),p=(A,e)=>(I.forEach(e,(e,t)=>h(A,e,t)),A),f=(A,e)=>(I.forEach(e,(e,t)=>E(A,e,t)),A),u=(A,e=[],t=[])=>C(c(n(A),e),t),w=(A,e)=>{let t=n("canvas");return t.height=e,t.width=A,t},y=a,F=A=>`${A.left}:${A.right};`,D=A=>A.map(F).join(""),m=A=>r.map(A,(A,e)=>`${e}:${A};`).join(""),k=(A,e)=>A.querySelector(e),S=(A,e)=>A.querySelectorAll(e),U=A=>o.getElementById(A),G=A=>s.parseFromString(`${A}`,"text/html").body,N=A=>l(G(A).childNodes),H=A=>G(A).firstElementChild,x=(A,e)=>A.replaceWith(e),J=(A,e,t)=>A.insertBefore(e,t),q=(A,e)=>A.appendChild(e),b=o.ELEMENT_NODE,M=o.TEXT_NODE,R=o.CDATA_SECTION_NODE,K=o.COMMENT_NODE,v=o.DOCUMENT_NODE,j=o.DOCUMENT_TYPE_NODE,O=o.DOCUMENT_FRAGMENT_NODE,L=(A,e)=>A.nodeType===e,V=(A,e)=>{let t=e.parentNode;for(;t&&t!==A;)t=t.parentNode;return t===A}},{"./pair.js":"gQxRb","./map.js":"dUNWE","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],emME5:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"stringify",()=>I),i.export(t,"parse",()=>r);let I=JSON.stringify,r=JSON.parse},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],eZM8P:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"enqueue",()=>o),i.export(t,"timeout",()=>a),i.export(t,"interval",()=>B),i.export(t,"Animation",()=>c),i.export(t,"animationFrame",()=>Q),i.export(t,"idleCallback",()=>C),i.export(t,"createDebouncer",()=>d);let I=[],r=()=>{for(let A=0;A{I.push(A),1===I.length&&setTimeout(r,0)},n=A=>class{constructor(A){this._=A}destroy(){A(this._)}},g=n(clearTimeout),a=(A,e)=>new g(setTimeout(e,A)),s=n(clearInterval),B=(A,e)=>new s(setInterval(e,A)),c=n(A=>"undefined"!=typeof requestAnimationFrame&&cancelAnimationFrame(A)),Q=A=>"undefined"==typeof requestAnimationFrame?a(0,A):new c(requestAnimationFrame(A)),l=n(A=>"undefined"!=typeof cancelIdleCallback&&cancelIdleCallback(A)),C=A=>"undefined"!=typeof requestIdleCallback?new l(requestIdleCallback(A)):a(1e3,A),d=A=>{let e=-1;return t=>{clearTimeout(e),t&&(e=setTimeout(t,A))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],g3rgM:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"BOLD",()=>g),i.export(t,"UNBOLD",()=>a),i.export(t,"BLUE",()=>s),i.export(t,"GREY",()=>B),i.export(t,"GREEN",()=>c),i.export(t,"RED",()=>Q),i.export(t,"PURPLE",()=>l),i.export(t,"ORANGE",()=>C),i.export(t,"UNCOLOR",()=>d),i.export(t,"computeNoColorLoggingArgs",()=>h),i.export(t,"createModuleLogger",()=>u);var I=A("./symbol.js"),r=A("./time.js"),o=A("./environment.js"),n=A("./function.js");let g=I.create(),a=I.create(),s=I.create(),B=I.create(),c=I.create(),Q=I.create(),l=I.create(),C=I.create(),d=I.create(),h=A=>{let e=[],t=[],i=0;for(;i{let t=E[p],i=o.getVariable("log"),I=null!==i&&("*"===i||"true"===i||RegExp(i,"gi").test(e));return p=(p+1)%E.length,e+=": ",I?(...i)=>{let I=r.getUnixTime(),o=I-f;f=I,A(t,e,d,...i.map(A=>"string"==typeof A||"symbol"==typeof A?A:JSON.stringify(A)),t," +"+o+"ms")}:n.nop}},{"./symbol.js":"fqScD","./time.js":"h82oW","./environment.js":"fx9cT","./function.js":"gbKoX","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],fqScD:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"create",()=>I),i.export(t,"isSymbol",()=>r);let I=Symbol,r=A=>"symbol"==typeof A},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],f0JW3:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"mapIterator",()=>I),i.export(t,"createIterator",()=>r),i.export(t,"iteratorFilter",()=>o),i.export(t,"iteratorMap",()=>n);let I=(A,e)=>({[Symbol.iterator](){return this},next(){let t=A.next();return{value:t.done?void 0:e(t.value),done:t.done}}}),r=A=>({[Symbol.iterator](){return this},next:A}),o=(A,e)=>r(()=>{let t;do t=A.next();while(!t.done&&!e(t.value))return t}),n=(A,e)=>r(()=>{let{done:t,value:i}=A.next();return{done:t,value:t?void 0:e(i)}})},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],l6Pwy:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viLoadSnapshot",()=>g),i.export(t,"applyEnv",()=>a);var I=A("../../../base/load/api/api-proxy"),r=A("../../../base/load/api/api-proxy-def"),o=A("../../../base/load/db/db-proxy"),n=A("../../ed/logic/code-loader");new TextEncoder;let g=async A=>{let e=A.site.config.api_url;try{let t=new URL(e);e&&t.hostname&&(await (0,r.loadApiProxyDef)(e,!0),A.script.db||(A.script.db=(0,o.dbProxy)(e)),A.script.api||(A.script.api=(0,I.apiProxy)(e)))}catch(A){A&&!A.message.toLowerCase().includes("invalid url")&&console.warn("Failed to load API [Snapshot]:",e)}await a(A)},a=async A=>{let e=window;A.site.config.api_url&&(e.db=(0,o.dbProxy)(A.site.config.api_url),e.api=(0,I.apiProxy)(A.site.config.api_url)),await (0,n.loadCode)(A,A.site_tstamp)}},{"../../../base/load/api/api-proxy":"gSUXN","../../../base/load/api/api-proxy-def":"ad3R8","../../../base/load/db/db-proxy":"gXSmQ","../../ed/logic/code-loader":"43JBt","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"43JBt":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"loadFrontEnd",()=>I),i.export(t,"loadTypings",()=>r),i.export(t,"loadCode",()=>o);let I=async(A,e)=>{let t=A.site.id,i=`/prod/${t}/_prasi/code/index.js?ts=${e}`,I=Function("callback",` import("${i}") .catch((e) => console.error("Failed to load site code\\n\\n", e)) - .then(callback)`);try{await new Promise(e=>{try{I(t=>{let i=window;for(let[e,I]of Object.entries(t))i[e]=I,A.site_exports[e]=I;e(t)})}catch(A){console.log("Failed to load site code",A)}})}catch(A){}},r=async A=>{let e=A.site.id;await Promise.all([fetch(`/prod/${e}/_prasi/typings.d.ts`).catch(()=>{}).then(async e=>{e&&(A.site_dts=await e.text(),A.render())}),fetch(`/prod/${e}/_prasi/type_def`).catch(()=>{}).then(async e=>{e&&(A.site_dts_entry=await e.json(),A.render())}),fetch(`/prod/${e}/_prasi/prisma.ext`).catch(()=>{}).then(async e=>{e&&(A.prisma_ext=(await e.text()).replace("./prisma","ts:prisma"),A.render())})])},o=async(A,e)=>{try{await Promise.all([r(A),I(A,e)])}catch(A){console.log("Failed to load site code",A)}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"4kYcB":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"devItem",()=>r);let I=window,r=(A,e,t)=>{I.prasiEdit||(I.prasiEdit={});let i=I.prasiEdit[t];i||(I.prasiEdit[t]={},i=I.prasiEdit[t]);let n=()=>{let A=e.get("id")||"",t=i[A];return t||(i[A]=[],t=i[A]),t},g=e.toJSON();return{...g,edit:{get props(){if(g.component?.props){let i={};for(let[I,o]of Object.entries(g.component.props))if(o.content){let o=e.get("component")?.get("props")?.get(I)?.get("content");o?i[I]={mode:"jsx",value:r(A,o,t)}:i[I]={mode:"jsx",value:null}}else{let A="string"==typeof o.valueBuilt?o.valueBuilt.trim():"";A.endsWith(";\n")&&(A=A.substring(0,A.length-2)),A&&A===o.value.trim()?i[I]={mode:"string",value:JSON.parse(o.value)}:i[I]={mode:"raw",value:o.value,valueBuilt:o.valueBuilt}}return i}return},get pending(){return[]},async commit(){let t={};for(let[A,t]of Object.entries(i))if(e){let i=e.toJSON(),I=i?.component?.props,r={};for(let A of t)if("prop"===A.type&&I)I[A.name]&&("string"===A.mode?(I[A.name].value=JSON.stringify(A.value),I[A.name].valueBuilt=JSON.stringify(A.value)):"raw"===A.mode?(I[A.name].value=A.value,A.valueBuilt?I[A.name].valueBuilt=A.valueBuilt:r[A.name]=A.value):"jsx"===A.mode&&(I[A.name]||(I[A.name]={meta:{type:"content-element"}}),A.value&&(I[A.name].content=o([A.value])[0])));else if("set"===A.type&&"object"==typeof A.value)for(let[e,t]of Object.entries(A.value))i[e]=t;let n=await _api.code_build(r);for(let[A,e]of Object.entries(n))I[A].valueBuilt=e;n[A]=i}e&&e.doc?.transact(()=>{for(let[e,i]of Object.entries(t)){let t=A[e];t.mitem&&syncronize(t.mitem,i)}})},setValue(A,e){let t=n(),i=e;"childs"===A&&(i=o(e)),t.push({type:"set",name:A,value:i})},setProp(A,e){let t=n();"string"==typeof e?t.push({type:"prop",mode:"string",name:A,value:e}):"string"===e.mode?t.push({type:"prop",mode:"string",name:A,value:e.value}):"raw"===e.mode?t.push({type:"prop",mode:"raw",name:A,value:e.value,valueBuilt:e.valueBuilt}):"jsx"===e.mode&&t.push({type:"prop",mode:"jsx",name:A,value:e.value})},get childs(){let i=e?.toJSON();if(i.childs)return i.childs.map(e=>{if(e){let i=A[e.id];if(i&&i.mitem)return r(A,i.mitem,t)}});return[]},get parent(){if(e){let i=e.parent.toJSON();if(Array.isArray(i)){let I=A[(e.parent?.parent).get("id")].mitem;if(I)return{item:r(A,I,t),child_type:"child",child_idx:i.findIndex(A=>A.id===g.id)}}}return null}}}},o=A=>A.map(A=>{let e={...A};if(delete e.edit,e.component?.props)for(let[A,t]of Object.entries(e.component.props))t.content&&(t.content=o([t.content]));return e.childs&&(e.childs=o(e.childs)),e})},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"47fGT":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"responsiveVal",()=>I);let I=(A,e,t,i)=>{let I=A[e];return"desktop"!==t&&t?A.mobile&&A.mobile[e]&&(I=A.mobile[e]):!I&&A.mobile&&A.mobile[e]&&(I=A.mobile[e]),I||(I=i),I}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"5aNau":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"edRoute",()=>Q),i.export(t,"reloadLayout",()=>l),i.export(t,"reloadPage",()=>C),i.export(t,"loadPageMetaCache",()=>d),i.export(t,"savePageMetaCache",()=>h);var I=A("wasm-gzip"),r=A("./active/is-editing"),o=A("./comp/load"),n=A("./ed-global"),g=A("./ed-site"),a=A("./tree/build"),s=A("idb-keyval"),B=A("../../vi/render/script/extract-nav"),c=A("686da3b6f0fee310").Buffer;let Q=async A=>{if(A.sync&&("ready"===A.status||"init"===A.status)){if(!A.site.domain&&!A.site.name){A.status="load-site";let e=await A.sync.site.load(A.site.id);if(!e){A.status="site-not-found",A.render();return}await (0,g.loadSite)(A,e,"from-route")}if(A.page.cur.id!==params.page_id||!A.page.cur.snapshot||!A.page.list[A.page.cur.id]){let e=A.page.list[params.page_id];if(e&&A.page.doc&&e.on_update){A.page.doc.off("update",e.on_update);let t=A.page.list[params.page_id];A.page.cur=t.page,A.page.doc=t.doc}await C(A,params.page_id,"load-route")}}},l=async(A,e,t)=>{if(!A.sync)return;let i=await A.sync.page.load(e);if(i){if(i.comps)for(let[e,t]of Object.entries(i.comps))t&&t.snapshot&&await (0,o.loadCompSnapshot)(A,e,t.snapshot);if(i.snapshot){let o=new Y.Doc;Y.applyUpdate(o,(0,I.decompress)(i.snapshot));let n=A.page.list[i.id];n||(A.page.list[i.id]={},n=A.page.list[i.id]),n.on_update&&n.doc&&n.doc.off("update",n.on_update),n.on_update=async(i,n)=>{if("local"===n||!A.sync)return;let s=await A.sync.yjs.sv_local("page",e,c.from((0,I.compress)(i)));if(s){let i=Y.encodeStateAsUpdate(o,(0,I.decompress)(s.sv));Y.applyUpdate(o,(0,I.decompress)(s.diff),"local"),(0,r.isTextEditing)()||await (0,a.treeRebuild)(A,{note:t+" page-on-update"}),await A.sync.yjs.diff_local("page",A.page.cur.id,c.from((0,I.compress)(i))),A.preview.page_cache[e]={root:g,url:"~~@$#%^#@~LAYOUT~~@$#%^#@~"},await (0,a.treeCacheBuild)(A,e),A.render();let n=A.preview.meta_cache[e];n&&(A.site.layout.meta=n.meta,A.site.layout.entry=n.entry,h(A,n.meta))}};let g=o.getMap("map").get("root")?.toJSON();if(g){A.preview.page_cache[e]={root:g,url:"~~@$#%^#@~LAYOUT~~@$#%^#@~"},await (0,a.treeCacheBuild)(A,e);let t=A.preview.meta_cache[e];t&&(A.site.layout.meta=t.meta,A.site.layout.entry=t.entry,h(A,t.meta)),A.render()}}}},C=async(A,e,t,i)=>{if(!A.sync)return;A.status="reload";let g=await A.sync.page.load(e);if(!g){A.status="page-not-found",A.render();return}if(g.comps)for(let[e,t]of Object.entries(g.comps))t&&t.snapshot&&await (0,o.loadCompSnapshot)(A,e,t.snapshot);if(A.page.cur=g,g.snapshot){let i=new Y.Doc;Y.applyUpdate(i,(0,I.decompress)(g.snapshot));let o=A.page.list[g.id];o||(A.page.list[g.id]={},o=A.page.list[g.id]),o.on_update&&o.doc&&o.doc.off("update",o.on_update),o.on_update=async(e,s)=>{if("local"===s||!A.sync)return;if(o.page.id!==g.id){alert("Page ID Mismatch!\n Refreshing to preventing data loss..."),location.reload();return}let B=await A.sync.yjs.sv_local("page",A.page.cur.id,c.from((0,I.compress)(e)));if(B){let e=Y.encodeStateAsUpdate(i,(0,I.decompress)(B.sv));Y.applyUpdate(i,(0,I.decompress)(B.diff),"local"),(0,r.isTextEditing)()||await (0,a.treeRebuild)(A,{note:t+" page-on-update"}),await A.sync.yjs.diff_local("page",A.page.cur.id,c.from((0,I.compress)(e))),A.ui.syncing=!1,A.page.entry=i.getMap("map").get("root")?.get("childs")?.map(A=>A.get("id")),n.active.should_render_main&&A.render()}},i.on("update",o.on_update),A.page.doc=i,A.page.doc&&(o.page=A.page.cur,o.doc=A.page.doc,A.page.entry=A.page.doc.getMap("map").get("root")?.get("childs")?.map(A=>A.get("id")),Array.isArray(A.page.entry)||A.sync.code.action({type:"flush-page-cache",page_id:e}).then(()=>{location.reload()})),A.page.doc&&await (0,a.treeRebuild)(A,{note:t+" page-init"})}A.status="ready",!1!==i&&A.render()},d=async(A,e)=>{let t=await (0,s.get)(`page-${e}`,B.nav.store);if(t)return A.preview.meta_cache[e]=t,A.preview.meta_cache[e]},h=async(A,e)=>{let t={};for(let[A,i]of Object.entries(e))t[A]={item:i.item,instances:i.instances,parent:i.parent,jsx_prop:i.jsx_prop};A.preview.meta_cache[params.page_id]={meta:t,entry:A.page.entry,url:A.page.cur.url},(0,s.set)(`page-${params.page_id}`,A.preview.meta_cache[params.page_id],B.nav.store)}},{"686da3b6f0fee310":"9Gw3v","wasm-gzip":"pbgs4","./active/is-editing":"dhggL","./comp/load":"aigu6","./ed-global":"6QDfO","./ed-site":"fbNqA","./tree/build":"dNllk","idb-keyval":"hfWoV","../../vi/render/script/extract-nav":"hXbWs","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],fbNqA:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"loadSite",()=>o);var I=A("../../vi/load/load-legacy"),r=A("../../vi/load/load-snapshot");let o=async(A,e,t)=>{A.site=e,A.script.db||A.script.api||(location.pathname.startsWith("/ed/")?await (0,r.viLoadSnapshot)(A):await (0,I.viLoadLegacy)({mode:A.mode,site:{api_url:A.site.config.api_url,id:A.site.id,api:{get:()=>A.script.api,set(e){A.script.api=e}},db:{get:()=>A.script.db,set(e){A.script.db=e}}},render:()=>{}}))}},{"../../vi/load/load-legacy":"ibQ3Y","../../vi/load/load-snapshot":"l6Pwy","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],ibQ3Y:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viLoadLegacy",()=>s);var I=A("../../../base/load/api/api-proxy"),r=A("../../../base/load/api/api-proxy-def"),o=A("../../../base/load/db/db-proxy"),n=A("../../ed/panel/side/style/tools/dynamic-import"),g=i.interopDefault(n),a=A("../render/script/arg");let s=async A=>{let e=window;e.exports||(e.exports={});let t=await _db.site.findFirst({where:{id:A.site.id},include:{component_site:!0}});if(t){if(t.component_site)for(let A of t.component_site){let e=`/npm/site/${A.id_site}/site.js`;await (0,g.default)(e)}let e=A.site.api_url;if(e||(e=(t.config||{}).api_url||""),!e)return;try{let A=new URL(e);if(e&&A.hostname)try{await (0,r.loadApiProxyDef)(e,!0)}catch(A){console.warn("Failed to load API [Legacy]:",e)}}catch(A){}let n=`/npm/site/${A.site.id}/site.js`;await (0,g.default)(n),A.site.db.get()||A.site.db.set((0,o.dbProxy)(e)),A.site.api.get()||A.site.api.set((0,I.apiProxy)(e));let s=window;if(t.js_compiled){var i;let e=t.config,I={...(0,a.viScriptArg)({site:A.site,mode:A.mode}),types:{},exports:s.exports,load:g.default,render:A.render,module:{exports:{}}};if(await (i=t.js_compiled,e.api_url&&!I.api&&(I.api=A.site.api.get(),I.db=A.site.db.get()),I.params=s.params,I.module={},Function(...Object.keys(I),i)(...Object.values(I))),I.module.exports)for(let[A,e]of Object.entries(I.module.exports))s.exports[A]=e}}}},{"../../../base/load/api/api-proxy":"gSUXN","../../../base/load/api/api-proxy-def":"ad3R8","../../../base/load/db/db-proxy":"gXSmQ","../../ed/panel/side/style/tools/dynamic-import":"3Xtlr","../render/script/arg":"btInY","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"3Xtlr":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"importModule",()=>r);var I=A("../../../../../../utils/types/general");function r(A){return A?new Promise((e,t)=>{let i="$importModule$"+Math.random().toString(32).slice(2),r=document.createElement("script"),o=()=>{delete window[i],r.onerror=null,r.onload=null,r.remove(),URL.revokeObjectURL(r.src),r.src=""};r.defer=!0,r.type="module",r.onerror=()=>{t(Error(`Failed to import: ${A}`)),o()},r.onload=()=>{e(window[i]),o()};let n=I.w.basehost?I.w.basehost+A:function(A){let e=document.createElement("a");return e.setAttribute("href",A),e.cloneNode(!1).href}(A),g=new Blob([`import * as m from "${n}"; window.${i} = m;`],{type:"text/javascript"});r.src=URL.createObjectURL(g),document.head.appendChild(r)}):""}t.default=r},{"../../../../../../utils/types/general":"fBAQm","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],btInY:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viScriptArg",()=>I);let I=A=>({isMobile:"mobile"===A.mode,isDesktop:"desktop"===A.mode,isEditor:location.pathname.startsWith("/ed/")})},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],lSNIl:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"Vi",()=>l);var I=A("react/jsx-runtime"),r=A("react"),o=A("web-utils"),n=A("./load/load"),g=A("./render/global"),a=A("./render/render"),s=A("./render/script/extract-nav"),B=A("./root"),c=A("./utils/error-box");let Q=window,l=({meta:A,entry:e,api_url:t,site_id:i,api:l,mode:C,db:d,visit:h,script:E,page_id:p,render_stat:f,on_status_changed:u,on_preload:w,layout:y,comp_load:F})=>{let D=(0,o.useGlobal)(g.ViGlobal,"VI");return D.mode=C,D.entry=e,D.on_preload=w,D.comp.load=F,Q.siteurl=(A,e)=>{if(A.startsWith("http://")||A.startsWith("https://"))return A;try{["prasi.avolut.com","localhost"].includes(location.hostname)?D.site.api_url&&!D.site_url&&(D.site_url=new URL(D.site.api_url)):D.site_url||(e&&D.site.api_url?D.site_url=new URL(D.site.api_url):D.site_url=new URL(location.href),D.site_url.pathname="")}catch(A){}if(D.site_url){let e=D.site_url,t=A;return t.startsWith("/")||(t="/"+t),Q.prasiContext.siteUrl&&(t=Q.prasiContext.siteUrl(t)),`${e.protocol}//${e.host}${t}`}return A},Q.isMobile="mobile"===C,Q.isDesktop="desktop"===C,Q.preload=(A,e)=>{for(let e of(D.page.navs[p]||(D.page.navs[p]=new Set),"string"==typeof A?[A]:A))D.page.navs[p].add(e);return clearTimeout(s.nav.timeout),s.nav.timeout=setTimeout(()=>{D.on_preload&&D.on_preload({urls:Array.from(D.page.navs[p]),opt:{on_load:e?.on_load}})},100),""},D.layout=y,D.page.cur.id=p,D.on_status_changes=u,"disabled"===f&&(a.render_stat.enabled=!1),D.meta!==A&&(D.meta=A),E&&(D.script.init_local_effect=E.init_local_effect),D.visit=h,"init"===D.status&&(D.site.db=d,D.site.api=l,(0,n.viLoad)(D,{api_url:t,site_id:i})),w&&(0,r.useEffect)(()=>{setTimeout(()=>{let A=D.page.navs[D.page.cur.id];A&&w({urls:Array.from(A),opt:{on_load(A){}}})},500)},[D.page.cur.id]),(0,I.jsx)(c.ErrorBox,{children:(0,I.jsx)(r.Suspense,{children:(0,I.jsx)(B.ViRoot,{})})})}},{"react/jsx-runtime":"QoA3A",react:"6Lppp","web-utils":"1hi6H","./load/load":"9mDWt","./render/global":"1IdeH","./render/render":"8FwN3","./render/script/extract-nav":"hXbWs","./root":"6ey3Y","./utils/error-box":"4gof8","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"9mDWt":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viLoad",()=>I);let I=(A,e)=>{A.status="loading",A.on_status_changes&&A.on_status_changes(A.status),A.site.id=e.site_id,A.site.api_url=e.api_url,A.status="ready",A.on_status_changes&&A.on_status_changes(A.status)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"1IdeH":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"ViGlobal",()=>I);let I={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}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"8FwN3":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"render_stat",()=>c),i.export(t,"ViRender",()=>Q),i.export(t,"ViChild",()=>l);var I=A("react/jsx-runtime"),r=A("react"),o=A("web-utils"),n=A("../utils/error-box"),g=A("./global"),a=A("./parts"),s=A("./script");let B={debug:!!localStorage.getItem("prasi-js-debug")},c={enabled:!1,meta:{}},Q=({meta:A,passprop:e,is_layout:t,parent_key:i,depth:r})=>{if(c.enabled){let e=c.meta;if(e[A.item.id]&&e[A.item.id].last_render===Math.floor(Date.now()/1e3)?e[A.item.id].count++:e[A.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},e[A.item.id]?.count>70)return(0,I.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,I.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",A.item.name,"]"]}),(0,I.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",e[A.item.id]?.count," times in less than 1 second."]})]})}if(!A||A.item.hidden)return null;if(B.debug){let e="";for(let A=0;A{let c=(0,o.useGlobal)(g.ViGlobal,"VI");if(t&&"children"===A.item.name){let A=[];for(let t of c.entry){let r=c.meta[t];if(r.item.adv?.js||r.item.component?.id)A.push((0,I.jsx)(n.ErrorBox,{meta:r,children:(0,I.jsx)(s.ViScript,{meta:r,is_layout:!1,passprop:{...e},parent_key:i,depth:B+1})}));else{let t=(0,a.viParts)(c,r,!1,e,B);c.visit&&c.visit(r,t),A.push((0,I.jsx)("div",{...t.props}))}}return(0,I.jsx)(I.Fragment,{children:A.map((A,e)=>(0,I.jsx)(r.Fragment,{children:A},e))})}let Q=(0,a.viParts)(c,A,t,e,B);return c.visit&&c.visit(A,Q),(0,I.jsx)("div",{...Q.props})}},{"react/jsx-runtime":"QoA3A",react:"6Lppp","web-utils":"1hi6H","../utils/error-box":"4gof8","./global":"1IdeH","./parts":"fUkcA","./script":"biZQo","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"4gof8":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"ErrorBox",()=>n);var I=A("react/jsx-runtime"),r=A("react-use-error-boundary"),o=A("web-utils");let n=(0,r.withErrorBoundary)(({children:A,meta:e,id:t,silent:i=!0})=>{let n=(0,o.useLocal)({retrying:!1,meta:e}),[g,a]=(0,r.useErrorBoundary)((A,e)=>{!0!==i&&console.warn(A)});return(e&&n.meta!==e&&(n.meta=e,setTimeout(a)),g)?(0,I.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,I.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",e?.item.name?"["+e.item.name+"]:":""]}),(0,I.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:n.retrying?(0,I.jsx)(I.Fragment,{children:"Retrying..."}):(0,I.jsx)(I.Fragment,{children:g.message})}),(0,I.jsx)("div",{className:"p-1",children:(0,I.jsx)("button",{onClick:()=>{n.retrying=!0,n.render(),setTimeout(()=>{n.retrying=!1,n.render(),a()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):A})},{"react/jsx-runtime":"QoA3A","react-use-error-boundary":"5QDO8","web-utils":"1hi6H","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"5QDO8":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"ErrorBoundaryContext",()=>g),i.export(t,"withErrorBoundary",()=>a),i.export(t,"useErrorBoundary",()=>s);var I=A("react"),r=i.interopDefault(I);class o extends I.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...A){this.setState({}),this.props.onError(...A)}render(){return this.props.children}}let n=(0,I.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:()=>!1});function g({children:A}){let[e,t]=(0,I.useState)(),i=(0,I.useRef)(),g=(0,I.useMemo)(()=>({componentDidCatch:i,error:e,setError:t}),[e]);return(0,r.default).createElement(n.Provider,{value:g},(0,r.default).createElement(o,{error:e,onError:(A,e)=>{t(A),i.current?.(A,e)}},A))}function a(A){function e(e){return(0,r.default).createElement(g,null,(0,r.default).createElement(A,{key:"WrappedComponent",...e}))}return e.displayName=`WithErrorBoundary(${A.displayName??A.name??"Component"})`,e}function s(A){let e=(0,I.useContext)(n);e.componentDidCatch.current=A;let t=(0,I.useCallback)(()=>{e.setError(void 0)},[]);return[e.error,t]}g.displayName="ReactUseErrorBoundaryContext"},{react:"6Lppp","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],fUkcA:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viParts",()=>n);var I=A("react/jsx-runtime"),r=A("../../../utils/css/gen"),o=A("./render");let n=(A,e,t,i,n)=>{let g,a;let s=e.item;s.component?.style&&(g={style:s.component.style,className:(0,r.produceCSS)(s.component.style,{mode:A.mode})});let B={className:(0,r.produceCSS)(s,{mode:A.mode}),inherit:g},c=e.item.childs;return"text"===e.item.type?(a=null,B.dangerouslySetInnerHTML={__html:e.item.html||""}):a=Array.isArray(c)&&c?.map(e=>{if(!e)return null;let{id:r}=e,g=t?A.layout?.meta[r]:A.meta[r];return g?I.jsx(o.ViRender,{meta:g,is_layout:t,passprop:{...i},depth:n+1},r):null}),B.children=a,e.item.adv?.html?(delete B.children,B.dangerouslySetInnerHTML={__html:e.item.adv?.html}):e.item.adv?.js&&!e.item.adv.js.includes("children")&&(delete B.children,delete B.dangerouslySetInnerHTML),{props:B,text_props:{}}}},{"react/jsx-runtime":"QoA3A","../../../utils/css/gen":"lljkd","./render":"8FwN3","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],lljkd:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"produceCSS",()=>c);var I=A("./advanced"),r=A("./background"),o=A("./border"),n=A("./dimension"),g=A("./editor"),a=A("./font"),s=A("./layout"),B=A("./padding");let c=(A,e)=>{try{return cx([A.id?`s-${A.id}`:"",css` + .then(callback)`);try{await new Promise(e=>{try{I(t=>{let i=window;for(let[e,I]of Object.entries(t))i[e]=I,A.site_exports[e]=I;e(t)})}catch(A){console.log("Failed to load site code",A)}})}catch(A){}},r=async A=>{let e=A.site.id;await Promise.all([fetch(`/prod/${e}/_prasi/typings.d.ts`).catch(()=>{}).then(async e=>{e&&(A.site_dts=await e.text(),A.render())}),fetch(`/prod/${e}/_prasi/type_def`).catch(()=>{}).then(async e=>{e&&(A.site_dts_entry=await e.json(),A.render())}),fetch(`/prod/${e}/_prasi/prisma.ext`).catch(()=>{}).then(async e=>{e&&(A.prisma_ext=(await e.text()).replace("./prisma","ts:prisma"),A.render())})])},o=async(A,e)=>{try{await Promise.all([r(A),I(A,e)])}catch(A){console.log("Failed to load site code",A)}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"4kYcB":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"devItem",()=>r);let I=window,r=(A,e,t)=>{I.prasiEdit||(I.prasiEdit={});let i=I.prasiEdit[t];i||(I.prasiEdit[t]={},i=I.prasiEdit[t]);let n=()=>{let A=e.get("id")||"",t=i[A];return t||(i[A]=[],t=i[A]),t},g=e.toJSON();return{...g,edit:{get props(){if(g.component?.props){let i={};for(let[I,o]of Object.entries(g.component.props))if(o.content){let o=e.get("component")?.get("props")?.get(I)?.get("content");o?i[I]={mode:"jsx",value:r(A,o,t)}:i[I]={mode:"jsx",value:null}}else{let A="string"==typeof o.valueBuilt?o.valueBuilt.trim():"";A.endsWith(";\n")&&(A=A.substring(0,A.length-2)),A&&A===o.value.trim()?i[I]={mode:"string",value:JSON.parse(o.value)}:i[I]={mode:"raw",value:o.value,valueBuilt:o.valueBuilt}}return i}return},get pending(){return[]},async commit(){let t={};for(let[A,t]of Object.entries(i))if(e){let i=e.toJSON(),I=i?.component?.props,r={};for(let A of t)if("prop"===A.type&&I)I[A.name]&&("string"===A.mode?(I[A.name].value=JSON.stringify(A.value),I[A.name].valueBuilt=JSON.stringify(A.value)):"raw"===A.mode?(I[A.name].value=A.value,A.valueBuilt?I[A.name].valueBuilt=A.valueBuilt:r[A.name]=A.value):"jsx"===A.mode&&(I[A.name]||(I[A.name]={meta:{type:"content-element"}}),A.value&&(I[A.name].content=o([A.value])[0])));else if("set"===A.type&&"object"==typeof A.value)for(let[e,t]of Object.entries(A.value))i[e]=t;let n=await _api.code_build(r);for(let[A,e]of Object.entries(n))I[A].valueBuilt=e;n[A]=i}e&&e.doc?.transact(()=>{for(let[e,i]of Object.entries(t)){let t=A[e];t.mitem&&syncronize(t.mitem,i)}})},setValue(A,e){let t=n(),i=e;"childs"===A&&(i=o(e)),t.push({type:"set",name:A,value:i})},setProp(A,e){let t=n();"string"==typeof e?t.push({type:"prop",mode:"string",name:A,value:e}):"string"===e.mode?t.push({type:"prop",mode:"string",name:A,value:e.value}):"raw"===e.mode?t.push({type:"prop",mode:"raw",name:A,value:e.value,valueBuilt:e.valueBuilt}):"jsx"===e.mode&&t.push({type:"prop",mode:"jsx",name:A,value:e.value})},get childs(){let i=e?.toJSON();if(i.component?.id){if((i.component?.props.child).content){let i=e.get("component")?.get("props")?.get("child")?.get("content");if(i)return[r(A,i,t)]}return[]}if(i.childs)return i.childs.map(e=>{if(e){let i=A[e.id];if(i&&i.mitem)return r(A,i.mitem,t)}}).filter(A=>A);return[]},get parent(){if(e){let i=e.parent.toJSON();if(Array.isArray(i)){let I=A[(e.parent?.parent).get("id")].mitem;if(I)return{item:r(A,I,t),child_type:"child",child_idx:i.findIndex(A=>A.id===g.id)}}}return null}}}},o=A=>A.map(A=>{let e={...A};if(delete e.edit,e.component?.props)for(let[A,t]of Object.entries(e.component.props))t.content&&(t.content=o([t.content]));return e.childs&&(e.childs=o(e.childs)),e})},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"47fGT":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"responsiveVal",()=>I);let I=(A,e,t,i)=>{let I=A[e];return"desktop"!==t&&t?A.mobile&&A.mobile[e]&&(I=A.mobile[e]):!I&&A.mobile&&A.mobile[e]&&(I=A.mobile[e]),I||(I=i),I}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"5aNau":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"edRoute",()=>Q),i.export(t,"reloadLayout",()=>l),i.export(t,"reloadPage",()=>C),i.export(t,"loadPageMetaCache",()=>d),i.export(t,"savePageMetaCache",()=>h);var I=A("wasm-gzip"),r=A("./active/is-editing"),o=A("./comp/load"),n=A("./ed-global"),g=A("./ed-site"),a=A("./tree/build"),s=A("idb-keyval"),B=A("../../vi/render/script/extract-nav"),c=A("686da3b6f0fee310").Buffer;let Q=async A=>{if(A.sync&&("ready"===A.status||"init"===A.status)){if(!A.site.domain&&!A.site.name){A.status="load-site";let e=await A.sync.site.load(A.site.id);if(!e){A.status="site-not-found",A.render();return}await (0,g.loadSite)(A,e,"from-route")}if(A.page.cur.id!==params.page_id||!A.page.cur.snapshot||!A.page.list[A.page.cur.id]){let e=A.page.list[params.page_id];if(e&&A.page.doc&&e.on_update){A.page.doc.off("update",e.on_update);let t=A.page.list[params.page_id];A.page.cur=t.page,A.page.doc=t.doc}await C(A,params.page_id,"load-route")}}},l=async(A,e,t)=>{if(!A.sync)return;let i=await A.sync.page.load(e);if(i){if(i.comps)for(let[e,t]of Object.entries(i.comps))t&&t.snapshot&&await (0,o.loadCompSnapshot)(A,e,t.snapshot);if(i.snapshot){let o=new Y.Doc;Y.applyUpdate(o,(0,I.decompress)(i.snapshot));let n=A.page.list[i.id];n||(A.page.list[i.id]={},n=A.page.list[i.id]),n.on_update&&n.doc&&n.doc.off("update",n.on_update),n.on_update=async(i,n)=>{if("local"===n||!A.sync)return;let s=await A.sync.yjs.sv_local("page",e,c.from((0,I.compress)(i)));if(s){let i=Y.encodeStateAsUpdate(o,(0,I.decompress)(s.sv));Y.applyUpdate(o,(0,I.decompress)(s.diff),"local"),(0,r.isTextEditing)()||await (0,a.treeRebuild)(A,{note:t+" page-on-update"}),await A.sync.yjs.diff_local("page",A.page.cur.id,c.from((0,I.compress)(i))),A.preview.page_cache[e]={root:g,url:"~~@$#%^#@~LAYOUT~~@$#%^#@~"},await (0,a.treeCacheBuild)(A,e),A.render();let n=A.preview.meta_cache[e];n&&(A.site.layout.meta=n.meta,A.site.layout.entry=n.entry,h(A,n.meta))}};let g=o.getMap("map").get("root")?.toJSON();if(g){A.preview.page_cache[e]={root:g,url:"~~@$#%^#@~LAYOUT~~@$#%^#@~"},await (0,a.treeCacheBuild)(A,e);let t=A.preview.meta_cache[e];t&&(A.site.layout.meta=t.meta,A.site.layout.entry=t.entry,h(A,t.meta)),A.render()}}}},C=async(A,e,t,i)=>{if(!A.sync)return;A.status="reload";let g=await A.sync.page.load(e);if(!g){A.status="page-not-found",A.render();return}if(g.comps)for(let[e,t]of Object.entries(g.comps))t&&t.snapshot&&await (0,o.loadCompSnapshot)(A,e,t.snapshot);if(A.page.cur=g,g.snapshot){let i=new Y.Doc;Y.applyUpdate(i,(0,I.decompress)(g.snapshot));let o=A.page.list[g.id];o||(A.page.list[g.id]={},o=A.page.list[g.id]),o.on_update&&o.doc&&o.doc.off("update",o.on_update),o.on_update=async(e,s)=>{if("local"===s||!A.sync)return;if(o.page.id!==g.id){alert("Page ID Mismatch!\n Refreshing to preventing data loss..."),location.reload();return}let B=await A.sync.yjs.sv_local("page",A.page.cur.id,c.from((0,I.compress)(e)));if(B){let e=Y.encodeStateAsUpdate(i,(0,I.decompress)(B.sv));Y.applyUpdate(i,(0,I.decompress)(B.diff),"local"),(0,r.isTextEditing)()||await (0,a.treeRebuild)(A,{note:t+" page-on-update"}),await A.sync.yjs.diff_local("page",A.page.cur.id,c.from((0,I.compress)(e))),A.ui.syncing=!1,A.page.entry=i.getMap("map").get("root")?.get("childs")?.map(A=>A.get("id")),n.active.should_render_main&&A.render()}},i.on("update",o.on_update),A.page.doc=i,A.page.doc&&(o.page=A.page.cur,o.doc=A.page.doc,A.page.entry=A.page.doc.getMap("map").get("root")?.get("childs")?.map(A=>A.get("id")),Array.isArray(A.page.entry)||A.sync.code.action({type:"flush-page-cache",page_id:e}).then(()=>{location.reload()})),A.page.doc&&await (0,a.treeRebuild)(A,{note:t+" page-init"})}A.status="ready",!1!==i&&A.render()},d=async(A,e)=>{let t=await (0,s.get)(`page-${e}`,B.nav.store);if(t)return A.preview.meta_cache[e]=t,A.preview.meta_cache[e]},h=async(A,e)=>{let t={};for(let[A,i]of Object.entries(e))t[A]={item:i.item,instances:i.instances,parent:i.parent,jsx_prop:i.jsx_prop};A.preview.meta_cache[params.page_id]={meta:t,entry:A.page.entry,url:A.page.cur.url},(0,s.set)(`page-${params.page_id}`,A.preview.meta_cache[params.page_id],B.nav.store)}},{"686da3b6f0fee310":"9Gw3v","wasm-gzip":"pbgs4","./active/is-editing":"dhggL","./comp/load":"aigu6","./ed-global":"6QDfO","./ed-site":"fbNqA","./tree/build":"dNllk","idb-keyval":"hfWoV","../../vi/render/script/extract-nav":"hXbWs","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],fbNqA:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"loadSite",()=>o);var I=A("../../vi/load/load-legacy"),r=A("../../vi/load/load-snapshot");let o=async(A,e,t)=>{A.site=e,A.script.db||A.script.api||(location.pathname.startsWith("/ed/")?await (0,r.viLoadSnapshot)(A):await (0,I.viLoadLegacy)({mode:A.mode,site:{api_url:A.site.config.api_url,id:A.site.id,api:{get:()=>A.script.api,set(e){A.script.api=e}},db:{get:()=>A.script.db,set(e){A.script.db=e}}},render:()=>{}}))}},{"../../vi/load/load-legacy":"ibQ3Y","../../vi/load/load-snapshot":"l6Pwy","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],ibQ3Y:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viLoadLegacy",()=>s);var I=A("../../../base/load/api/api-proxy"),r=A("../../../base/load/api/api-proxy-def"),o=A("../../../base/load/db/db-proxy"),n=A("../../ed/panel/side/style/tools/dynamic-import"),g=i.interopDefault(n),a=A("../render/script/arg");let s=async A=>{let e=window;e.exports||(e.exports={});let t=await _db.site.findFirst({where:{id:A.site.id},include:{component_site:!0}});if(t){if(t.component_site)for(let A of t.component_site){let e=`/npm/site/${A.id_site}/site.js`;await (0,g.default)(e)}let e=A.site.api_url;if(e||(e=(t.config||{}).api_url||""),!e)return;try{let A=new URL(e);if(e&&A.hostname)try{await (0,r.loadApiProxyDef)(e,!0)}catch(A){console.warn("Failed to load API [Legacy]:",e)}}catch(A){}let n=`/npm/site/${A.site.id}/site.js`;await (0,g.default)(n),A.site.db.get()||A.site.db.set((0,o.dbProxy)(e)),A.site.api.get()||A.site.api.set((0,I.apiProxy)(e));let s=window;if(t.js_compiled){var i;let e=t.config,I={...(0,a.viScriptArg)({site:A.site,mode:A.mode}),types:{},exports:s.exports,load:g.default,render:A.render,module:{exports:{}}};if(await (i=t.js_compiled,e.api_url&&!I.api&&(I.api=A.site.api.get(),I.db=A.site.db.get()),I.params=s.params,I.module={},Function(...Object.keys(I),i)(...Object.values(I))),I.module.exports)for(let[A,e]of Object.entries(I.module.exports))s.exports[A]=e}}}},{"../../../base/load/api/api-proxy":"gSUXN","../../../base/load/api/api-proxy-def":"ad3R8","../../../base/load/db/db-proxy":"gXSmQ","../../ed/panel/side/style/tools/dynamic-import":"3Xtlr","../render/script/arg":"btInY","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"3Xtlr":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"importModule",()=>r);var I=A("../../../../../../utils/types/general");function r(A){return A?new Promise((e,t)=>{let i="$importModule$"+Math.random().toString(32).slice(2),r=document.createElement("script"),o=()=>{delete window[i],r.onerror=null,r.onload=null,r.remove(),URL.revokeObjectURL(r.src),r.src=""};r.defer=!0,r.type="module",r.onerror=()=>{t(Error(`Failed to import: ${A}`)),o()},r.onload=()=>{e(window[i]),o()};let n=I.w.basehost?I.w.basehost+A:function(A){let e=document.createElement("a");return e.setAttribute("href",A),e.cloneNode(!1).href}(A),g=new Blob([`import * as m from "${n}"; window.${i} = m;`],{type:"text/javascript"});r.src=URL.createObjectURL(g),document.head.appendChild(r)}):""}t.default=r},{"../../../../../../utils/types/general":"fBAQm","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],btInY:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viScriptArg",()=>I);let I=A=>({isMobile:"mobile"===A.mode,isDesktop:"desktop"===A.mode,isEditor:location.pathname.startsWith("/ed/")})},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],lSNIl:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"Vi",()=>l);var I=A("react/jsx-runtime"),r=A("react"),o=A("web-utils"),n=A("./load/load"),g=A("./render/global"),a=A("./render/render"),s=A("./render/script/extract-nav"),B=A("./root"),c=A("./utils/error-box");let Q=window,l=({meta:A,entry:e,api_url:t,site_id:i,api:l,mode:C,db:d,visit:h,script:E,page_id:p,render_stat:f,on_status_changed:u,on_preload:w,layout:y,comp_load:F})=>{let D=(0,o.useGlobal)(g.ViGlobal,"VI");return D.mode=C,D.entry=e,D.on_preload=w,D.comp.load=F,Q.siteurl=(A,e)=>{if(A.startsWith("http://")||A.startsWith("https://"))return A;try{["prasi.avolut.com","localhost"].includes(location.hostname)?D.site.api_url&&!D.site_url&&(D.site_url=new URL(D.site.api_url)):D.site_url||(e&&D.site.api_url?D.site_url=new URL(D.site.api_url):D.site_url=new URL(location.href),D.site_url.pathname="")}catch(A){}if(D.site_url){let e=D.site_url,t=A;return t.startsWith("/")||(t="/"+t),Q.prasiContext.siteUrl&&(t=Q.prasiContext.siteUrl(t)),`${e.protocol}//${e.host}${t}`}return A},Q.isMobile="mobile"===C,Q.isDesktop="desktop"===C,Q.preload=(A,e)=>{for(let e of(D.page.navs[p]||(D.page.navs[p]=new Set),"string"==typeof A?[A]:A))D.page.navs[p].add(e);return clearTimeout(s.nav.timeout),s.nav.timeout=setTimeout(()=>{D.on_preload&&D.on_preload({urls:Array.from(D.page.navs[p]),opt:{on_load:e?.on_load}})},100),""},D.layout=y,D.page.cur.id=p,D.on_status_changes=u,"disabled"===f&&(a.render_stat.enabled=!1),D.meta!==A&&(D.meta=A),E&&(D.script.init_local_effect=E.init_local_effect),D.visit=h,"init"===D.status&&(D.site.db=d,D.site.api=l,(0,n.viLoad)(D,{api_url:t,site_id:i})),w&&(0,r.useEffect)(()=>{setTimeout(()=>{let A=D.page.navs[D.page.cur.id];A&&w({urls:Array.from(A),opt:{on_load(A){}}})},500)},[D.page.cur.id]),(0,I.jsx)(c.ErrorBox,{children:(0,I.jsx)(r.Suspense,{children:(0,I.jsx)(B.ViRoot,{})})})}},{"react/jsx-runtime":"QoA3A",react:"6Lppp","web-utils":"1hi6H","./load/load":"9mDWt","./render/global":"1IdeH","./render/render":"8FwN3","./render/script/extract-nav":"hXbWs","./root":"6ey3Y","./utils/error-box":"4gof8","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"9mDWt":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viLoad",()=>I);let I=(A,e)=>{A.status="loading",A.on_status_changes&&A.on_status_changes(A.status),A.site.id=e.site_id,A.site.api_url=e.api_url,A.status="ready",A.on_status_changes&&A.on_status_changes(A.status)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"1IdeH":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"ViGlobal",()=>I);let I={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}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"8FwN3":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"render_stat",()=>c),i.export(t,"ViRender",()=>Q),i.export(t,"ViChild",()=>l);var I=A("react/jsx-runtime"),r=A("react"),o=A("web-utils"),n=A("../utils/error-box"),g=A("./global"),a=A("./parts"),s=A("./script");let B={debug:!!localStorage.getItem("prasi-js-debug")},c={enabled:!1,meta:{}},Q=({meta:A,passprop:e,is_layout:t,parent_key:i,depth:r})=>{if(c.enabled){let e=c.meta;if(e[A.item.id]&&e[A.item.id].last_render===Math.floor(Date.now()/1e3)?e[A.item.id].count++:e[A.item.id]={last_render:Math.floor(Date.now()/1e3),count:1},e[A.item.id]?.count>70)return(0,I.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,I.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",A.item.name,"]"]}),(0,I.jsxs)("p",{className:"border-b border-orange-300 px-1 pb-1 min-w-[100px]",children:["Rendered ",e[A.item.id]?.count," times in less than 1 second."]})]})}if(!A||A.item.hidden)return null;if(B.debug){let e="";for(let A=0;A{let c=(0,o.useGlobal)(g.ViGlobal,"VI");if(t&&"children"===A.item.name){let A=[];for(let t of c.entry){let r=c.meta[t];if(r.item.adv?.js||r.item.component?.id)A.push((0,I.jsx)(n.ErrorBox,{meta:r,children:(0,I.jsx)(s.ViScript,{meta:r,is_layout:!1,passprop:{...e},parent_key:i,depth:B+1})}));else{let t=(0,a.viParts)(c,r,!1,e,B);c.visit&&c.visit(r,t),A.push((0,I.jsx)("div",{...t.props}))}}return(0,I.jsx)(I.Fragment,{children:A.map((A,e)=>(0,I.jsx)(r.Fragment,{children:A},e))})}let Q=(0,a.viParts)(c,A,t,e,B);return c.visit&&c.visit(A,Q),(0,I.jsx)("div",{...Q.props})}},{"react/jsx-runtime":"QoA3A",react:"6Lppp","web-utils":"1hi6H","../utils/error-box":"4gof8","./global":"1IdeH","./parts":"fUkcA","./script":"biZQo","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"4gof8":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"ErrorBox",()=>n);var I=A("react/jsx-runtime"),r=A("react-use-error-boundary"),o=A("web-utils");let n=(0,r.withErrorBoundary)(({children:A,meta:e,id:t,silent:i=!0})=>{let n=(0,o.useLocal)({retrying:!1,meta:e}),[g,a]=(0,r.useErrorBoundary)((A,e)=>{!0!==i&&console.warn(A)});return(e&&n.meta!==e&&(n.meta=e,setTimeout(a)),g)?(0,I.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,I.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",e?.item.name?"["+e.item.name+"]:":""]}),(0,I.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:n.retrying?(0,I.jsx)(I.Fragment,{children:"Retrying..."}):(0,I.jsx)(I.Fragment,{children:g.message})}),(0,I.jsx)("div",{className:"p-1",children:(0,I.jsx)("button",{onClick:()=>{n.retrying=!0,n.render(),setTimeout(()=>{n.retrying=!1,n.render(),a()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):A})},{"react/jsx-runtime":"QoA3A","react-use-error-boundary":"5QDO8","web-utils":"1hi6H","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],"5QDO8":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"ErrorBoundaryContext",()=>g),i.export(t,"withErrorBoundary",()=>a),i.export(t,"useErrorBoundary",()=>s);var I=A("react"),r=i.interopDefault(I);class o extends I.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...A){this.setState({}),this.props.onError(...A)}render(){return this.props.children}}let n=(0,I.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:()=>!1});function g({children:A}){let[e,t]=(0,I.useState)(),i=(0,I.useRef)(),g=(0,I.useMemo)(()=>({componentDidCatch:i,error:e,setError:t}),[e]);return(0,r.default).createElement(n.Provider,{value:g},(0,r.default).createElement(o,{error:e,onError:(A,e)=>{t(A),i.current?.(A,e)}},A))}function a(A){function e(e){return(0,r.default).createElement(g,null,(0,r.default).createElement(A,{key:"WrappedComponent",...e}))}return e.displayName=`WithErrorBoundary(${A.displayName??A.name??"Component"})`,e}function s(A){let e=(0,I.useContext)(n);e.componentDidCatch.current=A;let t=(0,I.useCallback)(()=>{e.setError(void 0)},[]);return[e.error,t]}g.displayName="ReactUseErrorBoundaryContext"},{react:"6Lppp","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],fUkcA:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"viParts",()=>n);var I=A("react/jsx-runtime"),r=A("../../../utils/css/gen"),o=A("./render");let n=(A,e,t,i,n)=>{let g,a;let s=e.item;s.component?.style&&(g={style:s.component.style,className:(0,r.produceCSS)(s.component.style,{mode:A.mode})});let B={className:(0,r.produceCSS)(s,{mode:A.mode}),inherit:g},c=e.item.childs;return"text"===e.item.type?(a=null,B.dangerouslySetInnerHTML={__html:e.item.html||""}):a=Array.isArray(c)&&c?.map(e=>{if(!e)return null;let{id:r}=e,g=t?A.layout?.meta[r]:A.meta[r];return g?I.jsx(o.ViRender,{meta:g,is_layout:t,passprop:{...i},depth:n+1},r):null}),B.children=a,e.item.adv?.html?(delete B.children,B.dangerouslySetInnerHTML={__html:e.item.adv?.html}):e.item.adv?.js&&!e.item.adv.js.includes("children")&&(delete B.children,delete B.dangerouslySetInnerHTML),{props:B,text_props:{}}}},{"react/jsx-runtime":"QoA3A","../../../utils/css/gen":"lljkd","./render":"8FwN3","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],lljkd:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"produceCSS",()=>c);var I=A("./advanced"),r=A("./background"),o=A("./border"),n=A("./dimension"),g=A("./editor"),a=A("./font"),s=A("./layout"),B=A("./padding");let c=(A,e)=>{try{return cx([A.id?`s-${A.id}`:"",css` display: flex; position: relative; user-select: none; @@ -333,4 +333,4 @@ ${e}`,c.pop(),`[${t}]`}let I=Object.keys(B),h=I.length;if(0===h)return"{}";if(g< ${d}`,p="",f="",u=Math.min(h,l);a(B)&&(p+=s(B,E,l),I=I.slice(B.length),u-=B.length,f=E),r&&(I=n(I)),c.push(B);for(let e=0;el&&(p+=`${f}"...": "${Q(h-l)} not stringified"`,f=E),""!==f&&(p=` ${d}${p} ${e}`),c.pop(),`{${p}}`}case"number":return isFinite(B)?String(B):e?e(B):"null";case"boolean":return!0===B?"true":"false";case"undefined":return;case"bigint":if(I)return String(B);default:return e?e(B):void 0}}("",A,[],c,"")}return function A(i,B,c){switch(typeof B){case"string":return o(B);case"object":{if(null===B)return"null";if("function"==typeof B.toJSON){if("object"!=typeof(B=B.toJSON(i)))return A(i,B,c);if(null===B)return"null"}if(-1!==c.indexOf(B))return t;let e="";if(Array.isArray(B)){if(0===B.length)return"[]";if(gl){let A=B.length-l-1;e+=`,"... ${Q(A)} not stringified"`}return c.pop(),`[${e}]`}let I=Object.keys(B),C=I.length;if(0===C)return"{}";if(gl&&(e+=`${d}"...":"${Q(C-l)} not stringified"`),c.pop(),`{${e}}`}case"number":return isFinite(B)?String(B):e?e(B):"null";case"boolean":return!0===B?"true":"false";case"undefined":return;case"bigint":if(I)return String(B);default:return e?e(B):void 0}}("",A,[])}}},{}],"6Ve6I":[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"SyncActionDefinition",()=>I),i.export(t,"SyncActionPaths",()=>r);let I={site:{list:"0",group:"1",load:"2",update:"3"},comp:{new:"4",list:"5",group:"6",load:"7"},page:{list:"8",load:"9",cache:"10"},yjs:{um:"11",sv_local:"12",diff_local:"13",sv_remote:"14"},client:{info:"15"},code:{load:"16",edit:"17",action:"18"}},r={0:"site.list",1:"site.group",2:"site.load",3:"site.update",4:"comp.new",5:"comp.list",6:"comp.group",7:"comp.load",8:"page.list",9:"page.load",10:"page.cache",11:"yjs.um",12:"yjs.sv_local",13:"yjs.diff_local",14:"yjs.sv_remote",15:"client.info",16:"code.load",17:"code.edit",18:"code.action"}},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],k5feh:[function(A,e,t){var i,I,r=A("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"SyncType",()=>I),(i=I||(I={}))[i.ClientID=0]="ClientID",i[i.UserID=1]="UserID",i[i.Event=2]="Event",i[i.Action=3]="Action",i[i.ActionResult=4]="ActionResult"},{"@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}],bZFhN:[function(A,e,t){var i=A("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(t),i.export(t,"initIDB",()=>r);var I=A("idb-keyval");let r=A=>(0,I.createStore)(`prasi-user-${A}`,"default")},{"idb-keyval":"hfWoV","@parcel/transformer-js/src/esmodule-helpers.js":"41Cak"}]},[],0,"parcelRequire2d1f"); -//# sourceMappingURL=ed.3253f060.js.map +//# sourceMappingURL=ed.31e5ec2b.js.map diff --git a/app/static/index.js b/app/static/index.js index 1d09fba0..6e0de370 100644 --- a/app/static/index.js +++ b/app/static/index.js @@ -1,4 +1,4 @@ -!function(e,t,r,n,a){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof l[n]&&l[n],i=o.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!i[t]){if(!e[t]){var a="function"==typeof l[n]&&l[n];if(!r&&a)return a(t,!0);if(o)return o(t,!0);if(s&&"string"==typeof t)return s(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var f=i[t]=new u.Module(t);e[t][0].call(f.exports,d,f,f.exports,this)}return i[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=i,u.parent=o,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return l[n]}}),l[n]=u;for(var c=0;c{let e={root:null},t=new URL(f.w.basehost||location.href),r=`${t.protocol}//${t.host}`;f.w._db=(0,s.dbProxy)(r);try{await (0,i.loadApiProxyDef)(r,!1),f.w._api=(0,o.apiProxy)(r)}catch(e){t.host&&console.warn("Failed to load API:",r)}f.w.serverurl=r,(0,c.sworkerRegister)(e),(0,l.defineReact)(),await (0,l.defineWindow)(!1),(0,c.sworkerAddCache)(r);let d=document.getElementById("root");d&&(e.root=(0,a.createRoot)(d),e.root.render((0,n.jsx)(u.Root,{})))})()},{"react/jsx-runtime":"QoA3A","react-dom/client":"7K1H5","web-utils":"1hi6H","./base/load/api/api-proxy":"gSUXN","./base/load/api/api-proxy-def":"ad3R8","./base/load/db/db-proxy":"gXSmQ","./base/root":"4pSjz","./index.css":"fW8RG","./sworker-boot":"kQgkP","./utils/types/general":"fBAQm"}],QoA3A:[function(e,t,r){t.exports=e("74c4d8b749aa4062")},{"74c4d8b749aa4062":"8Jufx"}],"8Jufx":[function(e,t,r){var n=e("ec7c466cd0540f08"),a=Symbol.for("react.element"),l=Symbol.for("react.fragment"),o=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,l={},u=null,c=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)o.call(t,n)&&!s.hasOwnProperty(n)&&(l[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===l[n]&&(l[n]=t[n]);return{$$typeof:a,type:e,key:u,ref:c,props:l,_owner:i.current}}r.Fragment=l,r.jsx=u,r.jsxs=u},{ec7c466cd0540f08:"6Lppp"}],"6Lppp":[function(e,t,r){t.exports=e("7fae94c780840210")},{"7fae94c780840210":"1Mqe8"}],"1Mqe8":[function(e,t,r){var n=Symbol.for("react.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator,m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function b(e,t,r){this.props=e,this.context=t,this.refs=y,this.updater=r||m}function v(){}function w(e,t,r){this.props=e,this.context=t,this.refs=y,this.updater=r||m}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)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")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},v.prototype=b.prototype;var _=w.prototype=new v;_.constructor=w,g(_,b.prototype),_.isPureReactComponent=!0;var k=Array.isArray,x=Object.prototype.hasOwnProperty,E={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,r){var a,l={},o=null,i=null;if(null!=t)for(a in void 0!==t.ref&&(i=t.ref),void 0!==t.key&&(o=""+t.key),t)x.call(t,a)&&!j.hasOwnProperty(a)&&(l[a]=t[a]);var s=arguments.length-2;if(1===s)l.children=r;else if(1