@jxsuite/compiler 0.28.2 → 0.28.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +159 -150
- package/dist/compiler.js +100 -95
- package/package.json +5 -5
- package/src/cli.ts +6 -6
- package/src/compile-cli.ts +6 -4
- package/src/compiler.ts +34 -23
- package/src/shared.ts +402 -231
- package/src/site/content-loader.ts +54 -29
- package/src/site/context-injection.ts +13 -9
- package/src/site/format-host.ts +26 -15
- package/src/site/head-merger.ts +37 -18
- package/src/site/image-cache.ts +13 -12
- package/src/site/image-optimizer.ts +30 -20
- package/src/site/image-transform.ts +144 -63
- package/src/site/layout-resolver.ts +33 -18
- package/src/site/pages-discovery.ts +61 -39
- package/src/site/prototype-resolver.ts +45 -21
- package/src/site/site-build.ts +212 -136
- package/src/site/site-loader.ts +70 -43
- package/src/targets/compile-class.ts +70 -51
- package/src/targets/compile-client.ts +271 -227
- package/src/targets/compile-element.ts +230 -146
- package/src/targets/compile-server.ts +9 -5
- package/src/targets/compile-static.ts +27 -19
package/dist/compiler.js
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import{createRequire as X6}from"node:module";var iZ=Object.create;var{getPrototypeOf:nZ,defineProperty:I1,getOwnPropertyNames:oZ}=Object;var rZ=Object.prototype.hasOwnProperty;function sZ(Z){return this[Z]}var aZ,tZ,u3=(Z,X,z)=>{var q=Z!=null&&typeof Z==="object";if(q){var J=X?aZ??=new WeakMap:tZ??=new WeakMap,W=J.get(Z);if(W)return W}z=Z!=null?iZ(nZ(Z)):{};let G=X||!Z||!Z.__esModule?I1(z,"default",{value:Z,enumerable:!0}):z;for(let Y of oZ(Z))if(!rZ.call(G,Y))I1(G,Y,{get:sZ.bind(Z,Y),enumerable:!0});if(q)J.set(Z,G);return G};var f3=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var eZ=(Z)=>Z;function Z6(Z,X){this[Z]=eZ.bind(null,X)}var w8=(Z,X)=>{for(var z in X)I1(Z,z,{get:X[z],enumerable:!0,configurable:!0,set:Z6.bind(X,z)})};var T=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var G0=X6(import.meta.url);function F0(Z){return T8.has(Z)}function t(Z,X,z,q){if(Z===null||Z===void 0)return Z;if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return U0(Z,X,z,q);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return q6(Z.$ref,X,z,q);if(Array.isArray(Z))return Z.map((J)=>t(J,X,z,q));return Z}function q6(Z,X,z,q){if(Z==="$reduce/acc")return q?.acc;if(Z.startsWith("$reduce/"))return q?.acc;if(Z.startsWith("event#/")){let J=Z.slice(7);return I0(z,J)}if(Z.startsWith("$map/")){let J=Z.split("/"),W=J[1],G;if(W==="item")G=q?.item??X.$map?.item??X["$map/item"];else if(W==="index")G=q?.index??X.$map?.index??X["$map/index"];else G=X.$map?.[W]??X["$map/"+W];return J.length>2?I0(G,J.slice(2).join("/")):G}if(Z.startsWith("#/state/")){let J=Z.slice(8),W=J.indexOf("/");if(W<0)return X[J];return I0(X[J.slice(0,W)],J.slice(W+1))}if(Z.startsWith("parent#/"))return X[Z.slice(8)];if(Z.startsWith("window#/"))return I0(globalThis.window,Z.slice(8));if(Z.startsWith("document#/"))return I0(globalThis.document,Z.slice(10));return X[Z]??null}function J6(Z,X,z,q){if(Z.startsWith("$map/")){let J=Z.split("/"),W=J[1],G;if(W==="item")G=q?.item??X.$map?.item??X["$map/item"];else if(W==="index")G=q?.index??X.$map?.index??X["$map/index"];else G=X.$map?.[W]??X["$map/"+W];if(J.length>2){let Y=J.slice(2),Q=Y.pop();return{obj:Y.length>0?I0(G,Y.join("/")):G,key:Q}}return{obj:X.$map??X,key:W==="item"?"$map/item":"$map/index"}}if(Z.startsWith("#/state/")){let J=Z.slice(8);if(J.indexOf("/")<0)return{obj:X,key:J};let G=J.split("/"),Y=G.pop(),Q=X;for(let U of G)Q=Q[U];return{obj:Q,key:Y}}return{obj:X,key:Z}}function U0(Z,X,z,q){let{operator:J,target:W,value:G,initial:Y}=Z;if(!z6.has(J))throw Error(`$expression: unknown operator "${J}"`);if(T1.has(J)&&!("value"in Z)){let Q=t(W,X,z,q);if(J==="!")return!Q;if(J==="-")return-Q}if(R1.has(J)){let Q=t(W,X,z,q),U=t(G,X,z,q);switch(J){case"+":return Q+U;case"-":return Q-U;case"*":return Q*U;case"/":return Q/U;case"%":return Q%U;case"===":return Q===U;case"!==":return Q!==U;case"<":return Q<U;case"<=":return Q<=U;case">":return Q>U;case">=":return Q>=U;case"&&":return Q&&U;case"||":return Q||U}}if(R8.has(J)){let Q=t(G,X,z,q),{obj:U,key:K}=J6(W.$ref,X,z,q);switch(J){case"=":U[K]=Q;break;case"+=":U[K]+=Q;break;case"-=":U[K]-=Q;break;case"*=":U[K]*=Q;break;case"/=":U[K]/=Q;break}return}if(C8.has(J)){let Q=t(W,X,z,q);switch(J){case"push":return Q.push(t(G,X,z,q));case"unshift":return Q.unshift(t(G,X,z,q));case"pop":return Q.pop();case"shift":return Q.shift();case"splice":{let U=t(G,X,z,q);return Q.splice(...U)}}}if(C1.has(J)){let Q=t(W,X,z,q);if(J==="reduce"){let U=t(Y,X,z,q);return Q.reduce((K,V,M)=>{return U0(G,X,z,{acc:K,item:V,index:M})},U)}if(J==="map")return Q.map((U,K)=>{return U0(G,X,z,{...q,item:U,index:K})});if(J==="filter")return Q.filter((U,K)=>{return U0(G,X,z,{...q,item:U,index:K})})}return}function n(Z,X){if(Z===null)return"null";if(Z===void 0)return"undefined";if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return d(Z,X);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return j8(Z.$ref,X);if(Array.isArray(Z))return Z.map((z)=>n(z,X)).join(", ");return JSON.stringify(Z)}function j8(Z,X){let z=X.statePrefix??"state",q=X.eventParam??"event";if(Z==="$reduce/acc")return"_acc";if(Z.startsWith("$reduce/"))return"_acc";if(Z.startsWith("event#/")){let J=Z.slice(7);return`${q}.${J.replace(/\//g,".")}`}if(Z.startsWith("$map/")){let J=Z.split("/"),W=J[1];if(W==="item")return J.length>2?`_item.${J.slice(2).join(".")}`:"_item";if(W==="index")return"_index";return`_${W}`}if(Z.startsWith("#/state/")){let J=Z.slice(8);return`${z}.${J.replace(/\//g,".")}`}if(Z.startsWith("parent#/"))return`${z}.${Z.slice(8)}`;if(Z.startsWith("window#/"))return`window.${Z.slice(8).replace(/\//g,".")}`;if(Z.startsWith("document#/"))return`document.${Z.slice(10).replace(/\//g,".")}`;return`${z}.${Z}`}function I8(Z,X){if(typeof Z==="object"&&Z!==null&&"$ref"in Z)return j8(Z.$ref,X);return n(Z,X)}function d(Z,X={}){let{operator:z,target:q,value:J,initial:W}=Z;if(T1.has(z)&&!("value"in Z)){let G=n(q,X);if(z==="!")return`!(${G})`;if(z==="-")return`-(${G})`}if(R1.has(z)){let G=n(q,X),Y=n(J,X);return`(${G} ${z} ${Y})`}if(R8.has(z)){let G=I8(q,X),Y=n(J,X);return`${G} ${z} ${Y}`}if(C8.has(z)){let G=I8(q,X);switch(z){case"push":return`${G}.push(${n(J,X)})`;case"unshift":return`${G}.unshift(${n(J,X)})`;case"pop":return`${G}.pop()`;case"shift":return`${G}.shift()`;case"splice":{let Y=Array.isArray(J)?J.map((Q)=>n(Q,X)).join(", "):n(J,X);return`${G}.splice(${Y})`}}}if(C1.has(z)){let G=n(q,X),Y=d(J,X);if(z==="reduce"){let Q=n(W,X);return`${G}.reduce((_acc, _item, _index) => ${Y}, ${Q})`}if(z==="map")return`${G}.map((_item, _index) => ${Y})`;if(z==="filter")return`${G}.filter((_item, _index) => ${Y})`}return"undefined"}function I0(Z,X){return X.split(/[./]/).reduce((z,q)=>z?.[q],Z)}var T8,T1,R1,R8,C8,C1,z6;var j1=T(()=>{T8=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),T1=new Set(["!","-"]),R1=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||"]),R8=new Set(["=","+=","-=","*=","/="]),C8=new Set(["push","pop","shift","unshift","splice"]),C1=new Set(["reduce","map","filter"]),z6=new Set([...T8,...T1,...R1,...C1])});function G6(Z){return Z.startsWith(":")||Z.startsWith(".")||Z.startsWith("&")||Z.startsWith("[")}function l(Z){return Z.replace(/[A-Z]/g,(X)=>`-${X.toLowerCase()}`)}function u(Z){return Object.entries(Z).filter(([X,z])=>!G6(X)&&(z===null||typeof z!=="object")).map(([X,z])=>`${l(X)}: ${z}`).join("; ")}var H0;var a0=T(()=>{j1();H0=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$title","$description","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"])});function T0(Z){for(let X of Object.keys(Z))if(!W6.has(X))return!1;return!0}function P(Z){return typeof Z==="string"&&Z.includes("${")}function x1(Z){if(!Z||typeof Z!=="object")return!1;if(Z.state)for(let[X,z]of Object.entries(Z.state)){if(X==="$site"||X==="$page")continue;if(z&&typeof z==="object"&&!Array.isArray(z)&&z.timing==="compiler")continue;if(typeof z!=="object"||z===null||Array.isArray(z))return!0;if(z.$prototype)return!0;if("default"in z)return!0;if(T0(z))continue;return!0}if(Z.$switch)return!0;if(!Array.isArray(Z.children)&&Z.children?.$prototype==="Array")return!0;if(Array.isArray(Z.children)){if(Z.children.some((X)=>x1(X)))return!0}for(let[X,z]of Object.entries(Z)){if(H0.has(X))continue;if(z!==null&&typeof z==="object"&&typeof z.$ref==="string")return!0;if(P(z))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(P(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(P(X))return!0}return!1}function P8(Z){if(!Z||typeof Z!=="object")return!1;if(Z.$switch)return!0;if(!Array.isArray(Z.children)&&Z.children?.$prototype==="Array")return!0;for(let[X,z]of Object.entries(Z)){if(H0.has(X))continue;if(z!==null&&typeof z==="object"&&typeof z.$ref==="string")return!0;if(P(z))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(P(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(P(X))return!0}return!1}function R0(Z,X=null,z={},q={}){return{scope:Z?.state?_8(Z.state,X):X??Object.create(null),scopeDefs:z,media:q}}function _8(Z={},X=null){let z=Object.create(X??null);for(let[q,J]of Object.entries(Z)){if(typeof J!=="object"||J===null||Array.isArray(J)){B0(z,q,t0(J));continue}let W=J;if("default"in W){B0(z,q,t0(W.default));continue}if(!W.$prototype&&!("$expression"in W)&&!T0(W))B0(z,q,t0(W))}for(let[q,J]of Object.entries(Z)){if(typeof J==="string"&&P(J)){N1(z,q,()=>E1(J,z));continue}if(!J||typeof J!=="object")continue;let W=J;if("$expression"in W){let G=W.$expression;if(F0(G.operator))B0(z,q,(Y,Q)=>U0(G,Y,Q));else N1(z,q,()=>U0(G,z,null));continue}if(W.$prototype==="Function"){if(W.body){let G=Function("state",...W.parameters??W.arguments??[],W.body);if(W.body.includes("return"))N1(z,q,()=>G(z));else B0(z,q,G)}else if(!W.body?.includes("return"))B0(z,q,()=>{});continue}if(W.$prototype==="LocalStorage"||W.$prototype==="SessionStorage")B0(z,q,t0(W.default??null))}return z}function B0(Z,X,z){Object.defineProperty(Z,X,{value:z,enumerable:!0,configurable:!0,writable:!0})}function N1(Z,X,z){Object.defineProperty(Z,X,{enumerable:!0,configurable:!0,get:z})}function b(Z,X){if(W0(Z))return Q6(Z.$ref,X);if(P(Z))return E1(Z,X);return Z}function W0(Z){return Z!==null&&typeof Z==="object"&&typeof Z.$ref==="string"}function Q6(Z,X){if(typeof Z!=="string")return Z;if(Z.startsWith("$map/")){let z=Z.split("/"),q=z[1],J=X.$map?.[q]??X["$map/"+q];return z.length>2?N8(J,z.slice(2).join("/")):J}if(Z.startsWith("#/state/")){let z=Z.slice(8),q=z.indexOf("/");if(q<0)return X[z];return N8(X[z.slice(0,q)],z.slice(q+1))}return X[Z]??null}function E1(Z,X){try{let z=Z.match(/^\$\{(.+)\}$/s);if(z)return Function("state","$map",`return (${z[1]})`)(X,X?.$map);return Function("state","$map",`return \`${Z}\``)(X,X?.$map)}catch{return null}}function N8(Z,X){if(!X)return Z;return X.split("/").reduce((z,q)=>z==null?void 0:z[q],Z)}function t0(Z){if(Z===null||typeof Z!=="object")return Z;return JSON.parse(JSON.stringify(Z))}function y0(Z,X){let z="",q=b(Z.id,X),J=b(Z.className,X),W=b(Z.hidden,X),G=b(Z.tabIndex,X),Y=b(Z.title,X),Q=b(Z.lang,X),U=b(Z.dir,X);if(q)z+=` id="${C(String(q))}"`;if(J)z+=` class="${C(String(J))}"`;if(W)z+=" hidden";if(G!==void 0&&G!==null)z+=` tabindex="${C(String(G))}"`;if(Y)z+=` title="${C(String(Y))}"`;if(Q)z+=` lang="${C(String(Q))}"`;if(U)z+=` dir="${C(String(U))}"`;if(Z.style&&X){let K=Object.entries(Z.style).filter(([V,M])=>!V.startsWith(":")&&!V.startsWith(".")&&!V.startsWith("&")&&!V.startsWith("[")&&!V.startsWith("@")&&M!==null&&typeof M!=="object"&&typeof M==="string"&&P(M)).map(([V,M])=>{let F=b(M,X);return F==null?null:`${l(V)}: ${F}`}).filter(Boolean).join("; ");if(K)z+=` style="${K}"`}if(Z.attributes)for(let[K,V]of Object.entries(Z.attributes)){let M=b(V,X);if(M!==null&&M!==void 0&&(typeof M==="string"||typeof M==="number"||typeof M==="boolean"))z+=` ${K}="${C(String(M))}"`}if(Z.tagName==="img"){if(!Z.attributes?.loading)z+=' loading="lazy"';if(!Z.attributes?.decoding)z+=' decoding="async"'}if(Z.$static)z+=" data-jx-static";else if(Z.$prerendered)z+=" data-jx-prerendered";return z}function C0(Z,X={},z=null){let q=[];if(z&&typeof z==="object"){let W=function(K,V){let M=u(V);if(M)q.push(`${K} { ${M} }`);for(let[F,H]of Object.entries(V)){if(H===null||typeof H!=="object"||Array.isArray(H))continue;if(F.startsWith("@")){let B=F.startsWith("@--")?`@media ${X[F.slice(1)]??F.slice(1)}`:F,$=u(H);if($)q.push(`${B} { ${K} { ${$} } }`);for(let[D,O]of Object.entries(H)){if(O===null||typeof O!=="object"||Array.isArray(O))continue;if(D.startsWith("@"))continue;let R=D.startsWith("&")?D.replace("&",K):D.startsWith(":")||D.startsWith(".")||D.startsWith("[")?`${K}${D}`:`${K} ${D}`,j=u(O);if(j)q.push(`${B} { ${R} { ${j} } }`)}continue}let A=F.startsWith("&")?F.replace("&",K):F.startsWith(":")||F.startsWith(".")||F.startsWith("[")?`${K}${F}`:`${K} ${F}`;W(A,H)}};for(let[K,V]of Object.entries(z))if(K.startsWith(":")||K.startsWith(".")||K.startsWith("["))W(K,V);else if(V!==null&&typeof V==="object"&&!Array.isArray(V)&&!K.startsWith("@")&&!K.startsWith("--"))W(K,V);else if(K.startsWith("@")){let M=K.startsWith("@--")?`@media ${X[K.slice(1)]??K.slice(1)}`:K.startsWith("@(")?`@media ${K.slice(1)}`:K;q.push(`${M} { body { ${u(V)} } }`)}let G={},Y={};for(let[K,V]of Object.entries(z)){if(K.startsWith(":")||K.startsWith(".")||K.startsWith("[")||K.startsWith("@"))continue;if(V!==null&&typeof V==="object"&&!Array.isArray(V))continue;if(K.startsWith("--"))G[K]=V;else Y[K]=V}let Q=u(G);if(Q)q.push(`:root { ${Q} }`);let U=u(Y);if(U)q.push(`body { ${U} }`)}if(m0(Z,q,X,"",{n:0}),q.length===0)return"";return`<style>
|
|
1
|
+
import{createRequire as L6}from"node:module";var K6=Object.create;var{getPrototypeOf:V6,defineProperty:E1,getOwnPropertyNames:M6}=Object;var H6=Object.prototype.hasOwnProperty;function F6(Z){return this[Z]}var B6,$6,z7=(Z,X,z)=>{var q=Z!=null&&typeof Z==="object";if(q){var G=X?B6??=new WeakMap:$6??=new WeakMap,Q=G.get(Z);if(Q)return Q}z=Z!=null?K6(V6(Z)):{};let W=X||!Z||!Z.__esModule?E1(z,"default",{value:Z,enumerable:!0}):z;for(let Y of M6(Z))if(!H6.call(W,Y))E1(W,Y,{get:F6.bind(Z,Y),enumerable:!0});if(q)G.set(Z,W);return W};var q7=(Z,X)=>()=>(X||Z((X={exports:{}}).exports,X),X.exports);var D6=(Z)=>Z;function A6(Z,X){this[Z]=D6.bind(null,X)}var k8=(Z,X)=>{for(var z in X)E1(Z,z,{get:X[z],enumerable:!0,configurable:!0,set:A6.bind(X,z)})};var T=(Z,X)=>()=>(Z&&(X=Z(Z=0)),X);var J0=L6(import.meta.url);function S1(Z){let X=Z.$map;return X&&typeof X==="object"?X:void 0}function w0(Z){return g8.has(Z)}function a(Z,X,z,q){if(Z===null||Z===void 0)return Z;if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return H0(Z,X,z,q);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return w6(Z.$ref,X,z,q);if(Array.isArray(Z))return Z.map((G)=>a(G,X,z,q));return Z}function w6(Z,X,z,q){if(Z==="$reduce/acc")return q?.acc;if(Z.startsWith("$reduce/"))return q?.acc;if(Z.startsWith("event#/")){let G=Z.slice(7);return P0(z,G)}if(Z.startsWith("$map/")){let G=Z.split("/"),[,Q]=G,W,Y=S1(X);if(Q==="item")W=q?.item??Y?.item??X["$map/item"];else if(Q==="index")W=q?.index??Y?.index??X["$map/index"];else W=Y?.[Q]??X[`$map/${Q}`];return G.length>2?P0(W,G.slice(2).join("/")):W}if(Z.startsWith("#/state/")){let G=Z.slice(8),Q=G.indexOf("/");if(Q===-1)return X[G];return P0(X[G.slice(0,Q)],G.slice(Q+1))}if(Z.startsWith("parent#/"))return X[Z.slice(8)];if(Z.startsWith("window#/"))return P0(globalThis.window,Z.slice(8));if(Z.startsWith("document#/"))return P0(globalThis.document,Z.slice(10));return X[Z]??null}function O6(Z,X,z,q){if(Z.startsWith("$map/")){let G=Z.split("/"),[,Q]=G,W,Y=S1(X);if(Q==="item")W=q?.item??Y?.item??X["$map/item"];else if(Q==="index")W=q?.index??Y?.index??X["$map/index"];else W=Y?.[Q]??X[`$map/${Q}`];if(G.length>2){let J=G.slice(2),U=J.pop(),K=J.length>0?P0(W,J.join("/")):W;return{key:U,obj:K}}return{key:Q==="item"?"$map/item":"$map/index",obj:S1(X)??X}}if(Z.startsWith("#/state/")){let G=Z.slice(8);if(G.indexOf("/")===-1)return{key:G,obj:X};let W=G.split("/"),Y=W.pop(),J=X;for(let U of W)J=J[U];return{key:Y,obj:J}}return{key:Z,obj:X}}function H0(Z,X,z,q){let{operator:G,target:Q,value:W,initial:Y}=Z;if(!I6.has(G))throw Error(`$expression: unknown operator "${G}"`);if(k1.has(G)&&!("value"in Z)){let J=a(Q,X,z,q);if(G==="!")return!J;if(G==="-")return-J}if(b1.has(G)){let J=a(Q,X,z,q),U=a(W,X,z,q);switch(G){case"+":return J+U;case"-":return J-U;case"*":return J*U;case"/":return J/U;case"%":return J%U;case"===":return J===U;case"!==":return J!==U;case"<":return J<U;case"<=":return J<=U;case">":return J>U;case">=":return J>=U;case"&&":return J&&U;case"||":return J||U;default:break}}if(v8.has(G)){let J=a(W,X,z,q),{obj:U,key:K}=O6(Q.$ref,X,z,q);switch(G){case"=":{U[K]=J;break}case"+=":{let V=U[K];U[K]=V+J;break}case"-=":{let V=U[K];U[K]=V-J;break}case"*=":{let V=U[K];U[K]=V*J;break}case"/=":{let V=U[K];U[K]=V/J;break}default:break}return}if(y8.has(G)){let J=a(Q,X,z,q);switch(G){case"push":return J.push(a(W,X,z,q));case"unshift":return J.unshift(a(W,X,z,q));case"pop":return J.pop();case"shift":return J.shift();case"splice":{let U=a(W,X,z,q);return J.splice(...U)}default:break}}if(g1.has(G)){let J=a(Q,X,z,q);if(G==="reduce"){let U=a(Y,X,z,q);for(let[K,V]of J.entries())U=H0(W,X,z,{acc:U,index:K,item:V});return U}if(G==="map")return J.map((U,K)=>H0(W,X,z,{...q,index:K,item:U}));if(G==="filter")return J.filter((U,K)=>H0(W,X,z,{...q,index:K,item:U}))}return}function i(Z,X){if(Z===null)return"null";if(Z===void 0)return"undefined";if(typeof Z==="object"&&!Array.isArray(Z)&&"operator"in Z)return n(Z,X);if(typeof Z==="object"&&!Array.isArray(Z)&&"$ref"in Z)return m8(Z.$ref,X);if(Array.isArray(Z))return Z.map((z)=>i(z,X)).join(", ");return JSON.stringify(Z)}function m8(Z,X){let z=X.statePrefix??"state",q=X.eventParam??"event";if(Z==="$reduce/acc")return"_acc";if(Z.startsWith("$reduce/"))return"_acc";if(Z.startsWith("event#/")){let G=Z.slice(7);return`${q}.${G.replaceAll("/",".")}`}if(Z.startsWith("$map/")){let G=Z.split("/"),[,Q]=G;if(Q==="item")return G.length>2?`_item.${G.slice(2).join(".")}`:"_item";if(Q==="index")return"_index";return`_${Q}`}if(Z.startsWith("#/state/")){let G=Z.slice(8);return`${z}.${G.replaceAll("/",".")}`}if(Z.startsWith("parent#/"))return`${z}.${Z.slice(8)}`;if(Z.startsWith("window#/"))return`window.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("document#/"))return`document.${Z.slice(10).replaceAll("/",".")}`;return`${z}.${Z}`}function b8(Z,X){if(typeof Z==="object"&&Z!==null&&"$ref"in Z)return m8(Z.$ref,X);return i(Z,X)}function n(Z,X={}){let{operator:z,target:q,value:G,initial:Q}=Z;if(k1.has(z)&&!("value"in Z)){let W=i(q,X);if(z==="!")return`!(${W})`;if(z==="-")return`-(${W})`}if(b1.has(z)){let W=i(q,X),Y=i(G,X);return`(${W} ${z} ${Y})`}if(v8.has(z)){let W=b8(q,X),Y=i(G,X);return`${W} ${z} ${Y}`}if(y8.has(z)){let W=b8(q,X);switch(z){case"push":return`${W}.push(${i(G,X)})`;case"unshift":return`${W}.unshift(${i(G,X)})`;case"pop":return`${W}.pop()`;case"shift":return`${W}.shift()`;case"splice":{let Y=Array.isArray(G)?G.map((J)=>i(J,X)).join(", "):i(G,X);return`${W}.splice(${Y})`}default:break}}if(g1.has(z)){let W=i(q,X),Y=n(G,X);if(z==="reduce"){let J=i(Q,X);return`${W}.reduce((_acc, _item, _index) => ${Y}, ${J})`}if(z==="map")return`${W}.map((_item, _index) => ${Y})`;if(z==="filter")return`${W}.filter((_item, _index) => ${Y})`}return"undefined"}function P0(Z,X){let z=Z;for(let q of X.split(/[./]/))z=z?.[q];return z}var g8,k1,b1,v8,y8,g1,I6;var v1=T(()=>{g8=new Set(["=","+=","-=","*=","/=","push","pop","shift","unshift","splice"]),k1=new Set(["!","-"]),b1=new Set(["+","-","*","/","%","===","!==","<","<=",">",">=","&&","||"]),v8=new Set(["=","+=","-=","*=","/="]),y8=new Set(["push","pop","shift","unshift","splice"]),g1=new Set(["reduce","map","filter"]),I6=new Set([...g8,...k1,...b1,...g1])});function p(Z){return typeof Z==="object"&&Z!==null&&!Array.isArray(Z)}function t(Z){return p(Z)&&typeof Z.$ref==="string"}function Y0(Z){return p(Z)&&Z.$prototype==="Function"}function e(Z){return p(Z)&&p(Z.$expression)}function l0(Z){return p(Z)&&typeof Z.$prototype==="string"&&Z.$prototype!=="Function"}function y1(Z){return p(Z)&&Z.timing==="server"&&typeof Z.$src==="string"&&typeof Z.$export==="string"&&!Z.$prototype}function h8(Z){return p(Z)&&!Z.$prototype&&!Z.$expression&&"default"in Z}function F0(Z){if(!p(Z))return!1;for(let X of Object.keys(Z))if(!u8.has(X))return!1;return!0}function i0(Z){return p(Z)&&Z.$prototype==="Array"}function f8(Z){return p(Z)&&Z.$prototype==="Class"}function j(Z){return typeof Z==="string"&&Z.includes("${")}function B0(Z){if(!Z)return[];return Z.map((X)=>typeof X==="string"?X:X.name)}var u8;var $0=T(()=>{u8=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"])});function T6(Z){return Z.startsWith(":")||Z.startsWith(".")||Z.startsWith("&")||Z.startsWith("[")}function d(Z){return Z.replaceAll(/[A-Z]/g,(X)=>`-${X.toLowerCase()}`)}function h(Z){return Object.entries(Z).filter(([X,z])=>!T6(X)&&(z===null||typeof z!=="object")).map(([X,z])=>`${d(X)}: ${z}`).join("; ")}var O0;var W1=T(()=>{v1();$0();O0=new Set(["$schema","$id","$defs","state","$ref","$props","$elements","$title","$description","$switch","$prototype","$src","$export","$media","$map","timing","default","description","body","parameters","arguments","name","tagName","children","style","attributes","items","map","filter","sort","cases","observedAttributes"])});function u1(Z){if(!Z||typeof Z!=="object")return!1;if(Z.state)for(let[X,z]of Object.entries(Z.state)){if(X==="$site"||X==="$page")continue;if(z&&typeof z==="object"&&!Array.isArray(z)&&z.timing==="compiler")continue;if(typeof z!=="object"||z===null||Array.isArray(z))return!0;if(z.$prototype)return!0;if("default"in z)return!0;if(F0(z))continue;return!0}if(Z.$switch)return!0;if(!Array.isArray(Z.children)&&Z.children?.$prototype==="Array")return!0;if(Array.isArray(Z.children)&&Z.children.some((X)=>u1(X)))return!0;for(let[X,z]of Object.entries(Z)){if(O0.has(X))continue;if(z!==null&&typeof z==="object"&&typeof z.$ref==="string")return!0;if(j(z))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(j(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(j(X))return!0}return!1}function p8(Z){if(!Z||typeof Z!=="object")return!1;if(Z.$switch)return!0;if(!Array.isArray(Z.children)&&Z.children?.$prototype==="Array")return!0;for(let[X,z]of Object.entries(Z)){if(O0.has(X))continue;if(z!==null&&typeof z==="object"&&typeof z.$ref==="string")return!0;if(j(z))return!0}if(Z.style&&typeof Z.style==="object"){for(let X of Object.values(Z.style))if(j(X))return!0}if(Z.attributes&&typeof Z.attributes==="object"){for(let X of Object.values(Z.attributes))if(j(X))return!0}return!1}function S0(Z,X=null,z={},q={}){let G=Z?.state?d8(Z.state,X):X??Object.create(null);return{media:q,scope:G,scopeDefs:z}}function d8(Z={},X=null){let z=Object.create(X??null);for(let[q,G]of Object.entries(Z)){if(typeof G!=="object"||G===null||Array.isArray(G)){T0(z,q,Q1(G));continue}let Q=G;if("default"in Q){T0(z,q,Q1(Q.default));continue}if(!Q.$prototype&&!("$expression"in Q)&&!F0(Q))T0(z,q,Q1(Q))}for(let[q,G]of Object.entries(Z)){if(typeof G==="string"&&j(G)){m1(z,q,()=>f1(G,z));continue}if(!G||typeof G!=="object")continue;if(e(G)){let Q=G.$expression;if(w0(Q.operator))T0(z,q,(W,Y)=>H0(Q,W,Y));else m1(z,q,()=>H0(Q,z,null));continue}if(Y0(G)){if(G.body){let Q=G.parameters?B0(G.parameters):G.arguments??[],W=Function("state",...Q,G.body);if(G.body.includes("return"))m1(z,q,()=>W(z));else T0(z,q,W)}else T0(z,q,()=>{});continue}if(l0(G)&&(G.$prototype==="LocalStorage"||G.$prototype==="SessionStorage"))T0(z,q,Q1(G.default??null))}return z}function T0(Z,X,z){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,value:z,writable:!0})}function m1(Z,X,z){Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,get:z})}function S(Z,X){if(z0(Z))return C6(Z.$ref,X);if(j(Z))return f1(Z,X);return Z}function z0(Z){return t(Z)}function C6(Z,X){if(typeof Z!=="string")return Z;if(Z.startsWith("$map/")){let z=Z.split("/"),[,q]=z,G=X.$map?.[q]??X[`$map/${q}`];return z.length>2?c8(G,z.slice(2).join("/")):G}if(Z.startsWith("#/state/")){let z=Z.slice(8),q=z.indexOf("/");if(q===-1)return X[z];return c8(X[z.slice(0,q)],z.slice(q+1))}return X[Z]??null}function f1(Z,X){try{let z=Z.match(/^\$\{(.+)\}$/s);if(z)return Function("state","$map",`return (${z[1]})`)(X,X?.$map);return Function("state","$map",`return \`${Z}\``)(X,X?.$map)}catch{return null}}function c8(Z,X){if(!X)return Z;let z=Z;for(let q of X.split("/"))z=z==null?void 0:z[q];return z}function Q1(Z){if(Z===null||typeof Z!=="object")return Z;return structuredClone(Z)}function x0(Z,X){let z="",q=S(Z.id,X),G=S(Z.className,X),Q=S(Z.hidden,X),W=S(Z.tabIndex,X),Y=S(Z.title,X),J=S(Z.lang,X),U=S(Z.dir,X);if(q)z+=` id="${C(String(q))}"`;if(G)z+=` class="${C(String(G))}"`;if(Q)z+=" hidden";if(W!==void 0&&W!==null)z+=` tabindex="${C(String(W))}"`;if(Y)z+=` title="${C(String(Y))}"`;if(J)z+=` lang="${C(String(J))}"`;if(U)z+=` dir="${C(String(U))}"`;if(Z.style&&X){let K=Object.entries(Z.style).filter(([V,M])=>!V.startsWith(":")&&!V.startsWith(".")&&!V.startsWith("&")&&!V.startsWith("[")&&!V.startsWith("@")&&M!==null&&typeof M!=="object"&&typeof M==="string"&&j(M)).map(([V,M])=>{let H=S(M,X);return H==null?null:`${d(V)}: ${H}`}).filter(Boolean).join("; ");if(K)z+=` style="${K}"`}if(Z.attributes)for(let[K,V]of Object.entries(Z.attributes)){let M=S(V,X);if(M!==null&&M!==void 0&&(typeof M==="string"||typeof M==="number"||typeof M==="boolean"))z+=` ${K}="${C(String(M))}"`}if(Z.tagName==="img"){if(!Z.attributes?.loading)z+=' loading="lazy"';if(!Z.attributes?.decoding)z+=' decoding="async"'}if(Z.$static)z+=" data-jx-static";else if(Z.$prerendered)z+=" data-jx-prerendered";return z}function k0(Z,X={},z=null){let q=[];if(z&&typeof z==="object"){let Q=(K,V)=>{let M=h(V);if(M)q.push(`${K} { ${M} }`);for(let[H,F]of Object.entries(V)){if(F===null||typeof F!=="object"||Array.isArray(F))continue;if(H.startsWith("@")){let B=H.startsWith("@--")?`@media ${X[H.slice(1)]??H.slice(1)}`:H,D=h(F);if(D)q.push(`${B} { ${K} { ${D} } }`);for(let[$,w]of Object.entries(F)){if(w===null||typeof w!=="object"||Array.isArray(w))continue;if($.startsWith("@"))continue;let R=$.startsWith("&")?$.replace("&",K):$.startsWith(":")||$.startsWith(".")||$.startsWith("[")?`${K}${$}`:`${K} ${$}`,N=h(w);if(N)q.push(`${B} { ${R} { ${N} } }`)}continue}let A=H.startsWith("&")?H.replace("&",K):H.startsWith(":")||H.startsWith(".")||H.startsWith("[")?`${K}${H}`:`${K} ${H}`;Q(A,F)}};for(let[K,V]of Object.entries(z))if(K.startsWith(":")||K.startsWith(".")||K.startsWith("["))Q(K,V);else if(V!==null&&typeof V==="object"&&!Array.isArray(V)&&!K.startsWith("@")&&!K.startsWith("--"))Q(K,V);else if(K.startsWith("@")){let M=K.startsWith("@--")?`@media ${X[K.slice(1)]??K.slice(1)}`:K.startsWith("@(")?`@media ${K.slice(1)}`:K;q.push(`${M} { body { ${h(V)} } }`)}let W={},Y={};for(let[K,V]of Object.entries(z)){if(K.startsWith(":")||K.startsWith(".")||K.startsWith("[")||K.startsWith("@"))continue;if(V!==null&&typeof V==="object"&&!Array.isArray(V))continue;if(K.startsWith("--"))W[K]=V;else Y[K]=V}let J=h(W);if(J)q.push(`:root { ${J} }`);let U=h(Y);if(U)q.push(`body { ${U} }`)}if(E0(Z,q,X,"",{n:0}),q.length===0)return"";return`<style>
|
|
2
2
|
${q.join(`
|
|
3
3
|
`)}
|
|
4
|
-
</style>`}function
|
|
5
|
-
${
|
|
4
|
+
</style>`}function l8(Z,X,z,q){let G=h(X);if(G)z.push(`${Z} { ${G} }`);for(let[Q,W]of Object.entries(X)){if(W===null||typeof W!=="object"||Array.isArray(W))continue;if(Q.startsWith("@")){let J=Q.startsWith("@--")?`@media ${q[Q.slice(1)]??Q.slice(1)}`:Q.startsWith("@(")?`@media ${Q.slice(1)}`:Q,U=h(W);if(U)z.push(`${J} { ${Z} { ${U} } }`);for(let[K,V]of Object.entries(W)){if(V===null||typeof V!=="object"||Array.isArray(V))continue;if(K.startsWith("@"))continue;let M=K.startsWith("&")?K.replace("&",Z):K.startsWith(":")||K.startsWith(".")||K.startsWith("[")?`${Z}${K}`:`${Z} ${K}`,H=h(V);if(H)z.push(`${J} { ${M} { ${H} } }`)}continue}let Y=Q.startsWith("&")?Q.replace("&",Z):Q.startsWith(":")||Q.startsWith(".")||Q.startsWith("[")?`${Z}${Q}`:`${Z} ${Q}`;l8(Y,W,z,q)}}function E0(Z,X,z,q="",G,Q="jx"){let W=G??{n:0};if(!Z||typeof Z!=="object")return;if(Z.style&&!Z.id&&!Z.className)Z.className=`${Q}-${W.n}`,W.n+=1;let Y=Z.id?`#${Z.id}`:Z.className?`.${Z.className.split(" ")[0]}`:Z.tagName??"*";if(Z.style){let J=[];for(let[U,K]of Object.entries(Z.style)){if(U.startsWith(":")||U.startsWith(".")||U.startsWith("&")||U.startsWith("[")||U.startsWith("@"))continue;if(K===null||typeof K==="object")continue;if(typeof K==="string"&&j(K))continue;J.push(` ${d(U)}: ${K};`)}if(J.length>0)X.push(`${Y} {
|
|
5
|
+
${J.join(`
|
|
6
6
|
`)}
|
|
7
|
-
}`);for(let[
|
|
8
|
-
`);if(!Z||typeof Z!=="object")return"";if(Z.$prototype==="Array")return"";let q=Z.tagName??"div";if(q==="slot"&&z!=null)return z;let
|
|
9
|
-
`);return`<${q}${
|
|
10
|
-
`)}function
|
|
11
|
-
${
|
|
7
|
+
}`);for(let[U,K]of Object.entries(Z.style)){if(K===null||typeof K!=="object"||Array.isArray(K))continue;if(U.startsWith("@")){let V=U.startsWith("@--")?`@media ${z[U.slice(1)]??U.slice(1)}`:U.startsWith("@(")?`@media ${U.slice(1)}`:U,M=h(K);if(M)X.push(`${V} { ${Y} { ${M} } }`);for(let[H,F]of Object.entries(K)){if(F===null||typeof F!=="object"||Array.isArray(F))continue;if(H.startsWith("@"))continue;let A=H.startsWith("&")?H.replace("&",Y):H.startsWith(":")||H.startsWith(".")||H.startsWith("[")?`${Y}${H}`:`${Y} ${H}`;X.push(`${V} { ${A} { ${h(F)} } }`)}}else{let V=U.startsWith("&")?U.replace("&",Y):U.startsWith(":")||U.startsWith(".")||U.startsWith("[")?`${Y}${U}`:`${Y} ${U}`;l8(V,K,X,z)}}}if(Array.isArray(Z.children))for(let J of Z.children)E0(J,X,z,Y,W,Q);if(Z.cases&&typeof Z.cases==="object")for(let J of Object.values(Z.cases))E0(J,X,z,Y,W,Q)}function C(Z){return String(Z).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}function K1(Z){return Z.split("-").map((X)=>X.charAt(0).toUpperCase()+X.slice(1)).join("")}function i8(Z){let X=new Map;return n8(Z,X),[...X.values()]}function n8(Z,X){if(!Z||typeof Z!=="object")return;if(Z.state){for(let[z,q]of Object.entries(Z.state))if(y1(q))X.set(q.$export,{exportName:q.$export,key:z,src:q.$src})}if(Array.isArray(Z.children))for(let z of Z.children)n8(z,X)}function J1(Z,X,z=null){if(typeof Z==="string"){if(j(Z)&&X){let W=f1(Z,X);return W!=null?C(String(W)):C(Z)}return C(Z)}if(typeof Z==="number"||typeof Z==="boolean")return C(String(Z));if(Array.isArray(Z))return Z.map((W)=>J1(W,X,z)).join(`
|
|
8
|
+
`);if(!Z||typeof Z!=="object")return"";if(Z.$prototype==="Array")return"";if(Z.$switch){let W=Z.tagName??"div",Y=x0(Z,X),J=S(Z.$switch,X),U=J==null?void 0:Z.cases?.[String(J)],K=U!==void 0&&!z0(U)?J1(U,X,z):"";return`<${W}${Y}>${K}</${W}>`}let q=Z.tagName??"div";if(q==="slot"&&z!=null)return z;let G=x0(Z,X);if(R6.has(q))return`<${q}${G}>`;let Q="";if(Z.textContent!==void 0){let W=S(Z.textContent,X);Q=W!=null?C(String(W)):""}else if(Z.innerHTML){let W=S(Z.innerHTML,X);Q=W!=null?String(W):Z.innerHTML}else if(Array.isArray(Z.children))Q=Z.children.map((W)=>J1(W,X,z)).join(`
|
|
9
|
+
`);return`<${q}${G}>${Q}</${q}>`}function F7(Z,X=null,z=null){let q=Z.state??{};if(X){q={...q};for(let[Q,W]of Object.entries(X))if(Q in q){let Y=q[Q];q[Q]=Y&&typeof Y==="object"&&!Array.isArray(Y)&&"default"in Y?{...Y,default:W}:W}else q[Q]=W}let G=d8(q,null);if(!Array.isArray(Z.children))return"";return Z.children.map((Q)=>J1(Q,G,z)).join(`
|
|
10
|
+
`)}function B7(Z){return h1(Z)}function h1(Z){if(!Z||typeof Z!=="object")return!0;if(Array.isArray(Z))return Z.every((X)=>h1(X));if(Z.$prototype)return!1;if(Z.$ref)return!1;if(Z.state)for(let X of Object.values(Z.state)){if(!X||typeof X!=="object")continue;let z=X;if(z.$prototype)return!1;if(z.$ref)return!1}for(let X of Object.keys(Z))if(X.startsWith("on")&&X!=="observedAttributes")return!1;if(Array.isArray(Z.children))return Z.children.every((X)=>h1(X));if(Z.children&&typeof Z.children==="object"&&Z.children.$prototype)return!1;return!0}function $7(Z,X,z=null,q={}){let G=[];if(X&&typeof X==="object"){let Q=[];for(let[W,Y]of Object.entries(X)){if(W.startsWith(":")||W.startsWith(".")||W.startsWith("&")||W.startsWith("[")||W.startsWith("@"))continue;if(Y===null||typeof Y==="object")continue;if(typeof Y==="string"&&j(Y))continue;Q.push(` ${d(W)}: ${Y};`)}if(Q.length>0)G.push(`${Z} {
|
|
11
|
+
${Q.join(`
|
|
12
12
|
`)}
|
|
13
|
-
}`);for(let[
|
|
14
|
-
`)
|
|
15
|
-
`:""}var e0="https://esm.sh/@vue/reactivity@3.5.32",Z1="https://esm.sh/lit-html@3.3.0",W6,Y6;var j0=T(()=>{a0();j1();W6=new Set(["type","enum","minimum","maximum","minLength","maxLength","pattern","format","items","properties","required","description","title","$comment"]);Y6=new Set(["input","br","hr","img","meta","link","area","col","source"])});function Q0(Z){if(Z.startsWith("\\\\?\\"))return Z;return Z.split("\\").join("/")}var U6,u0=()=>U6;var k8=T(()=>{U6=/^win/.test(globalThis.process?globalThis.process.platform:"")});function S(Z,X){let z=new URL(Q0(Z),"https://aaa.nonexistanturl.com"),q=new URL(Q0(X),z),J=X.match(/(\s*)$/)?.[1]||"";if(q.hostname==="aaa.nonexistanturl.com"){let{pathname:G,search:Y,hash:Q}=q;return G+Y+decodeURIComponent(Q)+J}let W=q.toString()+J;if(W.includes("#")){let[G,Y]=W.split("#",2);return G+"#"+decodeURIComponent(Y||"")}return W}function D0(){if(typeof window<"u"&&window.location&&window.location.href){let Z=window.location.href;if(!Z||!Z.startsWith("http"))try{return new URL(Z),Z}catch{return"/"}return Z}if(typeof process<"u"&&process.cwd){let Z=process.cwd(),X=Z.slice(-1);if(X==="/"||X==="\\")return Z;else return Z+"/"}return"/"}function b8(Z){let X=V6.exec(Z||"");if(X)return X[1].toLowerCase();return}function g8(Z){let X=Z.lastIndexOf(".");if(X>=0)return D6(Z.substring(X).toLowerCase());return""}function D6(Z){let X=Z.indexOf("?");if(X>=0)Z=Z.substring(0,X);return Z}function Z0(Z){if(!Z)return"#";let X=Z.indexOf("#");if(X>=0)return Z.substring(X);return"#"}function x(Z){if(!Z)return"";let X=Z.indexOf("#");if(X>=0)Z=Z.substring(0,X);return Z}function v8(Z){let X=b8(Z);if(X==="http"||X==="https")return!0;else if(X===void 0)return typeof window<"u";else return!1}function k1(Z){if(!Z||typeof Z!=="string")return!0;let X=Z.trim().toLowerCase();if(!X)return!0;if(X.startsWith("javascript:")||X.startsWith("vbscript:")||X.startsWith("data:"))return!0;if(X.startsWith("file:"))return!0;if(typeof window<"u"&&window.location&&window.location.href)return!1;let z=["localhost","127.0.0.1","::1","10.","172.16.","172.17.","172.18.","172.19.","172.20.","172.21.","172.22.","172.23.","172.24.","172.25.","172.26.","172.27.","172.28.","172.29.","172.30.","172.31.","192.168.","169.254.",".local",".internal",".intranet",".corp",".home",".lan"];try{let q=new URL(X.startsWith("//")?"http:"+X:X),J=q.hostname.toLowerCase();for(let G of z)if(J===G||J.startsWith(G)||J.endsWith(G))return!0;if($6(J))return!0;let W=q.port;if(W&&A6(parseInt(W)))return!0}catch{if(X.startsWith("/")&&!X.startsWith("//"))return!1;for(let q of z)if(X.includes(q))return!0}return!1}function $6(Z){let X=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,z=Z.match(X);if(!z)return!1;let[,q,J,W,G]=z.map(Number);if(q>255||J>255||W>255||G>255)return!1;return q===10||q===127||q===172&&J>=16&&J<=31||q===192&&J===168||q===169&&J===254}function A6(Z){return[22,23,25,53,135,139,445,993,995,1433,1521,3306,3389,5432,5900,6379,8080,8443,9200,27017].includes(Z)}function z1(Z){if(typeof window<"u"||typeof process<"u"&&!1)return!1;let X=b8(Z);return X===void 0||X==="file"}function y8(Z){if(u0()){let X=D0(),z=Z.toUpperCase(),J=Q0(X).toUpperCase(),W=z.includes(J),G=z.includes(J),Y=H6.test(Z)||Z.startsWith("http://")||Z.startsWith("https://")||Z.startsWith("file://");if(!(W||G||Y)&&!X.startsWith("http"))Z=((U,K)=>{if(U.endsWith("/")||U.endsWith("\\"))return U+K;else return U+"/"+K})(X,Z);Z=Q0(Z)}Z=encodeURI(Z);for(let X of B6)Z=Z.replace(X[0],X[1]);return Z}function P0(Z,X){Z=Z.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"),Z=decodeURI(Z);for(let q=0;q<S1.length;q+=2)Z=Z.replace(S1[q],S1[q+1]);let z=Z.toLowerCase().startsWith("file://");if(z){if(Z=Z.replace(/^file:\/\//,"").replace(/^\//,""),u0()&&Z[1]==="/")Z=`${Z[0]}:${Z.substring(1)}`;if(X)Z="file:///"+Z;else z=!1,Z=u0()?Z:"/"+Z}if(u0()&&!z){if(Z=Z.replace(K6,"\\"),Z.match(/^[a-z]:\\/i))Z=Z[0].toUpperCase()+Z.substring(1)}return Z}function q1(Z){if(Z.length<=1||Z[0]!=="#"||Z[1]!=="/")return[];return Z.slice(2).split("/").map((X)=>{return X.replace(M6,"/").replace(F6,"~")})}var K6,V6,M6,F6,H6,B6,S1,N0=(Z)=>new URL(Z);var f=T(()=>{k8();K6=/\//g,V6=/^(\w{2,}):\/\//i,M6=/~1/g,F6=/~0/g,H6=/^[a-zA-Z]:[\\/]/,B6=[[/\?/g,"%3F"],[/#/g,"%23"]],S1=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"]});function m8(){let Z={},X=this;for(let z of I6(X))if(typeof z==="string"){let q=X[z],J=typeof q;if(!L6.includes(J))Z[z]=q}return Z}function I6(Z,X=[]){let z=[];while(Z&&Z!==w6)z=z.concat(Object.getOwnPropertyNames(Z),Object.getOwnPropertySymbols(Z)),Z=Object.getPrototypeOf(Z);let q=new Set(z);for(let J of X.concat(O6))q.delete(J);return q}function z0(Z){return Z instanceof o||Z instanceof _0}function g1(Z){if(Z.path===null)Z.path=[];return Z}var L6,O6,w6,o,_0,r,J1,e,G1,W1,b1,x0;var s=T(()=>{f();L6=["function","symbol","undefined"],O6=["constructor","prototype","__proto__"],w6=Object.getPrototypeOf({});o=class o extends Error{name;message;source;path;code;constructor(Z,X){super();this.code="EUNKNOWN",this.name="JSONParserError",this.message=Z,this.source=X,this.path=null}toJSON=m8.bind(this);get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};_0=class _0 extends Error{files;constructor(Z){super();this.files=Z,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${P0(Z.$refs._root$Ref.path)}'`}toJSON=m8.bind(this);static getParserErrors(Z){let X=[];for(let z of Object.values(Z.$refs._$refs))if(z.errors)X.push(...z.errors);return X}get errors(){return _0.getParserErrors(this.files)}};r=class r extends o{code="EPARSER";name="ParserError";constructor(Z,X){super(`Error parsing ${X}: ${Z}`,X)}};J1=class J1 extends o{code="EUNMATCHEDPARSER";name="UnmatchedParserError";constructor(Z){super(`Could not find parser for "${Z}"`,Z)}};e=class e extends o{code="ERESOLVER";name="ResolverError";ioErrorCode;constructor(Z,X){super(Z.message||`Error reading file "${X}"`,X);if("code"in Z)this.ioErrorCode=String(Z.code)}};G1=class G1 extends o{code="EUNMATCHEDRESOLVER";name="UnmatchedResolverError";constructor(Z){super(`Could not find resolver for "${Z}"`,Z)}};W1=class W1 extends o{code="EMISSINGPOINTER";name="MissingPointerError";targetToken;targetRef;targetFound;parentPath;constructor(Z,X,z,q,J){super(`Missing $ref pointer "${Z0(X)}". Token "${Z}" does not exist.`,x(X));this.targetToken=Z,this.targetRef=z,this.targetFound=q,this.parentPath=J}};b1=class b1 extends o{code="ETIMEOUT";name="TimeoutError";constructor(Z){super(`Dereferencing timeout reached: ${Z}ms`)}};x0=class x0 extends o{code="EUNMATCHEDRESOLVER";name="InvalidPointerError";constructor(Z,X){super(`Invalid $ref pointer "${Z}". Pointers must begin with "#/"`,x(X))}}});function m(Z,X){let z=T6(X);return z?S(Z,z):Z}function Q1(Z){if(!Z||typeof Z!=="object"||ArrayBuffer.isView(Z))return!1;let X=Z.$schema;if(typeof X==="string"&&(X.includes("draft/2019-09/")||X.includes("draft/2020-12/")||X.includes("oas/3.1/")))return!0;let z=Z.openapi;return typeof z==="string"&&/^3\.1(?:\.|$)/.test(z)}function Y1(Z,X,z,q,J=!1){if(!J)return;let W=new Set,G=(Y,Q)=>{if(!Y||typeof Y!=="object"||ArrayBuffer.isView(Y)||W.has(Y))return;W.add(Y);let U=m(Q,Y);if(U!==Q)Z._addAlias(U,Y,q,J);for(let K of Object.keys(Y))G(Y[K],U)};G(z,X)}function T6(Z){if(Z&&typeof Z==="object"&&"$id"in Z&&typeof Z.$id==="string"&&Z.$id.length>0)return Z.$id;return}var $0=T(()=>{f()});class A0{$ref;path;originalPath;scopeBase;value;circular;indirections;constructor(Z,X,z){this.$ref=Z,this.path=X,this.originalPath=z||X,this.scopeBase=Z.path||x(X),this.value=void 0,this.circular=!1,this.indirections=0}resolve(Z,X,z){let q=A0.parse(this.path,this.originalPath),J=[];if(this.value=u8(Z),this.$ref.dynamicIdScope&&!f8(this.$ref))this.scopeBase=m(this.scopeBase,this.value);for(let G=0;G<q.length;G++){let Y=this.circular,Q=_.isExtended$Ref(this.value);if(U1(this,X,z))this.path=A0.join(this.path,q.slice(G));else if(!Y&&this.circular&&Q)this.circular=!1;let U=q[G];if(this.value[U]===void 0||this.value[U]===null&&G===q.length-1){let K=!1;for(let A=q.length-1;A>G;A--){let B=q.slice(G,A+1).join("/");if(this.value[B]!==void 0){this.value=this.value[B],G=A,K=!0;break}}if(K)continue;if(U in this.value&&this.value[U]===null){this.value=K1;continue}this.value=null;let V=this.$ref.path||"",M=this.path.replace(V,""),F=A0.join("",J),H=z?.replace(V,"");throw new W1(U,decodeURI(this.originalPath),M,F,H)}else this.value=this.value[U];if(J.push(U),this.$ref.dynamicIdScope)this.scopeBase=m(this.scopeBase,this.value)}let W=this.$ref.dynamicIdScope?this.scopeBase:this.path;if(!this.value||this.value.$ref&&S(W,this.value.$ref)!==z)U1(this,X,z);return this}set(Z,X,z){let q=A0.parse(this.path),J;if(q.length===0)return this.value=X,X;if(this.value=u8(Z),this.$ref.dynamicIdScope&&!f8(this.$ref))this.scopeBase=m(this.scopeBase,this.value);for(let W=0;W<q.length-1;W++){if(U1(this,z),J=q[W],this.value&&this.value[J]!==void 0)this.value=this.value[J];else this.value=h8(this,J,{});if(this.$ref.dynamicIdScope)this.scopeBase=m(this.scopeBase,this.value)}return U1(this,z),J=q[q.length-1],h8(this,J,X),Z}static parse(Z,X){let z=Z0(Z).substring(1);if(!z)return[];let q=z.split("/");for(let J=0;J<q.length;J++)q[J]=q[J].replace(j6,"/").replace(N6,"~");if(q[0]!=="")throw new x0(z,X===void 0?Z:X);return q.slice(1)}static join(Z,X){if(Z.indexOf("#")===-1)Z+="#";X=Array.isArray(X)?X:[X];for(let z=0;z<X.length;z++){let q=X[z];Z+="/"+q.replace(C6,"~0").replace(R6,"~1")}return Z}}function U1(Z,X,z){if(_.isAllowed$Ref(Z.value,X)){let q=Z.$ref.dynamicIdScope?Z.scopeBase:Z.path,J=S(q,Z.value.$ref);if(J===Z.path&&!P6(z))Z.circular=!0;else{let W=Z.$ref.$refs._resolve(J,Z.path,X);if(W===null)return!1;if(Z.indirections+=W.indirections+1,_.isExtended$Ref(Z.value))return Z.value=_.dereference(Z.value,W.value,X),!1;else Z.$ref=W.$ref,Z.path=W.path,Z.value=W.value,Z.scopeBase=Z.$ref.path;return!0}}return}function h8(Z,X,z){if(Z.value&&typeof Z.value==="object")if(X==="-"&&Array.isArray(Z.value))Z.value.push(z);else Z.value[X]=z;else throw new o(`Error assigning $ref pointer "${Z.path}".
|
|
16
|
-
Cannot set "${X}" of a non-object.`);return z}function
|
|
17
|
-
"${x(z)}" not found.`);q.set(z,X)}_get$Ref(Z){return Z=
|
|
18
|
-
"${x(q)}" not found.`);return
|
|
19
|
-
Parsed value is empty`);else return
|
|
13
|
+
}`);for(let[W,Y]of Object.entries(X))if(W.startsWith("@")){let J=W.startsWith("@--")?`@media ${q[W.slice(1)]??W.slice(1)}`:W.startsWith("@(")?`@media ${W.slice(1)}`:W;G.push(`${J} { ${Z} { ${h(Y)} } }`)}else if(W.startsWith(":")||W.startsWith(".")||W.startsWith("&")||W.startsWith("[")){let J=W.startsWith("&")?W.replace("&",Z):`${Z}${W}`;G.push(`${J} { ${h(Y)} }`)}}if(z&&Array.isArray(z.children)){let Q={n:0};for(let W of z.children)E0(W,G,q,"",Q,Z)}return G.length>0?`${G.join(`
|
|
14
|
+
`)}
|
|
15
|
+
`:""}var Y1="https://esm.sh/@vue/reactivity@3.5.32",U1="https://esm.sh/lit-html@3.3.0",R6;var b0=T(()=>{W1();v1();$0();$0();R6=new Set(["input","br","hr","img","meta","link","area","col","source"])});function U0(Z){if(Z.startsWith("\\\\?\\"))return Z;return Z.split("\\").join("/")}var N6,o0=()=>N6;var o8=T(()=>{N6=/^win/.test(globalThis.process?globalThis.process.platform:"")});function k(Z,X){let z=new URL(U0(Z),"https://aaa.nonexistanturl.com"),q=new URL(U0(X),z),G=X.match(/(\s*)$/)?.[1]||"";if(q.hostname==="aaa.nonexistanturl.com"){let{pathname:W,search:Y,hash:J}=q;return W+Y+decodeURIComponent(J)+G}let Q=q.toString()+G;if(Q.includes("#")){let[W,Y]=Q.split("#",2);return W+"#"+decodeURIComponent(Y||"")}return Q}function C0(){if(typeof window<"u"&&window.location&&window.location.href){let Z=window.location.href;if(!Z||!Z.startsWith("http"))try{return new URL(Z),Z}catch{return"/"}return Z}if(typeof process<"u"&&process.cwd){let Z=process.cwd(),X=Z.slice(-1);if(X==="/"||X==="\\")return Z;else return Z+"/"}return"/"}function r8(Z){let X=_6.exec(Z||"");if(X)return X[1].toLowerCase();return}function s8(Z){let X=Z.lastIndexOf(".");if(X>=0)return k6(Z.substring(X).toLowerCase());return""}function k6(Z){let X=Z.indexOf("?");if(X>=0)Z=Z.substring(0,X);return Z}function q0(Z){if(!Z)return"#";let X=Z.indexOf("#");if(X>=0)return Z.substring(X);return"#"}function x(Z){if(!Z)return"";let X=Z.indexOf("#");if(X>=0)Z=Z.substring(0,X);return Z}function a8(Z){let X=r8(Z);if(X==="http"||X==="https")return!0;else if(X===void 0)return typeof window<"u";else return!1}function p1(Z){if(!Z||typeof Z!=="string")return!0;let X=Z.trim().toLowerCase();if(!X)return!0;if(X.startsWith("javascript:")||X.startsWith("vbscript:")||X.startsWith("data:"))return!0;if(X.startsWith("file:"))return!0;if(typeof window<"u"&&window.location&&window.location.href)return!1;let z=["localhost","127.0.0.1","::1","10.","172.16.","172.17.","172.18.","172.19.","172.20.","172.21.","172.22.","172.23.","172.24.","172.25.","172.26.","172.27.","172.28.","172.29.","172.30.","172.31.","192.168.","169.254.",".local",".internal",".intranet",".corp",".home",".lan"];try{let q=new URL(X.startsWith("//")?"http:"+X:X),G=q.hostname.toLowerCase();for(let W of z)if(G===W||G.startsWith(W)||G.endsWith(W))return!0;if(b6(G))return!0;let Q=q.port;if(Q&&g6(parseInt(Q)))return!0}catch{if(X.startsWith("/")&&!X.startsWith("//"))return!1;for(let q of z)if(X.includes(q))return!0}return!1}function b6(Z){let X=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,z=Z.match(X);if(!z)return!1;let[,q,G,Q,W]=z.map(Number);if(q>255||G>255||Q>255||W>255)return!1;return q===10||q===127||q===172&&G>=16&&G<=31||q===192&&G===168||q===169&&G===254}function g6(Z){return[22,23,25,53,135,139,445,993,995,1433,1521,3306,3389,5432,5900,6379,8080,8443,9200,27017].includes(Z)}function V1(Z){if(typeof window<"u"||typeof process<"u"&&!1)return!1;let X=r8(Z);return X===void 0||X==="file"}function t8(Z){if(o0()){let X=C0(),z=Z.toUpperCase(),G=U0(X).toUpperCase(),Q=z.includes(G),W=z.includes(G),Y=E6.test(Z)||Z.startsWith("http://")||Z.startsWith("https://")||Z.startsWith("file://");if(!(Q||W||Y)&&!X.startsWith("http"))Z=((U,K)=>{if(U.endsWith("/")||U.endsWith("\\"))return U+K;else return U+"/"+K})(X,Z);Z=U0(Z)}Z=encodeURI(Z);for(let X of S6)Z=Z.replace(X[0],X[1]);return Z}function v0(Z,X){Z=Z.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"),Z=decodeURI(Z);for(let q=0;q<c1.length;q+=2)Z=Z.replace(c1[q],c1[q+1]);let z=Z.toLowerCase().startsWith("file://");if(z){if(Z=Z.replace(/^file:\/\//,"").replace(/^\//,""),o0()&&Z[1]==="/")Z=`${Z[0]}:${Z.substring(1)}`;if(X)Z="file:///"+Z;else z=!1,Z=o0()?Z:"/"+Z}if(o0()&&!z){if(Z=Z.replace(j6,"\\"),Z.match(/^[a-z]:\\/i))Z=Z[0].toUpperCase()+Z.substring(1)}return Z}function M1(Z){if(Z.length<=1||Z[0]!=="#"||Z[1]!=="/")return[];return Z.slice(2).split("/").map((X)=>{return X.replace(P6,"/").replace(x6,"~")})}var j6,_6,P6,x6,E6,S6,c1,g0=(Z)=>new URL(Z);var u=T(()=>{o8();j6=/\//g,_6=/^(\w{2,}):\/\//i,P6=/~1/g,x6=/~0/g,E6=/^[a-zA-Z]:[\\/]/,S6=[[/\?/g,"%3F"],[/#/g,"%23"]],c1=[/%23/g,"#",/%24/g,"$",/%26/g,"&",/%2C/g,",",/%40/g,"@"]});function e8(){let Z={},X=this;for(let z of h6(X))if(typeof z==="string"){let q=X[z],G=typeof q;if(!v6.includes(G))Z[z]=q}return Z}function h6(Z,X=[]){let z=[];while(Z&&Z!==m6)z=z.concat(Object.getOwnPropertyNames(Z),Object.getOwnPropertySymbols(Z)),Z=Object.getPrototypeOf(Z);let q=new Set(z);for(let G of X.concat(y6))q.delete(G);return q}function W0(Z){return Z instanceof o||Z instanceof y0}function l1(Z){if(Z.path===null)Z.path=[];return Z}var v6,y6,m6,o,y0,r,H1,Z0,F1,B1,d1,m0;var s=T(()=>{u();v6=["function","symbol","undefined"],y6=["constructor","prototype","__proto__"],m6=Object.getPrototypeOf({});o=class o extends Error{name;message;source;path;code;constructor(Z,X){super();this.code="EUNKNOWN",this.name="JSONParserError",this.message=Z,this.source=X,this.path=null}toJSON=e8.bind(this);get footprint(){return`${this.path}+${this.source}+${this.code}+${this.message}`}};y0=class y0 extends Error{files;constructor(Z){super();this.files=Z,this.name="JSONParserErrorGroup",this.message=`${this.errors.length} error${this.errors.length>1?"s":""} occurred while reading '${v0(Z.$refs._root$Ref.path)}'`}toJSON=e8.bind(this);static getParserErrors(Z){let X=[];for(let z of Object.values(Z.$refs._$refs))if(z.errors)X.push(...z.errors);return X}get errors(){return y0.getParserErrors(this.files)}};r=class r extends o{code="EPARSER";name="ParserError";constructor(Z,X){super(`Error parsing ${X}: ${Z}`,X)}};H1=class H1 extends o{code="EUNMATCHEDPARSER";name="UnmatchedParserError";constructor(Z){super(`Could not find parser for "${Z}"`,Z)}};Z0=class Z0 extends o{code="ERESOLVER";name="ResolverError";ioErrorCode;constructor(Z,X){super(Z.message||`Error reading file "${X}"`,X);if("code"in Z)this.ioErrorCode=String(Z.code)}};F1=class F1 extends o{code="EUNMATCHEDRESOLVER";name="UnmatchedResolverError";constructor(Z){super(`Could not find resolver for "${Z}"`,Z)}};B1=class B1 extends o{code="EMISSINGPOINTER";name="MissingPointerError";targetToken;targetRef;targetFound;parentPath;constructor(Z,X,z,q,G){super(`Missing $ref pointer "${q0(X)}". Token "${Z}" does not exist.`,x(X));this.targetToken=Z,this.targetRef=z,this.targetFound=q,this.parentPath=G}};d1=class d1 extends o{code="ETIMEOUT";name="TimeoutError";constructor(Z){super(`Dereferencing timeout reached: ${Z}ms`)}};m0=class m0 extends o{code="EUNMATCHEDRESOLVER";name="InvalidPointerError";constructor(Z,X){super(`Invalid $ref pointer "${Z}". Pointers must begin with "#/"`,x(X))}}});function y(Z,X){let z=u6(X);return z?k(Z,z):Z}function $1(Z){if(!Z||typeof Z!=="object"||ArrayBuffer.isView(Z))return!1;let X=Z.$schema;if(typeof X==="string"&&(X.includes("draft/2019-09/")||X.includes("draft/2020-12/")||X.includes("oas/3.1/")))return!0;let z=Z.openapi;return typeof z==="string"&&/^3\.1(?:\.|$)/.test(z)}function D1(Z,X,z,q,G=!1){if(!G)return;let Q=new Set,W=(Y,J)=>{if(!Y||typeof Y!=="object"||ArrayBuffer.isView(Y)||Q.has(Y))return;Q.add(Y);let U=y(J,Y);if(U!==J)Z._addAlias(U,Y,q,G);for(let K of Object.keys(Y))W(Y[K],U)};W(z,X)}function u6(Z){if(Z&&typeof Z==="object"&&"$id"in Z&&typeof Z.$id==="string"&&Z.$id.length>0)return Z.$id;return}var R0=T(()=>{u()});class N0{$ref;path;originalPath;scopeBase;value;circular;indirections;constructor(Z,X,z){this.$ref=Z,this.path=X,this.originalPath=z||X,this.scopeBase=Z.path||x(X),this.value=void 0,this.circular=!1,this.indirections=0}resolve(Z,X,z){let q=N0.parse(this.path,this.originalPath),G=[];if(this.value=X9(Z),this.$ref.dynamicIdScope&&!z9(this.$ref))this.scopeBase=y(this.scopeBase,this.value);for(let W=0;W<q.length;W++){let Y=this.circular,J=_.isExtended$Ref(this.value);if(A1(this,X,z))this.path=N0.join(this.path,q.slice(W));else if(!Y&&this.circular&&J)this.circular=!1;let U=q[W];if(this.value[U]===void 0||this.value[U]===null&&W===q.length-1){let K=!1;for(let A=q.length-1;A>W;A--){let B=q.slice(W,A+1).join("/");if(this.value[B]!==void 0){this.value=this.value[B],W=A,K=!0;break}}if(K)continue;if(U in this.value&&this.value[U]===null){this.value=L1;continue}this.value=null;let V=this.$ref.path||"",M=this.path.replace(V,""),H=N0.join("",G),F=z?.replace(V,"");throw new B1(U,decodeURI(this.originalPath),M,H,F)}else this.value=this.value[U];if(G.push(U),this.$ref.dynamicIdScope)this.scopeBase=y(this.scopeBase,this.value)}let Q=this.$ref.dynamicIdScope?this.scopeBase:this.path;if(!this.value||this.value.$ref&&k(Q,this.value.$ref)!==z)A1(this,X,z);return this}set(Z,X,z){let q=N0.parse(this.path),G;if(q.length===0)return this.value=X,X;if(this.value=X9(Z),this.$ref.dynamicIdScope&&!z9(this.$ref))this.scopeBase=y(this.scopeBase,this.value);for(let Q=0;Q<q.length-1;Q++){if(A1(this,z),G=q[Q],this.value&&this.value[G]!==void 0)this.value=this.value[G];else this.value=Z9(this,G,{});if(this.$ref.dynamicIdScope)this.scopeBase=y(this.scopeBase,this.value)}return A1(this,z),G=q[q.length-1],Z9(this,G,X),Z}static parse(Z,X){let z=q0(Z).substring(1);if(!z)return[];let q=z.split("/");for(let G=0;G<q.length;G++)q[G]=q[G].replace(p6,"/").replace(d6,"~");if(q[0]!=="")throw new m0(z,X===void 0?Z:X);return q.slice(1)}static join(Z,X){if(Z.indexOf("#")===-1)Z+="#";X=Array.isArray(X)?X:[X];for(let z=0;z<X.length;z++){let q=X[z];Z+="/"+q.replace(c6,"~0").replace(f6,"~1")}return Z}}function A1(Z,X,z){if(_.isAllowed$Ref(Z.value,X)){let q=Z.$ref.dynamicIdScope?Z.scopeBase:Z.path,G=k(q,Z.value.$ref);if(G===Z.path&&!l6(z))Z.circular=!0;else{let Q=Z.$ref.$refs._resolve(G,Z.path,X);if(Q===null)return!1;if(Z.indirections+=Q.indirections+1,_.isExtended$Ref(Z.value))return Z.value=_.dereference(Z.value,Q.value,X),!1;else Z.$ref=Q.$ref,Z.path=Q.path,Z.value=Q.value,Z.scopeBase=Z.$ref.path;return!0}}return}function Z9(Z,X,z){if(Z.value&&typeof Z.value==="object")if(X==="-"&&Array.isArray(Z.value))Z.value.push(z);else Z.value[X]=z;else throw new o(`Error assigning $ref pointer "${Z.path}".
|
|
16
|
+
Cannot set "${X}" of a non-object.`);return z}function X9(Z){if(W0(Z))throw Z;return Z}function l6(Z){return typeof Z=="string"&&N0.parse(Z).length==0}function z9(Z){return Boolean(Z.path&&Z.path in Z.$refs._aliases)}var L1,f6,c6,p6,d6,f;var r0=T(()=>{h0();u();s();R0();L1=Symbol("null"),f6=/\//g,c6=/~/g,p6=/~1/g,d6=/~0/g;f=N0});class s0{path;value;$refs;pathType;dynamicIdScope=!1;errors=[];constructor(Z){this.$refs=Z}addError(Z){if(this.errors===void 0)this.errors=[];let X=this.errors.map(({footprint:z})=>z);if("errors"in Z&&Array.isArray(Z.errors))this.errors.push(...Z.errors.map(l1).filter(({footprint:z})=>!X.includes(z)));else if(!("footprint"in Z)||!X.includes(Z.footprint))this.errors.push(l1(Z))}exists(Z,X){try{return this.resolve(Z,X),!0}catch{return!1}}get(Z,X){return this.resolve(Z,X)?.value}resolve(Z,X,z,q){let G=new f(this,Z,z);try{let Q=G.resolve(this.value,X,q);if(Q.value===L1)Q.value=null;return Q}catch(Q){if(!X||!X.continueOnError||!W0(Q))throw Q;if(Q.path===null)Q.path=M1(q0(q));if(Q instanceof m0)Q.source=decodeURI(x(q));return this.addError(Q),null}}set(Z,X){let z=new f(this,Z);if(this.value=z.set(this.value,X),this.value===L1)this.value=null}static is$Ref(Z){return Boolean(Z)&&typeof Z==="object"&&Z!==null&&"$ref"in Z&&typeof Z.$ref==="string"&&Z.$ref.length>0}static isExternal$Ref(Z){return s0.is$Ref(Z)&&Z.$ref[0]!=="#"}static isAllowed$Ref(Z,X){if(this.is$Ref(Z)){if(Z.$ref.substring(0,2)==="#/"||Z.$ref==="#")return!0;else if(Z.$ref[0]!=="#"&&(!X||X.resolve?.external))return!0}return}static isExtended$Ref(Z){return s0.is$Ref(Z)&&Object.keys(Z).length>1}static dereference(Z,X,z){if(X&&typeof X==="object"&&s0.isExtended$Ref(Z)){let q={};for(let Q of Object.keys(Z))if(Q!=="$ref")q[Q]=Z[Q];let G=z?.dereference?.mergeKeys??!0;for(let Q of Object.keys(X)){let W=Q;if(!(W in q))q[W]=X[W];else if(G&&typeof q[W]==="object"&&q[W]!==null&&typeof X[W]==="object"&&X[W]!==null)q[W]=q9(X[W],q[W])}return q}else return X}}function q9(Z,X){if(typeof Z!=="object"||Z===null)return X;if(typeof X!=="object"||X===null)return X;let z=Array.isArray(Z)?[...Z]:{...Z};for(let q of Object.keys(X))if(Array.isArray(X[q]))z[q]=[...X[q]];else if(typeof X[q]==="object"&&X[q]!==null)z[q]=q9(Z[q],X[q]);else z[q]=X[q];return z}var _;var h0=T(()=>{r0();s();u();_=s0});class a0{circular;paths(...Z){return G9(this._$refs,Z.flat()).map((z)=>{return U0(z.decoded)})}values(...Z){let X=this._$refs;return G9(X,Z.flat()).reduce((q,G)=>{return q[U0(G.decoded)]=X[G.encoded].value,q},{})}exists(Z,X){try{return this._resolve(Z,"",X),!0}catch{return!1}}get(Z,X){return this._resolve(Z,"",X).value}set(Z,X){let z=k(this._root$Ref.path,Z),q=this._getRef(z);if(!q)throw Error(`Error resolving $ref pointer "${Z}".
|
|
17
|
+
"${x(z)}" not found.`);q.set(z,X)}_get$Ref(Z){return Z=k(this._root$Ref.path,Z),this._getRef(Z)}_add(Z){let X=x(Z),z=new _(this);return z.path=X,this._$refs[X]=z,this._root$Ref=this._root$Ref||z,z}_addAlias(Z,X,z,q=!1){let G=x(Z);if(!G||this._$refs[G]||this._aliases[G])return this._$refs[G]||this._aliases[G];let Q=new _(this);return Q.path=G,Q.pathType=z,Q.value=X,Q.dynamicIdScope=q,this._aliases[G]=Q,Q}_resolve(Z,X,z){let q=k(this._root$Ref.path,Z),G=this._getRef(q);if(!G)throw Error(`Error resolving $ref pointer "${Z}".
|
|
18
|
+
"${x(q)}" not found.`);return G.resolve(q,z,Z,X)}_$refs={};_aliases={};_root$Ref;constructor(){this.circular=!1,this._$refs={},this._aliases={},this._root$Ref=null}toJSON=this.values;_getRef(Z){let X=x(Z);return this._$refs[X]||this._aliases[X]}}function G9(Z,X){let z=Object.keys(Z);if(X=Array.isArray(X[0])?X[0]:Array.prototype.slice.call(X),X.length>0&&X[0])z=z.filter((q)=>{return X.includes(Z[q].pathType)});return z.map((q)=>{return{encoded:q,decoded:Z[q].pathType==="file"?v0(q,!0):q}})}var W9=T(()=>{h0();u()});function i1(Z){return Object.keys(Z||{}).filter((X)=>{return typeof Z[X]==="object"}).map((X)=>{return Z[X].name=X,Z[X]})}function n1(Z,X,z,q,G){return Z.filter((Q)=>{return!!Q9(Q,X,z,q,G)})}function o1(Z){for(let X of Z)X.order=X.order||Number.MAX_SAFE_INTEGER;return Z.sort((X,z)=>{return X.order-z.order})}async function r1(Z,X,z,q){let G,Q,W=0;return new Promise((Y,J)=>{U();function U(){if(G=Z[W++],!G)return J(Q);try{let H=Q9(G,X,z,K,q);if(H&&typeof H.then==="function")H.then(V,M);else if(H!==void 0)V(H);else if(W===Z.length)throw Error("No promise has been returned or callback has been called.")}catch(H){M(H)}}function K(H,F){if(H)M(H);else V(F)}function V(H){Y({plugin:G,result:H})}function M(H){Q={plugin:G,error:H},U()}})}function Q9(Z,X,z,q,G){let Q=Z[X];if(typeof Q==="function")return Q.apply(Z,[z,q,G]);if(!q){if(Q instanceof RegExp)return Q.test(z.url);else if(typeof Q==="string")return Q===z.extension;else if(Array.isArray(Q))return Q.indexOf(z.extension)!==-1}return Q}async function i6(Z,X,z){let q=typeof Z==="string"?Z:Z.url,G=typeof Z==="string"?void 0:Z.baseUrl,Q=typeof Z==="string"?void 0:Z.reference,W=q.indexOf("#"),Y="";if(W>=0)Y=q.substring(W),q=q.substring(0,W);if(Q){let K=Q.indexOf("#");if(K>=0)Q=Q.substring(0,K)}let J=X._add(q),U={url:q,hash:Y,extension:s8(q),...Q!==void 0?{reference:Q}:{},...G!==void 0?{baseUrl:G}:{}};try{let K=await n6(U,z,X);J.pathType=K.plugin.name,U.data=K.result;let V=await o6(U,z,X);return J.value=V.result,J.dynamicIdScope=$1(J.value),D1(X,J.path,J.value,J.pathType,J.dynamicIdScope),V.result}catch(K){if(W0(K))J.value=K;throw K}}async function n6(Z,X,z){let q=i1(X.resolve);q=n1(q,"canRead",Z,void 0,z),o1(q);try{return await r1(q,"read",Z,z)}catch(G){if(!G&&X.continueOnError)throw new F1(Z.url);else if(!G||!("error"in G))throw SyntaxError(`Unable to resolve $ref pointer "${Z.url}"`,{cause:G});else if(G.error instanceof Z0)throw G.error;else throw new Z0(G,Z.url)}}async function o6(Z,X,z){let q=i1(X.parse),G=n1(q,"canParse",Z),Q=G.length>0?G:q;o1(Q);try{let W=await r1(Q,"parse",Z,z);if(!W.plugin.allowEmpty&&r6(W.result))throw SyntaxError(`Error parsing "${Z.url}" as ${W.plugin.name}.
|
|
19
|
+
Parsed value is empty`);else return W}catch(W){if(!W&&X.continueOnError)throw new H1(Z.url);else if(W&&W.message&&W.message.startsWith("Error parsing"))throw W;else if(!W||!("error"in W))throw SyntaxError(`Unable to parse ${Z.url}`,{cause:W});else if(W.error instanceof r)throw W.error;else throw new r(W.error.message,Z.url)}}function r6(Z){return Z===void 0||typeof Z==="object"&&Object.keys(Z).length===0||typeof Z==="string"&&Z.trim().length===0||Buffer.isBuffer(Z)&&Z.length===0}var I1;var s1=T(()=>{u();R0();s();I1=i6});var J9;var Y9=T(()=>{s();J9={order:100,allowEmpty:!0,canParse:".json",allowBOM:!0,async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")if(X.trim().length===0)return;else try{return JSON.parse(X)}catch(z){if(this.allowBOM)try{let q=X.indexOf("{");return X=X.slice(q),JSON.parse(X)}catch(q){throw new r(q.message,Z.url)}throw new r(z.message,Z.url)}else return X}}});function C9(Z){return typeof Z>"u"||Z===null}function s6(Z){return typeof Z==="object"&&Z!==null}function a6(Z){if(Array.isArray(Z))return Z;else if(C9(Z))return[];return[Z]}function t6(Z,X){var z,q,G,Q;if(X){Q=Object.keys(X);for(z=0,q=Q.length;z<q;z+=1)G=Q[z],Z[G]=X[G]}return Z}function e6(Z,X){var z="",q;for(q=0;q<X;q+=1)z+=Z;return z}function Z4(Z){return Z===0&&Number.NEGATIVE_INFINITY===1/Z}function R9(Z,X){var z="",q=Z.reason||"(unknown reason)";if(!Z.mark)return q;if(Z.mark.name)z+='in "'+Z.mark.name+'" ';if(z+="("+(Z.mark.line+1)+":"+(Z.mark.column+1)+")",!X&&Z.mark.snippet)z+=`
|
|
20
20
|
|
|
21
|
-
`+Z.mark.snippet;return q+" "+z}function
|
|
22
|
-
`+Y}U=
|
|
23
|
-
`,Y+=
|
|
24
|
-
`;for(
|
|
25
|
-
`}return Y.replace(/\n$/,"")}function
|
|
26
|
-
`:Z===118?"\v":Z===102?"\f":Z===114?"\r":Z===101?"\x1B":Z===32?" ":Z===34?'"':Z===47?"/":Z===92?"\\":Z===78?"
":Z===95?" ":Z===76?"\u2028":Z===80?"\u2029":""}function
|
|
27
|
-
`,X-1)}function
|
|
28
|
-
`,
|
|
29
|
-
`}break}if(q)if(
|
|
30
|
-
`,
|
|
31
|
-
`,
|
|
32
|
-
`,
|
|
33
|
-
`,
|
|
34
|
-
`;if(Z.charCodeAt(0)===65279)Z=Z.slice(1)}var z=new
|
|
35
|
-
`,q),
|
|
36
|
-
`)
|
|
37
|
-
`+
|
|
38
|
-
`,
|
|
21
|
+
`+Z.mark.snippet;return q+" "+z}function e0(Z,X){if(Error.call(this),this.name="YAMLException",this.reason=Z,this.mark=X,this.message=R9(this,!1),Error.captureStackTrace)Error.captureStackTrace(this,this.constructor);else this.stack=Error().stack||""}function a1(Z,X,z,q,G){var Q="",W="",Y=Math.floor(G/2)-1;if(q-X>Y)Q=" ... ",X=q-Y+Q.length;if(z-q>Y)W=" ...",z=q+Y-W.length;return{str:Q+Z.slice(X,z).replace(/\t/g,"→")+W,pos:q-X+Q.length}}function t1(Z,X){return b.repeat(" ",X-Z.length)+Z}function J4(Z,X){if(X=Object.create(X||null),!Z.buffer)return null;if(!X.maxLength)X.maxLength=79;if(typeof X.indent!=="number")X.indent=1;if(typeof X.linesBefore!=="number")X.linesBefore=3;if(typeof X.linesAfter!=="number")X.linesAfter=2;var z=/\r?\n|\r|\0/g,q=[0],G=[],Q,W=-1;while(Q=z.exec(Z.buffer))if(G.push(Q.index),q.push(Q.index+Q[0].length),Z.position<=Q.index&&W<0)W=q.length-2;if(W<0)W=q.length-1;var Y="",J,U,K=Math.min(Z.line+X.linesAfter,G.length).toString().length,V=X.maxLength-(X.indent+K+3);for(J=1;J<=X.linesBefore;J++){if(W-J<0)break;U=a1(Z.buffer,q[W-J],G[W-J],Z.position-(q[W]-q[W-J]),V),Y=b.repeat(" ",X.indent)+t1((Z.line-J+1).toString(),K)+" | "+U.str+`
|
|
22
|
+
`+Y}U=a1(Z.buffer,q[W],G[W],Z.position,V),Y+=b.repeat(" ",X.indent)+t1((Z.line+1).toString(),K)+" | "+U.str+`
|
|
23
|
+
`,Y+=b.repeat("-",X.indent+K+3+U.pos)+`^
|
|
24
|
+
`;for(J=1;J<=X.linesAfter;J++){if(W+J>=G.length)break;U=a1(Z.buffer,q[W+J],G[W+J],Z.position-(q[W]-q[W+J]),V),Y+=b.repeat(" ",X.indent)+t1((Z.line+J+1).toString(),K)+" | "+U.str+`
|
|
25
|
+
`}return Y.replace(/\n$/,"")}function V4(Z){var X={};if(Z!==null)Object.keys(Z).forEach(function(z){Z[z].forEach(function(q){X[String(q)]=z})});return X}function M4(Z,X){if(X=X||{},Object.keys(X).forEach(function(z){if(U4.indexOf(z)===-1)throw new m('Unknown option "'+z+'" is met in definition of "'+Z+'" YAML type.')}),this.options=X,this.tag=Z,this.kind=X.kind||null,this.resolve=X.resolve||function(){return!0},this.construct=X.construct||function(z){return z},this.instanceOf=X.instanceOf||null,this.predicate=X.predicate||null,this.represent=X.represent||null,this.representName=X.representName||null,this.defaultStyle=X.defaultStyle||null,this.multi=X.multi||!1,this.styleAliases=V4(X.styleAliases||null),K4.indexOf(this.kind)===-1)throw new m('Unknown kind "'+this.kind+'" is specified for "'+Z+'" YAML type.')}function U9(Z,X){var z=[];return Z[X].forEach(function(q){var G=z.length;z.forEach(function(Q,W){if(Q.tag===q.tag&&Q.kind===q.kind&&Q.multi===q.multi)G=W}),z[G]=q}),z}function H4(){var Z={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},X,z;function q(G){if(G.multi)Z.multi[G.kind].push(G),Z.multi.fallback.push(G);else Z[G.kind][G.tag]=Z.fallback[G.tag]=G}for(X=0,z=arguments.length;X<z;X+=1)arguments[X].forEach(q);return Z}function Z8(Z){return this.extend(Z)}function F4(Z){if(Z===null)return!0;var X=Z.length;return X===1&&Z==="~"||X===4&&(Z==="null"||Z==="Null"||Z==="NULL")}function B4(){return null}function $4(Z){return Z===null}function D4(Z){if(Z===null)return!1;var X=Z.length;return X===4&&(Z==="true"||Z==="True"||Z==="TRUE")||X===5&&(Z==="false"||Z==="False"||Z==="FALSE")}function A4(Z){return Z==="true"||Z==="True"||Z==="TRUE"}function L4(Z){return Object.prototype.toString.call(Z)==="[object Boolean]"}function I4(Z){return 48<=Z&&Z<=57||65<=Z&&Z<=70||97<=Z&&Z<=102}function w4(Z){return 48<=Z&&Z<=55}function O4(Z){return 48<=Z&&Z<=57}function T4(Z){if(Z===null)return!1;var X=Z.length,z=0,q=!1,G;if(!X)return!1;if(G=Z[z],G==="-"||G==="+")G=Z[++z];if(G==="0"){if(z+1===X)return!0;if(G=Z[++z],G==="b"){z++;for(;z<X;z++){if(G=Z[z],G==="_")continue;if(G!=="0"&&G!=="1")return!1;q=!0}return q&&G!=="_"}if(G==="x"){z++;for(;z<X;z++){if(G=Z[z],G==="_")continue;if(!I4(Z.charCodeAt(z)))return!1;q=!0}return q&&G!=="_"}if(G==="o"){z++;for(;z<X;z++){if(G=Z[z],G==="_")continue;if(!w4(Z.charCodeAt(z)))return!1;q=!0}return q&&G!=="_"}}if(G==="_")return!1;for(;z<X;z++){if(G=Z[z],G==="_")continue;if(!O4(Z.charCodeAt(z)))return!1;q=!0}if(!q||G==="_")return!1;return!0}function C4(Z){var X=Z,z=1,q;if(X.indexOf("_")!==-1)X=X.replace(/_/g,"");if(q=X[0],q==="-"||q==="+"){if(q==="-")z=-1;X=X.slice(1),q=X[0]}if(X==="0")return 0;if(q==="0"){if(X[1]==="b")return z*parseInt(X.slice(2),2);if(X[1]==="x")return z*parseInt(X.slice(2),16);if(X[1]==="o")return z*parseInt(X.slice(2),8)}return z*parseInt(X,10)}function R4(Z){return Object.prototype.toString.call(Z)==="[object Number]"&&(Z%1===0&&!b.isNegativeZero(Z))}function j4(Z){if(Z===null)return!1;if(!N4.test(Z)||Z[Z.length-1]==="_")return!1;return!0}function _4(Z){var X,z;if(X=Z.replace(/_/g,"").toLowerCase(),z=X[0]==="-"?-1:1,"+-".indexOf(X[0])>=0)X=X.slice(1);if(X===".inf")return z===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;else if(X===".nan")return NaN;return z*parseFloat(X,10)}function x4(Z,X){var z;if(isNaN(Z))switch(X){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===Z)switch(X){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===Z)switch(X){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(b.isNegativeZero(Z))return"-0.0";return z=Z.toString(10),P4.test(z)?z.replace("e",".e"):z}function E4(Z){return Object.prototype.toString.call(Z)==="[object Number]"&&(Z%1!==0||b.isNegativeZero(Z))}function S4(Z){if(Z===null)return!1;if(y9.exec(Z)!==null)return!0;if(m9.exec(Z)!==null)return!0;return!1}function k4(Z){var X,z,q,G,Q,W,Y,J=0,U=null,K,V,M;if(X=y9.exec(Z),X===null)X=m9.exec(Z);if(X===null)throw Error("Date resolve error");if(z=+X[1],q=+X[2]-1,G=+X[3],!X[4])return new Date(Date.UTC(z,q,G));if(Q=+X[4],W=+X[5],Y=+X[6],X[7]){J=X[7].slice(0,3);while(J.length<3)J+="0";J=+J}if(X[9]){if(K=+X[10],V=+(X[11]||0),U=(K*60+V)*60000,X[9]==="-")U=-U}if(M=new Date(Date.UTC(z,q,G,Q,W,Y,J)),U)M.setTime(M.getTime()-U);return M}function b4(Z){return Z.toISOString()}function g4(Z){return Z==="<<"||Z===null}function v4(Z){if(Z===null)return!1;var X,z,q=0,G=Z.length,Q=W8;for(z=0;z<G;z++){if(X=Q.indexOf(Z.charAt(z)),X>64)continue;if(X<0)return!1;q+=6}return q%8===0}function y4(Z){var X,z,q=Z.replace(/[\r\n=]/g,""),G=q.length,Q=W8,W=0,Y=[];for(X=0;X<G;X++){if(X%4===0&&X)Y.push(W>>16&255),Y.push(W>>8&255),Y.push(W&255);W=W<<6|Q.indexOf(q.charAt(X))}if(z=G%4*6,z===0)Y.push(W>>16&255),Y.push(W>>8&255),Y.push(W&255);else if(z===18)Y.push(W>>10&255),Y.push(W>>2&255);else if(z===12)Y.push(W>>4&255);return new Uint8Array(Y)}function m4(Z){var X="",z=0,q,G,Q=Z.length,W=W8;for(q=0;q<Q;q++){if(q%3===0&&q)X+=W[z>>18&63],X+=W[z>>12&63],X+=W[z>>6&63],X+=W[z&63];z=(z<<8)+Z[q]}if(G=Q%3,G===0)X+=W[z>>18&63],X+=W[z>>12&63],X+=W[z>>6&63],X+=W[z&63];else if(G===2)X+=W[z>>10&63],X+=W[z>>4&63],X+=W[z<<2&63],X+=W[64];else if(G===1)X+=W[z>>2&63],X+=W[z<<4&63],X+=W[64],X+=W[64];return X}function h4(Z){return Object.prototype.toString.call(Z)==="[object Uint8Array]"}function c4(Z){if(Z===null)return!0;var X=[],z,q,G,Q,W,Y=Z;for(z=0,q=Y.length;z<q;z+=1){if(G=Y[z],W=!1,f4.call(G)!=="[object Object]")return!1;for(Q in G)if(u4.call(G,Q))if(!W)W=!0;else return!1;if(!W)return!1;if(X.indexOf(Q)===-1)X.push(Q);else return!1}return!0}function p4(Z){return Z!==null?Z:[]}function l4(Z){if(Z===null)return!0;var X,z,q,G,Q,W=Z;Q=Array(W.length);for(X=0,z=W.length;X<z;X+=1){if(q=W[X],d4.call(q)!=="[object Object]")return!1;if(G=Object.keys(q),G.length!==1)return!1;Q[X]=[G[0],q[G[0]]]}return!0}function i4(Z){if(Z===null)return[];var X,z,q,G,Q,W=Z;Q=Array(W.length);for(X=0,z=W.length;X<z;X+=1)q=W[X],G=Object.keys(q),Q[X]=[G[0],q[G[0]]];return Q}function o4(Z){if(Z===null)return!0;var X,z=Z;for(X in z)if(n4.call(z,X)){if(z[X]!==null)return!1}return!0}function r4(Z){return Z!==null?Z:{}}function V9(Z){return Object.prototype.toString.call(Z)}function Q0(Z){return Z===10||Z===13}function j0(Z){return Z===9||Z===32}function c(Z){return Z===9||Z===32||Z===10||Z===13}function f0(Z){return Z===44||Z===91||Z===93||Z===123||Z===125}function Z5(Z){var X;if(48<=Z&&Z<=57)return Z-48;if(X=Z|32,97<=X&&X<=102)return X-97+10;return-1}function X5(Z){if(Z===120)return 2;if(Z===117)return 4;if(Z===85)return 8;return 0}function z5(Z){if(48<=Z&&Z<=57)return Z-48;return-1}function M9(Z){return Z===48?"\x00":Z===97?"\x07":Z===98?"\b":Z===116?"\t":Z===9?"\t":Z===110?`
|
|
26
|
+
`:Z===118?"\v":Z===102?"\f":Z===114?"\r":Z===101?"\x1B":Z===32?" ":Z===34?'"':Z===47?"/":Z===92?"\\":Z===78?"
":Z===95?" ":Z===76?"\u2028":Z===80?"\u2029":""}function q5(Z){if(Z<=65535)return String.fromCharCode(Z);return String.fromCharCode((Z-65536>>10)+55296,(Z-65536&1023)+56320)}function r9(Z,X,z){if(X==="__proto__")Object.defineProperty(Z,X,{configurable:!0,enumerable:!0,writable:!0,value:z});else Z[X]=z}function G5(Z,X){this.input=Z,this.filename=X.filename||null,this.schema=X.schema||Q8,this.onWarning=X.onWarning||null,this.legacy=X.legacy||!1,this.json=X.json||!1,this.listener=X.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=Z.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function t9(Z,X){var z={name:Z.filename,buffer:Z.input.slice(0,-1),position:Z.position,line:Z.line,column:Z.position-Z.lineStart};return z.snippet=Y4(z),new m(X,z)}function L(Z,X){throw t9(Z,X)}function T1(Z,X){if(Z.onWarning)Z.onWarning.call(null,t9(Z,X))}function A0(Z,X,z,q){var G,Q,W,Y;if(X<z){if(Y=Z.input.slice(X,z),q){for(G=0,Q=Y.length;G<Q;G+=1)if(W=Y.charCodeAt(G),!(W===9||32<=W&&W<=1114111))L(Z,"expected valid JSON character")}else if(a4.test(Y))L(Z,"the stream contains non-printable characters");Z.result+=Y}}function F9(Z,X,z,q){var G,Q,W,Y;if(!b.isObject(z))L(Z,"cannot merge mappings; the provided source object is unacceptable");G=Object.keys(z);for(W=0,Y=G.length;W<Y;W+=1)if(Q=G[W],!L0.call(X,Q))r9(X,Q,z[Q]),q[Q]=!0}function c0(Z,X,z,q,G,Q,W,Y,J){var U,K;if(Array.isArray(G)){G=Array.prototype.slice.call(G);for(U=0,K=G.length;U<K;U+=1){if(Array.isArray(G[U]))L(Z,"nested arrays are not supported inside keys");if(typeof G==="object"&&V9(G[U])==="[object Object]")G[U]="[object Object]"}}if(typeof G==="object"&&V9(G)==="[object Object]")G="[object Object]";if(G=String(G),X===null)X={};if(q==="tag:yaml.org,2002:merge")if(Array.isArray(Q))for(U=0,K=Q.length;U<K;U+=1)F9(Z,X,Q[U],z);else F9(Z,X,Q,z);else{if(!Z.json&&!L0.call(z,G)&&L0.call(X,G))Z.line=W||Z.line,Z.lineStart=Y||Z.lineStart,Z.position=J||Z.position,L(Z,"duplicated mapping key");r9(X,G,Q),delete z[G]}return X}function J8(Z){var X=Z.input.charCodeAt(Z.position);if(X===10)Z.position++;else if(X===13){if(Z.position++,Z.input.charCodeAt(Z.position)===10)Z.position++}else L(Z,"a line break is expected");Z.line+=1,Z.lineStart=Z.position,Z.firstTabInLine=-1}function E(Z,X,z){var q=0,G=Z.input.charCodeAt(Z.position);while(G!==0){while(j0(G)){if(G===9&&Z.firstTabInLine===-1)Z.firstTabInLine=Z.position;G=Z.input.charCodeAt(++Z.position)}if(X&&G===35)do G=Z.input.charCodeAt(++Z.position);while(G!==10&&G!==13&&G!==0);if(Q0(G)){J8(Z),G=Z.input.charCodeAt(Z.position),q++,Z.lineIndent=0;while(G===32)Z.lineIndent++,G=Z.input.charCodeAt(++Z.position)}else break}if(z!==-1&&q!==0&&Z.lineIndent<z)T1(Z,"deficient indentation");return q}function N1(Z){var X=Z.position,z;if(z=Z.input.charCodeAt(X),(z===45||z===46)&&z===Z.input.charCodeAt(X+1)&&z===Z.input.charCodeAt(X+2)){if(X+=3,z=Z.input.charCodeAt(X),z===0||c(z))return!0}return!1}function Y8(Z,X){if(X===1)Z.result+=" ";else if(X>1)Z.result+=b.repeat(`
|
|
27
|
+
`,X-1)}function W5(Z,X,z){var q,G,Q,W,Y,J,U,K,V=Z.kind,M=Z.result,H;if(H=Z.input.charCodeAt(Z.position),c(H)||f0(H)||H===35||H===38||H===42||H===33||H===124||H===62||H===39||H===34||H===37||H===64||H===96)return!1;if(H===63||H===45){if(G=Z.input.charCodeAt(Z.position+1),c(G)||z&&f0(G))return!1}Z.kind="scalar",Z.result="",Q=W=Z.position,Y=!1;while(H!==0){if(H===58){if(G=Z.input.charCodeAt(Z.position+1),c(G)||z&&f0(G))break}else if(H===35){if(q=Z.input.charCodeAt(Z.position-1),c(q))break}else if(Z.position===Z.lineStart&&N1(Z)||z&&f0(H))break;else if(Q0(H))if(J=Z.line,U=Z.lineStart,K=Z.lineIndent,E(Z,!1,-1),Z.lineIndent>=X){Y=!0,H=Z.input.charCodeAt(Z.position);continue}else{Z.position=W,Z.line=J,Z.lineStart=U,Z.lineIndent=K;break}if(Y)A0(Z,Q,W,!1),Y8(Z,Z.line-J),Q=W=Z.position,Y=!1;if(!j0(H))W=Z.position+1;H=Z.input.charCodeAt(++Z.position)}if(A0(Z,Q,W,!1),Z.result)return!0;return Z.kind=V,Z.result=M,!1}function Q5(Z,X){var z,q,G;if(z=Z.input.charCodeAt(Z.position),z!==39)return!1;Z.kind="scalar",Z.result="",Z.position++,q=G=Z.position;while((z=Z.input.charCodeAt(Z.position))!==0)if(z===39)if(A0(Z,q,Z.position,!0),z=Z.input.charCodeAt(++Z.position),z===39)q=Z.position,Z.position++,G=Z.position;else return!0;else if(Q0(z))A0(Z,q,G,!0),Y8(Z,E(Z,!1,X)),q=G=Z.position;else if(Z.position===Z.lineStart&&N1(Z))L(Z,"unexpected end of the document within a single quoted scalar");else Z.position++,G=Z.position;L(Z,"unexpected end of the stream within a single quoted scalar")}function J5(Z,X){var z,q,G,Q,W,Y;if(Y=Z.input.charCodeAt(Z.position),Y!==34)return!1;Z.kind="scalar",Z.result="",Z.position++,z=q=Z.position;while((Y=Z.input.charCodeAt(Z.position))!==0)if(Y===34)return A0(Z,z,Z.position,!0),Z.position++,!0;else if(Y===92){if(A0(Z,z,Z.position,!0),Y=Z.input.charCodeAt(++Z.position),Q0(Y))E(Z,!1,X);else if(Y<256&&s9[Y])Z.result+=a9[Y],Z.position++;else if((W=X5(Y))>0){G=W,Q=0;for(;G>0;G--)if(Y=Z.input.charCodeAt(++Z.position),(W=Z5(Y))>=0)Q=(Q<<4)+W;else L(Z,"expected hexadecimal character");Z.result+=q5(Q),Z.position++}else L(Z,"unknown escape sequence");z=q=Z.position}else if(Q0(Y))A0(Z,z,q,!0),Y8(Z,E(Z,!1,X)),z=q=Z.position;else if(Z.position===Z.lineStart&&N1(Z))L(Z,"unexpected end of the document within a double quoted scalar");else Z.position++,q=Z.position;L(Z,"unexpected end of the stream within a double quoted scalar")}function Y5(Z,X){var z=!0,q,G,Q,W=Z.tag,Y,J=Z.anchor,U,K,V,M,H,F=Object.create(null),A,B,D,$;if($=Z.input.charCodeAt(Z.position),$===91)K=93,H=!1,Y=[];else if($===123)K=125,H=!0,Y={};else return!1;if(Z.anchor!==null)Z.anchorMap[Z.anchor]=Y;$=Z.input.charCodeAt(++Z.position);while($!==0){if(E(Z,!0,X),$=Z.input.charCodeAt(Z.position),$===K)return Z.position++,Z.tag=W,Z.anchor=J,Z.kind=H?"mapping":"sequence",Z.result=Y,!0;else if(!z)L(Z,"missed comma between flow collection entries");else if($===44)L(Z,"expected the node content, but found ','");if(B=A=D=null,V=M=!1,$===63){if(U=Z.input.charCodeAt(Z.position+1),c(U))V=M=!0,Z.position++,E(Z,!0,X)}if(q=Z.line,G=Z.lineStart,Q=Z.position,p0(Z,X,w1,!1,!0),B=Z.tag,A=Z.result,E(Z,!0,X),$=Z.input.charCodeAt(Z.position),(M||Z.line===q)&&$===58)V=!0,$=Z.input.charCodeAt(++Z.position),E(Z,!0,X),p0(Z,X,w1,!1,!0),D=Z.result;if(H)c0(Z,Y,F,B,A,D,q,G,Q);else if(V)Y.push(c0(Z,null,F,B,A,D,q,G,Q));else Y.push(A);if(E(Z,!0,X),$=Z.input.charCodeAt(Z.position),$===44)z=!0,$=Z.input.charCodeAt(++Z.position);else z=!1}L(Z,"unexpected end of the stream within a flow collection")}function U5(Z,X){var z,q,G=e1,Q=!1,W=!1,Y=X,J=0,U=!1,K,V;if(V=Z.input.charCodeAt(Z.position),V===124)q=!1;else if(V===62)q=!0;else return!1;Z.kind="scalar",Z.result="";while(V!==0)if(V=Z.input.charCodeAt(++Z.position),V===43||V===45)if(e1===G)G=V===43?K9:s4;else L(Z,"repeat of a chomping mode identifier");else if((K=z5(V))>=0)if(K===0)L(Z,"bad explicit indentation width of a block scalar; it cannot be less than one");else if(!W)Y=X+K-1,W=!0;else L(Z,"repeat of an indentation width identifier");else break;if(j0(V)){do V=Z.input.charCodeAt(++Z.position);while(j0(V));if(V===35)do V=Z.input.charCodeAt(++Z.position);while(!Q0(V)&&V!==0)}while(V!==0){J8(Z),Z.lineIndent=0,V=Z.input.charCodeAt(Z.position);while((!W||Z.lineIndent<Y)&&V===32)Z.lineIndent++,V=Z.input.charCodeAt(++Z.position);if(!W&&Z.lineIndent>Y)Y=Z.lineIndent;if(Q0(V)){J++;continue}if(Z.lineIndent<Y){if(G===K9)Z.result+=b.repeat(`
|
|
28
|
+
`,Q?1+J:J);else if(G===e1){if(Q)Z.result+=`
|
|
29
|
+
`}break}if(q)if(j0(V))U=!0,Z.result+=b.repeat(`
|
|
30
|
+
`,Q?1+J:J);else if(U)U=!1,Z.result+=b.repeat(`
|
|
31
|
+
`,J+1);else if(J===0){if(Q)Z.result+=" "}else Z.result+=b.repeat(`
|
|
32
|
+
`,J);else Z.result+=b.repeat(`
|
|
33
|
+
`,Q?1+J:J);Q=!0,W=!0,J=0,z=Z.position;while(!Q0(V)&&V!==0)V=Z.input.charCodeAt(++Z.position);A0(Z,z,Z.position,!1)}return!0}function B9(Z,X){var z,q=Z.tag,G=Z.anchor,Q=[],W,Y=!1,J;if(Z.firstTabInLine!==-1)return!1;if(Z.anchor!==null)Z.anchorMap[Z.anchor]=Q;J=Z.input.charCodeAt(Z.position);while(J!==0){if(Z.firstTabInLine!==-1)Z.position=Z.firstTabInLine,L(Z,"tab characters must not be used in indentation");if(J!==45)break;if(W=Z.input.charCodeAt(Z.position+1),!c(W))break;if(Y=!0,Z.position++,E(Z,!0,-1)){if(Z.lineIndent<=X){Q.push(null),J=Z.input.charCodeAt(Z.position);continue}}if(z=Z.line,p0(Z,X,i9,!1,!0),Q.push(Z.result),E(Z,!0,-1),J=Z.input.charCodeAt(Z.position),(Z.line===z||Z.lineIndent>X)&&J!==0)L(Z,"bad indentation of a sequence entry");else if(Z.lineIndent<X)break}if(Y)return Z.tag=q,Z.anchor=G,Z.kind="sequence",Z.result=Q,!0;return!1}function K5(Z,X,z){var q,G,Q,W,Y,J,U=Z.tag,K=Z.anchor,V={},M=Object.create(null),H=null,F=null,A=null,B=!1,D=!1,$;if(Z.firstTabInLine!==-1)return!1;if(Z.anchor!==null)Z.anchorMap[Z.anchor]=V;$=Z.input.charCodeAt(Z.position);while($!==0){if(!B&&Z.firstTabInLine!==-1)Z.position=Z.firstTabInLine,L(Z,"tab characters must not be used in indentation");if(q=Z.input.charCodeAt(Z.position+1),Q=Z.line,($===63||$===58)&&c(q)){if($===63){if(B)c0(Z,V,M,H,F,null,W,Y,J),H=F=A=null;D=!0,B=!0,G=!0}else if(B)B=!1,G=!0;else L(Z,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");Z.position+=1,$=q}else{if(W=Z.line,Y=Z.lineStart,J=Z.position,!p0(Z,z,l9,!1,!0))break;if(Z.line===Q){$=Z.input.charCodeAt(Z.position);while(j0($))$=Z.input.charCodeAt(++Z.position);if($===58){if($=Z.input.charCodeAt(++Z.position),!c($))L(Z,"a whitespace character is expected after the key-value separator within a block mapping");if(B)c0(Z,V,M,H,F,null,W,Y,J),H=F=A=null;D=!0,B=!1,G=!1,H=Z.tag,F=Z.result}else if(D)L(Z,"can not read an implicit mapping pair; a colon is missed");else return Z.tag=U,Z.anchor=K,!0}else if(D)L(Z,"can not read a block mapping entry; a multiline key may not be an implicit key");else return Z.tag=U,Z.anchor=K,!0}if(Z.line===Q||Z.lineIndent>X){if(B)W=Z.line,Y=Z.lineStart,J=Z.position;if(p0(Z,X,O1,!0,G))if(B)F=Z.result;else A=Z.result;if(!B)c0(Z,V,M,H,F,A,W,Y,J),H=F=A=null;E(Z,!0,-1),$=Z.input.charCodeAt(Z.position)}if((Z.line===Q||Z.lineIndent>X)&&$!==0)L(Z,"bad indentation of a mapping entry");else if(Z.lineIndent<X)break}if(B)c0(Z,V,M,H,F,null,W,Y,J);if(D)Z.tag=U,Z.anchor=K,Z.kind="mapping",Z.result=V;return D}function V5(Z){var X,z=!1,q=!1,G,Q,W;if(W=Z.input.charCodeAt(Z.position),W!==33)return!1;if(Z.tag!==null)L(Z,"duplication of a tag property");if(W=Z.input.charCodeAt(++Z.position),W===60)z=!0,W=Z.input.charCodeAt(++Z.position);else if(W===33)q=!0,G="!!",W=Z.input.charCodeAt(++Z.position);else G="!";if(X=Z.position,z){do W=Z.input.charCodeAt(++Z.position);while(W!==0&&W!==62);if(Z.position<Z.length)Q=Z.input.slice(X,Z.position),W=Z.input.charCodeAt(++Z.position);else L(Z,"unexpected end of the stream within a verbatim tag")}else{while(W!==0&&!c(W)){if(W===33)if(!q){if(G=Z.input.slice(X-1,Z.position+1),!n9.test(G))L(Z,"named tag handle cannot contain such characters");q=!0,X=Z.position+1}else L(Z,"tag suffix cannot contain exclamation marks");W=Z.input.charCodeAt(++Z.position)}if(Q=Z.input.slice(X,Z.position),e4.test(Q))L(Z,"tag suffix cannot contain flow indicator characters")}if(Q&&!o9.test(Q))L(Z,"tag name cannot contain such characters: "+Q);try{Q=decodeURIComponent(Q)}catch(Y){L(Z,"tag name is malformed: "+Q)}if(z)Z.tag=Q;else if(L0.call(Z.tagMap,G))Z.tag=Z.tagMap[G]+Q;else if(G==="!")Z.tag="!"+Q;else if(G==="!!")Z.tag="tag:yaml.org,2002:"+Q;else L(Z,'undeclared tag handle "'+G+'"');return!0}function M5(Z){var X,z;if(z=Z.input.charCodeAt(Z.position),z!==38)return!1;if(Z.anchor!==null)L(Z,"duplication of an anchor property");z=Z.input.charCodeAt(++Z.position),X=Z.position;while(z!==0&&!c(z)&&!f0(z))z=Z.input.charCodeAt(++Z.position);if(Z.position===X)L(Z,"name of an anchor node must contain at least one character");return Z.anchor=Z.input.slice(X,Z.position),!0}function H5(Z){var X,z,q;if(q=Z.input.charCodeAt(Z.position),q!==42)return!1;q=Z.input.charCodeAt(++Z.position),X=Z.position;while(q!==0&&!c(q)&&!f0(q))q=Z.input.charCodeAt(++Z.position);if(Z.position===X)L(Z,"name of an alias node must contain at least one character");if(z=Z.input.slice(X,Z.position),!L0.call(Z.anchorMap,z))L(Z,'unidentified alias "'+z+'"');return Z.result=Z.anchorMap[z],E(Z,!0,-1),!0}function p0(Z,X,z,q,G){var Q,W,Y,J=1,U=!1,K=!1,V,M,H,F,A,B;if(Z.listener!==null)Z.listener("open",Z);if(Z.tag=null,Z.anchor=null,Z.kind=null,Z.result=null,Q=W=Y=O1===z||i9===z,q){if(E(Z,!0,-1)){if(U=!0,Z.lineIndent>X)J=1;else if(Z.lineIndent===X)J=0;else if(Z.lineIndent<X)J=-1}}if(J===1)while(V5(Z)||M5(Z))if(E(Z,!0,-1)){if(U=!0,Y=Q,Z.lineIndent>X)J=1;else if(Z.lineIndent===X)J=0;else if(Z.lineIndent<X)J=-1}else Y=!1;if(Y)Y=U||G;if(J===1||O1===z){if(w1===z||l9===z)A=X;else A=X+1;if(B=Z.position-Z.lineStart,J===1)if(Y&&(B9(Z,B)||K5(Z,B,A))||Y5(Z,A))K=!0;else{if(W&&U5(Z,A)||Q5(Z,A)||J5(Z,A))K=!0;else if(H5(Z)){if(K=!0,Z.tag!==null||Z.anchor!==null)L(Z,"alias node should not have any properties")}else if(W5(Z,A,w1===z)){if(K=!0,Z.tag===null)Z.tag="?"}if(Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result}else if(J===0)K=Y&&B9(Z,B)}if(Z.tag===null){if(Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result}else if(Z.tag==="?"){if(Z.result!==null&&Z.kind!=="scalar")L(Z,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+Z.kind+'"');for(V=0,M=Z.implicitTypes.length;V<M;V+=1)if(F=Z.implicitTypes[V],F.resolve(Z.result)){if(Z.result=F.construct(Z.result),Z.tag=F.tag,Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result;break}}else if(Z.tag!=="!"){if(L0.call(Z.typeMap[Z.kind||"fallback"],Z.tag))F=Z.typeMap[Z.kind||"fallback"][Z.tag];else{F=null,H=Z.typeMap.multi[Z.kind||"fallback"];for(V=0,M=H.length;V<M;V+=1)if(Z.tag.slice(0,H[V].tag.length)===H[V].tag){F=H[V];break}}if(!F)L(Z,"unknown tag !<"+Z.tag+">");if(Z.result!==null&&F.kind!==Z.kind)L(Z,"unacceptable node kind for !<"+Z.tag+'> tag; it should be "'+F.kind+'", not "'+Z.kind+'"');if(!F.resolve(Z.result,Z.tag))L(Z,"cannot resolve a node with !<"+Z.tag+"> explicit tag");else if(Z.result=F.construct(Z.result,Z.tag),Z.anchor!==null)Z.anchorMap[Z.anchor]=Z.result}if(Z.listener!==null)Z.listener("close",Z);return Z.tag!==null||Z.anchor!==null||K}function F5(Z){var X=Z.position,z,q,G,Q=!1,W;Z.version=null,Z.checkLineBreaks=Z.legacy,Z.tagMap=Object.create(null),Z.anchorMap=Object.create(null);while((W=Z.input.charCodeAt(Z.position))!==0){if(E(Z,!0,-1),W=Z.input.charCodeAt(Z.position),Z.lineIndent>0||W!==37)break;Q=!0,W=Z.input.charCodeAt(++Z.position),z=Z.position;while(W!==0&&!c(W))W=Z.input.charCodeAt(++Z.position);if(q=Z.input.slice(z,Z.position),G=[],q.length<1)L(Z,"directive name must not be less than one character in length");while(W!==0){while(j0(W))W=Z.input.charCodeAt(++Z.position);if(W===35){do W=Z.input.charCodeAt(++Z.position);while(W!==0&&!Q0(W));break}if(Q0(W))break;z=Z.position;while(W!==0&&!c(W))W=Z.input.charCodeAt(++Z.position);G.push(Z.input.slice(z,Z.position))}if(W!==0)J8(Z);if(L0.call(H9,q))H9[q](Z,q,G);else T1(Z,'unknown document directive "'+q+'"')}if(E(Z,!0,-1),Z.lineIndent===0&&Z.input.charCodeAt(Z.position)===45&&Z.input.charCodeAt(Z.position+1)===45&&Z.input.charCodeAt(Z.position+2)===45)Z.position+=3,E(Z,!0,-1);else if(Q)L(Z,"directives end mark is expected");if(p0(Z,Z.lineIndent-1,O1,!1,!0),E(Z,!0,-1),Z.checkLineBreaks&&t4.test(Z.input.slice(X,Z.position)))T1(Z,"non-ASCII line breaks are interpreted as content");if(Z.documents.push(Z.result),Z.position===Z.lineStart&&N1(Z)){if(Z.input.charCodeAt(Z.position)===46)Z.position+=3,E(Z,!0,-1);return}if(Z.position<Z.length-1)L(Z,"end of the stream or a document separator is expected");else return}function e9(Z,X){if(Z=String(Z),X=X||{},Z.length!==0){if(Z.charCodeAt(Z.length-1)!==10&&Z.charCodeAt(Z.length-1)!==13)Z+=`
|
|
34
|
+
`;if(Z.charCodeAt(0)===65279)Z=Z.slice(1)}var z=new G5(Z,X),q=Z.indexOf("\x00");if(q!==-1)z.position=q,L(z,"null byte is not allowed in input");z.input+="\x00";while(z.input.charCodeAt(z.position)===32)z.lineIndent+=1,z.position+=1;while(z.position<z.length-1)F5(z);return z.documents}function B5(Z,X,z){if(X!==null&&typeof X==="object"&&typeof z>"u")z=X,X=null;var q=e9(Z,z);if(typeof X!=="function")return q;for(var G=0,Q=q.length;G<Q;G+=1)X(q[G])}function $5(Z,X){var z=e9(Z,X);if(z.length===0)return;else if(z.length===1)return z[0];throw new m("expected a single document in the stream, but found more")}function y5(Z,X){var z,q,G,Q,W,Y,J;if(X===null)return{};z={},q=Object.keys(X);for(G=0,Q=q.length;G<Q;G+=1){if(W=q[G],Y=String(X[W]),W.slice(0,2)==="!!")W="tag:yaml.org,2002:"+W.slice(2);if(J=Z.compiledTypeMap.fallback[W],J&&zZ.call(J.styleAliases,Y))Y=J.styleAliases[Y];z[W]=Y}return z}function m5(Z){var X,z,q;if(X=Z.toString(16).toUpperCase(),Z<=255)z="x",q=2;else if(Z<=65535)z="u",q=4;else if(Z<=4294967295)z="U",q=8;else throw new m("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+z+b.repeat("0",q-X.length)+X}function u5(Z){this.schema=Z.schema||Q8,this.indent=Math.max(1,Z.indent||2),this.noArrayIndent=Z.noArrayIndent||!1,this.skipInvalid=Z.skipInvalid||!1,this.flowLevel=b.isNothing(Z.flowLevel)?-1:Z.flowLevel,this.styleMap=y5(this.schema,Z.styles||null),this.sortKeys=Z.sortKeys||!1,this.lineWidth=Z.lineWidth||80,this.noRefs=Z.noRefs||!1,this.noCompatMode=Z.noCompatMode||!1,this.condenseFlow=Z.condenseFlow||!1,this.quotingType=Z.quotingType==='"'?X1:h5,this.forceQuotes=Z.forceQuotes||!1,this.replacer=typeof Z.replacer==="function"?Z.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function $9(Z,X){var z=b.repeat(" ",X),q=0,G=-1,Q="",W,Y=Z.length;while(q<Y){if(G=Z.indexOf(`
|
|
35
|
+
`,q),G===-1)W=Z.slice(q),q=Y;else W=Z.slice(q,G+1),q=G+1;if(W.length&&W!==`
|
|
36
|
+
`)Q+=z;Q+=W}return Q}function z8(Z,X){return`
|
|
37
|
+
`+b.repeat(" ",Z.indent*X)}function f5(Z,X){var z,q,G;for(z=0,q=Z.implicitTypes.length;z<q;z+=1)if(G=Z.implicitTypes[z],G.resolve(X))return!0;return!1}function R1(Z){return Z===w5||Z===L5}function z1(Z){return 32<=Z&&Z<=126||161<=Z&&Z<=55295&&Z!==8232&&Z!==8233||57344<=Z&&Z<=65533&&Z!==U8||65536<=Z&&Z<=1114111}function D9(Z){return z1(Z)&&Z!==U8&&Z!==I5&&Z!==Z1}function A9(Z,X,z){var q=D9(Z),G=q&&!R1(Z);return(z?q:q&&Z!==qZ&&Z!==GZ&&Z!==WZ&&Z!==QZ&&Z!==JZ)&&Z!==X8&&!(X===C1&&!G)||D9(X)&&!R1(X)&&Z===X8||X===C1&&G}function c5(Z){return z1(Z)&&Z!==U8&&!R1(Z)&&Z!==_5&&Z!==E5&&Z!==C1&&Z!==qZ&&Z!==GZ&&Z!==WZ&&Z!==QZ&&Z!==JZ&&Z!==X8&&Z!==R5&&Z!==j5&&Z!==O5&&Z!==b5&&Z!==P5&&Z!==x5&&Z!==N5&&Z!==T5&&Z!==C5&&Z!==S5&&Z!==k5}function p5(Z){return!R1(Z)&&Z!==C1}function t0(Z,X){var z=Z.charCodeAt(X),q;if(z>=55296&&z<=56319&&X+1<Z.length){if(q=Z.charCodeAt(X+1),q>=56320&&q<=57343)return(z-55296)*1024+q-56320+65536}return z}function YZ(Z){var X=/^\n* /;return X.test(Z)}function d5(Z,X,z,q,G,Q,W,Y){var J,U=0,K=null,V=!1,M=!1,H=q!==-1,F=-1,A=c5(t0(Z,0))&&p5(t0(Z,Z.length-1));if(X||W)for(J=0;J<Z.length;U>=65536?J+=2:J++){if(U=t0(Z,J),!z1(U))return u0;A=A&&A9(U,K,Y),K=U}else{for(J=0;J<Z.length;U>=65536?J+=2:J++){if(U=t0(Z,J),U===Z1){if(V=!0,H)M=M||J-F-1>q&&Z[F+1]!==" ",F=J}else if(!z1(U))return u0;A=A&&A9(U,K,Y),K=U}M=M||H&&(J-F-1>q&&Z[F+1]!==" ")}if(!V&&!M){if(A&&!W&&!G(Z))return UZ;return Q===X1?u0:q8}if(z>9&&YZ(Z))return u0;if(!W)return M?VZ:KZ;return Q===X1?u0:q8}function l5(Z,X,z,q,G){Z.dump=function(){if(X.length===0)return Z.quotingType===X1?'""':"''";if(!Z.noCompatMode){if(g5.indexOf(X)!==-1||v5.test(X))return Z.quotingType===X1?'"'+X+'"':"'"+X+"'"}var Q=Z.indent*Math.max(1,z),W=Z.lineWidth===-1?-1:Math.max(Math.min(Z.lineWidth,40),Z.lineWidth-Q),Y=q||Z.flowLevel>-1&&z>=Z.flowLevel;function J(U){return f5(Z,U)}switch(d5(X,Y,Z.indent,W,J,Z.quotingType,Z.forceQuotes&&!q,G)){case UZ:return X;case q8:return"'"+X.replace(/'/g,"''")+"'";case KZ:return"|"+L9(X,Z.indent)+I9($9(X,Q));case VZ:return">"+L9(X,Z.indent)+I9($9(i5(X,W),Q));case u0:return'"'+n5(X)+'"';default:throw new m("impossible error: invalid scalar style")}}()}function L9(Z,X){var z=YZ(Z)?String(X):"",q=Z[Z.length-1]===`
|
|
38
|
+
`,G=q&&(Z[Z.length-2]===`
|
|
39
39
|
`||Z===`
|
|
40
|
-
`),
|
|
41
|
-
`}function
|
|
42
|
-
`?Z.slice(0,-1):Z}function
|
|
43
|
-
`);return U=U!==-1?U:Z.length,z.lastIndex=U,
|
|
44
|
-
`||Z[0]===" ",W
|
|
45
|
-
`:"")+
|
|
46
|
-
`+Z.slice(
|
|
47
|
-
`,Z.length-
|
|
48
|
-
`+Z.slice(
|
|
49
|
-
`;return""}function
|
|
50
|
-
\r`,
|
|
40
|
+
`),Q=G?"+":q?"":"-";return z+Q+`
|
|
41
|
+
`}function I9(Z){return Z[Z.length-1]===`
|
|
42
|
+
`?Z.slice(0,-1):Z}function i5(Z,X){var z=/(\n+)([^\n]*)/g,q=function(){var U=Z.indexOf(`
|
|
43
|
+
`);return U=U!==-1?U:Z.length,z.lastIndex=U,w9(Z.slice(0,U),X)}(),G=Z[0]===`
|
|
44
|
+
`||Z[0]===" ",Q,W;while(W=z.exec(Z)){var Y=W[1],J=W[2];Q=J[0]===" ",q+=Y+(!G&&!Q&&J!==""?`
|
|
45
|
+
`:"")+w9(J,X),G=Q}return q}function w9(Z,X){if(Z===""||Z[0]===" ")return Z;var z=/ [^ ]/g,q,G=0,Q,W=0,Y=0,J="";while(q=z.exec(Z)){if(Y=q.index,Y-G>X)Q=W>G?W:Y,J+=`
|
|
46
|
+
`+Z.slice(G,Q),G=Q+1;W=Y}if(J+=`
|
|
47
|
+
`,Z.length-G>X&&W>G)J+=Z.slice(G,W)+`
|
|
48
|
+
`+Z.slice(W+1);else J+=Z.slice(G);return J.slice(1)}function n5(Z){var X="",z=0,q;for(var G=0;G<Z.length;z>=65536?G+=2:G++)if(z=t0(Z,G),q=v[z],!q&&z1(z)){if(X+=Z[G],z>=65536)X+=Z[G+1]}else X+=q||m5(z);return X}function o5(Z,X,z){var q="",G=Z.tag,Q,W,Y;for(Q=0,W=z.length;Q<W;Q+=1){if(Y=z[Q],Z.replacer)Y=Z.replacer.call(z,String(Q),Y);if(K0(Z,X,Y,!1,!1)||typeof Y>"u"&&K0(Z,X,null,!1,!1)){if(q!=="")q+=","+(!Z.condenseFlow?" ":"");q+=Z.dump}}Z.tag=G,Z.dump="["+q+"]"}function O9(Z,X,z,q){var G="",Q=Z.tag,W,Y,J;for(W=0,Y=z.length;W<Y;W+=1){if(J=z[W],Z.replacer)J=Z.replacer.call(z,String(W),J);if(K0(Z,X+1,J,!0,!0,!1,!0)||typeof J>"u"&&K0(Z,X+1,null,!0,!0,!1,!0)){if(!q||G!=="")G+=z8(Z,X);if(Z.dump&&Z1===Z.dump.charCodeAt(0))G+="-";else G+="- ";G+=Z.dump}}Z.tag=Q,Z.dump=G||"[]"}function r5(Z,X,z){var q="",G=Z.tag,Q=Object.keys(z),W,Y,J,U,K;for(W=0,Y=Q.length;W<Y;W+=1){if(K="",q!=="")K+=", ";if(Z.condenseFlow)K+='"';if(J=Q[W],U=z[J],Z.replacer)U=Z.replacer.call(z,J,U);if(!K0(Z,X,J,!1,!1))continue;if(Z.dump.length>1024)K+="? ";if(K+=Z.dump+(Z.condenseFlow?'"':"")+":"+(Z.condenseFlow?"":" "),!K0(Z,X,U,!1,!1))continue;K+=Z.dump,q+=K}Z.tag=G,Z.dump="{"+q+"}"}function s5(Z,X,z,q){var G="",Q=Z.tag,W=Object.keys(z),Y,J,U,K,V,M;if(Z.sortKeys===!0)W.sort();else if(typeof Z.sortKeys==="function")W.sort(Z.sortKeys);else if(Z.sortKeys)throw new m("sortKeys must be a boolean or a function");for(Y=0,J=W.length;Y<J;Y+=1){if(M="",!q||G!=="")M+=z8(Z,X);if(U=W[Y],K=z[U],Z.replacer)K=Z.replacer.call(z,U,K);if(!K0(Z,X+1,U,!0,!0,!0))continue;if(V=Z.tag!==null&&Z.tag!=="?"||Z.dump&&Z.dump.length>1024,V)if(Z.dump&&Z1===Z.dump.charCodeAt(0))M+="?";else M+="? ";if(M+=Z.dump,V)M+=z8(Z,X);if(!K0(Z,X+1,K,!0,V))continue;if(Z.dump&&Z1===Z.dump.charCodeAt(0))M+=":";else M+=": ";M+=Z.dump,G+=M}Z.tag=Q,Z.dump=G||"{}"}function T9(Z,X,z){var q,G,Q,W,Y,J;G=z?Z.explicitTypes:Z.implicitTypes;for(Q=0,W=G.length;Q<W;Q+=1)if(Y=G[Q],(Y.instanceOf||Y.predicate)&&(!Y.instanceOf||typeof X==="object"&&X instanceof Y.instanceOf)&&(!Y.predicate||Y.predicate(X))){if(z)if(Y.multi&&Y.representName)Z.tag=Y.representName(X);else Z.tag=Y.tag;else Z.tag="?";if(Y.represent){if(J=Z.styleMap[Y.tag]||Y.defaultStyle,XZ.call(Y.represent)==="[object Function]")q=Y.represent(X,J);else if(zZ.call(Y.represent,J))q=Y.represent[J](X,J);else throw new m("!<"+Y.tag+'> tag resolver accepts not "'+J+'" style');Z.dump=q}return!0}return!1}function K0(Z,X,z,q,G,Q,W){if(Z.tag=null,Z.dump=z,!T9(Z,z,!1))T9(Z,z,!0);var Y=XZ.call(Z.dump),J=q,U;if(q)q=Z.flowLevel<0||Z.flowLevel>X;var K=Y==="[object Object]"||Y==="[object Array]",V,M;if(K)V=Z.duplicates.indexOf(z),M=V!==-1;if(Z.tag!==null&&Z.tag!=="?"||M||Z.indent!==2&&X>0)G=!1;if(M&&Z.usedDuplicates[V])Z.dump="*ref_"+V;else{if(K&&M&&!Z.usedDuplicates[V])Z.usedDuplicates[V]=!0;if(Y==="[object Object]"){if(q&&Object.keys(Z.dump).length!==0){if(s5(Z,X,Z.dump,G),M)Z.dump="&ref_"+V+Z.dump}else if(r5(Z,X,Z.dump),M)Z.dump="&ref_"+V+" "+Z.dump}else if(Y==="[object Array]"){if(q&&Z.dump.length!==0){if(Z.noArrayIndent&&!W&&X>0)O9(Z,X-1,Z.dump,G);else O9(Z,X,Z.dump,G);if(M)Z.dump="&ref_"+V+Z.dump}else if(o5(Z,X,Z.dump),M)Z.dump="&ref_"+V+" "+Z.dump}else if(Y==="[object String]"){if(Z.tag!=="?")l5(Z,Z.dump,X,Q,J)}else if(Y==="[object Undefined]")return!1;else{if(Z.skipInvalid)return!1;throw new m("unacceptable kind of an object to dump "+Y)}if(Z.tag!==null&&Z.tag!=="?"){if(U=encodeURI(Z.tag[0]==="!"?Z.tag.slice(1):Z.tag).replace(/!/g,"%21"),Z.tag[0]==="!")U="!"+U;else if(U.slice(0,18)==="tag:yaml.org,2002:")U="!!"+U.slice(18);else U="!<"+U+">";Z.dump=U+" "+Z.dump}}return!0}function a5(Z,X){var z=[],q=[],G,Q;G8(Z,z,q);for(G=0,Q=q.length;G<Q;G+=1)X.duplicates.push(z[q[G]]);X.usedDuplicates=Array(Q)}function G8(Z,X,z){var q,G,Q;if(Z!==null&&typeof Z==="object")if(G=X.indexOf(Z),G!==-1){if(z.indexOf(G)===-1)z.push(G)}else if(X.push(Z),Array.isArray(Z))for(G=0,Q=Z.length;G<Q;G+=1)G8(Z[G],X,z);else{q=Object.keys(Z);for(G=0,Q=q.length;G<Q;G+=1)G8(Z[q[G]],X,z)}}function t5(Z,X){X=X||{};var z=new u5(X);if(!z.noRefs)a5(Z,z);var q=Z;if(z.replacer)q=z.replacer.call({"":q},"",q);if(K0(z,0,q,!0,!0))return z.dump+`
|
|
49
|
+
`;return""}function K8(Z,X){return function(){throw Error("Function yaml."+Z+" is removed in js-yaml 4. Use yaml."+X+" instead, which is now safe by default.")}}var X4,z4,q4,G4,W4,Q4,b,m,Y4,U4,K4,g,N9,j9,_9,P9,x9,E9,S9,k9,N4,P4,b9,g9,v9,y9,m9,h9,u9,W8=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
50
|
+
\r`,f9,u4,f4,c9,d4,p9,n4,d9,Q8,L0,w1=1,l9=2,i9=3,O1=4,e1=1,s4=2,K9=3,a4,t4,e4,n9,o9,s9,a9,D0,H9,D5,A5,ZZ,XZ,zZ,U8=65279,L5=9,Z1=10,I5=13,w5=32,O5=33,T5=34,X8=35,C5=37,R5=38,N5=39,j5=42,qZ=44,_5=45,C1=58,P5=61,x5=62,E5=63,S5=64,GZ=91,WZ=93,k5=96,QZ=123,b5=124,JZ=125,v,g5,v5,h5=1,X1=2,UZ=1,q8=2,KZ=3,VZ=4,u0=5,e5,Z3,X3,z3,q3,V8,G3,W3,Q3,J3,Y3,U3,K3,V3,M3,H3,M8;var H8=T(()=>{/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */X4=C9,z4=s6,q4=a6,G4=e6,W4=Z4,Q4=t6,b={isNothing:X4,isObject:z4,toArray:q4,repeat:G4,isNegativeZero:W4,extend:Q4};e0.prototype=Object.create(Error.prototype);e0.prototype.constructor=e0;e0.prototype.toString=function(X){return this.name+": "+R9(this,X)};m=e0;Y4=J4,U4=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],K4=["scalar","sequence","mapping"];g=M4;Z8.prototype.extend=function(X){var z=[],q=[];if(X instanceof g)q.push(X);else if(Array.isArray(X))q=q.concat(X);else if(X&&(Array.isArray(X.implicit)||Array.isArray(X.explicit))){if(X.implicit)z=z.concat(X.implicit);if(X.explicit)q=q.concat(X.explicit)}else throw new m("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");z.forEach(function(Q){if(!(Q instanceof g))throw new m("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(Q.loadKind&&Q.loadKind!=="scalar")throw new m("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(Q.multi)throw new m("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),q.forEach(function(Q){if(!(Q instanceof g))throw new m("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var G=Object.create(Z8.prototype);return G.implicit=(this.implicit||[]).concat(z),G.explicit=(this.explicit||[]).concat(q),G.compiledImplicit=U9(G,"implicit"),G.compiledExplicit=U9(G,"explicit"),G.compiledTypeMap=H4(G.compiledImplicit,G.compiledExplicit),G};N9=Z8,j9=new g("tag:yaml.org,2002:str",{kind:"scalar",construct:function(Z){return Z!==null?Z:""}}),_9=new g("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(Z){return Z!==null?Z:[]}}),P9=new g("tag:yaml.org,2002:map",{kind:"mapping",construct:function(Z){return Z!==null?Z:{}}}),x9=new N9({explicit:[j9,_9,P9]});E9=new g("tag:yaml.org,2002:null",{kind:"scalar",resolve:F4,construct:B4,predicate:$4,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});S9=new g("tag:yaml.org,2002:bool",{kind:"scalar",resolve:D4,construct:A4,predicate:L4,represent:{lowercase:function(Z){return Z?"true":"false"},uppercase:function(Z){return Z?"TRUE":"FALSE"},camelcase:function(Z){return Z?"True":"False"}},defaultStyle:"lowercase"});k9=new g("tag:yaml.org,2002:int",{kind:"scalar",resolve:T4,construct:C4,predicate:R4,represent:{binary:function(Z){return Z>=0?"0b"+Z.toString(2):"-0b"+Z.toString(2).slice(1)},octal:function(Z){return Z>=0?"0o"+Z.toString(8):"-0o"+Z.toString(8).slice(1)},decimal:function(Z){return Z.toString(10)},hexadecimal:function(Z){return Z>=0?"0x"+Z.toString(16).toUpperCase():"-0x"+Z.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),N4=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");P4=/^[-+]?[0-9]+e/;b9=new g("tag:yaml.org,2002:float",{kind:"scalar",resolve:j4,construct:_4,predicate:E4,represent:x4,defaultStyle:"lowercase"}),g9=x9.extend({implicit:[E9,S9,k9,b9]}),v9=g9,y9=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),m9=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");h9=new g("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:S4,construct:k4,instanceOf:Date,represent:b4});u9=new g("tag:yaml.org,2002:merge",{kind:"scalar",resolve:g4});f9=new g("tag:yaml.org,2002:binary",{kind:"scalar",resolve:v4,construct:y4,predicate:h4,represent:m4}),u4=Object.prototype.hasOwnProperty,f4=Object.prototype.toString;c9=new g("tag:yaml.org,2002:omap",{kind:"sequence",resolve:c4,construct:p4}),d4=Object.prototype.toString;p9=new g("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:l4,construct:i4}),n4=Object.prototype.hasOwnProperty;d9=new g("tag:yaml.org,2002:set",{kind:"mapping",resolve:o4,construct:r4}),Q8=v9.extend({implicit:[h9,u9],explicit:[f9,c9,p9,d9]}),L0=Object.prototype.hasOwnProperty,a4=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,t4=/[\x85\u2028\u2029]/,e4=/[,\[\]\{\}]/,n9=/^(?:!|!!|![a-z\-]+!)$/i,o9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;s9=Array(256),a9=Array(256);for(D0=0;D0<256;D0++)s9[D0]=M9(D0)?1:0,a9[D0]=M9(D0);H9={YAML:function(X,z,q){var G,Q,W;if(X.version!==null)L(X,"duplication of %YAML directive");if(q.length!==1)L(X,"YAML directive accepts exactly one argument");if(G=/^([0-9]+)\.([0-9]+)$/.exec(q[0]),G===null)L(X,"ill-formed argument of the YAML directive");if(Q=parseInt(G[1],10),W=parseInt(G[2],10),Q!==1)L(X,"unacceptable YAML version of the document");if(X.version=q[0],X.checkLineBreaks=W<2,W!==1&&W!==2)T1(X,"unsupported YAML version of the document")},TAG:function(X,z,q){var G,Q;if(q.length!==2)L(X,"TAG directive accepts exactly two arguments");if(G=q[0],Q=q[1],!n9.test(G))L(X,"ill-formed tag handle (first argument) of the TAG directive");if(L0.call(X.tagMap,G))L(X,'there is a previously declared suffix for "'+G+'" tag handle');if(!o9.test(Q))L(X,"ill-formed tag prefix (second argument) of the TAG directive");try{Q=decodeURIComponent(Q)}catch(W){L(X,"tag prefix is malformed: "+Q)}X.tagMap[G]=Q}};D5=B5,A5=$5,ZZ={loadAll:D5,load:A5},XZ=Object.prototype.toString,zZ=Object.prototype.hasOwnProperty,v={};v[0]="\\0";v[7]="\\a";v[8]="\\b";v[9]="\\t";v[10]="\\n";v[11]="\\v";v[12]="\\f";v[13]="\\r";v[27]="\\e";v[34]="\\\"";v[92]="\\\\";v[133]="\\N";v[160]="\\_";v[8232]="\\L";v[8233]="\\P";g5=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v5=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;e5=t5,Z3={dump:e5};X3=g,z3=N9,q3=x9,V8=g9,G3=v9,W3=Q8,Q3=ZZ.load,J3=ZZ.loadAll,Y3=Z3.dump,U3=m,K3={binary:f9,float:b9,map:P9,null:E9,pairs:p9,set:d9,timestamp:h9,bool:S9,int:k9,merge:u9,omap:c9,seq:_9,str:j9},V3=K8("safeLoad","load"),M3=K8("safeLoadAll","loadAll"),H3=K8("safeDump","dump"),M8={Type:X3,Schema:z3,FAILSAFE_SCHEMA:q3,JSON_SCHEMA:V8,CORE_SCHEMA:G3,DEFAULT_SCHEMA:W3,load:Q3,loadAll:J3,dump:Y3,YAMLException:U3,types:K3,safeLoad:V3,safeLoadAll:M3,safeDump:H3}});var MZ;var HZ=T(()=>{s();H8();H8();MZ={order:200,allowEmpty:!0,canParse:[".yaml",".yml",".json"],async parse(Z){let X=Z.data;if(Buffer.isBuffer(X))X=X.toString();if(typeof X==="string")try{return M8.load(X,{schema:V8})}catch{try{return M8.load(X)}catch(z){throw new r(z?.message||"Parser Error",Z.url)}}else return X}}});var F3,FZ;var BZ=T(()=>{s();F3=/\.(txt|htm|html|md|xml|js|min|map|css|scss|less|svg)$/i,FZ={order:300,allowEmpty:!0,encoding:"utf8",canParse(Z){return(typeof Z.data==="string"||Buffer.isBuffer(Z.data))&&F3.test(Z.url)},parse(Z){if(typeof Z.data==="string")return Z.data;else if(Buffer.isBuffer(Z.data))return Z.data.toString(this.encoding);else throw new r("data is not text",Z.url)}}});var B3,$Z;var DZ=T(()=>{B3=/\.(jpeg|jpg|gif|png|bmp|ico)$/i,$Z={order:400,allowEmpty:!0,canParse(Z){return Buffer.isBuffer(Z.data)&&B3.test(Z.url)},parse(Z){if(Buffer.isBuffer(Z.data))return Z.data;else return Buffer.from(Z.data)}}});var F8;var B8=T(()=>{u();s();F8={order:100,canRead(Z){return V1(Z.url)},async read(Z){let X,z=await import("fs");try{X=v0(Z.url)}catch(q){let G=q;throw G.message=`Malformed URI: ${Z.url}: ${G.message}`,new Z0(G,Z.url)}if(X.endsWith("/")||X.endsWith("\\"))X=X.slice(0,-1);try{return await z.promises.readFile(X)}catch(q){let G=q;throw G.message=`Error opening file ${X}: ${G.message}`,new Z0(G,X)}}}});async function AZ(Z,X,z){Z=g0(Z);let q=z||[];q.push(Z.href);try{let G=await $3(Z,X);if(G.status>=400){let Q=Error(`HTTP ERROR ${G.status}`);throw Q.status=G.status,Q}else if(G.status>=300)if(!Number.isNaN(X.redirects)&&q.length>X.redirects){let Q=Error(`Error downloading ${q[0]}.
|
|
51
51
|
Too many redirects:
|
|
52
52
|
${q.join(`
|
|
53
|
-
`)}`);throw W.status=J.status,new e(W)}else if(!("location"in J.headers)||!J.headers.location){let W=Error(`HTTP ${J.status} redirect with no location header`);throw W.status=J.status,W}else{let W=S(Z.href,J.headers.location);return qZ(W,X,q)}else{if(J.body){let W=await J.arrayBuffer();return Buffer.from(W)}return Buffer.alloc(0)}}catch(J){let W=J;throw W.message=`Error downloading ${Z.href}: ${W.message}`,new e(W,Z.href)}}async function e5(Z,X){let z,q;if(X.timeout&&typeof AbortController<"u")z=new AbortController,q=setTimeout(()=>z.abort(),X.timeout);let J=await fetch(Z,{method:"GET",headers:X.headers||{},credentials:X.withCredentials?"include":"same-origin",signal:z?z.signal:null});if(q)clearTimeout(q);return J}var W8;var Q8=T(()=>{f();s();W8={order:200,headers:null,timeout:60000,redirects:5,withCredentials:!1,safeUrlResolver:!0,canRead(Z){return v8(Z.url)&&(!this.safeUrlResolver||!k1(Z.url))},read(Z){let X=N0(Z.url);if(typeof window<"u"&&!X.protocol)X.protocol=N0(location.href).protocol;return qZ(X,this)}}});function QZ(Z,X){if(JZ(X)){let z=Object.keys(X).filter((q)=>!["__proto__","constructor","prototype"].includes(q));for(let q=0;q<z.length;q++){let J=z[q],W=X[J],G=Z[J];if(JZ(W))Z[J]=QZ(G||{},W);else if(W!==void 0)Z[J]=W}}return Z}function JZ(Z){return Z&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof RegExp)&&!(Z instanceof Date)}var GZ=()=>{return{parse:{json:{...i8},yaml:{...a9},text:{...e9},binary:{...XZ}},resolve:{file:{...J8},http:{...W8},external:!0},continueOnError:!1,bundle:{excludedPathMatcher:()=>!1},dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative",mergeKeys:!0},mutateInputSchema:!0}},WZ=(Z)=>{let X=GZ();if(Z)QZ(X,Z);return X};var Y8=T(()=>{n8();t9();ZZ();zZ();G8();Q8()});function Z3(Z){let X,z,q,J,W=Array.prototype.slice.call(Z);if(typeof W[W.length-1]==="function")J=W.pop();if(typeof W[0]==="string")if(X=W[0],typeof W[2]==="object")z=W[1],q=W[2];else z=void 0,q=W[1];else X="",z=W[0],q=W[1];try{q=WZ(q)}catch(G){console.error(`JSON Schema Ref Parser: Error normalizing options: ${G}`)}if(!q.mutateInputSchema&&typeof z==="object")z=JSON.parse(JSON.stringify(z));return{path:X,schema:z,options:q,callback:J}}var r0;var YZ=T(()=>{Y8();r0=Z3});function X3(Z,X){if(!X.resolve?.external)return Promise.resolve();try{let z=Z.$refs._root$Ref.dynamicIdScope?m(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,q=U8(Z.schema,Z.$refs._root$Ref.path+"#",z,Z.$refs._root$Ref.dynamicIdScope,Z.$refs,X);return Promise.all(q)}catch(z){return Promise.reject(z)}}function U8(Z,X,z,q,J,W,G,Y){G||=new Set;let Q=[];if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!G.has(Z)){G.add(Z);let U=z;if(_.isExternal$Ref(Z))Q.push(z3(Z,X,U,q,J,W));let K=Object.keys(Z);for(let V of K){let M=c.join(X,V),F=Z[V],H=q&&F&&typeof F==="object"&&!ArrayBuffer.isView(F)?m(U,F):U;Q=Q.concat(U8(F,M,H,q,J,W,G,Y))}}return Q}async function z3(Z,X,z,q,J,W){let Y=W.dereference?.externalReferenceResolution==="root"?D0():q?z:X,Q=S(Y,Z.$ref),U=x(Q),K=J._get$Ref(U);if(K)return Promise.resolve(K.value);try{let V=Z.$ref,M={url:Q,baseUrl:Y};if(typeof V==="string")M.reference=V;let F=await V1(M,J,W),H=J._get$Ref(U),A=U8(F,U+"#",U,H?.dynamicIdScope??!1,J,W,new Set,!0);return Promise.all(A)}catch(V){if(!W?.continueOnError||!z0(V))throw V;if(J._$refs[U])V.source=decodeURI(x(X)),V.path=q1(Z0(X));return[]}}var UZ;var KZ=T(()=>{E0();f0();u1();f();s();$0();UZ=X3});function q3(Z,X){let z=Z.$refs._root$Ref.dynamicIdScope?m(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,q=[];K8(Z,"schema",Z.$refs._root$Ref.path+"#",z,Z.$refs._root$Ref.dynamicIdScope,"#",0,q,Z.$refs,X);let J=Z.schema&&typeof Z.schema==="object"&&"$id"in Z.schema?Z.schema.$id:void 0;if(J3(q,X,J),(X.bundle||{}).optimizeInternalRefs!==!1)Q3(q,Z.schema)}function K8(Z,X,z,q,J,W,G,Y,Q,U){let K=X===null?Z:Z[X],V=U.bundle||{},M=V.excludedPathMatcher||(()=>!1);if(K&&typeof K==="object"&&!ArrayBuffer.isView(K)&&!M(W)){let F=q;if(_.isAllowed$Ref(K))VZ(Z,X,z,F,J,W,G,Y,Q,U);else{let H=Object.keys(K).sort((A,B)=>{if(A==="definitions"||A==="$defs")return-1;else if(B==="definitions"||B==="$defs")return 1;else return A.length-B.length});for(let A of H){let B=c.join(z,A),$=c.join(W,A),D=K[A],O=J&&D&&typeof D==="object"&&!ArrayBuffer.isView(D)?m(F,D):F;if(_.isAllowed$Ref(D))VZ(K,A,B,O,J,$,G,Y,Q,U);else K8(K,A,B,O,J,$,G,Y,Q,U);if(D&&typeof D==="object"&&!Array.isArray(D)){if("$ref"in D)V?.onBundle?.(D.$ref,K[A],K,A)}}}}}function VZ(Z,X,z,q,J,W,G,Y,Q,U){let K=X===null?Z:Z[X],V=S(J?q:z,K.$ref),M=Q._resolve(V,W,U);if(M===null)return;let H=c.parse(W).length,A=x(M.path),B=Z0(M.path),$=A!==Q._root$Ref.path&&!Q._aliases[A],D=_.isExtended$Ref(K);G+=M.indirections;let O=G3(Y,Z,X);if(O)if(H<O.depth||G<O.indirections)W3(Y,O);else return;if(Y.push({$ref:K,parent:Z,key:X,pathFromRoot:W,depth:H,file:A,hash:B,value:M.value,circular:M.circular,extended:D,external:$,indirections:G}),!O||$)K8(M.value,null,M.path,M.$ref.path,M.$ref.dynamicIdScope,W,G+1,Y,Q,U)}function J3(Z,X,z){Z.sort((G,Y)=>{if(G.file!==Y.file)return G.file<Y.file?-1:1;else if(G.hash!==Y.hash)return G.hash<Y.hash?-1:1;else if(G.circular!==Y.circular)return G.circular?-1:1;else if(G.extended!==Y.extended)return G.extended?1:-1;else if(G.indirections!==Y.indirections)return G.indirections-Y.indirections;else if(G.depth!==Y.depth)return G.depth-Y.depth;else{let Q=Math.max(G.pathFromRoot.lastIndexOf("/definitions"),G.pathFromRoot.lastIndexOf("/$defs")),U=Math.max(Y.pathFromRoot.lastIndexOf("/definitions"),Y.pathFromRoot.lastIndexOf("/$defs"));if(Q!==U)return U-Q;else return G.pathFromRoot.length-Y.pathFromRoot.length}});let q,J,W;for(let G of Z){let Y=X.bundle||{};if(!G.external){if(Y.optimizeInternalRefs!==!1)G.$ref.$ref=G.hash}else if(G.file===q&&G.hash===J)if(z&&MZ(Z,G))G.$ref.$ref=z+W;else G.$ref.$ref=W;else if(G.file===q&&G.hash.indexOf(J+"/")===0){let Q=c.join(W,c.parse(G.hash.replace(J,"#")));if(z&&MZ(Z,G))G.$ref.$ref=z+Q;else G.$ref.$ref=Q}else if(q=G.file,J=G.hash,W=G.pathFromRoot,G.$ref=G.parent[G.key]=_.dereference(G.$ref,G.value,X),G.circular)G.$ref.$ref=G.pathFromRoot}}function G3(Z,X,z){for(let q of Z)if(q&&q.parent===X&&q.key===z)return q;return}function W3(Z,X){let z=Z.indexOf(X);Z.splice(z,1)}function Q3(Z,X){for(let z of Z){if(!z.$ref||typeof z.$ref!=="object"||!("$ref"in z.$ref))continue;let q=z.$ref.$ref;if(typeof q!=="string"||!q.startsWith("#/"))continue;let J=Y3(X,q);if(J!==q)z.$ref.$ref=J}}function Y3(Z,X){if(!X.startsWith("#/"))return X;let z=X.slice(2).split("/"),q=Z,J=[];for(let G of z){if(q===null||q===void 0||typeof q!=="object")return X;if("$ref"in q&&typeof q.$ref==="string"&&q.$ref.startsWith("#/")){let U=q.$ref.slice(2).split("/");if(J.length=0,J.push(...U),q=U3(Z,q.$ref),q===null||q===void 0||typeof q!=="object")return X}let Y=G.replace(/~1/g,"/").replace(/~0/g,"~"),Q=Array.isArray(q)?parseInt(Y):Y;q=q[Q],J.push(G)}return"#/"+J.join("/")}function U3(Z,X){if(!X.startsWith("#/"))return;let z=X.slice(2).split("/"),q=Z;for(let J of z){if(q===null||q===void 0||typeof q!=="object")return;let W=J.replace(/~1/g,"/").replace(/~0/g,"~"),G=Array.isArray(q)?parseInt(W):W;q=q[G]}return q}function MZ(Z,X){for(let z of Z){if(z.pathFromRoot==="#"||z.pathFromRoot==="#/")continue;if(X.pathFromRoot.startsWith(z.pathFromRoot+"/")){if(z.value&&typeof z.value==="object"&&"$id"in z.value)return!0}}return!1}var FZ;var HZ=T(()=>{E0();f0();f();$0();FZ=q3});function K3(Z,X){let z=Date.now(),q=Z.$refs._root$Ref.dynamicIdScope?m(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,J=V8(Z.schema,Z.$refs._root$Ref.path,q,Z.$refs._root$Ref.dynamicIdScope,"#",new Set,new Set,new Map,Z.$refs,X,z,0);Z.$refs.circular=J.circular,Z.schema=J.value}function V8(Z,X,z,q,J,W,G,Y,Q,U,K,V){let M,F={value:Z,circular:!1};DZ(K,U);let H=U.dereference||{},A=H.maxDepth??500;if(V>A)throw RangeError(`Maximum dereference depth (${A}) exceeded at ${J}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);let B=H.excludedPathMatcher||(()=>!1);if(H?.circular==="ignore"||!G.has(Z)){if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!B(J)){W.add(Z),G.add(Z);let $=z;if(_.isAllowed$Ref(Z,U))M=BZ(Z,X,$,q,J,W,G,Y,Q,U,K,V),F.circular=M.circular,F.value=M.value;else for(let D of Object.keys(Z)){DZ(K,U);let O=c.join(X,D),R=c.join(J,D);if(B(R))continue;let j=Z[D],I=q&&j&&typeof j==="object"&&!ArrayBuffer.isView(j)?m($,j):$,N;if(_.isAllowed$Ref(j,U)){if(M=BZ(j,O,I,q,R,W,G,Y,Q,U,K,V),N=M.circular,Z[D]!==M.value){let w=new Map;if(H?.preservedProperties){if(typeof Z[D]==="object"&&!Array.isArray(Z[D]))H?.preservedProperties.forEach((a)=>{if(a in Z[D])w.set(a,Z[D][a])})}let y=M.value;if(H?.cloneReferences&&!N&&y&&typeof y==="object")y=structuredClone(y);if(Z[D]=y,H?.preservedProperties){if(w.size&&typeof Z[D]==="object"&&!Array.isArray(Z[D]))w.forEach((a,w1)=>{Z[D][w1]=a})}H?.onDereference?.(j.$ref,Z[D],Z,D)}}else if(!W.has(j)){if(M=V8(j,O,I,q,R,W,G,Y,Q,U,K,V+1),N=M.circular,Z[D]!==M.value)Z[D]=M.value}else N=A1(O,Q,U);F.circular=F.circular||N}W.delete(Z)}}return F}function BZ(Z,X,z,q,J,W,G,Y,Q,U,K,V){let H=_.isExternal$Ref(Z)&&U?.dereference?.externalReferenceResolution==="root"?D0():q?z:X,A=S(H,Z.$ref),B=Y.get(A);if(B){if(!B.circular){let I=Object.keys(Z);if(I.length>1){let N={};for(let w of I)if(w!=="$ref"&&!(w in B.value))N[w]=Z[w];return{circular:B.circular,value:Object.assign({},B.value,N)}}return B}if(typeof B.value==="object"&&"$ref"in B.value&&"$ref"in Z){if(B.value.$ref===Z.$ref)return A1(X,Q,U),B}else return A1(X,Q,U),B}let $=Q._resolve(A,X,U);if($===null)return{circular:!1,value:null};let D=$.circular,O=D||W.has($.value);if(O)A1(X,Q,U);let R=_.dereference(Z,$.value,U);if(!O){let I=V8(R,$.path,$.$ref.path,$.$ref.dynamicIdScope,J,W,G,Y,Q,U,K,V+1);O=I.circular,R=I.value}if(O&&!D&&U.dereference?.circular==="ignore")R=Z;if(D)R.$ref=J;let j={circular:O,value:R};if(Object.keys(Z).length===1)Y.set(A,j);return j}function DZ(Z,X){if(X&&X.timeoutMs){if(Date.now()-Z>X.timeoutMs)throw new b1(X.timeoutMs)}}function A1(Z,X,z){if(X.circular=!0,z?.dereference?.onCircular?.(Z),!z.dereference.circular)throw ReferenceError(`Circular $ref pointer found at ${Z}`);return!0}var $Z;var AZ=T(()=>{E0();f0();f();$0();s();$Z=K3});function V3(){if(typeof process==="object"&&typeof process.nextTick==="function")return process.nextTick;else if(typeof setImmediate==="function")return setImmediate;else return function(X){setTimeout(X,0)}}var M8;var LZ=T(()=>{M8=V3()});function i(Z,X){if(Z){X.then(function(z){M8(function(){Z(null,z)})},function(z){M8(function(){Z(z)})});return}else return X}var OZ=T(()=>{LZ()});class J0{schema=null;$refs=new p0;async parse(){let Z=r0(arguments),X;if(!Z.path&&!Z.schema){let q=Error(`Expected a file path, URL, or object. Got ${Z.path||Z.schema}`);return i(Z.callback,Promise.reject(q))}this.schema=null,this.$refs=new p0;let z="http";if(z1(Z.path))Z.path=y8(Z.path),z="file";else if(!Z.path&&Z.schema&&"$id"in Z.schema&&Z.schema.$id){let q=N0(Z.schema.$id),J=q.port??(q.protocol==="https:"?443:80);Z.path=`${q.protocol}//${q.hostname}:${J}`}if(Z.path=S(D0(),Z.path),Z.schema&&typeof Z.schema==="object"){let q=this.$refs._add(Z.path);q.value=Z.schema,q.pathType=z,q.dynamicIdScope=Q1(q.value),Y1(this.$refs,q.path,q.value,q.pathType,q.dynamicIdScope),X=Promise.resolve(Z.schema)}else X=V1(Z.path,this.$refs,Z.options);try{let q=await X;if(q!==null&&typeof q==="object"&&!Buffer.isBuffer(q))return this.schema=q,i(Z.callback,Promise.resolve(this.schema));else if(Z.options.continueOnError)return this.schema=null,i(Z.callback,Promise.resolve(this.schema));else throw SyntaxError(`"${this.$refs._root$Ref.path||q}" is not a valid JSON Schema`)}catch(q){if(!Z.options.continueOnError||!z0(q))return i(Z.callback,Promise.reject(q));if(this.$refs._$refs[x(Z.path)])this.$refs._$refs[x(Z.path)].addError(q);return i(Z.callback,Promise.resolve(null))}}static parse(){let Z=new J0;return Z.parse.apply(Z,arguments)}async resolve(){let Z=r0(arguments);try{return await this.parse(Z.path,Z.schema,Z.options),await UZ(this,Z.options),F8(this),i(Z.callback,Promise.resolve(this.$refs))}catch(X){return i(Z.callback,Promise.reject(X))}}static resolve(){let Z=new J0;return Z.resolve.apply(Z,arguments)}static bundle(){let Z=new J0;return Z.bundle.apply(Z,arguments)}async bundle(){let Z=r0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),FZ(this,Z.options),F8(this),i(Z.callback,Promise.resolve(this.schema))}catch(X){return i(Z.callback,Promise.reject(X))}}static dereference(){let Z=new J0;return Z.dereference.apply(Z,arguments)}async dereference(){let Z=r0(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),$Z(this,Z.options),F8(this),i(Z.callback,Promise.resolve(this.schema))}catch(X){return i(Z.callback,Promise.reject(X))}}}function F8(Z){if(_0.getParserErrors(Z).length>0)throw new _0(Z)}var wZ,IX,TX,RX,CX;var IZ=T(()=>{d8();u1();YZ();KZ();HZ();AZ();f();G8();Q8();s();OZ();$0();Y8();f();wZ=J0;IX=J0.parse,TX=J0.resolve,RX=J0.bundle,CX=J0.dereference});async function TZ(Z,X={}){let{baseUrl:z="/_jx/server"}=X,q=await wZ.dereference(Z),J=E8(q);if(J.length===0)return null;let W=J.map(({exportName:Y,src:Q})=>`import { ${Y} } from '${Q}'`).join(`
|
|
54
|
-
`),G
|
|
53
|
+
`)}`);throw Q.status=G.status,new Z0(Q)}else if(!("location"in G.headers)||!G.headers.location){let Q=Error(`HTTP ${G.status} redirect with no location header`);throw Q.status=G.status,Q}else{let Q=k(Z.href,G.headers.location);return AZ(Q,X,q)}else{if(G.body){let Q=await G.arrayBuffer();return Buffer.from(Q)}return Buffer.alloc(0)}}catch(G){let Q=G;throw Q.message=`Error downloading ${Z.href}: ${Q.message}`,new Z0(Q,Z.href)}}async function $3(Z,X){let z,q;if(X.timeout&&typeof AbortController<"u")z=new AbortController,q=setTimeout(()=>z.abort(),X.timeout);let G=await fetch(Z,{method:"GET",headers:X.headers||{},credentials:X.withCredentials?"include":"same-origin",signal:z?z.signal:null});if(q)clearTimeout(q);return G}var $8;var D8=T(()=>{u();s();$8={order:200,headers:null,timeout:60000,redirects:5,withCredentials:!1,safeUrlResolver:!0,canRead(Z){return a8(Z.url)&&(!this.safeUrlResolver||!p1(Z.url))},read(Z){let X=g0(Z.url);if(typeof window<"u"&&!X.protocol)X.protocol=g0(location.href).protocol;return AZ(X,this)}}});function OZ(Z,X){if(LZ(X)){let z=Object.keys(X).filter((q)=>!["__proto__","constructor","prototype"].includes(q));for(let q=0;q<z.length;q++){let G=z[q],Q=X[G],W=Z[G];if(LZ(Q))Z[G]=OZ(W||{},Q);else if(Q!==void 0)Z[G]=Q}}return Z}function LZ(Z){return Z&&typeof Z==="object"&&!Array.isArray(Z)&&!(Z instanceof RegExp)&&!(Z instanceof Date)}var IZ=()=>{return{parse:{json:{...J9},yaml:{...MZ},text:{...FZ},binary:{...$Z}},resolve:{file:{...F8},http:{...$8},external:!0},continueOnError:!1,bundle:{excludedPathMatcher:()=>!1},dereference:{circular:!0,excludedPathMatcher:()=>!1,referenceResolution:"relative",mergeKeys:!0},mutateInputSchema:!0}},wZ=(Z)=>{let X=IZ();if(Z)OZ(X,Z);return X};var A8=T(()=>{Y9();HZ();BZ();DZ();B8();D8()});function D3(Z){let X,z,q,G,Q=Array.prototype.slice.call(Z);if(typeof Q[Q.length-1]==="function")G=Q.pop();if(typeof Q[0]==="string")if(X=Q[0],typeof Q[2]==="object")z=Q[1],q=Q[2];else z=void 0,q=Q[1];else X="",z=Q[0],q=Q[1];try{q=wZ(q)}catch(W){console.error(`JSON Schema Ref Parser: Error normalizing options: ${W}`)}if(!q.mutateInputSchema&&typeof z==="object")z=JSON.parse(JSON.stringify(z));return{path:X,schema:z,options:q,callback:G}}var q1;var TZ=T(()=>{A8();q1=D3});function A3(Z,X){if(!X.resolve?.external)return Promise.resolve();try{let z=Z.$refs._root$Ref.dynamicIdScope?y(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,q=L8(Z.schema,Z.$refs._root$Ref.path+"#",z,Z.$refs._root$Ref.dynamicIdScope,Z.$refs,X);return Promise.all(q)}catch(z){return Promise.reject(z)}}function L8(Z,X,z,q,G,Q,W,Y){W||=new Set;let J=[];if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!W.has(Z)){W.add(Z);let U=z;if(_.isExternal$Ref(Z))J.push(L3(Z,X,U,q,G,Q));let K=Object.keys(Z);for(let V of K){let M=f.join(X,V),H=Z[V],F=q&&H&&typeof H==="object"&&!ArrayBuffer.isView(H)?y(U,H):U;J=J.concat(L8(H,M,F,q,G,Q,W,Y))}}return J}async function L3(Z,X,z,q,G,Q){let Y=Q.dereference?.externalReferenceResolution==="root"?C0():q?z:X,J=k(Y,Z.$ref),U=x(J),K=G._get$Ref(U);if(K)return Promise.resolve(K.value);try{let V=Z.$ref,M={url:J,baseUrl:Y};if(typeof V==="string")M.reference=V;let H=await I1(M,G,Q),F=G._get$Ref(U),A=L8(H,U+"#",U,F?.dynamicIdScope??!1,G,Q,new Set,!0);return Promise.all(A)}catch(V){if(!Q?.continueOnError||!W0(V))throw V;if(G._$refs[U])V.source=decodeURI(x(X)),V.path=M1(q0(X));return[]}}var CZ;var RZ=T(()=>{h0();r0();s1();u();s();R0();CZ=A3});function I3(Z,X){let z=Z.$refs._root$Ref.dynamicIdScope?y(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,q=[];I8(Z,"schema",Z.$refs._root$Ref.path+"#",z,Z.$refs._root$Ref.dynamicIdScope,"#",0,q,Z.$refs,X);let G=Z.schema&&typeof Z.schema==="object"&&"$id"in Z.schema?Z.schema.$id:void 0;if(w3(q,X,G),(X.bundle||{}).optimizeInternalRefs!==!1)C3(q,Z.schema)}function I8(Z,X,z,q,G,Q,W,Y,J,U){let K=X===null?Z:Z[X],V=U.bundle||{},M=V.excludedPathMatcher||(()=>!1);if(K&&typeof K==="object"&&!ArrayBuffer.isView(K)&&!M(Q)){let H=q;if(_.isAllowed$Ref(K))NZ(Z,X,z,H,G,Q,W,Y,J,U);else{let F=Object.keys(K).sort((A,B)=>{if(A==="definitions"||A==="$defs")return-1;else if(B==="definitions"||B==="$defs")return 1;else return A.length-B.length});for(let A of F){let B=f.join(z,A),D=f.join(Q,A),$=K[A],w=G&&$&&typeof $==="object"&&!ArrayBuffer.isView($)?y(H,$):H;if(_.isAllowed$Ref($))NZ(K,A,B,w,G,D,W,Y,J,U);else I8(K,A,B,w,G,D,W,Y,J,U);if($&&typeof $==="object"&&!Array.isArray($)){if("$ref"in $)V?.onBundle?.($.$ref,K[A],K,A)}}}}}function NZ(Z,X,z,q,G,Q,W,Y,J,U){let K=X===null?Z:Z[X],V=k(G?q:z,K.$ref),M=J._resolve(V,Q,U);if(M===null)return;let F=f.parse(Q).length,A=x(M.path),B=q0(M.path),D=A!==J._root$Ref.path&&!J._aliases[A],$=_.isExtended$Ref(K);W+=M.indirections;let w=O3(Y,Z,X);if(w)if(F<w.depth||W<w.indirections)T3(Y,w);else return;if(Y.push({$ref:K,parent:Z,key:X,pathFromRoot:Q,depth:F,file:A,hash:B,value:M.value,circular:M.circular,extended:$,external:D,indirections:W}),!w||D)I8(M.value,null,M.path,M.$ref.path,M.$ref.dynamicIdScope,Q,W+1,Y,J,U)}function w3(Z,X,z){Z.sort((W,Y)=>{if(W.file!==Y.file)return W.file<Y.file?-1:1;else if(W.hash!==Y.hash)return W.hash<Y.hash?-1:1;else if(W.circular!==Y.circular)return W.circular?-1:1;else if(W.extended!==Y.extended)return W.extended?1:-1;else if(W.indirections!==Y.indirections)return W.indirections-Y.indirections;else if(W.depth!==Y.depth)return W.depth-Y.depth;else{let J=Math.max(W.pathFromRoot.lastIndexOf("/definitions"),W.pathFromRoot.lastIndexOf("/$defs")),U=Math.max(Y.pathFromRoot.lastIndexOf("/definitions"),Y.pathFromRoot.lastIndexOf("/$defs"));if(J!==U)return U-J;else return W.pathFromRoot.length-Y.pathFromRoot.length}});let q,G,Q;for(let W of Z){let Y=X.bundle||{};if(!W.external){if(Y.optimizeInternalRefs!==!1)W.$ref.$ref=W.hash}else if(W.file===q&&W.hash===G)if(z&&jZ(Z,W))W.$ref.$ref=z+Q;else W.$ref.$ref=Q;else if(W.file===q&&W.hash.indexOf(G+"/")===0){let J=f.join(Q,f.parse(W.hash.replace(G,"#")));if(z&&jZ(Z,W))W.$ref.$ref=z+J;else W.$ref.$ref=J}else if(q=W.file,G=W.hash,Q=W.pathFromRoot,W.$ref=W.parent[W.key]=_.dereference(W.$ref,W.value,X),W.circular)W.$ref.$ref=W.pathFromRoot}}function O3(Z,X,z){for(let q of Z)if(q&&q.parent===X&&q.key===z)return q;return}function T3(Z,X){let z=Z.indexOf(X);Z.splice(z,1)}function C3(Z,X){for(let z of Z){if(!z.$ref||typeof z.$ref!=="object"||!("$ref"in z.$ref))continue;let q=z.$ref.$ref;if(typeof q!=="string"||!q.startsWith("#/"))continue;let G=R3(X,q);if(G!==q)z.$ref.$ref=G}}function R3(Z,X){if(!X.startsWith("#/"))return X;let z=X.slice(2).split("/"),q=Z,G=[];for(let W of z){if(q===null||q===void 0||typeof q!=="object")return X;if("$ref"in q&&typeof q.$ref==="string"&&q.$ref.startsWith("#/")){let U=q.$ref.slice(2).split("/");if(G.length=0,G.push(...U),q=N3(Z,q.$ref),q===null||q===void 0||typeof q!=="object")return X}let Y=W.replace(/~1/g,"/").replace(/~0/g,"~"),J=Array.isArray(q)?parseInt(Y):Y;q=q[J],G.push(W)}return"#/"+G.join("/")}function N3(Z,X){if(!X.startsWith("#/"))return;let z=X.slice(2).split("/"),q=Z;for(let G of z){if(q===null||q===void 0||typeof q!=="object")return;let Q=G.replace(/~1/g,"/").replace(/~0/g,"~"),W=Array.isArray(q)?parseInt(Q):Q;q=q[W]}return q}function jZ(Z,X){for(let z of Z){if(z.pathFromRoot==="#"||z.pathFromRoot==="#/")continue;if(X.pathFromRoot.startsWith(z.pathFromRoot+"/")){if(z.value&&typeof z.value==="object"&&"$id"in z.value)return!0}}return!1}var _Z;var PZ=T(()=>{h0();r0();u();R0();_Z=I3});function j3(Z,X){let z=Date.now(),q=Z.$refs._root$Ref.dynamicIdScope?y(Z.$refs._root$Ref.path,Z.schema):Z.$refs._root$Ref.path,G=w8(Z.schema,Z.$refs._root$Ref.path,q,Z.$refs._root$Ref.dynamicIdScope,"#",new Set,new Set,new Map,Z.$refs,X,z,0);Z.$refs.circular=G.circular,Z.schema=G.value}function w8(Z,X,z,q,G,Q,W,Y,J,U,K,V){let M,H={value:Z,circular:!1};EZ(K,U);let F=U.dereference||{},A=F.maxDepth??500;if(V>A)throw RangeError(`Maximum dereference depth (${A}) exceeded at ${G}. This likely indicates an extremely deep or recursive schema. You can increase this limit with the dereference.maxDepth option.`);let B=F.excludedPathMatcher||(()=>!1);if(F?.circular==="ignore"||!W.has(Z)){if(Z&&typeof Z==="object"&&!ArrayBuffer.isView(Z)&&!B(G)){Q.add(Z),W.add(Z);let D=z;if(_.isAllowed$Ref(Z,U))M=xZ(Z,X,D,q,G,Q,W,Y,J,U,K,V),H.circular=M.circular,H.value=M.value;else for(let $ of Object.keys(Z)){EZ(K,U);let w=f.join(X,$),R=f.join(G,$);if(B(R))continue;let N=Z[$],O=q&&N&&typeof N==="object"&&!ArrayBuffer.isView(N)?y(D,N):D,I;if(_.isAllowed$Ref(N,U)){if(M=xZ(N,w,O,q,R,Q,W,Y,J,U,K,V),I=M.circular,Z[$]!==M.value){let P=new Map;if(F?.preservedProperties){if(typeof Z[$]==="object"&&!Array.isArray(Z[$]))F?.preservedProperties.forEach((I0)=>{if(I0 in Z[$])P.set(I0,Z[$][I0])})}let X0=M.value;if(F?.cloneReferences&&!I&&X0&&typeof X0==="object")X0=structuredClone(X0);if(Z[$]=X0,F?.preservedProperties){if(P.size&&typeof Z[$]==="object"&&!Array.isArray(Z[$]))P.forEach((I0,U6)=>{Z[$][U6]=I0})}F?.onDereference?.(N.$ref,Z[$],Z,$)}}else if(!Q.has(N)){if(M=w8(N,w,O,q,R,Q,W,Y,J,U,K,V+1),I=M.circular,Z[$]!==M.value)Z[$]=M.value}else I=j1(w,J,U);H.circular=H.circular||I}Q.delete(Z)}}return H}function xZ(Z,X,z,q,G,Q,W,Y,J,U,K,V){let F=_.isExternal$Ref(Z)&&U?.dereference?.externalReferenceResolution==="root"?C0():q?z:X,A=k(F,Z.$ref),B=Y.get(A);if(B){if(!B.circular){let O=Object.keys(Z);if(O.length>1){let I={};for(let P of O)if(P!=="$ref"&&!(P in B.value))I[P]=Z[P];return{circular:B.circular,value:Object.assign({},B.value,I)}}return B}if(typeof B.value==="object"&&"$ref"in B.value&&"$ref"in Z){if(B.value.$ref===Z.$ref)return j1(X,J,U),B}else return j1(X,J,U),B}let D=J._resolve(A,X,U);if(D===null)return{circular:!1,value:null};let $=D.circular,w=$||Q.has(D.value);if(w)j1(X,J,U);let R=_.dereference(Z,D.value,U);if(!w){let O=w8(R,D.path,D.$ref.path,D.$ref.dynamicIdScope,G,Q,W,Y,J,U,K,V+1);w=O.circular,R=O.value}if(w&&!$&&U.dereference?.circular==="ignore")R=Z;if($)R.$ref=G;let N={circular:w,value:R};if(Object.keys(Z).length===1)Y.set(A,N);return N}function EZ(Z,X){if(X&&X.timeoutMs){if(Date.now()-Z>X.timeoutMs)throw new d1(X.timeoutMs)}}function j1(Z,X,z){if(X.circular=!0,z?.dereference?.onCircular?.(Z),!z.dereference.circular)throw ReferenceError(`Circular $ref pointer found at ${Z}`);return!0}var SZ;var kZ=T(()=>{h0();r0();u();R0();s();SZ=j3});function _3(){if(typeof process==="object"&&typeof process.nextTick==="function")return process.nextTick;else if(typeof setImmediate==="function")return setImmediate;else return function(X){setTimeout(X,0)}}var O8;var bZ=T(()=>{O8=_3()});function l(Z,X){if(Z){X.then(function(z){O8(function(){Z(null,z)})},function(z){O8(function(){Z(z)})});return}else return X}var gZ=T(()=>{bZ()});class V0{schema=null;$refs=new a0;async parse(){let Z=q1(arguments),X;if(!Z.path&&!Z.schema){let q=Error(`Expected a file path, URL, or object. Got ${Z.path||Z.schema}`);return l(Z.callback,Promise.reject(q))}this.schema=null,this.$refs=new a0;let z="http";if(V1(Z.path))Z.path=t8(Z.path),z="file";else if(!Z.path&&Z.schema&&"$id"in Z.schema&&Z.schema.$id){let q=g0(Z.schema.$id),G=q.port??(q.protocol==="https:"?443:80);Z.path=`${q.protocol}//${q.hostname}:${G}`}if(Z.path=k(C0(),Z.path),Z.schema&&typeof Z.schema==="object"){let q=this.$refs._add(Z.path);q.value=Z.schema,q.pathType=z,q.dynamicIdScope=$1(q.value),D1(this.$refs,q.path,q.value,q.pathType,q.dynamicIdScope),X=Promise.resolve(Z.schema)}else X=I1(Z.path,this.$refs,Z.options);try{let q=await X;if(q!==null&&typeof q==="object"&&!Buffer.isBuffer(q))return this.schema=q,l(Z.callback,Promise.resolve(this.schema));else if(Z.options.continueOnError)return this.schema=null,l(Z.callback,Promise.resolve(this.schema));else throw SyntaxError(`"${this.$refs._root$Ref.path||q}" is not a valid JSON Schema`)}catch(q){if(!Z.options.continueOnError||!W0(q))return l(Z.callback,Promise.reject(q));if(this.$refs._$refs[x(Z.path)])this.$refs._$refs[x(Z.path)].addError(q);return l(Z.callback,Promise.resolve(null))}}static parse(){let Z=new V0;return Z.parse.apply(Z,arguments)}async resolve(){let Z=q1(arguments);try{return await this.parse(Z.path,Z.schema,Z.options),await CZ(this,Z.options),T8(this),l(Z.callback,Promise.resolve(this.$refs))}catch(X){return l(Z.callback,Promise.reject(X))}}static resolve(){let Z=new V0;return Z.resolve.apply(Z,arguments)}static bundle(){let Z=new V0;return Z.bundle.apply(Z,arguments)}async bundle(){let Z=q1(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),_Z(this,Z.options),T8(this),l(Z.callback,Promise.resolve(this.schema))}catch(X){return l(Z.callback,Promise.reject(X))}}static dereference(){let Z=new V0;return Z.dereference.apply(Z,arguments)}async dereference(){let Z=q1(arguments);try{return await this.resolve(Z.path,Z.schema,Z.options),SZ(this,Z.options),T8(this),l(Z.callback,Promise.resolve(this.schema))}catch(X){return l(Z.callback,Promise.reject(X))}}}function T8(Z){if(y0.getParserErrors(Z).length>0)throw new y0(Z)}var cX,pX,dX,vZ;var yZ=T(()=>{W9();s1();TZ();RZ();PZ();kZ();u();B8();D8();s();gZ();R0();A8();u();cX=V0.parse,pX=V0.resolve,dX=V0.bundle,vZ=V0.dereference});async function mZ(Z,X={}){let{baseUrl:z="/_jx/server"}=X,q=await vZ(Z),G=i8(q);if(G.length===0)return null;let Q=G.map(({exportName:Y,src:J})=>`import { ${Y} } from '${J}'`).join(`
|
|
54
|
+
`),W=G.map(({exportName:Y})=>hZ(Y,z)).join(`
|
|
55
55
|
`);return`// Generated by @jxsuite/compiler — do not edit manually
|
|
56
56
|
// Deploy as a Cloudflare Worker, Node server, or Bun process.
|
|
57
57
|
// Requires: npm install hono
|
|
58
58
|
|
|
59
59
|
import { Hono } from 'hono'
|
|
60
|
-
${
|
|
60
|
+
${Q}
|
|
61
61
|
|
|
62
62
|
const app = new Hono()
|
|
63
|
-
${
|
|
63
|
+
${W}
|
|
64
64
|
|
|
65
65
|
export default app
|
|
66
|
-
`}function
|
|
67
|
-
`),
|
|
66
|
+
`}function P3(Z,X={}){let{baseUrl:z="/_jx/server",adapter:q=null}=X;if(Z.length===0&&!q)return null;let G=Z.map(({exportName:Y,src:J})=>`import { ${Y} } from '${J}'`).join(`
|
|
67
|
+
`),Q=Z.map(({exportName:Y})=>hZ(Y,z)).join(`
|
|
68
68
|
`);return`// Generated by @jxsuite/compiler — do not edit manually
|
|
69
69
|
import { Hono } from 'hono'
|
|
70
|
-
${
|
|
70
|
+
${G}
|
|
71
71
|
|
|
72
72
|
const app = new Hono()
|
|
73
|
-
${
|
|
73
|
+
${Q}
|
|
74
74
|
${q==="cloudflare-workers"||q==="cloudflare-pages"?`
|
|
75
75
|
app.all('*', (c) => c.env.ASSETS.fetch(c.req.raw))
|
|
76
76
|
`:`
|
|
77
77
|
`}
|
|
78
78
|
export default app
|
|
79
|
-
`}function
|
|
79
|
+
`}function hZ(Z,X){return`
|
|
80
80
|
app.post('${X}/${Z}', async (c) => {
|
|
81
81
|
const args = await c.req.json().catch(() => ({}))
|
|
82
82
|
try {
|
|
@@ -84,7 +84,7 @@ app.post('${X}/${Z}', async (c) => {
|
|
|
84
84
|
} catch (e) {
|
|
85
85
|
return c.json({ ok: false, error: e?.message ?? 'Server error' }, 500)
|
|
86
86
|
}
|
|
87
|
-
})`}var
|
|
87
|
+
})`}var uZ=T(()=>{yZ();b0()});function x3(Z){return Z instanceof Error?Z.message:String(Z)}function C8(Z,X,z){let q;try{q=JSON.parse(Z)}catch(G){throw Error(`Failed to parse ${z} at ${X}: ${x3(G)}`,{cause:G})}if(!p(q))throw Error(`Invalid ${z} at ${X}: expected a JSON object`);return q}function _1(Z,X){return C8(Z,X,"Jx document")}function sX(Z,X){return C8(Z,X,"project config")}function aX(Z,X){return C8(Z,X,"class definition")}var R8=T(()=>{$0()});class pZ{name;classPath;classDef;extensions;mediaType;documentKinds;exportTarget;remote;studio;capabilities;#Z;#X=null;constructor(Z,X,z,q){this.name=Z,this.classPath=X,this.classDef=z,this.#Z=q;let G=z.format;this.extensions=(G.extensions??[]).map((Q)=>Q.toLowerCase()),this.mediaType=G.mediaType??null,this.documentKinds=G.documentKinds??[],this.exportTarget=G.exportTarget===!0,this.remote=G.remote===!0,this.studio=z.$studio??null,this.capabilities=S3(z)}implementation(){if(!this.#X){let Z=this.classDef.$implementation;if(!Z)return Promise.reject(Error(`Format class "${this.name}" has no $implementation to import`));this.#X=this.#Z.importModule(this.#Z.resolvePath(this.classPath,Z))}return this.#X}async call(Z,...X){let z=this.capabilities[Z];if(!z)throw Error(`Format class "${this.name}" does not declare a "${Z}" capability`);let q=await this.implementation(),G=this.classDef.title??this.name,Q=q[G]??q.default?.[G]??q.default,W=Q?.[z.identifier];if(typeof W!=="function")throw TypeError(`Format class "${this.name}": implementation export "${G}" has no static "${z.identifier}" method`);return await W.call(Q,...X)}}class dZ{#Z;constructor(Z){this.#Z=Z;for(let X of cZ){let z=new Map;for(let q of Z){if(!q.capabilities[X])continue;for(let G of q.extensions){let Q=z.get(G);if(Q)throw Error(`Format conflict: "${Q.name}" and "${q.name}" both claim "${G}" with the "${X}" capability`);z.set(G,q)}}}}get entries(){return this.#Z}byExtension(Z,X){let z=fZ(Z);return this.#Z.find((q)=>q.extensions.includes(z)&&(!X||q.capabilities[X]))}byName(Z){return this.#Z.find((X)=>X.name===Z)}withCapability(Z){return this.#Z.filter((X)=>X.capabilities[Z])}documentExtensions(Z){let X=new Set;for(let z of this.#Z){if(Z&&!z.documentKinds.includes(Z))continue;for(let q of z.extensions)X.add(q)}return X.delete(".json"),[...X]}has(Z){let X=fZ(Z);return this.#Z.some((z)=>z.extensions.includes(X))}}async function lZ(Z,X,z){let q=[];for(let[G,Q]of Object.entries(Z??{})){if(typeof Q!=="string"||!Q.endsWith(".class.json"))continue;let W,Y;try{W=z?X.resolvePath(z,Q):Q,Y=await X.loadJson(W)}catch{continue}if(!Y||typeof Y!=="object")continue;if(!Y.format||!Array.isArray(Y.format.extensions))continue;q.push(new pZ(G,W,Y,X))}return new dZ(q)}function S3(Z){let X={},z=Z.$defs?.methods??{};for(let[q,G]of Object.entries(z)){let Q=G.role;if(!Q||!cZ.includes(Q))continue;X[Q]={identifier:G.identifier??q,timing:G.timing??E3}}return X}function fZ(Z){let X=Z.toLowerCase();return X.startsWith(".")?X:`.${X}`}var cZ,E3;var iZ=T(()=>{cZ=["parse","serialize","discover","load"],E3=["compiler","server"]});var j8={};k8(j8,{unknownFormatError:()=>m3,importImplementation:()=>oZ,createNodeFormatIO:()=>rZ,buildProjectFormatRegistry:()=>y3});import{readFileSync as k3}from"node:fs";import{dirname as b3,isAbsolute as g3,resolve as N8,sep as P1}from"node:path";import{pathToFileURL as v3}from"node:url";import{createRequire as nZ}from"node:module";async function oZ(Z){let X=[Z],z=`${P1}src${P1}`,q=`${P1}dist${P1}`;if(Z.includes(z))X.push(Z.replace(z,q));if(Z.endsWith(".js"))X.push(`${Z.slice(0,-3)}.ts`);let G;for(let Q of X)try{return await import(v3(Q).href)}catch(W){G=W}throw G instanceof Error?G:Error(String(G))}function rZ(Z){return{importModule:(X)=>oZ(X),loadJson:async(X)=>JSON.parse(k3(X,"utf8")),resolvePath:(X,z)=>{if(z.startsWith("./")||z.startsWith("../"))return N8(b3(X),z);if(g3(z))return z;let q=nZ(N8(Z,"package.json"));try{return q.resolve(z)}catch{return nZ(import.meta.url).resolve(z)}}}}async function y3(Z,X){return lZ(X?.imports,rZ(Z),N8(Z,"project.json"))}function m3(Z,X){return Error(`No format class imported for "${X}" (${Z}). Add a format class to project.json imports, e.g. "Markdown": "@jxsuite/parser/Markdown.class.json".`)}var _8=T(()=>{iZ()});async function sZ(Z,X={}){let{resolveElementPath:z,$media:q,formats:G}=X,Q=[],W=new Set;async function Y(J,U){let K,V;if(typeof J==="string"){let{readFileSync:w}=await import("node:fs"),{resolve:R}=await import("node:path");if(V=U?R(U,J):R(J),W.has(V))return;if(W.add(V),V.endsWith(".json"))K=_1(w(V,"utf8"),V);else{let{extname:N}=await import("node:path"),O=N(V).toLowerCase(),I=G?.byExtension?.(O,"parse");if(!I){let{unknownFormatError:P}=await Promise.resolve().then(() => (_8(),j8));throw P(V,O)}K=await I.call("parse",w(V,"utf8"))}}else{if(K=J,V=null,K.tagName&&W.has(K.tagName))return;if(K.tagName)W.add(K.tagName)}let{tagName:M}=K;if(!M||!M.includes("-"))throw Error(`compileElement: tagName "${M}" must contain a hyphen`);let{dirname:H}=await import("node:path"),F=V?H(V):null,A=[];if(Array.isArray(K.$elements))for(let w of K.$elements){let R=t(w)?w.$ref:w;if(typeof R!=="string")continue;if(F)await Y(R,F);let N=z?z(R,F):R.replace(/\.json$/,".js");A.push(N)}let B=K1(M);if(q)K.$media={...q,...K.$media};let D=G1(K,B,A),$=V?V.replace(/\.json$/,".js"):`${M}.js`;Q.push({content:D,path:$,tagName:M})}return await Y(Z,X.basePath??null),{files:Q}}async function h3(Z,X={}){let{title:z="Jx App",reactivitySrc:q="https://esm.sh/@vue/reactivity@3.5.13",litHtmlSrc:G="https://esm.sh/lit-html@3.3.0"}=X,Q=await sZ(Z,X),W=Q.files.at(-1);if(!W)throw Error("compileElementPage: no element modules were produced");let{basename:Y}=await import("node:path"),J=Y(W.path),U=`<!DOCTYPE html>
|
|
88
88
|
<html lang="en">
|
|
89
89
|
<head>
|
|
90
90
|
<meta charset="utf-8">
|
|
@@ -94,53 +94,58 @@ app.post('${X}/${Z}', async (c) => {
|
|
|
94
94
|
{
|
|
95
95
|
"imports": {
|
|
96
96
|
"@vue/reactivity": "${q}",
|
|
97
|
-
"lit-html": "${
|
|
97
|
+
"lit-html": "${G}"
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
</script>
|
|
101
101
|
</head>
|
|
102
102
|
<body>
|
|
103
|
-
<${
|
|
104
|
-
<script type="module" src="./${
|
|
103
|
+
<${W.tagName}></${W.tagName}>
|
|
104
|
+
<script type="module" src="./${J}"></script>
|
|
105
105
|
</body>
|
|
106
|
-
</html
|
|
107
|
-
`)}function
|
|
108
|
-
`)}function
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
${X}>`;let Y="";if(Z
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
${
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
${X}
|
|
120
|
-
${X}
|
|
121
|
-
${X}
|
|
106
|
+
</html>`;return{files:Q.files,html:U}}function u3(Z){if(Z===null||typeof Z!=="object"||Array.isArray(Z))return JSON.stringify(Z);if("default"in Z)return JSON.stringify(Z.default);if(F0(Z))return;if(Z.$prototype==="LocalStorage"||Z.$prototype==="SessionStorage")return JSON.stringify(Z.default??null);if(Z.$prototype==="Request")return"null";return JSON.stringify(Z)}function G1(Z,X,z){let q=["// Generated by @jxsuite/compiler — do not edit manually"];if(Z.$id)q.push(`// Source: ${Z.$id}`);for(let V of z)q.push(`import '${V}';`);let G=new Map,Q=Z.state??{};for(let[V,M]of Object.entries(Q)){let H=M;if(H&&typeof H==="object"&&!Array.isArray(H)&&H.$prototype==="Function"&&H.$src){let F=H.$src;if(!G.has(F))G.set(F,[]);G.get(F).push(V)}}for(let[V,M]of G)q.push(`import { ${M.join(", ")} } from '${V}';`);q.push("import { reactive, computed, effect } from '@vue/reactivity';"),q.push("import { render, html } from 'lit-html';"),q.push(""),q.push(`class ${X} extends HTMLElement {`),q.push(" #dispose = null;"),q.push(""),q.push(" constructor() {"),q.push(" super();");let W=[],Y=[],J=[];for(let[V,M]of Object.entries(Q)){let H=M;if(e(H)){let F=H.$expression;if(w0(F.operator))J.push([V,H]);else Y.push([V,H])}else if(Y0(H))if(typeof H.body==="string"&&H.body.includes("return"))Y.push([V,H]);else J.push([V,H]);else{let F=u3(H);if(F!==void 0)W.push([V,F])}}q.push(" this.state = reactive({");for(let[V,M]of W)q.push(` ${V}: ${M},`);q.push(" });");for(let[V,M]of J)if(q.push(""),e(M)){let H=n(M.$expression,{eventParam:"e",statePrefix:"s"});q.push(` this.state.${V} = (s, e) => { ${H}; };`)}else{let F=(M.parameters?B0(M.parameters):M.arguments??["state"]).join(", ");if(M.$src)q.push(` this.state.${V} = (${F}) => ${V}(${F});`);else q.push(` this.state.${V} = (${F}) => {`),q.push(` ${M.body??""}`),q.push(" };")}for(let[V,M]of Y)if(q.push(""),e(M)){let H=n(M.$expression,{eventParam:"e",statePrefix:"this.state"});q.push(` this.state.${V} = computed(() => ${H});`)}else if(M.$src)q.push(` this.state.${V} = computed(() => ${V}(this.state));`);else{q.push(` this.state.${V} = computed(() => {`);let H=(M.body??"").replaceAll("state.","this.state.");q.push(` ${H}`),q.push(" });")}q.push(" }"),q.push("");let U=[];if(Array.isArray(Z.children)){let V={n:0};for(let M of Z.children)E0(M,U,Z.$media??{},"",V,Z.tagName)}if(q.push(" template() {"),q.push(" const s = this.state;"),q.push(" return html`"),q.push(x8(Z.children,Z.style," ")),q.push(" `;"),q.push(" }"),q.push(""),q.push(" connectedCallback() {"),q.push(" const _pa = this.getAttribute('data-jx-props');"),q.push(" if (_pa) {"),q.push(" try {"),q.push(" const _p = JSON.parse(_pa);"),q.push(" for (const [k, v] of Object.entries(_p)) {"),q.push(" if (k in this.state) this.state[k] = v;"),q.push(" }"),q.push(" } catch {}"),q.push(" this.removeAttribute('data-jx-props');"),q.push(" }"),q.push(" for (const key of Object.keys(this.state)) {"),q.push(" if (this.hasOwnProperty(key) && this[key] !== undefined) {"),q.push(" this.state[key] = this[key];"),q.push(" }"),q.push(" }"),Z.style&&typeof Z.style==="object"){let V=[];for(let[M,H]of Object.entries(Z.style)){if(M.startsWith(":")||M.startsWith(".")||M.startsWith("&")||M.startsWith("[")||M.startsWith("@"))continue;if(H===null||typeof H==="object")continue;let F=d(M);if(typeof H==="string"&&H.includes("${"))V.push([F,H])}if(V.length>0){q.push(" effect(() => {");for(let[M,H]of V){let F=H.replaceAll(/\$\{([^}]+)\}/g,(A,B)=>`\${${B.replaceAll("state.","this.state.")}}`);q.push(` this.style['${M}'] = \`${F}\`;`)}q.push(" });")}}let K=eZ(Z.children);if(K)q.push(" const _slotted = Array.from(this.childNodes).filter(n => n.nodeType === 1 || (n.nodeType === 3 && n.textContent.trim()));");if(q.push(" if (this.hasAttribute('data-jx-prerendered')) {"),q.push(" this.removeAttribute('data-jx-prerendered');"),q.push(" }"),q.push(" this.innerHTML = '';"),q.push(" this.#dispose = effect(() => render(this.template(), this));"),K)q.push(" const _slot = this.querySelector('slot');"),q.push(" if (_slot && _slotted.length > 0) {"),q.push(" for (const n of _slotted) _slot.before(n);"),q.push(" _slot.remove();"),q.push(" }");return q.push(" }"),q.push(""),q.push(" disconnectedCallback() {"),q.push(" if (this.#dispose) { this.#dispose(); this.#dispose = null; }"),q.push(" }"),q.push("}"),q.push(""),q.push(`customElements.define('${Z.tagName}', ${X});`),q.push(""),q.join(`
|
|
107
|
+
`)}function x8(Z,X,z){if(!Z)return"";if(i0(Z))return f3(Z,z);if(!Array.isArray(Z))return"";return Z.map((q)=>aZ(q,z)).join(`
|
|
108
|
+
`)}function aZ(Z,X){if(typeof Z==="string"){if(Z.includes("${"))return`${X}${P8(Z)}`;return`${X}${C(Z)}`}if(typeof Z==="number"||typeof Z==="boolean")return`${X}${C(String(Z))}`;if(!Z||typeof Z!=="object")return"";let z=Z.tagName??"div",q=[];if(Z.attributes)for(let[J,U]of Object.entries(Z.attributes))if(U&&typeof U==="object"&&t(U))q.push(`${J}="\${${M0(U.$ref)}}"`);else if(typeof U==="string"&&U.includes("${"))q.push(`${J}="${x1(U)}"`);else q.push(`${J}="${U}"`);if(Z.id)q.push(`id="${Z.id}"`);if(Z.className)q.push(`class="${Z.className}"`);for(let[J,U]of Object.entries(Z)){if(O0.has(J)||J.startsWith("$")||J.startsWith("on")||J==="tagName"||J==="id"||J==="className"||J==="style"||J==="children"||J==="textContent"||J==="innerHTML"||J==="attributes")continue;if(U&&typeof U==="object"&&U.$ref)q.push(`.${J}="\${${M0(U.$ref)}}"`);else if(typeof U==="string"&&U.includes("${"))q.push(`.${J}="${x1(U)}"`)}if(Z.$props)for(let[J,U]of Object.entries(Z.$props))if(U&&typeof U==="object"&&U.$ref)q.push(`.${J}="\${${M0(U.$ref)}}"`);else q.push(`.${J}="\${${JSON.stringify(U)}}"`);for(let[J,U]of Object.entries(Z)){if(!J.startsWith("on")||J==="observedAttributes")continue;let K=J.slice(2).toLowerCase();if(U&&typeof U==="object"&&U.$ref)q.push(`@${K}="\${(e) => ${M0(U.$ref)}(s, e)}"`);else if(U&&typeof U==="object"&&"$expression"in U){let V=n(U.$expression,{eventParam:"e",statePrefix:"s"});q.push(`@${K}="\${(e) => { ${V}; }}"`)}else if(Y0(U))q.push(`@${K}="\${(e) => { ${p3(U)} }}"`)}let G=tZ(Z.style);if(G)q.push(`style="${G}"`);let Q=q.length>0?`
|
|
109
|
+
${X} ${q.join(`
|
|
110
|
+
${X} `)}`:"";if(new Set(["input","br","hr","img","meta","link"]).has(z))return`${X}<${z}${Q}
|
|
111
|
+
${X}>`;let Y="";if(Z.$switch){let J=t(Z.$switch)?Z.$switch.$ref:Z.$switch,U=M0(J),K=Z.cases??{},V=[];for(let[M,H]of Object.entries(K)){if(!H||t(H))continue;let F=aZ(H,`${X} `);V.push(` ${JSON.stringify(M)}: html\`
|
|
112
|
+
${F}
|
|
113
|
+
\``)}Y=`\${{
|
|
114
|
+
${V.join(`,
|
|
115
|
+
`)}
|
|
116
|
+
}[${U}]}`}else if(Z.textContent!==void 0)Y=P8(Z.textContent);else if(Z.innerHTML!==void 0)Y=Z.innerHTML;else if(Z.children)Y=`
|
|
117
|
+
${x8(Z.children,Z.style,`${X} `)}
|
|
118
|
+
${X}`;return`${X}<${z}${Q}
|
|
119
|
+
${X}>${Y}</${z}>`}function f3(Z,X){let z=t(Z.items)?M0(Z.items.$ref):"ITEMS",q=Z.map;if(!q)return"";let G=q.tagName??"div",Q=[];if(q.$props)for(let[U,K]of Object.entries(q.$props))if(t(K))Q.push(`.${U}="\${${c3(K.$ref)}}"`);else Q.push(`.${U}="\${${JSON.stringify(K)}}"`);let W=tZ(q.style);if(W)Q.push(`style="${W}"`);for(let[U,K]of Object.entries(q)){if(!U.startsWith("on"))continue;let V=U.slice(2).toLowerCase();if(t(K))Q.push(`@${V}="\${(e) => ${M0(K.$ref)}(s, e)}"`);else if(e(K)){let M=n(K.$expression,{eventParam:"e",statePrefix:"s"});Q.push(`@${V}="\${(e) => { ${M}; }}"`)}}let Y=Q.length>0?`
|
|
120
|
+
${X} ${Q.join(`
|
|
121
|
+
${X} `)}`:"",J="";if(q.textContent!==void 0)J=P8(q.textContent);else if(q.children)J=`
|
|
122
|
+
${x8(q.children,null,`${X} `)}
|
|
123
|
+
${X} `;return`${X}\${${z}.map((item, index) => html\`
|
|
124
|
+
${X} <${G}${Y}
|
|
125
|
+
${X} >${J}</${G}>
|
|
126
|
+
${X}\`)}`}function M0(Z){if(Z.startsWith("#/state/"))return`s.${Z.slice(8).replaceAll("/",".")}`;if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return`s.${Z}`}function c3(Z){if(Z.startsWith("$map/"))return Z.slice(5).replaceAll("/",".");return M0(Z)}function x1(Z){return Z.replaceAll("state.","s.")}function P8(Z){if(Z!==null&&typeof Z==="object"&&typeof Z.$ref==="string")return`\${${M0(Z.$ref)}}`;if(typeof Z==="string"&&Z.includes("${"))return x1(Z);return String(Z)}function p3(Z){return(Z.body??"").replaceAll(/(?<!this\.)state\./g,"s.").replaceAll(/(?<!this\.)state(?!\.)/g,"s")}function tZ(Z){if(!Z||typeof Z!=="object")return"";let X=[];for(let[z,q]of Object.entries(Z)){if(z.startsWith(":")||z.startsWith(".")||z.startsWith("&")||z.startsWith("[")||z.startsWith("@"))continue;if(q===null||typeof q==="object")continue;if(typeof q==="string"&&q.includes("${")){let G=d(z);X.push(`${G}: ${x1(q)}`)}}return X.join("; ")}function eZ(Z){if(!Array.isArray(Z))return!1;for(let X of Z){if(!X||typeof X!=="object")continue;if(X.tagName==="slot")return!0;if(eZ(X.children))return!0}return!1}var E8=T(()=>{W1();b0();$0();R8()});function Z6(Z,X){let{title:z="Jx App",reactivitySrc:q,litHtmlSrc:G}=X,Q=S0(Z,null,Z.state??{},Z.$media??{}),W=k0(Z,Z.$media??{},X.projectStyle??null),Y=[],J=X6(Z,!1,Z,Q,Y),U=[],K="",V="";if(Y.length>0){for(let H of Y){let F=G1(H.def,H.className,[]);U.push({content:F,path:`_islands/${H.tagName}.js`,tagName:H.tagName})}K=`<script type="importmap">
|
|
122
127
|
{
|
|
123
128
|
"imports": {
|
|
124
129
|
"@vue/reactivity": "${q}",
|
|
125
|
-
"lit-html": "${
|
|
130
|
+
"lit-html": "${G}"
|
|
126
131
|
}
|
|
127
132
|
}
|
|
128
|
-
</script>`,V=U.map((
|
|
129
|
-
`)}
|
|
133
|
+
</script>`,V=U.map((H)=>`<script type="module" src="./${H.path}"></script>`).join(`
|
|
134
|
+
`)}let M=`<!DOCTYPE html>
|
|
130
135
|
<html lang="en">
|
|
131
136
|
<head>
|
|
132
137
|
<meta charset="utf-8">
|
|
133
138
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
134
139
|
<title>${C(z)}</title>
|
|
135
140
|
${K}
|
|
136
|
-
${
|
|
141
|
+
${W}
|
|
137
142
|
</head>
|
|
138
143
|
<body>
|
|
139
|
-
${
|
|
144
|
+
${J}
|
|
140
145
|
${V}
|
|
141
146
|
</body>
|
|
142
|
-
</html
|
|
143
|
-
`)}return""}var
|
|
147
|
+
</html>`;return{files:U,html:M}}function X6(Z,X,z,q,G){if(typeof Z==="string")return C(Z);if(typeof Z==="number"||typeof Z==="boolean")return C(String(Z));if(!Z||typeof Z!=="object")return"";let Q=S0(z,q.scope,z?.state??q.scopeDefs,z?.$media??q.media);if(X){let U=G.length,K=`jx-island-${U}`,V=`JxIsland${U}`,M={...z??Z,tagName:K};return G.push({className:V,def:M,tagName:K}),`<${K}></${K}>`}let W=Z.tagName??"div",Y=x0(Z,Q.scope),J=d3(Z,z,Q,G);return`<${W}${Y}>${J}</${W}>`}function d3(Z,X,z,q){let G=X??Z;if(G.textContent!==void 0){let Q=S(G.textContent,z.scope);return Q==null?"":C(String(Q))}if(G.innerHTML)return S(G.innerHTML,z.scope)??G.innerHTML;if(Array.isArray(G.children)){let Q=Array.isArray(X?.children)?X.children:void 0;return G.children.map((W,Y)=>{let J=W,U=p8(J),K=Q?.[Y]??W;return X6(J,U,K,z,q)}).join(`
|
|
148
|
+
`)}return""}var z6=T(()=>{b0();E8()});function q6(Z,X){let{title:z="Jx App",reactivitySrc:q=Y1,litHtmlSrc:G=U1,modulePath:Q="app.js"}=X,W=S0(Z,null,Z.state??{},Z.$media??{}),Y=k0(Z,Z.$media??{},X.projectStyle??null),J={h:0,l:0,m:0,needsLit:!1,s:0,sw:0,t:0},U=new Map,K=new Map,V=[],M=[],H=[],F=[],A=[],B=new Map,D=Z.state??{};for(let[O,I]of Object.entries(D)){if(I===null||typeof I!=="object"||Array.isArray(I)){if(typeof I==="string"&&j(I))M.push([O,`() => \`${I}\``]);else V.push([O,I]);continue}if(e(I)){let P=I.$expression,X0=n(P,{eventParam:"e",statePrefix:"state"});if(w0(P.operator))F.push([O,{args:["state","e"],body:X0}]);else M.push([O,`() => ${X0}`]);continue}if(Y0(I)){let P=I.parameters?B0(I.parameters):I.arguments;if(I.$src){if(!B.has(I.$src))B.set(I.$src,new Set);B.get(I.$src).add(O),M.push([O,`() => { return ${O}(state); }`])}else if(I.body&&I.body.includes("return"))M.push([O,`() => { ${I.body} }`]);else F.push([O,{args:P??["state"],body:I.body}]);continue}if(F0(I))continue;if(h8(I)){V.push([O,I.default]);continue}if(l0(I)){if(I.$prototype==="LocalStorage"||I.$prototype==="SessionStorage"){let P=I.$prototype==="LocalStorage"?"localStorage":"sessionStorage",X0=I.key??O,I0=I.default??null;V.push([O,null]),A.push(n3(O,P,X0,I0));continue}if(I.$prototype==="Request"){V.push([O,null]),A.push(i3(O,I));continue}if(I.$prototype==="Cookie"){V.push([O,null]),A.push(o3(O,I.name??O,I.default??null));continue}}V.push([O,I])}let $=G6(Z,Z,W,U,K,J);for(let[O,I]of U)if(!H.some(([P])=>P===O))H.push([O,I]);for(let[O,I]of K)if(!F.some(([P])=>P===O))F.push([O,I]);let w=l3(V,M,H,F,A,B,J,q),R=[` "@vue/reactivity": "${q}"`,` "lit-html": "${G}"`],N=`<!DOCTYPE html>
|
|
144
149
|
<html lang="en">
|
|
145
150
|
<head>
|
|
146
151
|
<meta charset="utf-8">
|
|
@@ -155,22 +160,22 @@ ${R.join(`,
|
|
|
155
160
|
}
|
|
156
161
|
</script>
|
|
157
162
|
${Y}
|
|
158
|
-
<script type="module" src="./${
|
|
163
|
+
<script type="module" src="./${Q}"></script>
|
|
159
164
|
</head>
|
|
160
165
|
<body>
|
|
161
|
-
${
|
|
166
|
+
${$}
|
|
162
167
|
</body>
|
|
163
|
-
</html
|
|
164
|
-
`)}if(new Set(["input","br","hr","img","meta","link"]).has(Y))return`<${Y}${K}${V}${M}>`;return`<${Y}${K}${V}${M}>${
|
|
165
|
-
|
|
166
|
-
`)
|
|
167
|
-
`;if(new Set(["input","br","hr","img","meta","link"]).has(X))return
|
|
168
|
-
`)}function
|
|
169
|
-
`)}function
|
|
170
|
-
`)}function
|
|
171
|
-
`)}function
|
|
172
|
-
`)}function
|
|
173
|
-
`):Z.body??"").includes("await ")}import{readFileSync as
|
|
168
|
+
</html>`;return{files:[{content:w,path:Q}],html:N}}function G6(Z,X,z,q,G,Q){if(typeof Z==="string")return C(Z);if(typeof Z==="number"||typeof Z==="boolean")return C(String(Z));if(!Z||typeof Z!=="object")return"";let W=S0(X,z.scope,X?.state??z.scopeDefs,X?.$media??z.media),Y=Z.tagName??"div",J=[],U=!1;if(Z.textContent!==void 0){let B=X?.textContent??Z.textContent;if(z0(B)){let D=_0(B.$ref);J.push(`:text-content="${D}"`),S8(q,D,B.$ref),U=!0}else if(j(B)){let D=`_t${Q.t}`;Q.t+=1,J.push(`:text-content="${D}"`),q.set(D,`() => \`${B}\``),U=!0}}for(let[B,D]of Object.entries(Z)){if(!B.startsWith("on")||B==="observedAttributes")continue;let $=B.slice(2).toLowerCase();if(z0(D)){let w=_0(D.$ref);J.push(`@${$}="${w}"`),U=!0}else if(Y0(D)){let w=`_h${Q.h}`;Q.h+=1,J.push(`@${$}="${w}"`),G.set(w,{args:D.parameters?B0(D.parameters):D.arguments??["state","event"],body:D.body}),U=!0}else if(e(D)){let w=`_h${Q.h}`;Q.h+=1,J.push(`@${$}="${w}"`);let R=n(D.$expression,{eventParam:"e",statePrefix:"state"});G.set(w,{args:["state","e"],body:R}),U=!0}}if(Z.style&&typeof Z.style==="object")for(let[B,D]of Object.entries(Z.style)){if(B.startsWith(":")||B.startsWith(".")||B.startsWith("&")||B.startsWith("[")||B.startsWith("@"))continue;if(D===null||typeof D==="object")continue;if(j(D)){let $=`_s${Q.s}`;Q.s+=1,J.push(`:style.${d(B)}="${$}"`),q.set($,`() => \`${D}\``),U=!0}}if(Z.attributes&&typeof Z.attributes==="object"){for(let[B,D]of Object.entries(Z.attributes))if(z0(D)){let $=_0(D.$ref);J.push(`:attr.${B}="${$}"`),S8(q,$,D.$ref),U=!0}else if(j(D)){let $=`_t${Q.t}`;Q.t+=1,J.push(`:attr.${B}="${$}"`),q.set($,`() => \`${D}\``),U=!0}}for(let[B,D]of Object.entries(Z)){if(O0.has(B)||B.startsWith("on")||B.startsWith("$")||B==="tagName"||B==="id"||B==="className"||B==="style"||B==="children"||B==="textContent"||B==="innerHTML"||B==="attributes")continue;if(z0(D)){let $=_0(D.$ref);J.push(`:${d(B)}="${$}"`),S8(q,$,D.$ref),U=!0}else if(j(D)){let $=`_t${Q.t}`;Q.t+=1,J.push(`:${d(B)}="${$}"`),q.set($,`() => \`${D}\``),U=!0}}let K=x0(Z,W.scope),V=U?" data-bind":"",M=J.length>0?` ${J.join(" ")}`:"",H="",F=X??Z;if(F.textContent!==void 0&&!U){let B=S(F.textContent,W.scope);H=B==null?"":C(String(B))}else if(F.textContent!==void 0&&U){let B=S(F.textContent,W.scope);H=B==null?"":C(String(B))}else if(F.innerHTML)H=S(F.innerHTML,W.scope)??F.innerHTML;else if(i0(F.children)){Q.needsLit=!0;let B=`_list${Q.l}`;Q.l+=1;let D=F.children,$;if(z0(D.items))$=`state.${_0(D.items.$ref)}`;else $=JSON.stringify(D.items);let w=W6(D.map);q.set(B,`() => (${$} ?? []).map((item, index) => html\`${w}\`)`),J.push(`:render="${B}"`),U=!0;let R=" data-bind",N=` ${J.join(" ")}`;if(new Set(["input","br","hr","img","meta","link"]).has(Y))return`<${Y}${K}${R}${N}>`;return`<${Y}${K}${R}${N}></${Y}>`}else if(Array.isArray(F.children)){let B=Array.isArray(X?.children)?X.children:void 0;H=F.children.map((D,$)=>{let w=B?.[$]??D;return G6(D,w,W,q,G,Q)}).join(`
|
|
169
|
+
`)}if(new Set(["input","br","hr","img","meta","link"]).has(Y))return`<${Y}${K}${V}${M}>`;return`<${Y}${K}${V}${M}>${H}</${Y}>`}function W6(Z){if(!Z)return"";let X=Z.tagName??"div",z="";if(Z.id)z+=` id="${Z.id}"`;if(Z.className)z+=` class="${d0(Z.className)}"`;if(Z.attributes&&typeof Z.attributes==="object")for(let[Q,W]of Object.entries(Z.attributes))z+=typeof W==="string"&&j(W)?` ${Q}="${d0(W)}"`:` ${Q}="${C(String(W))}"`;if(Z.style&&typeof Z.style==="object"){let Q=[];for(let[W,Y]of Object.entries(Z.style)){if(W.startsWith(":")||W.startsWith(".")||W.startsWith("&")||W.startsWith("[")||W.startsWith("@"))continue;if(Y===null||typeof Y==="object")continue;let J=d(W);if(j(String(Y)))Q.push(`${J}: ${d0(String(Y))}`);else Q.push(`${J}: ${Y}`)}if(Q.length>0)z+=` style="${Q.join("; ")}"`}for(let[Q,W]of Object.entries(Z)){if(!Q.startsWith("on")||Q==="observedAttributes")continue;let Y=Q.slice(2).toLowerCase();if(z0(W)){let J=_0(W.$ref);z+=` @${Y}=\${(e) => { state.$map = { item, index }; on.${J}(e); }}`}else if(W&&typeof W==="object"&&W.$prototype==="Function"){let J=d0(W.body);z+=` @${Y}=\${(e) => { ${J} }}`}else if(W&&typeof W==="object"&&"$expression"in W){let J=n(W.$expression,{eventParam:"e",statePrefix:"state"});z+=` @${Y}=\${(e) => { state.$map = { item, index }; ${J}; }}`}}if(Z.contentEditable)z+=` contenteditable="${Z.contentEditable}"`;let q="";if(Z.textContent!==void 0){let Q=String(Z.textContent);if(j(Q))q=d0(Q);else if(z0(Z.textContent))q=`\${state.${_0(Z.textContent.$ref)}}`;else q=C(Q)}else if(Z.innerHTML)q=d0(String(Z.innerHTML));else if(Array.isArray(Z.children))q=`
|
|
170
|
+
${Z.children.map((Q)=>W6(Q)).join(`
|
|
171
|
+
`)}
|
|
172
|
+
`;if(new Set(["input","br","hr","img","meta","link"]).has(X))return`<${X}${z}>`;return`<${X}${z}>${q}</${X}>`}function d0(Z){return Z.replaceAll("$map.","")}function l3(Z,X,z,q,G,Q,W,Y){let J=[],{needsLit:U}=W,K=X.length>0;J.push("// Generated by @jxsuite/compiler — do not edit manually");let V=["reactive","effect"];if(K)V.push("computed");if(J.push(`import { ${V.join(", ")} } from '@vue/reactivity';`),U)J.push("import { html, render } from 'lit-html';");for(let[M,H]of Q)J.push(`import { ${[...H].join(", ")} } from '${M}';`);J.push(""),J.push("const state = reactive({");for(let[M,H]of Z)J.push(` ${M}: ${JSON.stringify(H)},`);if(J.push("});"),J.push(""),G.length>0){for(let M of G)J.push(M);J.push("")}if(X.length>0){for(let[M,H]of X)J.push(`state.${M} = computed(${H});`);J.push("")}if(z.length>0){J.push("const bind = {");for(let[M,H]of z)J.push(` ${M}: ${H},`);J.push("};")}else J.push("const bind = {};");if(J.push(""),q.length>0){J.push("const on = {");for(let[M,H]of q){let F=H.args??["state"],A=F.map((B)=>B==="state"?"state":"e").join(", ");J.push(` ${M}: (e) => { const fn = (${F.join(", ")}) => { ${H.body} }; fn(${A}); },`)}J.push("};")}else J.push("const on = {};");if(J.push(""),J.push("function hydrate(root) {"),J.push(" root.querySelectorAll('[data-bind]').forEach(el => {"),J.push(" [...el.attributes].forEach(a => {"),J.push(" if (a.name.startsWith(':')) {"),J.push(" const parts = a.name.slice(1).split('.');"),J.push(" const key = a.value;"),U)J.push(" if (parts[0] === 'render') {"),J.push(" effect(() => { render(bind[key](), el); });"),J.push(" } else if (parts[0] === 'style' && parts.length > 1) {");else J.push(" if (parts[0] === 'style' && parts.length > 1) {");return J.push(" effect(() => { el.style[parts[1]] = bind[key](); });"),J.push(" } else if (parts[0] === 'attr' && parts.length > 1) {"),J.push(" effect(() => { el.setAttribute(parts[1], bind[key]()); });"),J.push(" } else {"),J.push(" const prop = parts[0].replace(/-([a-z])/g, (_, c) => c.toUpperCase());"),J.push(" effect(() => { el[prop] = bind[key](); });"),J.push(" }"),J.push(" } else if (a.name.startsWith('@')) {"),J.push(" el.addEventListener(a.name.slice(1), on[a.value]);"),J.push(" }"),J.push(" });"),J.push(" });"),J.push("}"),J.push(""),J.push("hydrate(document);"),J.push(""),J.join(`
|
|
173
|
+
`)}function i3(Z,X){let{url:z}=X,q=X.method??"GET",G=j(z);if(X.manual)return`// ${Z}: manual Request — fetch triggered by user action`;let Q=[`// ${Z}: auto-fetch from ${G?"(dynamic URL)":z}`,"effect(() => {"];if(G)Q.push(` const url = \`${z}\`;`),Q.push(' if (!url || url === "undefined" || url.includes("undefined")) return;');else Q.push(` const url = ${JSON.stringify(z)};`);let W=[];if(q!=="GET")W.push(`method: ${JSON.stringify(q)}`);if(X.headers)W.push(`headers: ${JSON.stringify(X.headers)}`);if(X.body){let J=typeof X.body==="object"?JSON.stringify(JSON.stringify(X.body)):JSON.stringify(X.body);W.push(`body: ${J}`)}let Y=W.length>0?`, { ${W.join(", ")} }`:"";return Q.push(` fetch(url${Y})`),Q.push(" .then(r => r.ok ? r.json() : Promise.reject(r.statusText))"),Q.push(` .then(d => { state.${Z} = d; })`),Q.push(` .catch(e => { state.${Z} = { error: String(e) }; });`),Q.push("});"),Q.join(`
|
|
174
|
+
`)}function n3(Z,X,z,q){return[`// ${Z}: ${X} (key: "${z}")`,"try {",` const _s = ${X}.getItem(${JSON.stringify(z)});`,` state.${Z} = _s !== null ? JSON.parse(_s) : ${JSON.stringify(q)};`,`} catch { state.${Z} = ${JSON.stringify(q)}; }`,"effect(() => {",` const v = state.${Z};`," try {",` if (v === null) ${X}.removeItem(${JSON.stringify(z)});`,` else ${X}.setItem(${JSON.stringify(z)}, JSON.stringify(v));`," } catch {}","});"].join(`
|
|
175
|
+
`)}function o3(Z,X,z){return[`// ${Z}: Cookie (name: "${X}")`,"{",` const _m = document.cookie.match(new RegExp("(?:^|; )${X}=([^;]*)"));`,` try { state.${Z} = _m ? JSON.parse(decodeURIComponent(_m[1])) : ${JSON.stringify(z)}; }`,` catch { state.${Z} = _m ? _m[1] : ${JSON.stringify(z)}; }`,"}"].join(`
|
|
176
|
+
`)}function _0(Z){if(Z.startsWith("#/state/"))return Z.slice(8).replaceAll("/","_");return Z.replaceAll("/","_")}function S8(Z,X,z){if(Z.has(X))return;if(z.startsWith("#/state/")){let G=z.slice(8).split("/");Z.set(X,`() => state.${G.join(".")}`)}else Z.set(X,`() => state.${z}`)}var Q6=T(()=>{W1();b0();$0()});var Y6={};k8(Y6,{compileClassJson:()=>r3});function r3(Z,X={}){let z=Z.title;if(!z)throw Error("compileClassJson: missing title (class name)");let q=s3(Z.extends),G=Z.$defs,Q=G?.fields??{},W=G?.constructor,Y=typeof W==="object"?W:void 0,J=G?.methods??{},U=["// Generated by @jxsuite/compiler from .class.json — do not edit manually"];if(Z.$id)U.push(`// Source: ${Z.$id}`);U.push("");let K=q!=="Object"?` extends ${q}`:"";U.push(`class ${z}${K} {`);for(let[V,M]of Object.entries(Q)){if(M.scope!=="static")continue;let H=M.identifier??V,F=M.access==="private"?"#":"",A=M.initializer!==void 0?JSON.stringify(M.initializer):M.default!==void 0?JSON.stringify(M.default):"null";U.push(` static ${F}${H} = ${A};`)}for(let[V,M]of Object.entries(Q)){if(M.scope==="static")continue;if(M.access!=="private")continue;let H=M.identifier??V;U.push(` #${H};`)}if(Object.keys(Q).length>0)U.push("");if(U.push(" constructor(config = {}) {"),Y?.superCall||q!=="Object"){let V=Y?.superCall?.arguments?Y.superCall.arguments.join(", "):"";U.push(` super(${V});`)}for(let[V,M]of Object.entries(Q)){if(M.scope==="static")continue;let H=M.identifier??V,F=M.access==="private"?"#":"",A=M.initializer!==void 0?JSON.stringify(M.initializer):M.default!==void 0?JSON.stringify(M.default):"null";U.push(` this.${F}${H} = config.${H} !== undefined ? config.${H} : ${A};`)}if(Y?.body){let V=Array.isArray(Y.body)?Y.body:[Y.body];for(let M of V)U.push(` ${M}`)}U.push(" }");for(let[V,M]of Object.entries(J)){let H=M.identifier??V,F=M.scope==="static",B=M.access==="private"?"#":"",D=F?"static ":"",$=M.returnType?.$ref?.includes("Promise")||t3(M)?"async ":"",w=J6(M.parameters??[]),R=a3(M.body);if(U.push(""),M.role==="accessor"){if(M.getter)U.push(` ${D}get ${B}${H}() {`),U.push(` ${M.getter.body}`),U.push(" }");if(M.setter){let N=J6(M.setter.parameters??[]);U.push(` ${D}set ${B}${H}(${N}) {`),U.push(` ${M.setter.body}`),U.push(" }")}}else{U.push(` ${D}${$}${B}${H}(${w}) {`);for(let N of R)U.push(` ${N}`);U.push(" }")}}return U.push("}"),U.push(""),U.push(`export { ${z} };`),U.push(`export default ${z};`),U.push(""),U.join(`
|
|
177
|
+
`)}function s3(Z){if(!Z)return"Object";if(typeof Z==="string")return Z;if(Z.$ref){let X=Z.$ref.match(/([A-Za-z0-9_]+)\.class\.json/);return X?X[1]:"Object"}return"Object"}function J6(Z){return Z.map((X)=>{if(X.$ref)return X.$ref.split("/").pop();let z=X.identifier??X.name;return typeof z==="string"?z:"arg"}).join(", ")}function a3(Z){if(!Z)return[""];return Array.isArray(Z)?Z:[Z]}function t3(Z){return(Array.isArray(Z.body)?Z.body.join(`
|
|
178
|
+
`):Z.body??"").includes("await ")}import{readFileSync as e3}from"node:fs";async function Z7(Z,X={}){let{title:z="Jx App",reactivitySrc:q=Y1,litHtmlSrc:G=U1,projectStyle:Q=null}=X,W;if(typeof Z==="string"){let Y=e3(Z,"utf8");if(Z.endsWith(".json"))W=_1(Y,Z);else{let{extname:J}=await import("node:path"),U=J(Z).toLowerCase(),K=X.formats?.byExtension?.(U,"parse");if(!K){let{unknownFormatError:V}=await Promise.resolve().then(() => (_8(),j8));throw V(Z,U)}W=await K.call("parse",Y)}}else W=Z;if(f8(W)){let{compileClassJson:Y}=await Promise.resolve().then(() => Y6),J=Y(W,X),U=typeof Z==="string"?Z.replace(/\.class\.json$/,".js"):`${W.title}.js`;return{files:[{content:J,path:U}],html:""}}if(!u1(W))return Z6(W,{litHtmlSrc:G,projectStyle:Q,reactivitySrc:q,title:z});if(W.tagName&&W.tagName.includes("-")){let{tagName:Y}=W,J=K1(Y),K={content:G1(W,J,[]),path:`${Y}.js`,tagName:Y},V=k0(W,W.$media??{}),M=`<!DOCTYPE html>
|
|
174
179
|
<html lang="en">
|
|
175
180
|
<head>
|
|
176
181
|
<meta charset="utf-8">
|
|
@@ -180,7 +185,7 @@ ${R.join(`,
|
|
|
180
185
|
{
|
|
181
186
|
"imports": {
|
|
182
187
|
"@vue/reactivity": "${q}",
|
|
183
|
-
"lit-html": "${
|
|
188
|
+
"lit-html": "${G}"
|
|
184
189
|
}
|
|
185
190
|
}
|
|
186
191
|
</script>
|
|
@@ -190,4 +195,4 @@ ${R.join(`,
|
|
|
190
195
|
<${Y}></${Y}>
|
|
191
196
|
<script type="module" src="./${Y}.js"></script>
|
|
192
197
|
</body>
|
|
193
|
-
</html
|
|
198
|
+
</html>`;return{files:[K],html:M}}return q6(W,{litHtmlSrc:G,projectStyle:Q,reactivitySrc:q,title:z})}async function Rz(Z,X){let[z,q]=await Promise.all([Z7(Z),mZ(Z)]),{writeFileSync:G,mkdirSync:Q}=await import("node:fs"),{dirname:W,join:Y}=await import("node:path");if(X){G(X,z.html,"utf8"),console.error(`Written to ${X}`);let J=W(X);for(let U of z.files){let K=Y(J,U.path);Q(W(K),{recursive:!0}),G(K,U.content,"utf8"),console.error(`Written to ${K}`)}}else process.stdout.write(z.html);if(q&&X){let J=X.replace(/(\.[^.]+)?$/,"-server.js");G(J,q,"utf8"),console.error(`Server handler written to ${J}`)}}var X7=T(()=>{b0();uZ();E8();z6();Q6();$0();R8()});X7();export{Rz as runCli,u1 as isDynamic,P3 as compileSiteServer,mZ as compileServer,h3 as compileElementPage,sZ as compileElement,q6 as compileClient,Z7 as compile};
|