From 7c4b189e0086222fa24c2d90f922029e388d1ad3 Mon Sep 17 00:00:00 2001 From: Rizky Date: Wed, 17 Jul 2024 02:14:20 +0700 Subject: [PATCH] fix --- app/srv/api/nova-load.ts | 2 +- app/srv/core/chunk-RFBBAUMM.js | 2 -- app/srv/core/font-LBWDSK65.css | 2 -- app/srv/core/font-PD3WIDAZ.js | 2 -- app/srv/core/main.css | 1 - app/srv/core/main.js | 15 +++++++-------- app/web/src/index.tsx | 2 +- .../src/nova/ed/logic/tree/build/push-tree.tsx | 4 ++-- app/web/src/nova/ed/panel/side/prop-instance.tsx | 6 +++--- .../ed/panel/side/prop-instance/prop-button.tsx | 4 ++-- .../ed/panel/side/prop-instance/prop-option.tsx | 6 +++--- .../nova/ed/panel/tree/node/item/indent-hook.ts | 2 +- app/web/src/nova/prod/base/component.tsx | 2 +- app/web/src/nova/vi/load/load-legacy.tsx | 2 +- app/web/src/nova/vi/load/load-snapshot.tsx | 2 +- app/web/src/nova/vi/render/parts.tsx | 2 +- app/web/src/nova/vi/render/script/eval-script.tsx | 4 ++-- app/web/src/nova/vi/utils/error-box.tsx | 2 +- 18 files changed, 27 insertions(+), 35 deletions(-) delete mode 100644 app/srv/core/chunk-RFBBAUMM.js delete mode 100644 app/srv/core/font-LBWDSK65.css delete mode 100644 app/srv/core/font-PD3WIDAZ.js diff --git a/app/srv/api/nova-load.ts b/app/srv/api/nova-load.ts index 1ce9d7b8..8d694b2b 100644 --- a/app/srv/api/nova-load.ts +++ b/app/srv/api/nova-load.ts @@ -12,6 +12,6 @@ export const _ = { return new Response(file as any); } - return `console.warn("Script not found\n", " mode: ${mode}\\n", " id : ${id_site}")`; + return `console.error("Script not found\n", " mode: ${mode}\\n", " id : ${id_site}")`; }, }; diff --git a/app/srv/core/chunk-RFBBAUMM.js b/app/srv/core/chunk-RFBBAUMM.js deleted file mode 100644 index f913727b..00000000 --- a/app/srv/core/chunk-RFBBAUMM.js +++ /dev/null @@ -1,2 +0,0 @@ -var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c}; -//# sourceMappingURL=chunk-RFBBAUMM.js.map diff --git a/app/srv/core/font-LBWDSK65.css b/app/srv/core/font-LBWDSK65.css deleted file mode 100644 index 7e2eb55a..00000000 --- a/app/srv/core/font-LBWDSK65.css +++ /dev/null @@ -1,2 +0,0 @@ -@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD} -/*# sourceMappingURL=font-LBWDSK65.css.map */ diff --git a/app/srv/core/font-PD3WIDAZ.js b/app/srv/core/font-PD3WIDAZ.js deleted file mode 100644 index cecedcd2..00000000 --- a/app/srv/core/font-PD3WIDAZ.js +++ /dev/null @@ -1,2 +0,0 @@ -import"./chunk-RFBBAUMM.js"; -//# sourceMappingURL=font-PD3WIDAZ.js.map diff --git a/app/srv/core/main.css b/app/srv/core/main.css index f43fa0d4..811cb5cf 100644 --- a/app/srv/core/main.css +++ b/app/srv/core/main.css @@ -1,2 +1 @@ @font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-ext-400-normal.woff") format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-cyrillic-400-normal.woff2") format("woff2"),url("./source-sans-3-cyrillic-400-normal.woff") format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-ext-400-normal.woff") format("woff");unicode-range:U+1F00-1FFF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-greek-400-normal.woff2") format("woff2"),url("./source-sans-3-greek-400-normal.woff") format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-vietnamese-400-normal.woff2") format("woff2"),url("./source-sans-3-vietnamese-400-normal.woff") format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-ext-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-ext-400-normal.woff") format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Source Sans 3";font-style:normal;font-display:swap;font-weight:400;src:url("./source-sans-3-latin-400-normal.woff2") format("woff2"),url("./source-sans-3-latin-400-normal.woff") format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD} -/*# sourceMappingURL=main.css.map */ diff --git a/app/srv/core/main.js b/app/srv/core/main.js index a63f35a8..be26fc74 100644 --- a/app/srv/core/main.js +++ b/app/srv/core/main.js @@ -1,4 +1,4 @@ -import{a as ie,b as $1,c as P}from"./chunk-RFBBAUMM.js";var gp=ie(j=>{"use strict";var Ti=Symbol.for("react.element"),H1=Symbol.for("react.portal"),V1=Symbol.for("react.fragment"),W1=Symbol.for("react.strict_mode"),G1=Symbol.for("react.profiler"),Z1=Symbol.for("react.provider"),K1=Symbol.for("react.context"),Q1=Symbol.for("react.forward_ref"),q1=Symbol.for("react.suspense"),X1=Symbol.for("react.memo"),J1=Symbol.for("react.lazy"),sp=Symbol.iterator;function Y1(e){return e===null||typeof e!="object"?null:(e=sp&&e[sp]||e["@@iterator"],typeof e=="function"?e:null)}var up={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cp=Object.assign,fp={};function xr(e,t,n){this.props=e,this.context=t,this.refs=fp,this.updater=n||up}xr.prototype.isReactComponent={};xr.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")};xr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dp(){}dp.prototype=xr.prototype;function $a(e,t,n){this.props=e,this.context=t,this.refs=fp,this.updater=n||up}var Ha=$a.prototype=new dp;Ha.constructor=$a;cp(Ha,xr.prototype);Ha.isPureReactComponent=!0;var lp=Array.isArray,pp=Object.prototype.hasOwnProperty,Va={current:null},mp={key:!0,ref:!0,__self:!0,__source:!0};function hp(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)pp.call(t,r)&&!mp.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1{"use strict";yp.exports=gp()});var Cp=ie(K=>{"use strict";function Qa(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rgs(l,n))cgs(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else if(cgs(u,n))e[r]=u,e[c]=n,r=c;else break e}}return t}function gs(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(_p=performance,K.unstable_now=function(){return _p.now()}):(Ga=Date,vp=Ga.now(),K.unstable_now=function(){return Ga.now()-vp});var _p,Ga,vp,bt=[],cn=[],iw=1,tt=null,be=3,vs=!1,Vn=!1,Ni=!1,kp=typeof setTimeout=="function"?setTimeout:null,Sp=typeof clearTimeout=="function"?clearTimeout:null,wp=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function qa(e){for(var t=pt(cn);t!==null;){if(t.callback===null)_s(cn);else if(t.startTime<=e)_s(cn),t.sortIndex=t.expirationTime,Qa(bt,t);else break;t=pt(cn)}}function Xa(e){if(Ni=!1,qa(e),!Vn)if(pt(bt)!==null)Vn=!0,Ya(Ja);else{var t=pt(cn);t!==null&&eu(Xa,t.startTime-e)}}function Ja(e,t){Vn=!1,Ni&&(Ni=!1,Sp(Pi),Pi=-1),vs=!0;var n=be;try{for(qa(t),tt=pt(bt);tt!==null&&(!(tt.expirationTime>t)||e&&!Rp());){var r=tt.callback;if(typeof r=="function"){tt.callback=null,be=tt.priorityLevel;var i=r(tt.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?tt.callback=i:tt===pt(bt)&&_s(bt),qa(t)}else _s(bt);tt=pt(bt)}if(tt!==null)var o=!0;else{var s=pt(cn);s!==null&&eu(Xa,s.startTime-t),o=!1}return o}finally{tt=null,be=n,vs=!1}}var ws=!1,ys=null,Pi=-1,Ep=5,bp=-1;function Rp(){return!(K.unstable_now()-bpe||125r?(e.sortIndex=n,Qa(cn,e),pt(bt)===null&&e===pt(cn)&&(Ni?(Sp(Pi),Pi=-1):Ni=!0,eu(Xa,n-r))):(e.sortIndex=i,Qa(bt,e),Vn||vs||(Vn=!0,Ya(Ja))),e};K.unstable_shouldYield=Rp;K.unstable_wrapCallback=function(e){var t=be;return function(){var n=be;be=t;try{return e.apply(this,arguments)}finally{be=n}}}});var Tp=ie((o3,Ip)=>{"use strict";Ip.exports=Cp()});var D0=ie(Xe=>{"use strict";var Mm=_e(),Qe=Tp();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"),Su=Object.prototype.hasOwnProperty,ow=/^[: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]*$/,Op={},Np={};function sw(e){return Su.call(Np,e)?!0:Su.call(Op,e)?!1:ow.test(e)?Np[e]=!0:(Op[e]=!0,!1)}function lw(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 aw(e,t,n,r){if(t===null||typeof t>"u"||lw(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 De(e,t,n,r,i,o,s){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=s}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new De(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){xe[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var hc=/[\-:]([a-z])/g;function gc(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(hc,gc);xe[t]=new De(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(hc,gc);xe[t]=new De(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(hc,gc);xe[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function yc(e,t,n,r){var i=xe.hasOwnProperty(t)?xe[t]:null;(i!==null?i.type!==0:r||!(2{"use strict";var Ti=Symbol.for("react.element"),H1=Symbol.for("react.portal"),V1=Symbol.for("react.fragment"),W1=Symbol.for("react.strict_mode"),G1=Symbol.for("react.profiler"),Z1=Symbol.for("react.provider"),K1=Symbol.for("react.context"),Q1=Symbol.for("react.forward_ref"),q1=Symbol.for("react.suspense"),X1=Symbol.for("react.memo"),J1=Symbol.for("react.lazy"),sp=Symbol.iterator;function Y1(e){return e===null||typeof e!="object"?null:(e=sp&&e[sp]||e["@@iterator"],typeof e=="function"?e:null)}var up={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},cp=Object.assign,fp={};function xr(e,t,n){this.props=e,this.context=t,this.refs=fp,this.updater=n||up}xr.prototype.isReactComponent={};xr.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")};xr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function dp(){}dp.prototype=xr.prototype;function $a(e,t,n){this.props=e,this.context=t,this.refs=fp,this.updater=n||up}var Ha=$a.prototype=new dp;Ha.constructor=$a;cp(Ha,xr.prototype);Ha.isPureReactComponent=!0;var lp=Array.isArray,pp=Object.prototype.hasOwnProperty,Va={current:null},mp={key:!0,ref:!0,__self:!0,__source:!0};function hp(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)pp.call(t,r)&&!mp.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1{"use strict";yp.exports=gp()});var Cp=ie(K=>{"use strict";function Qa(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(0>>1;rgs(l,n))cgs(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else if(cgs(u,n))e[r]=u,e[c]=n,r=c;else break e}}return t}function gs(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(_p=performance,K.unstable_now=function(){return _p.now()}):(Ga=Date,vp=Ga.now(),K.unstable_now=function(){return Ga.now()-vp});var _p,Ga,vp,bt=[],cn=[],iw=1,tt=null,be=3,vs=!1,Vn=!1,Ni=!1,kp=typeof setTimeout=="function"?setTimeout:null,Sp=typeof clearTimeout=="function"?clearTimeout:null,wp=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function qa(e){for(var t=pt(cn);t!==null;){if(t.callback===null)_s(cn);else if(t.startTime<=e)_s(cn),t.sortIndex=t.expirationTime,Qa(bt,t);else break;t=pt(cn)}}function Xa(e){if(Ni=!1,qa(e),!Vn)if(pt(bt)!==null)Vn=!0,Ya(Ja);else{var t=pt(cn);t!==null&&eu(Xa,t.startTime-e)}}function Ja(e,t){Vn=!1,Ni&&(Ni=!1,Sp(Pi),Pi=-1),vs=!0;var n=be;try{for(qa(t),tt=pt(bt);tt!==null&&(!(tt.expirationTime>t)||e&&!Rp());){var r=tt.callback;if(typeof r=="function"){tt.callback=null,be=tt.priorityLevel;var i=r(tt.expirationTime<=t);t=K.unstable_now(),typeof i=="function"?tt.callback=i:tt===pt(bt)&&_s(bt),qa(t)}else _s(bt);tt=pt(bt)}if(tt!==null)var o=!0;else{var s=pt(cn);s!==null&&eu(Xa,s.startTime-t),o=!1}return o}finally{tt=null,be=n,vs=!1}}var ws=!1,ys=null,Pi=-1,Ep=5,bp=-1;function Rp(){return!(K.unstable_now()-bpe||125r?(e.sortIndex=n,Qa(cn,e),pt(bt)===null&&e===pt(cn)&&(Ni?(Sp(Pi),Pi=-1):Ni=!0,eu(Xa,n-r))):(e.sortIndex=i,Qa(bt,e),Vn||vs||(Vn=!0,Ya(Ja))),e};K.unstable_shouldYield=Rp;K.unstable_wrapCallback=function(e){var t=be;return function(){var n=be;be=t;try{return e.apply(this,arguments)}finally{be=n}}}});var Tp=ie((o3,Ip)=>{"use strict";Ip.exports=Cp()});var D0=ie(Xe=>{"use strict";var Mm=_e(),Qe=Tp();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"),Su=Object.prototype.hasOwnProperty,ow=/^[: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]*$/,Op={},Np={};function sw(e){return Su.call(Np,e)?!0:Su.call(Op,e)?!1:ow.test(e)?Np[e]=!0:(Op[e]=!0,!1)}function lw(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 aw(e,t,n,r){if(t===null||typeof t>"u"||lw(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 De(e,t,n,r,i,o,s){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=s}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new De(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new De(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new De(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new De(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){xe[e]=new De(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new De(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new De(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new De(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new De(e,5,!1,e.toLowerCase(),null,!1,!1)});var hc=/[\-:]([a-z])/g;function gc(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(hc,gc);xe[t]=new De(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(hc,gc);xe[t]=new De(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(hc,gc);xe[t]=new De(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new De("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new De(e,1,!1,e.toLowerCase(),null,!0,!0)});function yc(e,t,n,r){var i=xe.hasOwnProperty(t)?xe[t]:null;(i!==null?i.type!==0:r||!(2l||i[s]!==o[l]){var c=` @@ -15,7 +15,7 @@ Error generating stack: `+o.message+` } `),children:[(0,Oe.jsx)("div",{className:"text-[10px] text-slate-400 whitespace-nowrap",children:i}),(0,Oe.jsx)("div",{className:"pr-outer w-full h-[3px] flex items-stretch rounded-sm overflow-hidden",children:(0,Oe.jsx)("div",{className:cx("bg-blue-800 transition-all duration-200 rounded-sm w-full",css` transform: translate(${-100+l.value*200}%); - `)})}),o]})})]})};var Yl=P(_e());var lg=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};var An={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{},preload:[]},comp:{load:async()=>null},on_preload:void 0};var Uy=P(_e());var de=P(_e()),vf=class extends de.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},wk=()=>!1,ag=(0,de.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:wk});function ug({children:e}){let[t,n]=(0,de.useState)(),r=(0,de.useRef)(),i=(0,de.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return de.default.createElement(ag.Provider,{value:i},de.default.createElement(vf,{error:t,onError:(o,s)=>{n(o),r.current?.(o,s)}},e))}ug.displayName="ReactUseErrorBoundaryContext";function cg(e){function t(n){return de.default.createElement(ug,null,de.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function fg(e){let t=(0,de.useContext)(ag);t.componentDidCatch.current=e;let n=(0,de.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var at=P(G()),Nt=cg(({children:e,meta:t,id:n,silent:r=!0})=>{let i=Nn({retrying:!1,meta:t}),[o,s]=fg((c,u)=>{r!==!0&&console.warn(c)});t&&i.meta!==t&&(i.meta=t,setTimeout(s));let l=t;return o?(0,at.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,at.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",l?.item.name?"["+l.item.name+"]:":""]}),(0,at.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,at.jsx)(at.Fragment,{children:"Retrying..."}):(0,at.jsx)(at.Fragment,{children:o.message})}),(0,at.jsx)("div",{className:"p-1",children:(0,at.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),s()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});var He=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var dg=(e,t)=>{let n=He(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` + `)})}),o]})})]})};var Yl=P(_e());var lg=(e,t)=>{e.status="loading",e.on_status_changes&&e.on_status_changes(e.status),e.site.id=t.site_id,e.site.api_url=t.api_url,e.status="ready",e.on_status_changes&&e.on_status_changes(e.status)};var An={ts:0,status:"init",meta:{},entry:[],tick:0,mode:"desktop",site:{id:"",api_url:"",api:null,db:null},site_url:null,script:{init_local_effect:void 0},visit:void 0,on_status_changes:void 0,layout:void 0,page:{cur:{id:""},navs:{},preload:[]},comp:{load:async()=>null},on_preload:void 0};var Uy=P(_e());var de=P(_e()),vf=class extends de.Component{displayName="ReactUseErrorBoundary";componentDidCatch(...t){this.setState({}),this.props.onError(...t)}render(){return this.props.children}},wk=()=>!1,ag=(0,de.createContext)({componentDidCatch:{current:void 0},error:void 0,setError:wk});function ug({children:e}){let[t,n]=(0,de.useState)(),r=(0,de.useRef)(),i=(0,de.useMemo)(()=>({componentDidCatch:r,error:t,setError:n}),[t]);return de.default.createElement(ag.Provider,{value:i},de.default.createElement(vf,{error:t,onError:(o,s)=>{n(o),r.current?.(o,s)}},e))}ug.displayName="ReactUseErrorBoundaryContext";function cg(e){function t(n){return de.default.createElement(ug,null,de.default.createElement(e,{key:"WrappedComponent",...n}))}return t.displayName=`WithErrorBoundary(${e.displayName??e.name??"Component"})`,t}function fg(e){let t=(0,de.useContext)(ag);t.componentDidCatch.current=e;let n=(0,de.useCallback)(()=>{t.setError(void 0)},[]);return[t.error,n]}var at=P(G()),Nt=cg(({children:e,meta:t,id:n,silent:r=!0})=>{let i=Nn({retrying:!1,meta:t}),[o,s]=fg((c,u)=>{r!==!0&&console.error(c)});t&&i.meta!==t&&(i.meta=t,setTimeout(s));let l=t;return o?(0,at.jsxs)("div",{className:"bg-red-100 border border-red-300 rounded-sm text-xs flex flex-col items-center",children:[(0,at.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["ERROR ",l?.item.name?"["+l.item.name+"]:":""]}),(0,at.jsx)("p",{className:"border-b border-red-300 px-1 pb-1 min-w-[100px]",children:i.retrying?(0,at.jsx)(at.Fragment,{children:"Retrying..."}):(0,at.jsx)(at.Fragment,{children:o.message})}),(0,at.jsx)("div",{className:"p-1",children:(0,at.jsx)("button",{onClick:()=>{i.retrying=!0,i.render(),setTimeout(()=>{i.retrying=!1,i.render(),s()},100)},className:"bg-white border border-white hover:border-red-400 hover:bg-red-50 rounded px-2",children:"Try again"})})]}):e});var He=(e,t,n,r)=>{let i=e[t];return n==="desktop"||!n?!i&&e.mobile&&e.mobile[t]&&(i=e.mobile[t]):e.mobile&&e.mobile[t]&&(i=e.mobile[t]),i||(i=r),i};var dg=(e,t)=>{let n=He(e,"adv",t,{});return typeof n.css=="string"&&n.css.trim()?cx(css` ${n.css} `,t):""};var pg=(e,t)=>{let n=He(e,"bg",t,{size:"contain",pos:"center"}),r=`${serverurl}${n.url}`;return n&&n.url&&n.url.startsWith("http")&&(r=n.url),cx(` background-repeat: no-repeat; @@ -93,20 +93,20 @@ Error generating stack: `+o.message+` ${Ig(e,t.mode)} ${pg(e,t.mode)} ${Ng(e,t.mode)} - `,(t?.hover||t?.active)&&Og({item:e,hover:t?.hover,active:t?.active}),dg(e,t.mode)])}catch(n){console.log(n)}return cx([])};var Lg=P(G()),bo=(e,t,n,r,i)=>{let o=t.item,s;o.component?.style&&(s={style:o.component.style,className:Rf(o.component.style,{mode:e.mode})});let l={className:Rf(o,{mode:e.mode}),inherit:s},c={},u=t.item.childs,a;return t.item.type==="text"?(a=null,l.dangerouslySetInnerHTML={__html:t.item.html||""}):a=Array.isArray(u)&&u?.map(p=>{if(!p)return null;let{id:f}=p,d=n?e.layout?.meta[f]:e.meta[f];return d?(0,Lg.jsx)(en,{meta:d,is_layout:n,passprop:{...r},depth:i+1},f):(p.type==="item"&&p.component?.id&&console.warn(`Warning component ${p.name} - ${p.component.id} failed to load.`),null)}),l.children=a,t.item.adv?.html?(delete l.children,l.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete l.children,delete l.dangerouslySetInnerHTML),{props:l,text_props:c}};var Fy=P(_e());var My=P(Vl());var ni={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Wl(e={}){let t={options:e,rootNode:Ty(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)Iy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>tE(t,n(r)),insert:(r,i)=>Iy(t,n(r),i),remove:r=>nE(t,n(r))}}function tE(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,s=null,l=e.rootNode,c=null;for(let u=0;u1){let f=r.length-u;l=l.placeholderChildren.find(d=>d.maxDepth===f)||null}else l=l.placeholderChildren[0]||null;if(!l)break;l.paramName&&(i[l.paramName]=a),o=!0}else l=p}return(l===null||l.data===null)&&s!==null&&(l=s,i[l.paramName||"_"]=c,o=!0),l?o?{...l.data,params:o?i:void 0}:l.data:null}function Iy(e,t,n){let r=!0,i=t.split("/"),o=e.rootNode,s=0,l=[o];for(let c of i){let u;if(u=o.children.get(c))o=u;else{let a=rE(c);u=Ty({type:a,parent:o}),o.children.set(c,u),a===ni.PLACEHOLDER?(u.paramName=c==="*"?`_${s++}`:c.slice(1),o.placeholderChildren.push(u),r=!1):a===ni.WILDCARD&&(o.wildcardChildNode=u,u.paramName=c.slice(3)||"_",r=!1),l.push(u),o=u}}for(let[c,u]of l.entries())u.maxDepth=Math.max(l.length-c,u.maxDepth||0);return o.data=n,r===!0&&(e.staticRoutesMap[t]=o),o}function nE(e,t){let n=!1,r=t.split("/"),i=e.rootNode;for(let o of r)if(i=i.children.get(o),!i)return n;if(i.data){let o=r.at(-1)||"";i.data=null,Object.keys(i.children).length===0&&i.parent&&(i.parent.children.delete(o),i.parent.wildcardChildNode=null,i.parent.placeholderChildren=[]),n=!0}return n}function Ty(e={}){return{type:e.type||ni.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function rE(e){return e.startsWith("**")?ni.WILDCARD:e[0]===":"||e==="*"?ni.PLACEHOLDER:ni.NORMAL}var iE={id:"",name:"",domain:"",config:{api_url:""},js:"",js_compiled:"",responsive:"",layout:{id:"--",meta:void 0,entry:[]}},oE={id:"",name:"",url:"",snapshot:null,comps:{}};var Ne={active_id:!1,comp_id:!1,instance_comp_id:!1,instance_item_id:!1},ri={should_render_main:!0,hover:{id:""},scope:{},script_nav:{list:[],idx:-1},text:{id:"",content:"",timeout:null,el:null},get item_id(){return Ne.active_id===!1&&(Ne.active_id=localStorage.getItem("prasi-active-id")||""),Ne.active_id||""},set item_id(e){localStorage.setItem("prasi-active-id",e||""),Ne.active_id=e||""},get comp_id(){return Ne.comp_id===!1&&(Ne.comp_id=localStorage.getItem("prasi-comp-id")||""),Ne.comp_id||""},set comp_id(e){localStorage.setItem("prasi-comp-id",e||""),Ne.comp_id=e||""},instance:{get comp_id(){return Ne.instance_comp_id===!1&&(Ne.instance_comp_id=localStorage.getItem("prasi-instance-comp-id")||""),Ne.instance_comp_id||""},set comp_id(e){localStorage.setItem("prasi-instance-comp-id",e||""),Ne.instance_comp_id=e||""},get item_id(){return Ne.instance_item_id===!1&&(Ne.instance_item_id=localStorage.getItem("prasi-instance-item-id")||""),Ne.instance_item_id||""},set item_id(e){localStorage.setItem("prasi-instance-item-id",e||""),Ne.instance_item_id=e||""}}},HI={mode:"",user:{id:"",username:"",client_id:""},clients:{},status:"init",preview:{url_cache:new Set,route_cache:Wl(),page_cache:{},meta_cache:{}},sync:null,sync_assigned:!1,site:Jr(iE),site_tstamp:Date.now(),site_exports:{},site_dts:"",site_dts_entry:{},prisma_ext:"",script:{site_types:{},loaded:!1,do_edit:async(e,t)=>{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:oE,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,rebuilding:!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 Gl=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});var cr=P(_e());var Mn=window;var sE=hf("prasi-cache","prasi-cache-store"),Oy={timeout:null,store:sE},Zl=(e,t)=>{let n=[...Ny(t,"navigate(",")"),...Ny(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(Oy.timeout),Oy.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},Ny=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let s=e.indexOf(t,r);if(i=r,s>=0){let l=e[s+t.length];if(l==='"'||l==="'"||l==="`"){let c=e.indexOf(`${l}${n}`,s+t.length+1),u=e.substring(s+t.length+1,c);r=c+2+n.length,o.push(u)}}if(i===r)break}return o};var ur=P(_e());var Py=P(bf()),ar=P(_e());var Mf=P(G()),Ay=(e,t,n,r,i)=>o=>{let[s,l]=(0,ar.useState)({}),c=o.internal_key;n.item.script||(n.item.script={});let u=n.item.script;c&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[c]||(n.item.script_keyed[c]={}),u=n.item.script_keyed[c]),u.passprop||(u.passprop={});let a={};if(u.passprop){let d=!1;for(let[g,w]of Object.entries(o))["children","key"].includes(g)||(d=!0,a[g]=w)}let p={...r,...a};if(n.editor_props=p,!Array.isArray(o.children)&&(0,ar.isValidElement)(o.children)&&typeof o.children=="object"){let d=(0,Py.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(d)){let g=!0;for(let w of d)!(0,ar.isValidElement)(w)&&typeof w=="object"||(g=!1);if(g)return d.map(w=>{let _=e.meta[w.id];if(_||(e.meta[w.id]={item:w},_=e.meta[w.id]),_){if(Object.keys(_.item).length<=3&&_.mitem){let m={..._.item},h=_.mitem.toJSON();_.item={...h,...m}}return(0,Mf.jsx)(en,{is_layout:t,meta:_,passprop:p,parent_key:o.internal_key,depth:i},w.id)}return null})}}if(!Array.isArray(o.children)&&!(0,ar.isValidElement)(o.children)&&typeof o.children=="object"){let d=o.children.id;if(d){let g=e.meta[d];if(!g){e.meta[d]={item:o.children},g=e.meta[d];let w=g.item.component?.id;w&&e.comp.load(w).then(_=>{if(_){for(let[h,y]of Object.entries(_)){let v=g.item;v[h]||(v[h]=y)}let m=g.item.component?.props;for(let[h,y]of Object.entries(_.component?.props||{}))m[h]||(m[h]=y);l({})}})}return(0,Mf.jsx)(en,{is_layout:t,meta:g,passprop:p,parent_key:o.internal_key,depth:i})}}return zf(o,p,c?{parent_key:c}:void 0)},zf=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){if(r.children.length===1)return Df(r.children[0],r,t,n);let i=[];for(let o of r.children)i.push(Df(o,r,t,n));return i}return Df(r.children,r,t,n)},Df=(e,t,n,r)=>{if((0,ar.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var ii={},Ly=(e,t,n)=>r=>{let i=(["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550")&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:s,parent_key:l}=r,c=e.script?.init_local_effect,u=t?e.layout?.meta:e.meta,a=(0,ur.useRef)(ii[o]?ii[o]:r.value),[p,f]=(0,ur.useState)({}),d=a.current;return d.render=()=>{window.prasiContext.render?window.prasiContext.render():f({})},Kl(e,n,n.script?.scope,l),r.hook&&r.hook(d),(0,ur.useEffect)(()=>{if(n.parent?.instance_id&&u){let w=u[n.parent?.instance_id];if(w&&w.instances){for(let[_,m]of Object.entries(w.instances[n.parent.instance_id]))if(m===n.item.id){o=_;break}}}return!c[o]&&(typeof c=="object"&&(c[o]=!0),(async()=>r.effect&&(await r.effect(d),i&&(ii[o]=d)))()),()=>{}},[...r.deps||[],location.pathname]),(0,ur.useEffect)(()=>{i&&ii[o]===null&&(async()=>r.effect&&(await r.effect(d),i&&(ii[o]=d)))()},[ii[o]]),zf(s,{...n.script?.scope,[r.name]:d})};var jf=P(Vl()),No=window,oi=(e,t,n)=>{No.prasiEditDevItem||(No.prasiEditDevItem={});let r=No.prasiEditDevItem[n];r||(No.prasiEditDevItem[n]={},r=No.prasiEditDevItem[n]);let i=()=>{let s=t.get("id")||"",l=r[s];return l||(r[s]=[],l=r[s]),l},o=t.toJSON();return{...o,edit:{get props(){if(o.component?.props){let s={};for(let[l,c]of Object.entries(o.component.props))if(c.content){let u=t.get("component")?.get("props")?.get(l)?.get("content");u?s[l]={mode:"jsx",value:oi(e,u,n)}:s[l]={mode:"jsx",value:null}}else{let u=typeof c.valueBuilt=="string"?c.valueBuilt.trim():"";if(u.endsWith(`; + `,(t?.hover||t?.active)&&Og({item:e,hover:t?.hover,active:t?.active}),dg(e,t.mode)])}catch(n){console.log(n)}return cx([])};var Lg=P(G()),bo=(e,t,n,r,i)=>{let o=t.item,s;o.component?.style&&(s={style:o.component.style,className:Rf(o.component.style,{mode:e.mode})});let l={className:Rf(o,{mode:e.mode}),inherit:s},c={},u=t.item.childs,a;return t.item.type==="text"?(a=null,l.dangerouslySetInnerHTML={__html:t.item.html||""}):a=Array.isArray(u)&&u?.map(p=>{if(!p)return null;let{id:f}=p,d=n?e.layout?.meta[f]:e.meta[f];return d?(0,Lg.jsx)(en,{meta:d,is_layout:n,passprop:{...r},depth:i+1},f):(p.type==="item"&&p.component?.id&&console.error(`Warning component ${p.name} - ${p.component.id} failed to load.`),null)}),l.children=a,t.item.adv?.html?(delete l.children,l.dangerouslySetInnerHTML={__html:t.item.adv?.html}):t.item.adv?.js&&!t.item.adv.js.includes("children")&&(delete l.children,delete l.dangerouslySetInnerHTML),{props:l,text_props:c}};var Fy=P(_e());var My=P(Vl());var ni={NORMAL:0,WILDCARD:1,PLACEHOLDER:2};function Wl(e={}){let t={options:e,rootNode:Ty(),staticRoutesMap:{}},n=r=>e.strictTrailingSlash?r:r.replace(/\/$/,"")||"/";if(e.routes)for(let r in e.routes)Iy(t,n(r),e.routes[r]);return{ctx:t,lookup:r=>tE(t,n(r)),insert:(r,i)=>Iy(t,n(r),i),remove:r=>nE(t,n(r))}}function tE(e,t){let n=e.staticRoutesMap[t];if(n)return n.data;let r=t.split("/"),i={},o=!1,s=null,l=e.rootNode,c=null;for(let u=0;u1){let f=r.length-u;l=l.placeholderChildren.find(d=>d.maxDepth===f)||null}else l=l.placeholderChildren[0]||null;if(!l)break;l.paramName&&(i[l.paramName]=a),o=!0}else l=p}return(l===null||l.data===null)&&s!==null&&(l=s,i[l.paramName||"_"]=c,o=!0),l?o?{...l.data,params:o?i:void 0}:l.data:null}function Iy(e,t,n){let r=!0,i=t.split("/"),o=e.rootNode,s=0,l=[o];for(let c of i){let u;if(u=o.children.get(c))o=u;else{let a=rE(c);u=Ty({type:a,parent:o}),o.children.set(c,u),a===ni.PLACEHOLDER?(u.paramName=c==="*"?`_${s++}`:c.slice(1),o.placeholderChildren.push(u),r=!1):a===ni.WILDCARD&&(o.wildcardChildNode=u,u.paramName=c.slice(3)||"_",r=!1),l.push(u),o=u}}for(let[c,u]of l.entries())u.maxDepth=Math.max(l.length-c,u.maxDepth||0);return o.data=n,r===!0&&(e.staticRoutesMap[t]=o),o}function nE(e,t){let n=!1,r=t.split("/"),i=e.rootNode;for(let o of r)if(i=i.children.get(o),!i)return n;if(i.data){let o=r.at(-1)||"";i.data=null,Object.keys(i.children).length===0&&i.parent&&(i.parent.children.delete(o),i.parent.wildcardChildNode=null,i.parent.placeholderChildren=[]),n=!0}return n}function Ty(e={}){return{type:e.type||ni.NORMAL,maxDepth:0,parent:e.parent||null,children:new Map,data:e.data||null,paramName:e.paramName||null,wildcardChildNode:null,placeholderChildren:[]}}function rE(e){return e.startsWith("**")?ni.WILDCARD:e[0]===":"||e==="*"?ni.PLACEHOLDER:ni.NORMAL}var iE={id:"",name:"",domain:"",config:{api_url:""},js:"",js_compiled:"",responsive:"",layout:{id:"--",meta:void 0,entry:[]}},oE={id:"",name:"",url:"",snapshot:null,comps:{}};var Ne={active_id:!1,comp_id:!1,instance_comp_id:!1,instance_item_id:!1},ri={should_render_main:!0,hover:{id:""},scope:{},script_nav:{list:[],idx:-1},text:{id:"",content:"",timeout:null,el:null},get item_id(){return Ne.active_id===!1&&(Ne.active_id=localStorage.getItem("prasi-active-id")||""),Ne.active_id||""},set item_id(e){localStorage.setItem("prasi-active-id",e||""),Ne.active_id=e||""},get comp_id(){return Ne.comp_id===!1&&(Ne.comp_id=localStorage.getItem("prasi-comp-id")||""),Ne.comp_id||""},set comp_id(e){localStorage.setItem("prasi-comp-id",e||""),Ne.comp_id=e||""},instance:{get comp_id(){return Ne.instance_comp_id===!1&&(Ne.instance_comp_id=localStorage.getItem("prasi-instance-comp-id")||""),Ne.instance_comp_id||""},set comp_id(e){localStorage.setItem("prasi-instance-comp-id",e||""),Ne.instance_comp_id=e||""},get item_id(){return Ne.instance_item_id===!1&&(Ne.instance_item_id=localStorage.getItem("prasi-instance-item-id")||""),Ne.instance_item_id||""},set item_id(e){localStorage.setItem("prasi-instance-item-id",e||""),Ne.instance_item_id=e||""}}},HI={mode:"",user:{id:"",username:"",client_id:""},clients:{},status:"init",preview:{url_cache:new Set,route_cache:Wl(),page_cache:{},meta_cache:{}},sync:null,sync_assigned:!1,site:Jr(iE),site_tstamp:Date.now(),site_exports:{},site_dts:"",site_dts_entry:{},prisma_ext:"",script:{site_types:{},loaded:!1,do_edit:async(e,t)=>{},db:null,api:null,init_local_effect:{}},page:{history:{id:"",show:!1},root_id:"root",cur:oE,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,rebuilding:!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 Gl=e=>({isMobile:e.mode==="mobile",isDesktop:e.mode==="desktop",isEditor:location.pathname.startsWith("/ed/")});var cr=P(_e());var Mn=window;var sE=hf("prasi-cache","prasi-cache-store"),Oy={timeout:null,store:sE},Zl=(e,t)=>{let n=[...Ny(t,"navigate(",")"),...Ny(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(Oy.timeout),Oy.timeout=setTimeout(()=>{e.on_nav_loaded&&e.on_nav_loaded({urls:Array.from(e.page.navs[r])})},100)},Ny=(e,t,n)=>{let r=0,i=0,o=[];for(;;){let s=e.indexOf(t,r);if(i=r,s>=0){let l=e[s+t.length];if(l==='"'||l==="'"||l==="`"){let c=e.indexOf(`${l}${n}`,s+t.length+1),u=e.substring(s+t.length+1,c);r=c+2+n.length,o.push(u)}}if(i===r)break}return o};var ur=P(_e());var Py=P(bf()),ar=P(_e());var Mf=P(G()),Ay=(e,t,n,r,i)=>o=>{let[s,l]=(0,ar.useState)({}),c=o.internal_key;n.item.script||(n.item.script={});let u=n.item.script;c&&(n.item.script_keyed||(n.item.script_keyed={}),n.item.script_keyed[c]||(n.item.script_keyed[c]={}),u=n.item.script_keyed[c]),u.passprop||(u.passprop={});let a={};if(u.passprop){let d=!1;for(let[g,w]of Object.entries(o))["children","key"].includes(g)||(d=!0,a[g]=w)}let p={...r,...a};if(n.editor_props=p,!Array.isArray(o.children)&&(0,ar.isValidElement)(o.children)&&typeof o.children=="object"){let d=(0,Py.default)(o.children,"props.meta.item.component.props.child.content.childs");if(Array.isArray(d)){let g=!0;for(let w of d)!(0,ar.isValidElement)(w)&&typeof w=="object"||(g=!1);if(g)return d.map(w=>{let _=e.meta[w.id];if(_||(e.meta[w.id]={item:w},_=e.meta[w.id]),_){if(Object.keys(_.item).length<=3&&_.mitem){let m={..._.item},h=_.mitem.toJSON();_.item={...h,...m}}return(0,Mf.jsx)(en,{is_layout:t,meta:_,passprop:p,parent_key:o.internal_key,depth:i},w.id)}return null})}}if(!Array.isArray(o.children)&&!(0,ar.isValidElement)(o.children)&&typeof o.children=="object"){let d=o.children.id;if(d){let g=e.meta[d];if(!g){e.meta[d]={item:o.children},g=e.meta[d];let w=g.item.component?.id;w&&e.comp.load(w).then(_=>{if(_){for(let[h,y]of Object.entries(_)){let v=g.item;v[h]||(v[h]=y)}let m=g.item.component?.props;for(let[h,y]of Object.entries(_.component?.props||{}))m[h]||(m[h]=y);l({})}})}return(0,Mf.jsx)(en,{is_layout:t,meta:g,passprop:p,parent_key:o.internal_key,depth:i})}}return zf(o,p,c?{parent_key:c}:void 0)},zf=(e,t,n)=>{let r={};if(Array.isArray(e)?r.children=e:r=e,Array.isArray(r.children)){if(r.children.length===1)return Df(r.children[0],r,t,n);let i=[];for(let o of r.children)i.push(Df(o,r,t,n));return i}return Df(r.children,r,t,n)},Df=(e,t,n,r)=>{if((0,ar.isValidElement)(e)){let i={...t};return delete i.children,{...e,props:{...e.props,...r,passprop:{...n,...i}}}}return e};var ii={},Ly=(e,t,n)=>r=>{let i=(["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550")&&location.pathname.startsWith("/ed/"),o=n.item.id,{children:s,parent_key:l}=r,c=e.script?.init_local_effect,u=t?e.layout?.meta:e.meta,a=(0,ur.useRef)(ii[o]?ii[o]:r.value),[p,f]=(0,ur.useState)({}),d=a.current;return d.render=()=>{window.prasiContext.render?window.prasiContext.render():f({})},Kl(e,n,n.script?.scope,l),r.hook&&r.hook(d),(0,ur.useEffect)(()=>{if(n.parent?.instance_id&&u){let w=u[n.parent?.instance_id];if(w&&w.instances){for(let[_,m]of Object.entries(w.instances[n.parent.instance_id]))if(m===n.item.id){o=_;break}}}return!c[o]&&(typeof c=="object"&&(c[o]=!0),(async()=>r.effect&&(await r.effect(d),i&&(ii[o]=d)))()),()=>{}},[...r.deps||[],location.pathname]),(0,ur.useEffect)(()=>{i&&ii[o]===null&&(async()=>r.effect&&(await r.effect(d),i&&(ii[o]=d)))()},[ii[o]]),zf(s,{...n.script?.scope,[r.name]:d})};var jf=P(Vl()),No=window,oi=(e,t,n)=>{No.prasiEditDevItem||(No.prasiEditDevItem={});let r=No.prasiEditDevItem[n];r||(No.prasiEditDevItem[n]={},r=No.prasiEditDevItem[n]);let i=()=>{let s=t.get("id")||"",l=r[s];return l||(r[s]=[],l=r[s]),l},o=t.toJSON();return{...o,edit:{get props(){if(o.component?.props){let s={};for(let[l,c]of Object.entries(o.component.props))if(c.content){let u=t.get("component")?.get("props")?.get(l)?.get("content");u?s[l]={mode:"jsx",value:oi(e,u,n)}:s[l]={mode:"jsx",value:null}}else{let u=typeof c.valueBuilt=="string"?c.valueBuilt.trim():"";if(u.endsWith(`; `)&&(u=u.substring(0,u.length-2)),u&&u===c.value.trim()){let a=new Function(`return ${c.value}`);s[l]={mode:"string",value:a()}}else s[l]={mode:"raw",value:c.value,valueBuilt:c.valueBuilt}}return s}},get pending(){return[]},async commit(){let s={},l={};if(t){for(let[c,u]of Object.entries(r)){let a=e[c];if(!a||!a.mitem)continue;let f=a.mitem.toJSON();if(f&&f.component){let d=f?.component?.props;if(!d){console.log(f,d);return}let g={};for(let _ of u)if(_.type==="prop"&&d)d[_.name]&&(_.mode==="string"?(d[_.name].value=JSON.stringify(_.value),d[_.name].valueBuilt=JSON.stringify(_.value)):_.mode==="raw"?(d[_.name].value=_.value,_.valueBuilt?d[_.name].valueBuilt=_.valueBuilt:g[_.name]=_.value):_.mode==="jsx"&&(d[_.name]||(d[_.name]={meta:{type:"content-element"}}),_.value&&(d[_.name].content=si([_.value],l)[0])));else if(_.type==="set"&&typeof _.value=="object")for(let[m,h]of Object.entries(_.value))f[m]=h;else if(_.type==="child"&&Array.isArray(_.childs))if(f.component?.id)f.component.props||(f.component.props={}),f.component.props.child={meta:{type:"content-element"},content:{type:"item",id:(0,jf.createId)(),name:"child",childs:si(_.childs.filter(m=>m),l)}};else{let m=si(_.childs.filter(h=>h),l);f.childs=m}for(let[_,m]of Object.entries(l))g[_]=m.value;let w=await _api.code_build(g);if(d)for(let[_,m]of Object.entries(w))d[_]?d[_].valueBuilt=m:l[_]&&(l[_].valueBuilt=m);s[c]=f}}t.doc?.transact(()=>{for(let[c,u]of Object.entries(s)){let a=e[c];a.mitem&&syncronize(a.mitem,u)}})}},setValue(s,l){let c=i(),u=l;if(s==="childs")throw new Error("Please modify childs via .child");c.push({type:"set",name:s,value:u})},setProp(s,l){let c=i();typeof l=="string"?c.push({type:"prop",mode:"string",name:s,value:l}):l.mode==="string"?c.push({type:"prop",mode:"string",name:s,value:l.value}):l.mode==="raw"?c.push({type:"prop",mode:"raw",name:s,value:l.value,valueBuilt:l.valueBuilt}):l.mode==="jsx"&&c.push({type:"prop",mode:"jsx",name:s,value:l.value})},setChilds(s){i().push({type:"child",childs:s})},get childs(){let s=t?.toJSON();if(s.component?.id){if((s.component?.props.child).content){let c=t.get("component")?.get("props")?.get("child")?.get("content");if(c)return[oi(e,c,n)]}return[]}return s.childs?s.childs.map(l=>{if(l){let c=e[l.id];if(c&&c.mitem)return oi(e,c.mitem,n)}}).filter(l=>l):[]},get parent(){if(t){let s=t.parent.toJSON();if(Array.isArray(s)){let l=(t.parent?.parent).get("id"),c=e[l].mitem;if(c)return{item:oi(e,c,n),child_type:"child",child_idx:s.findIndex(u=>u.id===o.id)}}}return null}}}},lE=(e,t)=>{let n={};for(let[r,i]of Object.entries(e))i.mode?i.mode==="string"?n[r]={value:JSON.stringify(i.value),valueBuilt:JSON.stringify(i.value),meta:{type:"text"}}:i.mode==="jsx"&&i.value?n[r]={value:"",valueBuilt:"",content:si([i.value],t)[0],meta:{type:"content-element"}}:i.mode==="raw"&&(n[r]={value:i.value,valueBuilt:i.valueBuilt,meta:{type:"text"}}):n[r]=i;return n},si=(e,t)=>{let n=t||{};return e.map(i=>{let o={...i};if(delete o.edit,o.id||(o.id=(0,jf.createId)()),o.component&&(o.component.instances||(o.component.instances={}),o.component.ref_ids||(o.component.ref_ids={}),o.component?.props)){o.component.props=lE(o.component.props,n);for(let[s,l]of Object.entries(o.component.props))!l.valueBuilt&&l.value&&(n[o.id+"|||"+s]=l),l.content&&(l.content=si([l.content],n)[0])}return o.childs?o.childs=si(o.childs,n):o.childs=[],o})};var li=(e,t,n)=>({...t,edit:{setChilds(r){},get childs(){if(t.component?.id){let r=t.component?.props.child;return r.content?[li(e,r.content,n)]:[]}return t.childs?t.childs.map(r=>{if(r){let i=e[r.id];if(i&&i.item)return li(e,i.item,n)}}).filter(r=>r):[]},get props(){if(t.component?.props){let r={};for(let[i,o]of Object.entries(t.component.props))if(o.content){let s=t.component?.props?.[i]?.content;s?r[i]={mode:"jsx",value:li(e,s,n)}:r[i]={mode:"jsx",value:null}}else{let s=typeof o.valueBuilt=="string"?o.valueBuilt.trim():"";if(s.endsWith(`; `)&&(s=s.substring(0,s.length-2)),s&&s===o.value.trim()){let l=new Function(`return ${o.value}`);r[i]={mode:"string",value:l()}}else r[i]={mode:"raw",value:o.value,valueBuilt:o.valueBuilt}}return r}},async commit(){},get parent(){let r=e[t.id];if(r&&r.parent?.id){let i=e[r.parent.id];return li(e,i.item,n)}return null},pending:[],setProp(r,i){},setValue(r,i){}}});var Ff=P(G()),Dy=(e,t,n,r,i,o)=>{let s=bo(e,t,n,r,i);e.visit&&e.visit(t,s),t.script?t.script.scope=r:t.script={scope:r,result:null,Local:Ly(e,n,t),PassProp:Ay(e,n,t,r,i)};let l=t.script,c=window.exports,u={useEffect:cr.useEffect,children:s.props.children,props:s.props,Local:l?.Local,db:e.site.db,api:e.site.api,PassProp:l?.PassProp,ErrorBox:Nt,newElement:()=>{},__props:r,_item:t.mitem?oi(e.meta,t.mitem,e.page.cur.id):li(e.meta,t.item,e.page.cur.id),_meta:e.meta,render:f=>{let d=f;if((0,cr.isValidElement)(f)&&f.props.children){let g=_=>{let m=!1,h=[];if((0,cr.isValidElement)(_)){if(_.type===t.script?.PassProp)return{should_replace:!0,el:{..._,props:{..._.props,internal_key:_.key}}};if(Array.isArray(_.props?.children))for(let y of _.props?.children)if(Array.isArray(y)){let v=[],S=!1;for(let b of y){let k=g(b);k.should_replace?(v.push(k.el),S=!0):v.push(b)}S?(m=!0,h.push(v)):h.push(y)}else typeof y=="object"&&y?y.type===t.script?.PassProp&&(m=!0,h.push({...y,props:{...y.props,internal_key:y.props.key}})):h.push(y)}return{should_replace:m,el:{..._,props:{..._.props,children:h}}}},w=g(f);w.should_replace&&(d=w.el)}l&&(l.result=(0,Ff.jsx)(cr.Suspense,{children:d}))},params,...Gl(e),...c,...r};if(typeof r=="object"){for(let[f,d]of Object.entries(r))if(typeof d=="object"&&d&&d._jsx){let g=d;u[f]=(0,Ff.jsx)(aE,{fn:g.fn,passprop:{...r},meta:t})}}!Mn.isEditor&&t.item.adv?.js&&Zl(e,t.item.adv.js);let a=t.item.adv?.jsBuilt||"",p=Bf(a,Uf)||"";try{new Function(...Object.keys(u),"___js",`// ${t.item.name}: ${t.item.id} try { ${p} } catch(e) { - console.warn("Error at item ${t.item.name}:", ___js); + console.error("Error at item ${t.item.name}:", ___js); console.error(e); } - `)(...Object.values(u),t.item.adv?.js)}catch(f){console.warn(`Error at item ${t.item.name}:`,t.item.adv?.js),console.error(f)}Kl(e,t,r,o)},aE=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),Uf={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},Bf=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var jy=P(G());var zy=(e,t,n,r,i,o)=>{if(t.item.component?.id){let s=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),s=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),s=t.item.script),!s)return;let c={...window.exports,db:e.site.db,api:e.site.api,...Gl(e),...r,params};s.props={};let u=new Set;if(t.item.component.props){let a={};for(let[p,f]of Object.entries(t.item.component.props))try{if(f.meta?.type==="content-element"){let m={_jsx:!0,fn:h=>{let y=f.content?.id;if(y){let v=n?e.layout?.meta[y]:e.meta[y];if(!v)return null;let S=t.instances;if(!h.meta.item.originalId||!S||!S[t.item.id])return null;let k=h.meta.item.originalId;if(v.mitem&&(f.jsxCalledBy&&(!f.jsxCalledBy.includes(k)||f.jsxCalledBy.length!==2)||!f.jsxCalledBy)){let R=t.mitem?.get("component")?.get("props")?.get(p);if(R){let O=R.get("jsxCalledBy");!O||typeof O!="object"?R.set("jsxCalledBy",[t.item.id,k]):Array.isArray(O)&&(!O.includes(k)||O.length!==2||O[0]!==t.item.id||O[1]!==k)&&R.set("jsxCalledBy",[t.item.id,k])}}return(0,jy.jsx)(en,{meta:v,passprop:h.passprop,is_layout:n,depth:i+1})}return null}};c[p]=m,r&&(r[p]=m);continue}if(f.value&&Zl(e,f.value),!f.valueBuilt&&f.value&&t.mitem){let m=t.mitem?.get("component")?.get("props")?.get(p);if(m){uE(m,f.value);return}}let d=f.valueBuilt||"",g=Bf(d,Uf)||"",w=new Function(...Object.keys(c),`// [${t.item.name}] ${p}: ${t.item.id} + `)(...Object.values(u),t.item.adv?.js)}catch(f){console.error(`Error at item ${t.item.name}:`,t.item.adv?.js),console.error(f)}Kl(e,t,r,o)},aE=({fn:e,meta:t,passprop:n})=>e({passprop:n,meta:t}),Uf={"stroke-width":"strokeWidth","fill-rule":"fillRule","clip-rule":"clipRule","stroke-linejoin":"strokeLinejoin","stroke-linecap":"strokeLinecap","clip-path":"clipPath"},Bf=(e,t)=>{let n=e;for(let[r,i]of Object.entries(t))n=n.replaceAll(r,i);return n};var jy=P(G());var zy=(e,t,n,r,i,o)=>{if(t.item.component?.id){let s=t.item.script;if(o?(t.item.script_keyed||(t.item.script_keyed={}),t.item.script_keyed[o]||(t.item.script_keyed[o]={}),s=t.item.script_keyed[o]):(t.item.script||(t.item.script={}),s=t.item.script),!s)return;let c={...window.exports,db:e.site.db,api:e.site.api,...Gl(e),...r,params};s.props={};let u=new Set;if(t.item.component.props){let a={};for(let[p,f]of Object.entries(t.item.component.props))try{if(f.meta?.type==="content-element"){let m={_jsx:!0,fn:h=>{let y=f.content?.id;if(y){let v=n?e.layout?.meta[y]:e.meta[y];if(!v)return null;let S=t.instances;if(!h.meta.item.originalId||!S||!S[t.item.id])return null;let k=h.meta.item.originalId;if(v.mitem&&(f.jsxCalledBy&&(!f.jsxCalledBy.includes(k)||f.jsxCalledBy.length!==2)||!f.jsxCalledBy)){let R=t.mitem?.get("component")?.get("props")?.get(p);if(R){let O=R.get("jsxCalledBy");!O||typeof O!="object"?R.set("jsxCalledBy",[t.item.id,k]):Array.isArray(O)&&(!O.includes(k)||O.length!==2||O[0]!==t.item.id||O[1]!==k)&&R.set("jsxCalledBy",[t.item.id,k])}}return(0,jy.jsx)(en,{meta:v,passprop:h.passprop,is_layout:n,depth:i+1})}return null}};c[p]=m,r&&(r[p]=m);continue}if(f.value&&Zl(e,f.value),!f.valueBuilt&&f.value&&t.mitem){let m=t.mitem?.get("component")?.get("props")?.get(p);if(m){uE(m,f.value);return}}let d=f.valueBuilt||"",g=Bf(d,Uf)||"",w=new Function(...Object.keys(c),`// [${t.item.name}] ${p}: ${t.item.id} return ${g} `);s.props[p]={value:g,valueBuilt:g};let _=w(...Object.values(c));typeof _=="function"&&(s.props[p].fn=_,_=(...m)=>t.item.script?.props?.[p].fn(...m)),c[p]=_,a[p]=_,r&&(r[p]=_)}catch{u.add(p)}if(location.pathname.startsWith("/ed/")&&ri.item_id&&t.item.id===ri.item_id){ri.scope={};for(let[p,f]of Object.entries(r))ri.scope[p]=f;ri.scope.self_props=a}}}},ut={timeout:null,set:new WeakSet,map:{},src:{}},uE=(e,t)=>{if(!ut.set.has(e)){ut.set.add(e);let n=(0,My.createId)();ut.map[n]={mprop:e},ut.src[n]=t}clearTimeout(ut.timeout),ut.timeout=setTimeout(async()=>{let n=await _api.code_build(ut.src),r=null;for(let[i,o]of Object.entries(n)){let s=ut.map[i].mprop;if(!r&&s.doc){r=s.doc;break}}r&&(r.transact(()=>{for(let[i,o]of Object.entries(n))ut.map[i].mprop.set("valueBuilt",o)}),ut.set=new WeakSet,ut.map={},ut.src={})},300)},Kl=(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[s,l]of Object.entries(i.props))if(l.fn){let c=new Function(...Object.keys(o),`// [${t.item.name}] ${s}: ${t.item.id} return ${l.value||""} - `);l.fn=c(...Object.values(o))}}};var $f=P(G()),Hf=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=Pn(An,"VI"),[s,l]=(0,Fy.useState)({});e.render=()=>{l({})};let c=t;return e.item.component?.id&&(c||(c={}),zy(o,e,n,c,i,r)),e.item.adv?.html?(0,$f.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i}):e.item.adv?.js&&(Dy(o,e,n,c,i,r),e.script)?e.script.result:(0,$f.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i})};var Se=P(G()),cE=70,fE={debug:!!localStorage.getItem("prasi-js-debug")},ql={enabled:!1,meta:{}},en=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(ql.enabled){let o=ql.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>cE)return(0,Se.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,Se.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,Se.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(fE.debug){let o="";for(let s=0;s{let o=Pn(An,"VI");if(n&&e.item.name==="children"){let l=[];for(let c of o.entry){let u=o.meta[c];if(u.item.adv?.js||u.item.component?.id)l.push((0,Se.jsx)(Nt,{meta:u,children:(0,Se.jsx)(Hf,{meta:u,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let a=bo(o,u,!1,t,i);o.visit&&o.visit(u,a),l.push((0,Se.jsx)("div",{...a.props}))}}return(0,Se.jsx)(Se.Fragment,{children:l.map((c,u)=>(0,Se.jsx)(Uy.Fragment,{children:c},u))})}let s=bo(o,e,n,t,i);return o.visit&&o.visit(e,s),(0,Se.jsx)("div",{...s.props})};var Je=window,By=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Je.notif?.onTap){let s=null,l=0;await new Promise(()=>{s=setInterval(()=>{l++,l>20&&clearInterval(s),o()&&clearInterval(s)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Je.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(!Je.notif?.onTap){i(()=>Je.notif?.onTap?(Je.notif?.onTap(r.notif),!0):!1);return}Je.notif?.onTap&&Je.notif?.onTap(r.notif);break;case"notification-receive":Je.notif?.onReceive||i(()=>Je.notif?.onReceive?(Je.notif?.onReceive(r.notif),!0):!1),Je.notif?.onReceive&&Je.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Je.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 Vf=window;Vf.prasi_ext||(Vf.prasi_ext={});var Xl=Vf.prasi_ext;var $y=async e=>{let t=Xl[e.site.id];if(t||(Xl[e.site.id]={status:"init"},t=Xl[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 By(e,t),t.status="ready"}};var ai=P(G()),Hy=({})=>{let e=Pn(An,"VI"),t=Nn({tick:Date.now()});if(e.tick=t.tick,$y(e),e.status!=="ready")return(0,ai.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,ai.jsx)(So,{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,ai.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,ai.jsx)(Nt,{children:(0,ai.jsx)(en,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Jl=P(G()),At=window;At.prasi_internal||(At.prasi_internal={page:{id:""}});var Vy=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:s,visit:l,script:c,preloaded:u,page_id:a,render_stat:p,on_status_changed:f,on_preload:d,layout:g,comp_load:w})=>{let _=Pn(An,"VI");return _.mode=o,_.entry=t,_.on_preload=d,_.comp.load=w,a&&(At.prasi_internal.page.id=a),At.siteurl=(m,h)=>{if(m.startsWith("http://")||m.startsWith("https://"))return m;try{["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550"?_.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 y=_.site_url,v=m;return v.startsWith("/")||(v="/"+v),At.prasiContext.siteUrl&&(v=At.prasiContext.siteUrl(v)),`${y.protocol}//${y.host}${v}`}return m},At.isMobile=o==="mobile",At.isDesktop=o==="desktop",At.preloaded=u||(m=>{}),At.preload=(m,h)=>{if(_.on_preload)return new Promise(y=>{_.page.navs[a]||(_.page.navs[a]=new Set);let v=_.page.navs[a],S=typeof m=="string"?[m]:m,b=!0;for(let k of S)v.has(k)||(v.add(k),b=!1);b?y():(_.page.preload.push(y),_.on_preload?.({urls:Array.from(_.page.navs[a]),opt:{on_load:(...k)=>{h?.on_load?.(...k);for(let R of _.page.preload)R();_.page.preload=[],_.render()}}}))})},_.layout=g,_.page.cur.id=a,_.on_status_changes=f,p==="disabled"&&(ql.enabled=!1),_.meta!==e&&(_.meta=e),c&&(_.script.init_local_effect=c.init_local_effect),_.visit=l,_.status==="init"&&(_.site.db=s,_.site.api=i,lg(_,{api_url:n,site_id:r})),d&&(0,Yl.useEffect)(()=>{setTimeout(()=>{let m=_.page.navs[_.page.cur.id];m&&d({urls:Array.from(m),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,Jl.jsx)(Nt,{children:(0,Jl.jsx)(Yl.Suspense,{children:(0,Jl.jsx)(Hy,{})})})};var ui=async(e,t)=>{let n=C.comp;for(let i of e)i&&i.type!=="text"&&ea(i,t);let r=Object.keys(n.pending);if(r.length>0)try{let i=await(await fetch(C.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...r]})})).json();for(let[o,s]of Object.entries(i))delete n.pending[o],n.list[o]=s,await zl(`comp-${o}`,s);if(Object.keys(n.pending).length>0){console.warn(`Warning: component not found: ${Object.keys(n.pending)}`);return}await ui(Object.values(i))}catch(i){console.error(i)}},ea=(e,t)=>{let n=C.comp;if(e.type==="item"){let r=e.component?.id;if(r){if(!n.list[r]&&!n.pending[r]&&(n.pending[r]=[]),n.pending[r]&&(n.pending[r].find(i=>i.id===e.id)||n.pending[r].push(e)),n.pending[r]&&n.list[r]){for(let i of n.pending[r])for(let o of Object.values(i.component?.props||{}))o.content&&ea(o.content,t);delete n.pending[r]}if(e.component?.props)for(let i of Object.values(e.component?.props||{}))i.content&&ea(i.content,t)}}if(e.childs)for(let r of e.childs){let i=r;i&&i.type!=="text"&&ea(i,t)}};var Wy=e=>new Promise(async t=>{let n=!1,r=await gf(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(C.url`_prasi/page/${e}`)).json();n||t(i)}),dE=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let s of r){let l=await gf(`page-${s}`);if(l)n[s]=l;else{i=!1;break}}i&&t(n);let o=await(await fetch(C.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),Gy=async e=>{let t=e.map(r=>C.route.router?.lookup(r)).filter(r=>r&&r.id);return await dE(t.map(r=>r?.id))};var Ky=P(Zy()),Qy=()=>{let e=C;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,Ky.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 Ao(e,t){return function(){return e.apply(t,arguments)}}var{toString:pE}=Object.prototype,{getPrototypeOf:Zf}=Object,ra=(e=>t=>{let n=pE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xt=e=>(e=e.toLowerCase(),t=>ra(t)===e),ia=e=>t=>typeof t===e,{isArray:ci}=Array,Lo=ia("undefined");function mE(e){return e!==null&&!Lo(e)&&e.constructor!==null&&!Lo(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Jy=xt("ArrayBuffer");function hE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Jy(e.buffer),t}var gE=ia("string"),ct=ia("function"),Yy=ia("number"),oa=e=>e!==null&&typeof e=="object",yE=e=>e===!0||e===!1,na=e=>{if(ra(e)!=="object")return!1;let t=Zf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_E=xt("Date"),vE=xt("File"),wE=xt("Blob"),xE=xt("FileList"),kE=e=>oa(e)&&ct(e.pipe),SE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=ra(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},EE=xt("URLSearchParams"),[bE,RE,CE,IE]=["ReadableStream","Request","Response","Headers"].map(xt),TE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Do(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ci(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var t_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,n_=e=>!Lo(e)&&e!==t_;function Gf(){let{caseless:e}=n_(this)&&this||{},t={},n=(r,i)=>{let o=e&&e_(t,i)||i;na(t[o])&&na(r)?t[o]=Gf(t[o],r):na(r)?t[o]=Gf({},r):ci(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Do(t,(i,o)=>{n&&ct(i)?e[o]=Ao(i,n):e[o]=i},{allOwnKeys:r}),e),NE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PE=(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)},AE=(e,t,n,r)=>{let i,o,s,l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Zf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},LE=(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},DE=e=>{if(!e)return null;if(ci(e))return e;let t=e.length;if(!Yy(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ME=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zf(Uint8Array)),zE=(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])}},jE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},FE=xt("HTMLFormElement"),UE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),qy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),BE=xt("RegExp"),r_=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Do(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},$E=e=>{r_(e,(t,n)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ct(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},HE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ci(e)?r(e):r(String(e).split(t)),n},VE=()=>{},WE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Wf="abcdefghijklmnopqrstuvwxyz",Xy="0123456789",i_={DIGIT:Xy,ALPHA:Wf,ALPHA_DIGIT:Wf+Wf.toUpperCase()+Xy},GE=(e=16,t=i_.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ZE(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var KE=e=>{let t=new Array(10),n=(r,i)=>{if(oa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ci(r)?[]:{};return Do(r,(s,l)=>{let c=n(s,i+1);!Lo(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},QE=xt("AsyncFunction"),qE=e=>e&&(oa(e)||ct(e))&&ct(e.then)&&ct(e.catch),x={isArray:ci,isArrayBuffer:Jy,isBuffer:mE,isFormData:SE,isArrayBufferView:hE,isString:gE,isNumber:Yy,isBoolean:yE,isObject:oa,isPlainObject:na,isReadableStream:bE,isRequest:RE,isResponse:CE,isHeaders:IE,isUndefined:Lo,isDate:_E,isFile:vE,isBlob:wE,isRegExp:BE,isFunction:ct,isStream:kE,isURLSearchParams:EE,isTypedArray:ME,isFileList:xE,forEach:Do,merge:Gf,extend:OE,trim:TE,stripBOM:NE,inherits:PE,toFlatObject:AE,kindOf:ra,kindOfTest:xt,endsWith:LE,toArray:DE,forEachEntry:zE,matchAll:jE,isHTMLForm:FE,hasOwnProperty:qy,hasOwnProp:qy,reduceDescriptors:r_,freezeMethods:$E,toObjectSet:HE,toCamelCase:UE,noop:VE,toFiniteNumber:WE,findKey:e_,global:t_,isContextDefined:n_,ALPHABET:i_,generateString:GE,isSpecCompliantForm:ZE,toJSONObject:KE,isAsyncFn:QE,isThenable:qE};function fi(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(fi,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 o_=fi.prototype,s_={};["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=>{s_[e]={value:e}});Object.defineProperties(fi,s_);Object.defineProperty(o_,"isAxiosError",{value:!0});fi.from=(e,t,n,r,i,o)=>{let s=Object.create(o_);return x.toFlatObject(e,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),fi.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var D=fi;var sa=null;function Kf(e){return x.isPlainObject(e)||x.isArray(e)}function a_(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function l_(e,t,n){return e?e.concat(t).map(function(i,o){return i=a_(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function XE(e){return x.isArray(e)&&!e.some(Kf)}var JE=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function YE(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(sa||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||a,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(x.isDate(g))return g.toISOString();if(!c&&x.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(g)||x.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function a(g,w,_){let m=g;if(g&&!_&&typeof g=="object"){if(x.endsWith(w,"{}"))w=r?w:w.slice(0,-2),g=JSON.stringify(g);else if(x.isArray(g)&&XE(g)||(x.isFileList(g)||x.endsWith(w,"[]"))&&(m=x.toArray(g)))return w=a_(w),m.forEach(function(y,v){!(x.isUndefined(y)||y===null)&&t.append(s===!0?l_([w],v,o):s===null?w:w+"[]",u(y))}),!1}return Kf(g)?!0:(t.append(l_(_,w,o),u(g)),!1)}let p=[],f=Object.assign(JE,{defaultVisitor:a,convertValue:u,isVisitable:Kf});function d(g,w){if(!x.isUndefined(g)){if(p.indexOf(g)!==-1)throw Error("Circular reference detected in "+w.join("."));p.push(g),x.forEach(g,function(m,h){(!(x.isUndefined(m)||m===null)&&i.call(t,m,x.isString(h)?h.trim():h,w,f))===!0&&d(m,w?w.concat(h):[h])}),p.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return d(e),t}var zn=YE;function u_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function c_(e,t){this._pairs=[],e&&zn(e,this,t)}var f_=c_.prototype;f_.append=function(t,n){this._pairs.push([t,n])};f_.toString=function(t){let n=t?function(r){return t.call(this,r,u_)}:u_;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var la=c_;function e2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mo(e,t,n){if(!t)return e;let r=n&&n.encode||e2,i=n&&n.serialize,o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new la(t,n).toString(r),o){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Qf=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)})}},qf=Qf;var aa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var d_=typeof URLSearchParams<"u"?URLSearchParams:la;var p_=typeof FormData<"u"?FormData:null;var m_=typeof Blob<"u"?Blob:null;var h_={isBrowser:!0,classes:{URLSearchParams:d_,FormData:p_,Blob:m_},protocols:["http","https","file","blob","url","data"]};var Jf={};$1(Jf,{hasBrowserEnv:()=>Xf,hasStandardBrowserEnv:()=>t2,hasStandardBrowserWebWorkerEnv:()=>n2,origin:()=>r2});var Xf=typeof window<"u"&&typeof document<"u",t2=(e=>Xf&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),n2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r2=Xf&&window.location.href||"http://localhost";var ge={...Jf,...h_};function Yf(e,t){return zn(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return ge.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function i2(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function o2(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return s=!s&&x.isArray(i)?i.length:s,c?(x.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!l):((!i[s]||!x.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&x.isArray(i[s])&&(i[s]=o2(i[s])),!l)}if(x.isFormData(e)&&x.isFunction(e.entries)){let n={};return x.forEachEntry(e,(r,i)=>{t(i2(r),i,n,0)}),n}return null}var ua=s2;function l2(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 ed={transitional:aa,adapter:["xhr","http","fetch"],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(ua(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(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 l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Yf(t,this.formSerializer).toString();if((l=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return zn(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),l2(t)):t}],transformResponse:[function(t){let n=this.transitional||ed.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||i)){let s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?D.from(l,D.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.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=>{ed.headers[e]={}});var di=ed;var a2=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"]),g_=e=>{let t={},n,r,i;return e&&e.split(` + `);l.fn=c(...Object.values(o))}}};var $f=P(G()),Hf=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{let o=Pn(An,"VI"),[s,l]=(0,Fy.useState)({});e.render=()=>{l({})};let c=t;return e.item.component?.id&&(c||(c={}),zy(o,e,n,c,i,r)),e.item.adv?.html?(0,$f.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i}):e.item.adv?.js&&(Dy(o,e,n,c,i,r),e.script)?e.script.result:(0,$f.jsx)(Ql,{meta:e,passprop:c,is_layout:n,depth:i})};var Se=P(G()),cE=70,fE={debug:!!localStorage.getItem("prasi-js-debug")},ql={enabled:!1,meta:{}},en=({meta:e,passprop:t,is_layout:n,parent_key:r,depth:i})=>{if(ql.enabled){let o=ql.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>cE)return(0,Se.jsxs)("div",{className:"bg-orange-100 border border-orange-300 rounded-sm text-xs flex flex-col items-center",children:[(0,Se.jsxs)("div",{className:"text-[10px] font-bold text-red-900 self-stretch px-1",children:["WARNING: Render loop detected in [",e.item.name,"]"]}),(0,Se.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(fE.debug){let o="";for(let s=0;s{let o=Pn(An,"VI");if(n&&e.item.name==="children"){let l=[];for(let c of o.entry){let u=o.meta[c];if(u.item.adv?.js||u.item.component?.id)l.push((0,Se.jsx)(Nt,{meta:u,children:(0,Se.jsx)(Hf,{meta:u,is_layout:!1,passprop:{...t},parent_key:r,depth:i+1})}));else{let a=bo(o,u,!1,t,i);o.visit&&o.visit(u,a),l.push((0,Se.jsx)("div",{...a.props}))}}return(0,Se.jsx)(Se.Fragment,{children:l.map((c,u)=>(0,Se.jsx)(Uy.Fragment,{children:c},u))})}let s=bo(o,e,n,t,i);return o.visit&&o.visit(e,s),(0,Se.jsx)("div",{...s.props})};var Je=window,By=async(e,t)=>{window.parent&&(window.addEventListener("message",async({data:n})=>{if(typeof n=="object"&&n.mobile){let r=n,i=async o=>{if(!Je.notif?.onTap){let s=null,l=0;await new Promise(()=>{s=setInterval(()=>{l++,l>20&&clearInterval(s),o()&&clearInterval(s)},500)});return}};switch(r.type){case"notification-token":t.notif={token:r.token},Je.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(!Je.notif?.onTap){i(()=>Je.notif?.onTap?(Je.notif?.onTap(r.notif),!0):!1);return}Je.notif?.onTap&&Je.notif?.onTap(r.notif);break;case"notification-receive":Je.notif?.onReceive||i(()=>Je.notif?.onReceive?(Je.notif?.onReceive(r.notif),!0):!1),Je.notif?.onReceive&&Je.notif?.onReceive(r.notif);break}}}),window.parent.postMessage({mobile:!0,type:"ready"},"*")),Je.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 Vf=window;Vf.prasi_ext||(Vf.prasi_ext={});var Xl=Vf.prasi_ext;var $y=async e=>{let t=Xl[e.site.id];if(t||(Xl[e.site.id]={status:"init"},t=Xl[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 By(e,t),t.status="ready"}};var ai=P(G()),Hy=({})=>{let e=Pn(An,"VI"),t=Nn({tick:Date.now()});if(e.tick=t.tick,$y(e),e.status!=="ready")return(0,ai.jsx)("div",{className:"flex flex-1 flex-col relative",children:(0,ai.jsx)(So,{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,ai.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,ai.jsx)(Nt,{children:(0,ai.jsx)(en,{meta:o,is_layout:n,depth:0})},o.item.id):null})})};var Jl=P(G()),At=window;At.prasi_internal||(At.prasi_internal={page:{id:""}});var Vy=({meta:e,entry:t,api_url:n,site_id:r,api:i,mode:o,db:s,visit:l,script:c,preloaded:u,page_id:a,render_stat:p,on_status_changed:f,on_preload:d,layout:g,comp_load:w})=>{let _=Pn(An,"VI");return _.mode=o,_.entry=t,_.on_preload=d,_.comp.load=w,a&&(At.prasi_internal.page.id=a),At.siteurl=(m,h)=>{if(m.startsWith("http://")||m.startsWith("https://"))return m;try{["prasi.avolut.com"].includes(location.hostname)||location.host==="localhost:4550"?_.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 y=_.site_url,v=m;return v.startsWith("/")||(v="/"+v),At.prasiContext.siteUrl&&(v=At.prasiContext.siteUrl(v)),`${y.protocol}//${y.host}${v}`}return m},At.isMobile=o==="mobile",At.isDesktop=o==="desktop",At.preloaded=u||(m=>{}),At.preload=(m,h)=>{if(_.on_preload)return new Promise(y=>{_.page.navs[a]||(_.page.navs[a]=new Set);let v=_.page.navs[a],S=typeof m=="string"?[m]:m,b=!0;for(let k of S)v.has(k)||(v.add(k),b=!1);b?y():(_.page.preload.push(y),_.on_preload?.({urls:Array.from(_.page.navs[a]),opt:{on_load:(...k)=>{h?.on_load?.(...k);for(let R of _.page.preload)R();_.page.preload=[],_.render()}}}))})},_.layout=g,_.page.cur.id=a,_.on_status_changes=f,p==="disabled"&&(ql.enabled=!1),_.meta!==e&&(_.meta=e),c&&(_.script.init_local_effect=c.init_local_effect),_.visit=l,_.status==="init"&&(_.site.db=s,_.site.api=i,lg(_,{api_url:n,site_id:r})),d&&(0,Yl.useEffect)(()=>{setTimeout(()=>{let m=_.page.navs[_.page.cur.id];m&&d({urls:Array.from(m),opt:{on_load(h){}}})},500)},[_.page.cur.id]),(0,Jl.jsx)(Nt,{children:(0,Jl.jsx)(Yl.Suspense,{children:(0,Jl.jsx)(Hy,{})})})};var ui=async(e,t)=>{let n=C.comp;for(let i of e)i&&i.type!=="text"&&ea(i,t);let r=Object.keys(n.pending);if(r.length>0)try{let i=await(await fetch(C.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[...r]})})).json();for(let[o,s]of Object.entries(i))delete n.pending[o],n.list[o]=s,await zl(`comp-${o}`,s);if(Object.keys(n.pending).length>0){console.error(`Warning: component not found: ${Object.keys(n.pending)}`);return}await ui(Object.values(i))}catch(i){console.error(i)}},ea=(e,t)=>{let n=C.comp;if(e.type==="item"){let r=e.component?.id;if(r){if(!n.list[r]&&!n.pending[r]&&(n.pending[r]=[]),n.pending[r]&&(n.pending[r].find(i=>i.id===e.id)||n.pending[r].push(e)),n.pending[r]&&n.list[r]){for(let i of n.pending[r])for(let o of Object.values(i.component?.props||{}))o.content&&ea(o.content,t);delete n.pending[r]}if(e.component?.props)for(let i of Object.values(e.component?.props||{}))i.content&&ea(i.content,t)}}if(e.childs)for(let r of e.childs){let i=r;i&&i.type!=="text"&&ea(i,t)}};var Wy=e=>new Promise(async t=>{let n=!1,r=await gf(`page-${e}`);r&&(t(r),n=!0);let i=await(await fetch(C.url`_prasi/page/${e}`)).json();n||t(i)}),dE=e=>new Promise(async t=>{let n={},r=[...new Set(e)],i=!0;for(let s of r){let l=await gf(`page-${s}`);if(l)n[s]=l;else{i=!1;break}}i&&t(n);let o=await(await fetch(C.url`_prasi/pages`,{method:"POST",body:JSON.stringify({ids:r})})).json();i||t(o)}),Gy=async e=>{let t=e.map(r=>C.route.router?.lookup(r)).filter(r=>r&&r.id);return await dE(t.map(r=>r?.id))};var Ky=P(Zy()),Qy=()=>{let e=C;if(e.site.id){if(!e.mode&&e.site.responsive)if(e.site.responsive!=="mobile-only"&&e.site.responsive!=="desktop-only"){let t=(0,Ky.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 Ao(e,t){return function(){return e.apply(t,arguments)}}var{toString:pE}=Object.prototype,{getPrototypeOf:Zf}=Object,ra=(e=>t=>{let n=pE.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xt=e=>(e=e.toLowerCase(),t=>ra(t)===e),ia=e=>t=>typeof t===e,{isArray:ci}=Array,Lo=ia("undefined");function mE(e){return e!==null&&!Lo(e)&&e.constructor!==null&&!Lo(e.constructor)&&ct(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Jy=xt("ArrayBuffer");function hE(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Jy(e.buffer),t}var gE=ia("string"),ct=ia("function"),Yy=ia("number"),oa=e=>e!==null&&typeof e=="object",yE=e=>e===!0||e===!1,na=e=>{if(ra(e)!=="object")return!1;let t=Zf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},_E=xt("Date"),vE=xt("File"),wE=xt("Blob"),xE=xt("FileList"),kE=e=>oa(e)&&ct(e.pipe),SE=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ct(e.append)&&((t=ra(e))==="formdata"||t==="object"&&ct(e.toString)&&e.toString()==="[object FormData]"))},EE=xt("URLSearchParams"),[bE,RE,CE,IE]=["ReadableStream","Request","Response","Headers"].map(xt),TE=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Do(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),ci(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}var t_=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,n_=e=>!Lo(e)&&e!==t_;function Gf(){let{caseless:e}=n_(this)&&this||{},t={},n=(r,i)=>{let o=e&&e_(t,i)||i;na(t[o])&&na(r)?t[o]=Gf(t[o],r):na(r)?t[o]=Gf({},r):ci(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(Do(t,(i,o)=>{n&&ct(i)?e[o]=Ao(i,n):e[o]=i},{allOwnKeys:r}),e),NE=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),PE=(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)},AE=(e,t,n,r)=>{let i,o,s,l={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)s=i[o],(!r||r(s,e,t))&&!l[s]&&(t[s]=e[s],l[s]=!0);e=n!==!1&&Zf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},LE=(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},DE=e=>{if(!e)return null;if(ci(e))return e;let t=e.length;if(!Yy(t))return null;let n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ME=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Zf(Uint8Array)),zE=(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])}},jE=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},FE=xt("HTMLFormElement"),UE=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),qy=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),BE=xt("RegExp"),r_=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};Do(n,(i,o)=>{let s;(s=t(i,o,e))!==!1&&(r[o]=s||i)}),Object.defineProperties(e,r)},$E=e=>{r_(e,(t,n)=>{if(ct(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;let r=e[n];if(ct(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},HE=(e,t)=>{let n={},r=i=>{i.forEach(o=>{n[o]=!0})};return ci(e)?r(e):r(String(e).split(t)),n},VE=()=>{},WE=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Wf="abcdefghijklmnopqrstuvwxyz",Xy="0123456789",i_={DIGIT:Xy,ALPHA:Wf,ALPHA_DIGIT:Wf+Wf.toUpperCase()+Xy},GE=(e=16,t=i_.ALPHA_DIGIT)=>{let n="",{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function ZE(e){return!!(e&&ct(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}var KE=e=>{let t=new Array(10),n=(r,i)=>{if(oa(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;let o=ci(r)?[]:{};return Do(r,(s,l)=>{let c=n(s,i+1);!Lo(c)&&(o[l]=c)}),t[i]=void 0,o}}return r};return n(e,0)},QE=xt("AsyncFunction"),qE=e=>e&&(oa(e)||ct(e))&&ct(e.then)&&ct(e.catch),x={isArray:ci,isArrayBuffer:Jy,isBuffer:mE,isFormData:SE,isArrayBufferView:hE,isString:gE,isNumber:Yy,isBoolean:yE,isObject:oa,isPlainObject:na,isReadableStream:bE,isRequest:RE,isResponse:CE,isHeaders:IE,isUndefined:Lo,isDate:_E,isFile:vE,isBlob:wE,isRegExp:BE,isFunction:ct,isStream:kE,isURLSearchParams:EE,isTypedArray:ME,isFileList:xE,forEach:Do,merge:Gf,extend:OE,trim:TE,stripBOM:NE,inherits:PE,toFlatObject:AE,kindOf:ra,kindOfTest:xt,endsWith:LE,toArray:DE,forEachEntry:zE,matchAll:jE,isHTMLForm:FE,hasOwnProperty:qy,hasOwnProp:qy,reduceDescriptors:r_,freezeMethods:$E,toObjectSet:HE,toCamelCase:UE,noop:VE,toFiniteNumber:WE,findKey:e_,global:t_,isContextDefined:n_,ALPHABET:i_,generateString:GE,isSpecCompliantForm:ZE,toJSONObject:KE,isAsyncFn:QE,isThenable:qE};function fi(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(fi,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 o_=fi.prototype,s_={};["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=>{s_[e]={value:e}});Object.defineProperties(fi,s_);Object.defineProperty(o_,"isAxiosError",{value:!0});fi.from=(e,t,n,r,i,o)=>{let s=Object.create(o_);return x.toFlatObject(e,s,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),fi.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,o&&Object.assign(s,o),s};var D=fi;var sa=null;function Kf(e){return x.isPlainObject(e)||x.isArray(e)}function a_(e){return x.endsWith(e,"[]")?e.slice(0,-2):e}function l_(e,t,n){return e?e.concat(t).map(function(i,o){return i=a_(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function XE(e){return x.isArray(e)&&!e.some(Kf)}var JE=x.toFlatObject(x,{},null,function(t){return/^is[A-Z]/.test(t)});function YE(e,t,n){if(!x.isObject(e))throw new TypeError("target must be an object");t=t||new(sa||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||a,o=n.dots,s=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&x.isSpecCompliantForm(t);if(!x.isFunction(i))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(x.isDate(g))return g.toISOString();if(!c&&x.isBlob(g))throw new D("Blob is not supported. Use a Buffer instead.");return x.isArrayBuffer(g)||x.isTypedArray(g)?c&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function a(g,w,_){let m=g;if(g&&!_&&typeof g=="object"){if(x.endsWith(w,"{}"))w=r?w:w.slice(0,-2),g=JSON.stringify(g);else if(x.isArray(g)&&XE(g)||(x.isFileList(g)||x.endsWith(w,"[]"))&&(m=x.toArray(g)))return w=a_(w),m.forEach(function(y,v){!(x.isUndefined(y)||y===null)&&t.append(s===!0?l_([w],v,o):s===null?w:w+"[]",u(y))}),!1}return Kf(g)?!0:(t.append(l_(_,w,o),u(g)),!1)}let p=[],f=Object.assign(JE,{defaultVisitor:a,convertValue:u,isVisitable:Kf});function d(g,w){if(!x.isUndefined(g)){if(p.indexOf(g)!==-1)throw Error("Circular reference detected in "+w.join("."));p.push(g),x.forEach(g,function(m,h){(!(x.isUndefined(m)||m===null)&&i.call(t,m,x.isString(h)?h.trim():h,w,f))===!0&&d(m,w?w.concat(h):[h])}),p.pop()}}if(!x.isObject(e))throw new TypeError("data must be an object");return d(e),t}var zn=YE;function u_(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function c_(e,t){this._pairs=[],e&&zn(e,this,t)}var f_=c_.prototype;f_.append=function(t,n){this._pairs.push([t,n])};f_.toString=function(t){let n=t?function(r){return t.call(this,r,u_)}:u_;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};var la=c_;function e2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mo(e,t,n){if(!t)return e;let r=n&&n.encode||e2,i=n&&n.serialize,o;if(i?o=i(t,n):o=x.isURLSearchParams(t)?t.toString():new la(t,n).toString(r),o){let s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}var Qf=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)})}},qf=Qf;var aa={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var d_=typeof URLSearchParams<"u"?URLSearchParams:la;var p_=typeof FormData<"u"?FormData:null;var m_=typeof Blob<"u"?Blob:null;var h_={isBrowser:!0,classes:{URLSearchParams:d_,FormData:p_,Blob:m_},protocols:["http","https","file","blob","url","data"]};var Jf={};$1(Jf,{hasBrowserEnv:()=>Xf,hasStandardBrowserEnv:()=>t2,hasStandardBrowserWebWorkerEnv:()=>n2,origin:()=>r2});var Xf=typeof window<"u"&&typeof document<"u",t2=(e=>Xf&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),n2=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",r2=Xf&&window.location.href||"http://localhost";var ge={...Jf,...h_};function Yf(e,t){return zn(e,new ge.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return ge.isNode&&x.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function i2(e){return x.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function o2(e){let t={},n=Object.keys(e),r,i=n.length,o;for(r=0;r=n.length;return s=!s&&x.isArray(i)?i.length:s,c?(x.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!l):((!i[s]||!x.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],o)&&x.isArray(i[s])&&(i[s]=o2(i[s])),!l)}if(x.isFormData(e)&&x.isFunction(e.entries)){let n={};return x.forEachEntry(e,(r,i)=>{t(i2(r),i,n,0)}),n}return null}var ua=s2;function l2(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 ed={transitional:aa,adapter:["xhr","http","fetch"],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(ua(t)):t;if(x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)||x.isReadableStream(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 l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Yf(t,this.formSerializer).toString();if((l=x.isFileList(t))||r.indexOf("multipart/form-data")>-1){let c=this.env&&this.env.FormData;return zn(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),l2(t)):t}],transformResponse:[function(t){let n=this.transitional||ed.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(x.isResponse(t)||x.isReadableStream(t))return t;if(t&&x.isString(t)&&(r&&!this.responseType||i)){let s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(l){if(s)throw l.name==="SyntaxError"?D.from(l,D.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.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=>{ed.headers[e]={}});var di=ed;var a2=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"]),g_=e=>{let t={},n,r,i;return e&&e.split(` `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&a2[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};var y_=Symbol("internals");function zo(e){return e&&String(e).trim().toLowerCase()}function ca(e){return e===!1||e==null?e:x.isArray(e)?e.map(ca):String(e)}function u2(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 c2=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function td(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 f2(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function d2(e,t){let n=x.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,s){return this[r].call(this,t,i,o,s)},configurable:!0})})}var pi=class{constructor(t){t&&this.set(t)}set(t,n,r){let i=this;function o(l,c,u){let a=zo(c);if(!a)throw new Error("header name must be a non-empty string");let p=x.findKey(i,a);(!p||i[p]===void 0||u===!0||u===void 0&&i[p]!==!1)&&(i[p||c]=ca(l))}let s=(l,c)=>x.forEach(l,(u,a)=>o(u,a,c));if(x.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(x.isString(t)&&(t=t.trim())&&!c2(t))s(g_(t),n);else if(x.isHeaders(t))for(let[l,c]of t.entries())o(c,l,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=zo(t),t){let r=x.findKey(this,t);if(r){let i=this[r];if(!n)return i;if(n===!0)return u2(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=zo(t),t){let r=x.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||td(this,this[r],r,n)))}return!1}delete(t,n){let r=this,i=!1;function o(s){if(s=zo(s),s){let l=x.findKey(r,s);l&&(!n||td(r,r[l],l,n))&&(delete r[l],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||td(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 s=x.findKey(r,o);if(s){n[s]=ca(i),delete n[o];return}let l=t?f2(o):String(o).trim();l!==o&&delete n[o],n[l]=ca(i),r[l]=!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[y_]=this[y_]={accessors:{}}).accessors,i=this.prototype;function o(s){let l=zo(s);r[l]||(d2(i,s),r[l]=!0)}return x.isArray(t)?t.forEach(o):o(t),this}};pi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);x.reduceDescriptors(pi.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});x.freezeMethods(pi);var pe=pi;function jo(e,t){let n=this||di,r=t||n,i=pe.from(r.headers),o=r.data;return x.forEach(e,function(l){o=l.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Fo(e){return!!(e&&e.__CANCEL__)}function __(e,t,n){D.call(this,e??"canceled",D.ERR_CANCELED,t,n),this.name="CanceledError"}x.inherits(__,D,{__CANCEL__:!0});var Lt=__;function Uo(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))}function nd(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function p2(e,t){e=e||10;let n=new Array(e),r=new Array(e),i=0,o=0,s;return t=t!==void 0?t:1e3,function(c){let u=Date.now(),a=r[o];s||(s=u),n[i]=c,r[i]=u;let p=o,f=0;for(;p!==i;)f+=n[p++],p=p%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),u-sr)return i&&(clearTimeout(i),i=null),n=l,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(l-n)))}}var w_=m2;var mi=(e,t,n=3)=>{let r=0,i=v_(50,250);return w_(o=>{let s=o.loaded,l=o.lengthComputable?o.total:void 0,c=s-r,u=i(c),a=s<=l;r=s;let p={loaded:s,total:l,progress:l?s/l:void 0,bytes:c,rate:u||void 0,estimated:u&&l&&a?(l-s)/u:void 0,event:o,lengthComputable:l!=null};p[t?"download":"upload"]=!0,e(p)},n)};var x_=ge.hasStandardBrowserEnv?function(){let t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){let s=o;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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(s){let l=x.isString(s)?i(s):s;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();var k_=ge.hasStandardBrowserEnv?{write(e,t,n,r,i,o){let s=[e+"="+encodeURIComponent(t)];x.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),x.isString(r)&&s.push("path="+r),x.isString(i)&&s.push("domain="+i),o===!0&&s.push("secure"),document.cookie=s.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 rd(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function id(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Bo(e,t){return e&&!rd(t)?id(e,t):t}var S_=e=>e instanceof pe?{...e}:e;function kt(e,t){t=t||{};let n={};function r(u,a,p){return x.isPlainObject(u)&&x.isPlainObject(a)?x.merge.call({caseless:p},u,a):x.isPlainObject(a)?x.merge({},a):x.isArray(a)?a.slice():a}function i(u,a,p){if(x.isUndefined(a)){if(!x.isUndefined(u))return r(void 0,u,p)}else return r(u,a,p)}function o(u,a){if(!x.isUndefined(a))return r(void 0,a)}function s(u,a){if(x.isUndefined(a)){if(!x.isUndefined(u))return r(void 0,u)}else return r(void 0,a)}function l(u,a,p){if(p in t)return r(u,a);if(p in e)return r(void 0,u)}let c={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l,headers:(u,a)=>i(S_(u),S_(a),!0)};return x.forEach(Object.keys(Object.assign({},e,t)),function(a){let p=c[a]||i,f=p(e[a],t[a],a);x.isUndefined(f)&&p!==l||(n[a]=f)}),n}var fa=e=>{let t=kt({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:s,auth:l}=t;t.headers=s=pe.from(s),t.url=Mo(Bo(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(x.isFormData(n)){if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((c=s.getContentType())!==!1){let[u,...a]=c?c.split(";").map(p=>p.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...a].join("; "))}}if(ge.hasStandardBrowserEnv&&(r&&x.isFunction(r)&&(r=r(t)),r||r!==!1&&x_(t.url))){let u=i&&o&&k_.read(o);u&&s.set(i,u)}return t};var h2=typeof XMLHttpRequest<"u",E_=h2&&function(e){return new Promise(function(n,r){let i=fa(e),o=i.data,s=pe.from(i.headers).normalize(),{responseType:l}=i,c;function u(){i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let a=new XMLHttpRequest;a.open(i.method.toUpperCase(),i.url,!0),a.timeout=i.timeout;function p(){if(!a)return;let d=pe.from("getAllResponseHeaders"in a&&a.getAllResponseHeaders()),w={data:!l||l==="text"||l==="json"?a.responseText:a.response,status:a.status,statusText:a.statusText,headers:d,config:e,request:a};Uo(function(m){n(m),u()},function(m){r(m),u()},w),a=null}"onloadend"in a?a.onloadend=p:a.onreadystatechange=function(){!a||a.readyState!==4||a.status===0&&!(a.responseURL&&a.responseURL.indexOf("file:")===0)||setTimeout(p)},a.onabort=function(){a&&(r(new D("Request aborted",D.ECONNABORTED,i,a)),a=null)},a.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,i,a)),a=null},a.ontimeout=function(){let g=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded",w=i.transitional||aa;i.timeoutErrorMessage&&(g=i.timeoutErrorMessage),r(new D(g,w.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,i,a)),a=null},o===void 0&&s.setContentType(null),"setRequestHeader"in a&&x.forEach(s.toJSON(),function(g,w){a.setRequestHeader(w,g)}),x.isUndefined(i.withCredentials)||(a.withCredentials=!!i.withCredentials),l&&l!=="json"&&(a.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&a.addEventListener("progress",mi(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&a.upload&&a.upload.addEventListener("progress",mi(i.onUploadProgress)),(i.cancelToken||i.signal)&&(c=d=>{a&&(r(!d||d.type?new Lt(null,e,a):d),a.abort(),a=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));let f=nd(i.url);if(f&&ge.protocols.indexOf(f)===-1){r(new D("Unsupported protocol "+f+":",D.ERR_BAD_REQUEST,e));return}a.send(o||null)})};var g2=(e,t)=>{let n=new AbortController,r,i=function(c){if(!r){r=!0,s();let u=c instanceof Error?c:this.reason;n.abort(u instanceof D?u:new Lt(u instanceof Error?u.message:u))}},o=t&&setTimeout(()=>{i(new D(`timeout ${t} of ms exceeded`,D.ETIMEDOUT))},t),s=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",i):c.unsubscribe(i))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",i));let{signal:l}=n;return l.unsubscribe=s,[l,()=>{o&&clearTimeout(o),o=null}]},b_=g2;var y2=function*(e,t){let n=e.byteLength;if(!t||n{let o=_2(e,t,i),s=0;return new ReadableStream({type:"bytes",async pull(l){let{done:c,value:u}=await o.next();if(c){l.close(),r();return}let a=u.byteLength;n&&n(s+=a),l.enqueue(new Uint8Array(u))},cancel(l){return r(l),o.return()}},{highWaterMark:2})};var R_=(e,t)=>{let n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},pa=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",I_=pa&&typeof ReadableStream=="function",sd=pa&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),v2=I_&&(()=>{let e=!1,t=new Request(ge.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),C_=64*1024,ld=I_&&!!(()=>{try{return x.isReadableStream(new Response("").body)}catch{}})(),da={stream:ld&&(e=>e.body)};pa&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!da[t]&&(da[t]=x.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new D(`Response type '${t}' is not supported`,D.ERR_NOT_SUPPORT,r)})})})(new Response);var w2=async e=>{if(e==null)return 0;if(x.isBlob(e))return e.size;if(x.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(x.isArrayBufferView(e))return e.byteLength;if(x.isURLSearchParams(e)&&(e=e+""),x.isString(e))return(await sd(e)).byteLength},x2=async(e,t)=>{let n=x.toFiniteNumber(e.getContentLength());return n??w2(t)},T_=pa&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:s,onDownloadProgress:l,onUploadProgress:c,responseType:u,headers:a,withCredentials:p="same-origin",fetchOptions:f}=fa(e);u=u?(u+"").toLowerCase():"text";let[d,g]=i||o||s?b_([i,o],s):[],w,_,m=()=>{!w&&setTimeout(()=>{d&&d.unsubscribe()}),w=!0},h;try{if(c&&v2&&n!=="get"&&n!=="head"&&(h=await x2(a,r))!==0){let b=new Request(t,{method:"POST",body:r,duplex:"half"}),k;x.isFormData(r)&&(k=b.headers.get("content-type"))&&a.setContentType(k),b.body&&(r=od(b.body,C_,R_(h,mi(c)),null,sd))}x.isString(p)||(p=p?"cors":"omit"),_=new Request(t,{...f,signal:d,method:n.toUpperCase(),headers:a.normalize().toJSON(),body:r,duplex:"half",withCredentials:p});let y=await fetch(_),v=ld&&(u==="stream"||u==="response");if(ld&&(l||v)){let b={};["status","statusText","headers"].forEach(R=>{b[R]=y[R]});let k=x.toFiniteNumber(y.headers.get("content-length"));y=new Response(od(y.body,C_,l&&R_(k,mi(l,!0)),v&&m,sd),b)}u=u||"text";let S=await da[x.findKey(da,u)||"text"](y,e);return!v&&m(),g&&g(),await new Promise((b,k)=>{Uo(b,k,{data:S,headers:pe.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:_})})}catch(y){throw m(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new D("Network Error",D.ERR_NETWORK,e,_),{cause:y.cause||y}):D.from(y,y&&y.code,e,_)}});var ad={http:sa,xhr:E_,fetch:T_};x.forEach(ad,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});var O_=e=>`- ${e}`,k2=e=>x.isFunction(e)||e===null||e===!1,ma={getAdapter:e=>{e=x.isArray(e)?e:[e];let{length:t}=e,n,r,i={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build")),s=t?o.length>1?`since : `+o.map(O_).join(` @@ -132,7 +132,7 @@ ${p} } `:"inset-0 overflow-auto",css` contain: content; - `),children:(0,un.jsx)(Vy,{api_url:C.site.api_url,entry:Object.values(C.page.root.childs).filter(a=>a).map(a=>a.id),meta:C.page.meta,mode:C.mode,page_id:C.page.id,site_id:C.site.id,db:C.site.db,api:C.site.api,preloaded:a=>{let p=C.route.router?.lookup(a);return!!(p&&C.page.cache[p.id])},comp_load:async a=>{let p=C.comp;if(p.list[a])return p.list[a];try{let f=await(await fetch(C.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[a]})})).json();for(let[d,g]of Object.entries(f))delete p.pending[d],p.list[d]=g,await zl(`comp-${d}`,g)}catch{}return p.list[a]},layout:C.layout.id&&C.layout.root&&C.layout.meta?{id:C.layout.id,meta:C.layout.meta,entry:Object.values(C.layout.root.childs).filter(a=>a).map(a=>a.id)}:void 0,script:{init_local_effect:C.init_local_effect},on_preload:async({urls:a,opt:p})=>{let f=[];if(C.cache.urls)for(let d of a)C.cache.urls.has(d)||(f.push(d),C.cache.urls.add(d));if(f.length>0){let d=await Gy(f);if(p?.on_load&&p.on_load(d,t3),Array.isArray(d))for(let g of d){let w={id:g.id,url:g.url,root:g.root,meta:{}};await ui(g.root.childs),Aa(w.meta,g.root),C.page.cache[w.id]=w}}}})})})})},t3=(e,t)=>{for(let n of e)for(let r of n.root.childs)Kd(r,t)},Kd=(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&&Kd(n.content,t);for(let n of e.childs)Kd(n,t)}};var j1=P(G());(async()=>{import("./font-PD3WIDAZ.js"),ng();let e=document.getElementById("root");if(e){await tg(!1);let t={root:(0,z1.createRoot)(e)};q0(),le.navigateOverride=n=>(n&&n.startsWith("/")&&Qd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.root.render((0,j1.jsx)(M1,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); + `),children:(0,un.jsx)(Vy,{api_url:C.site.api_url,entry:Object.values(C.page.root.childs).filter(a=>a).map(a=>a.id),meta:C.page.meta,mode:C.mode,page_id:C.page.id,site_id:C.site.id,db:C.site.db,api:C.site.api,preloaded:a=>{let p=C.route.router?.lookup(a);return!!(p&&C.page.cache[p.id])},comp_load:async a=>{let p=C.comp;if(p.list[a])return p.list[a];try{let f=await(await fetch(C.url`_prasi/comp`,{method:"POST",body:JSON.stringify({ids:[a]})})).json();for(let[d,g]of Object.entries(f))delete p.pending[d],p.list[d]=g,await zl(`comp-${d}`,g)}catch{}return p.list[a]},layout:C.layout.id&&C.layout.root&&C.layout.meta?{id:C.layout.id,meta:C.layout.meta,entry:Object.values(C.layout.root.childs).filter(a=>a).map(a=>a.id)}:void 0,script:{init_local_effect:C.init_local_effect},on_preload:async({urls:a,opt:p})=>{let f=[];if(C.cache.urls)for(let d of a)C.cache.urls.has(d)||(f.push(d),C.cache.urls.add(d));if(f.length>0){let d=await Gy(f);if(p?.on_load&&p.on_load(d,t3),Array.isArray(d))for(let g of d){let w={id:g.id,url:g.url,root:g.root,meta:{}};await ui(g.root.childs),Aa(w.meta,g.root),C.page.cache[w.id]=w}}}})})})})},t3=(e,t)=>{for(let n of e)for(let r of n.root.childs)Kd(r,t)},Kd=(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&&Kd(n.content,t);for(let n of e.childs)Kd(n,t)}};var j1=P(G());(async()=>{import("./font-ULAYMU2A.js"),ng();let e=document.getElementById("root");if(e){await tg(!1);let t={root:(0,z1.createRoot)(e)};q0(),le.navigateOverride=n=>(n&&n.startsWith("/")&&Qd()&&location.pathname.startsWith("/prod")&&!n.startsWith("/prod")&&(n=`/prod/${location.pathname.split("/")[2]}${n}`),n),t.root.render((0,j1.jsx)(M1,{})),document.body.classList.contains("opacity-0")&&document.body.classList.remove("opacity-0")}})(); /*! Bundled license information: react/cjs/react.production.min.js: @@ -196,4 +196,3 @@ react/cjs/react-jsx-runtime.production.min.js: pako/dist/pako.esm.mjs: (*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) *) */ -//# sourceMappingURL=main.js.map diff --git a/app/web/src/index.tsx b/app/web/src/index.tsx index 538ad3b0..53432395 100644 --- a/app/web/src/index.tsx +++ b/app/web/src/index.tsx @@ -21,7 +21,7 @@ const start = async () => { w._api = apiProxy(base_url); } catch (e) { if (cur.host) { - console.warn("Failed to load API:", base_url); + console.error("Failed to load API:", base_url); } } diff --git a/app/web/src/nova/ed/logic/tree/build/push-tree.tsx b/app/web/src/nova/ed/logic/tree/build/push-tree.tsx index 98181c65..3c1796c9 100644 --- a/app/web/src/nova/ed/logic/tree/build/push-tree.tsx +++ b/app/web/src/nova/ed/logic/tree/build/push-tree.tsx @@ -45,12 +45,12 @@ export const pushTreeNode = ( } if (!meta.item || !meta.item.id) { - console.warn("Emptry Tree Item ", meta); + console.error("Emptry Tree Item ", meta); return null; } if (tree.find((t) => t.id === meta.item.id)) { - console.warn("Double Tree Item: ", meta.item.id, meta.item.name); + console.error("Double Tree Item: ", meta.item.id, meta.item.name); } else { if (!meta.parent?.comp_id) { tree.push({ diff --git a/app/web/src/nova/ed/panel/side/prop-instance.tsx b/app/web/src/nova/ed/panel/side/prop-instance.tsx index 8e15a7cf..fe1ac381 100644 --- a/app/web/src/nova/ed/panel/side/prop-instance.tsx +++ b/app/web/src/nova/ed/panel/side/prop-instance.tsx @@ -93,7 +93,7 @@ export const EdSidePropInstance: FC<{ meta: IMeta }> = ({ meta }) => { evn(arg); } catch (e) { console.error(e); - console.warn(k, v.value); + console.error(k, v.value); } } } @@ -107,7 +107,7 @@ export const EdSidePropInstance: FC<{ meta: IMeta }> = ({ meta }) => { ); evn(arg); } catch (e) { - console.warn( + console.error( `Error prop ${k} in item [${meta.item.name}], source:`, v.valueBuilt ); @@ -126,7 +126,7 @@ export const EdSidePropInstance: FC<{ meta: IMeta }> = ({ meta }) => { return; } } catch (e) { - console.warn("Failed to parse visible on prop: ", key); + console.error("Failed to parse visible on prop: ", key); console.error(e); } } catch (e) { diff --git a/app/web/src/nova/ed/panel/side/prop-instance/prop-button.tsx b/app/web/src/nova/ed/panel/side/prop-instance/prop-button.tsx index f6b4ded6..483051c9 100644 --- a/app/web/src/nova/ed/panel/side/prop-instance/prop-button.tsx +++ b/app/web/src/nova/ed/panel/side/prop-instance/prop-button.tsx @@ -38,7 +38,7 @@ export const EdPropInstanceButton: FC<{ evn(arg); } catch (e) { console.error(e); - console.warn(k, v.value); + console.error(k, v.value); } } } @@ -50,7 +50,7 @@ export const EdPropInstanceButton: FC<{ evn(arg); } catch (e) { console.error(e); - console.warn(k, v.valueBuilt); + console.error(k, v.valueBuilt); } } } diff --git a/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx b/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx index aabc82c7..c8365903 100644 --- a/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx +++ b/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx @@ -86,7 +86,7 @@ export const EdPropInstanceOptions: FC<{ evn(arg); } catch (e) { console.error(e); - console.warn(k, v.value); + console.error(k, v.value); } } } @@ -102,7 +102,7 @@ export const EdPropInstanceOptions: FC<{ evn(arg); } catch (e) { console.error(e); - console.warn(k, v.valueBuilt); + console.error(k, v.valueBuilt); } } @@ -141,7 +141,7 @@ export const EdPropInstanceOptions: FC<{ fn(...Object.values(arg), local); } catch (e) { console.error(e); - console.warn(fn.toString(), arg); + console.error(fn.toString(), arg); } } } diff --git a/app/web/src/nova/ed/panel/tree/node/item/indent-hook.ts b/app/web/src/nova/ed/panel/tree/node/item/indent-hook.ts index daaf0aa3..b4577170 100644 --- a/app/web/src/nova/ed/panel/tree/node/item/indent-hook.ts +++ b/app/web/src/nova/ed/panel/tree/node/item/indent-hook.ts @@ -32,7 +32,7 @@ export const expandTreeHook = ( while (meta) { i++; if (i > 5000) { - console.warn( + console.error( "WARNING: Prasi expand item parent tree exceed 5000 loop, maybe infinite loop?" ); break; diff --git a/app/web/src/nova/prod/base/component.tsx b/app/web/src/nova/prod/base/component.tsx index db02f74f..959220e6 100644 --- a/app/web/src/nova/prod/base/component.tsx +++ b/app/web/src/nova/prod/base/component.tsx @@ -28,7 +28,7 @@ export const scanComponent = async (items: IContent[], from_root?: boolean) => { await set(`comp-${id}`, item); } if (Object.keys(comp.pending).length > 0) { - console.warn( + console.error( `Warning: component not found: ${Object.keys(comp.pending)}` ); return; diff --git a/app/web/src/nova/vi/load/load-legacy.tsx b/app/web/src/nova/vi/load/load-legacy.tsx index 8805d1bb..1f8bf6e2 100644 --- a/app/web/src/nova/vi/load/load-legacy.tsx +++ b/app/web/src/nova/vi/load/load-legacy.tsx @@ -50,7 +50,7 @@ export const viLoadLegacy = async (vi: { try { await loadApiProxyDef(api_url, true); } catch (e) { - console.warn("Failed to load API [Legacy]:", api_url); + console.error("Failed to load API [Legacy]:", api_url); } } } catch (e) {} diff --git a/app/web/src/nova/vi/load/load-snapshot.tsx b/app/web/src/nova/vi/load/load-snapshot.tsx index f9df7cc8..9f2f6e1b 100644 --- a/app/web/src/nova/vi/load/load-snapshot.tsx +++ b/app/web/src/nova/vi/load/load-snapshot.tsx @@ -22,7 +22,7 @@ export const viLoadSnapshot = async (p: PG) => { } } catch (e: any) { if (e && !e.message.toLowerCase().includes("invalid url")) { - console.warn("Failed to load API [Snapshot]:", api_url); + console.error("Failed to load API [Snapshot]:", api_url); } else { } } diff --git a/app/web/src/nova/vi/render/parts.tsx b/app/web/src/nova/vi/render/parts.tsx index 979f0eb9..e185b66f 100644 --- a/app/web/src/nova/vi/render/parts.tsx +++ b/app/web/src/nova/vi/render/parts.tsx @@ -66,7 +66,7 @@ export const viParts = ( if (!meta) { if (item.type === "item" && item.component?.id) { - console.warn(`Warning component ${item.name} - ${item.component.id} failed to load.`); + console.error(`Warning component ${item.name} - ${item.component.id} failed to load.`); } return null; } diff --git a/app/web/src/nova/vi/render/script/eval-script.tsx b/app/web/src/nova/vi/render/script/eval-script.tsx index 6e77f436..1eed1c17 100644 --- a/app/web/src/nova/vi/render/script/eval-script.tsx +++ b/app/web/src/nova/vi/render/script/eval-script.tsx @@ -172,14 +172,14 @@ export const viEvalScript = ( try { ${src} } catch(e) { - console.warn("Error at item ${meta.item.name}:", ___js); + console.error("Error at item ${meta.item.name}:", ___js); console.error(e); } ` ); fn(...Object.values(arg), meta.item.adv?.js); } catch (e) { - console.warn(`Error at item ${meta.item.name}:`, meta.item.adv?.js); + console.error(`Error at item ${meta.item.name}:`, meta.item.adv?.js); console.error(e); } diff --git a/app/web/src/nova/vi/utils/error-box.tsx b/app/web/src/nova/vi/utils/error-box.tsx index 9407f939..907f966c 100644 --- a/app/web/src/nova/vi/utils/error-box.tsx +++ b/app/web/src/nova/vi/utils/error-box.tsx @@ -16,7 +16,7 @@ export const ErrorBox = withErrorBoundary( }) => { const local = useLocal({ retrying: false, meta }); const [error, resetError] = useErrorBoundary((error, errorInfo) => { - if (silent !== true) console.warn(error); + if (silent !== true) console.error(error); }); if (meta && local.meta !== meta) {