shopify 3.94.2 → 3.94.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.
@@ -1,4 +1,4 @@
1
- import{$a as fu,Ba as Ti,Ed as je,Fb as es,Jc as ht,Lc as ts,Uc as Ri,Wa as ki,Xa as Xn,Ya as Zn,Za as Rt,b as uu,bb as du,c as lu,ed as gu,fb as hu,hb as pu,qb as mu,sb as yu,va as Oi,wd as pt,yd as ve}from"./chunk-KVWHPGOA.js";import{a as xi}from"./chunk-SVA22NZQ.js";import{c as Te,h as dt}from"./chunk-JBSYWYIP.js";import{a as R,c as v,e as Oe,g as u}from"./chunk-VPRTJUIN.js";var Gr=v(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.regexpCode=V.getEsmExportName=V.getProperty=V.safeStringify=V.stringify=V.strConcat=V.addCodeArg=V.str=V._=V.nil=V._Code=V.Name=V.IDENTIFIER=V._CodeOrName=void 0;var Vr=class{};V._CodeOrName=Vr;V.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var At=class extends Vr{constructor(e){if(super(),!V.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};V.Name=At;var qe=class extends Vr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof At&&(r[n.str]=(r[n.str]||0)+1),r),{})}};V._Code=qe;V.nil=new qe("");function Du(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Hi(r,e[n]),r.push(t[++n]);return new qe(r)}V._=Du;var Ui=new qe("+");function Mu(t,...e){let r=[Br(t[0])],n=0;for(;n<e.length;)r.push(Ui),Hi(r,e[n]),r.push(Ui,Br(t[++n]));return ny(r),new qe(r)}V.str=Mu;function Hi(t,e){e instanceof qe?t.push(...e._items):e instanceof At?t.push(e):t.push(oy(e))}V.addCodeArg=Hi;function ny(t){let e=1;for(;e<t.length-1;){if(t[e]===Ui){let r=sy(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function sy(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof At||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof At))return`"${t}${e.slice(1)}`}function iy(t,e){return e.emptyStr()?t:t.emptyStr()?e:Mu`${t}${e}`}V.strConcat=iy;function oy(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Br(Array.isArray(t)?t.join(","):t)}function ay(t){return new qe(Br(t))}V.stringify=ay;function Br(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}V.safeStringify=Br;function cy(t){return typeof t=="string"&&V.IDENTIFIER.test(t)?new qe(`.${t}`):Du`[${t}]`}V.getProperty=cy;function uy(t){if(typeof t=="string"&&V.IDENTIFIER.test(t))return new qe(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}V.getEsmExportName=uy;function ly(t){return new qe(t.toString())}V.regexpCode=ly});var Gi=v(Re=>{"use strict";u();Object.defineProperty(Re,"__esModule",{value:!0});Re.ValueScope=Re.ValueScopeName=Re.Scope=Re.varKinds=Re.UsedValueState=void 0;var xe=Gr(),Vi=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},is;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(is||(Re.UsedValueState=is={}));Re.varKinds={const:new xe.Name("const"),let:new xe.Name("let"),var:new xe.Name("var")};var os=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof xe.Name?e:this.name(e)}name(e){return new xe.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Re.Scope=os;var as=class extends xe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,xe._)`.${new xe.Name(r)}[${n}]`}};Re.ValueScopeName=as;var fy=(0,xe._)`\n`,Bi=class extends os{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?fy:xe.nil}}get(){return this._scope}name(e){return new as(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:i}=s,o=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[i];if(a){let f=a.get(o);if(f)return f}else a=this._values[i]=new Map;a.set(o,s);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,s.setValue(r,{property:i,itemIndex:l}),s}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,xe._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},r,n)}_reduceValues(e,r,n={},s){let i=xe.nil;for(let o in e){let a=e[o];if(!a)continue;let c=n[o]=n[o]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,is.Started);let f=r(l);if(f){let d=this.opts.es5?Re.varKinds.var:Re.varKinds.const;i=(0,xe._)`${i}${d} ${l} = ${f};${this.opts._n}`}else if(f=s?.(l))i=(0,xe._)`${i}${f}${this.opts._n}`;else throw new Vi(l);c.set(l,is.Completed)})}return i}};Re.ValueScope=Bi});var I=v(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.or=q.and=q.not=q.CodeGen=q.operators=q.varKinds=q.ValueScopeName=q.ValueScope=q.Scope=q.Name=q.regexpCode=q.stringify=q.getProperty=q.nil=q.strConcat=q.str=q._=void 0;var F=Gr(),Ve=Gi(),mt=Gr();Object.defineProperty(q,"_",{enumerable:!0,get:function(){return mt._}});Object.defineProperty(q,"str",{enumerable:!0,get:function(){return mt.str}});Object.defineProperty(q,"strConcat",{enumerable:!0,get:function(){return mt.strConcat}});Object.defineProperty(q,"nil",{enumerable:!0,get:function(){return mt.nil}});Object.defineProperty(q,"getProperty",{enumerable:!0,get:function(){return mt.getProperty}});Object.defineProperty(q,"stringify",{enumerable:!0,get:function(){return mt.stringify}});Object.defineProperty(q,"regexpCode",{enumerable:!0,get:function(){return mt.regexpCode}});Object.defineProperty(q,"Name",{enumerable:!0,get:function(){return mt.Name}});var fs=Gi();Object.defineProperty(q,"Scope",{enumerable:!0,get:function(){return fs.Scope}});Object.defineProperty(q,"ValueScope",{enumerable:!0,get:function(){return fs.ValueScope}});Object.defineProperty(q,"ValueScopeName",{enumerable:!0,get:function(){return fs.ValueScopeName}});Object.defineProperty(q,"varKinds",{enumerable:!0,get:function(){return fs.varKinds}});q.operators={GT:new F._Code(">"),GTE:new F._Code(">="),LT:new F._Code("<"),LTE:new F._Code("<="),EQ:new F._Code("==="),NEQ:new F._Code("!=="),NOT:new F._Code("!"),OR:new F._Code("||"),AND:new F._Code("&&"),ADD:new F._Code("+")};var nt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Wi=class extends nt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ve.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=or(this.rhs,e,r)),this}get names(){return this.rhs instanceof F._CodeOrName?this.rhs.names:{}}},cs=class extends nt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof F.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=or(this.rhs,e,r),this}get names(){let e=this.lhs instanceof F.Name?{}:{...this.lhs.names};return ls(e,this.rhs)}},Ki=class extends cs{constructor(e,r,n,s){super(e,n,s),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ji=class extends nt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Yi=class extends nt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Qi=class extends nt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Xi=class extends nt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=or(this.code,e,r),this}get names(){return this.code instanceof F._CodeOrName?this.code.names:{}}},Wr=class extends nt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,s=n.length;for(;s--;){let i=n[s];i.optimizeNames(e,r)||(dy(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>qt(e,r.names),{})}},st=class extends Wr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Zi=class extends Wr{},ir=class extends st{};ir.kind="else";var jt=class t extends st{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ir(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Lu(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=or(this.condition,e,r),this}get names(){let e=super.names;return ls(e,this.condition),this.else&&qt(e,this.else.names),e}};jt.kind="if";var It=class extends st{};It.kind="for";var eo=class extends It{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=or(this.iteration,e,r),this}get names(){return qt(super.names,this.iteration.names)}},to=class extends It{constructor(e,r,n,s){super(),this.varKind=e,this.name=r,this.from=n,this.to=s}render(e){let r=e.es5?Ve.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${r} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=ls(super.names,this.from);return ls(e,this.to)}},us=class extends It{constructor(e,r,n,s){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=or(this.iterable,e,r),this}get names(){return qt(super.names,this.iterable.names)}},Kr=class extends st{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Kr.kind="func";var Jr=class extends Wr{render(e){return"return "+super.render(e)}};Jr.kind="return";var ro=class extends st{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,s;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(s=this.finally)===null||s===void 0||s.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&qt(e,this.catch.names),this.finally&&qt(e,this.finally.names),e}},Yr=class extends st{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Yr.kind="catch";var Qr=class extends st{render(e){return"finally"+super.render(e)}};Qr.kind="finally";var no=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
1
+ import{$a as fu,Ba as Ti,Ed as je,Fb as es,Jc as ht,Lc as ts,Uc as Ri,Wa as ki,Xa as Xn,Ya as Zn,Za as Rt,b as uu,bb as du,c as lu,ed as gu,fb as hu,hb as pu,qb as mu,sb as yu,va as Oi,wd as pt,yd as ve}from"./chunk-66TIGB4U.js";import{a as xi}from"./chunk-SVA22NZQ.js";import{c as Te,h as dt}from"./chunk-JBSYWYIP.js";import{a as R,c as v,e as Oe,g as u}from"./chunk-VPRTJUIN.js";var Gr=v(V=>{"use strict";u();Object.defineProperty(V,"__esModule",{value:!0});V.regexpCode=V.getEsmExportName=V.getProperty=V.safeStringify=V.stringify=V.strConcat=V.addCodeArg=V.str=V._=V.nil=V._Code=V.Name=V.IDENTIFIER=V._CodeOrName=void 0;var Vr=class{};V._CodeOrName=Vr;V.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var At=class extends Vr{constructor(e){if(super(),!V.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};V.Name=At;var qe=class extends Vr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof At&&(r[n.str]=(r[n.str]||0)+1),r),{})}};V._Code=qe;V.nil=new qe("");function Du(t,...e){let r=[t[0]],n=0;for(;n<e.length;)Hi(r,e[n]),r.push(t[++n]);return new qe(r)}V._=Du;var Ui=new qe("+");function Mu(t,...e){let r=[Br(t[0])],n=0;for(;n<e.length;)r.push(Ui),Hi(r,e[n]),r.push(Ui,Br(t[++n]));return ny(r),new qe(r)}V.str=Mu;function Hi(t,e){e instanceof qe?t.push(...e._items):e instanceof At?t.push(e):t.push(oy(e))}V.addCodeArg=Hi;function ny(t){let e=1;for(;e<t.length-1;){if(t[e]===Ui){let r=sy(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function sy(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof At||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof At))return`"${t}${e.slice(1)}`}function iy(t,e){return e.emptyStr()?t:t.emptyStr()?e:Mu`${t}${e}`}V.strConcat=iy;function oy(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Br(Array.isArray(t)?t.join(","):t)}function ay(t){return new qe(Br(t))}V.stringify=ay;function Br(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}V.safeStringify=Br;function cy(t){return typeof t=="string"&&V.IDENTIFIER.test(t)?new qe(`.${t}`):Du`[${t}]`}V.getProperty=cy;function uy(t){if(typeof t=="string"&&V.IDENTIFIER.test(t))return new qe(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}V.getEsmExportName=uy;function ly(t){return new qe(t.toString())}V.regexpCode=ly});var Gi=v(Re=>{"use strict";u();Object.defineProperty(Re,"__esModule",{value:!0});Re.ValueScope=Re.ValueScopeName=Re.Scope=Re.varKinds=Re.UsedValueState=void 0;var xe=Gr(),Vi=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},is;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(is||(Re.UsedValueState=is={}));Re.varKinds={const:new xe.Name("const"),let:new xe.Name("let"),var:new xe.Name("var")};var os=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof xe.Name?e:this.name(e)}name(e){return new xe.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Re.Scope=os;var as=class extends xe.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,xe._)`.${new xe.Name(r)}[${n}]`}};Re.ValueScopeName=as;var fy=(0,xe._)`\n`,Bi=class extends os{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?fy:xe.nil}}get(){return this._scope}name(e){return new as(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let s=this.toName(e),{prefix:i}=s,o=(n=r.key)!==null&&n!==void 0?n:r.ref,a=this._values[i];if(a){let f=a.get(o);if(f)return f}else a=this._values[i]=new Map;a.set(o,s);let c=this._scope[i]||(this._scope[i]=[]),l=c.length;return c[l]=r.ref,s.setValue(r,{property:i,itemIndex:l}),s}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,xe._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,s=>{if(s.value===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return s.value.code},r,n)}_reduceValues(e,r,n={},s){let i=xe.nil;for(let o in e){let a=e[o];if(!a)continue;let c=n[o]=n[o]||new Map;a.forEach(l=>{if(c.has(l))return;c.set(l,is.Started);let f=r(l);if(f){let d=this.opts.es5?Re.varKinds.var:Re.varKinds.const;i=(0,xe._)`${i}${d} ${l} = ${f};${this.opts._n}`}else if(f=s?.(l))i=(0,xe._)`${i}${f}${this.opts._n}`;else throw new Vi(l);c.set(l,is.Completed)})}return i}};Re.ValueScope=Bi});var I=v(q=>{"use strict";u();Object.defineProperty(q,"__esModule",{value:!0});q.or=q.and=q.not=q.CodeGen=q.operators=q.varKinds=q.ValueScopeName=q.ValueScope=q.Scope=q.Name=q.regexpCode=q.stringify=q.getProperty=q.nil=q.strConcat=q.str=q._=void 0;var F=Gr(),Ve=Gi(),mt=Gr();Object.defineProperty(q,"_",{enumerable:!0,get:function(){return mt._}});Object.defineProperty(q,"str",{enumerable:!0,get:function(){return mt.str}});Object.defineProperty(q,"strConcat",{enumerable:!0,get:function(){return mt.strConcat}});Object.defineProperty(q,"nil",{enumerable:!0,get:function(){return mt.nil}});Object.defineProperty(q,"getProperty",{enumerable:!0,get:function(){return mt.getProperty}});Object.defineProperty(q,"stringify",{enumerable:!0,get:function(){return mt.stringify}});Object.defineProperty(q,"regexpCode",{enumerable:!0,get:function(){return mt.regexpCode}});Object.defineProperty(q,"Name",{enumerable:!0,get:function(){return mt.Name}});var fs=Gi();Object.defineProperty(q,"Scope",{enumerable:!0,get:function(){return fs.Scope}});Object.defineProperty(q,"ValueScope",{enumerable:!0,get:function(){return fs.ValueScope}});Object.defineProperty(q,"ValueScopeName",{enumerable:!0,get:function(){return fs.ValueScopeName}});Object.defineProperty(q,"varKinds",{enumerable:!0,get:function(){return fs.varKinds}});q.operators={GT:new F._Code(">"),GTE:new F._Code(">="),LT:new F._Code("<"),LTE:new F._Code("<="),EQ:new F._Code("==="),NEQ:new F._Code("!=="),NOT:new F._Code("!"),OR:new F._Code("||"),AND:new F._Code("&&"),ADD:new F._Code("+")};var nt=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},Wi=class extends nt{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ve.varKinds.var:this.varKind,s=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${s};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=or(this.rhs,e,r)),this}get names(){return this.rhs instanceof F._CodeOrName?this.rhs.names:{}}},cs=class extends nt{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof F.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=or(this.rhs,e,r),this}get names(){let e=this.lhs instanceof F.Name?{}:{...this.lhs.names};return ls(e,this.rhs)}},Ki=class extends cs{constructor(e,r,n,s){super(e,n,s),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Ji=class extends nt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Yi=class extends nt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Qi=class extends nt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Xi=class extends nt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=or(this.code,e,r),this}get names(){return this.code instanceof F._CodeOrName?this.code.names:{}}},Wr=class extends nt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,s=n.length;for(;s--;){let i=n[s];i.optimizeNames(e,r)||(dy(e,i.names),n.splice(s,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>qt(e,r.names),{})}},st=class extends Wr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Zi=class extends Wr{},ir=class extends st{};ir.kind="else";var jt=class t extends st{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ir(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Lu(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=or(this.condition,e,r),this}get names(){let e=super.names;return ls(e,this.condition),this.else&&qt(e,this.else.names),e}};jt.kind="if";var It=class extends st{};It.kind="for";var eo=class extends It{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=or(this.iteration,e,r),this}get names(){return qt(super.names,this.iteration.names)}},to=class extends It{constructor(e,r,n,s){super(),this.varKind=e,this.name=r,this.from=n,this.to=s}render(e){let r=e.es5?Ve.varKinds.var:this.varKind,{name:n,from:s,to:i}=this;return`for(${r} ${n}=${s}; ${n}<${i}; ${n}++)`+super.render(e)}get names(){let e=ls(super.names,this.from);return ls(e,this.to)}},us=class extends It{constructor(e,r,n,s){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=or(this.iterable,e,r),this}get names(){return qt(super.names,this.iterable.names)}},Kr=class extends st{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Kr.kind="func";var Jr=class extends Wr{render(e){return"return "+super.render(e)}};Jr.kind="return";var ro=class extends st{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,s;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(s=this.finally)===null||s===void 0||s.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&qt(e,this.catch.names),this.finally&&qt(e,this.finally.names),e}},Yr=class extends st{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Yr.kind="catch";var Qr=class extends st{render(e){return"finally"+super.render(e)}};Qr.kind="finally";var no=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...r,_n:r.lines?`
2
2
  `:""},this._extScope=e,this._scope=new Ve.Scope({parent:e}),this._nodes=[new Zi]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,s){let i=this._scope.toName(r);return n!==void 0&&s&&(this._constants[i.str]=n),this._leafNode(new Wi(e,i,n)),i}const(e,r,n){return this._def(Ve.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ve.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ve.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new cs(e,r,n))}add(e,r){return this._leafNode(new Ki(e,q.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==F.nil&&this._leafNode(new Xi(e)),this}object(...e){let r=["{"];for(let[n,s]of e)r.length>1&&r.push(","),r.push(n),(n!==s||this.opts.es5)&&(r.push(":"),(0,F.addCodeArg)(r,s));return r.push("}"),new F._Code(r)}if(e,r,n){if(this._blockNode(new jt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new jt(e))}else(){return this._elseNode(new ir)}endIf(){return this._endBlockNode(jt,ir)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new eo(e),r)}forRange(e,r,n,s,i=this.opts.es5?Ve.varKinds.var:Ve.varKinds.let){let o=this._scope.toName(e);return this._for(new to(i,o,r,n),()=>s(o))}forOf(e,r,n,s=Ve.varKinds.const){let i=this._scope.toName(e);if(this.opts.es5){let o=r instanceof F.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,F._)`${o}.length`,a=>{this.var(i,(0,F._)`${o}[${a}]`),n(i)})}return this._for(new us("of",s,i,r),()=>n(i))}forIn(e,r,n,s=this.opts.es5?Ve.varKinds.var:Ve.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,F._)`Object.keys(${r})`,n);let i=this._scope.toName(e);return this._for(new us("in",s,i,r),()=>n(i))}endFor(){return this._endBlockNode(It)}label(e){return this._leafNode(new Ji(e))}break(e){return this._leafNode(new Yi(e))}return(e){let r=new Jr;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Jr)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let s=new ro;if(this._blockNode(s),this.code(e),r){let i=this.name("e");this._currNode=s.catch=new Yr(i),r(i)}return n&&(this._currNode=s.finally=new Qr,this.code(n)),this._endBlockNode(Yr,Qr)}throw(e){return this._leafNode(new Qi(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=F.nil,n,s){return this._blockNode(new Kr(e,r,n)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(Kr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof jt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};q.CodeGen=no;function qt(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function ls(t,e){return e instanceof F._CodeOrName?qt(t,e.names):t}function or(t,e,r){if(t instanceof F.Name)return n(t);if(!s(t))return t;return new F._Code(t._items.reduce((i,o)=>(o instanceof F.Name&&(o=n(o)),o instanceof F._Code?i.push(...o._items):i.push(o),i),[]));function n(i){let o=r[i.str];return o===void 0||e[i.str]!==1?i:(delete e[i.str],o)}function s(i){return i instanceof F._Code&&i._items.some(o=>o instanceof F.Name&&e[o.str]===1&&r[o.str]!==void 0)}}function dy(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Lu(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,F._)`!${so(t)}`}q.not=Lu;var hy=Fu(q.operators.AND);function py(...t){return t.reduce(hy)}q.and=py;var my=Fu(q.operators.OR);function yy(...t){return t.reduce(my)}q.or=yy;function Fu(t){return(e,r)=>e===F.nil?r:r===F.nil?e:(0,F._)`${so(e)} ${t} ${so(r)}`}function so(t){return t instanceof F.Name?t:(0,F._)`(${t})`}});var z=v(M=>{"use strict";u();Object.defineProperty(M,"__esModule",{value:!0});M.checkStrictMode=M.getErrorPath=M.Type=M.useFunc=M.setEvaluated=M.evaluatedPropsToName=M.mergeEvaluated=M.eachItem=M.unescapeJsonPointer=M.escapeJsonPointer=M.escapeFragment=M.unescapeFragment=M.schemaRefOrVal=M.schemaHasRulesButRef=M.schemaHasRules=M.checkUnknownRules=M.alwaysValidSchema=M.toHash=void 0;var W=I(),gy=Gr();function _y(t){let e={};for(let r of t)e[r]=!0;return e}M.toHash=_y;function wy(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Hu(t,e),!Vu(e,t.self.RULES.all))}M.alwaysValidSchema=wy;function Hu(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let s=n.RULES.keywords;for(let i in e)s[i]||Wu(t,`unknown keyword: "${i}"`)}M.checkUnknownRules=Hu;function Vu(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}M.schemaHasRules=Vu;function by(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}M.schemaHasRulesButRef=by;function vy({topSchemaRef:t,schemaPath:e},r,n,s){if(!s){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,W._)`${r}`}return(0,W._)`${t}${e}${(0,W.getProperty)(n)}`}M.schemaRefOrVal=vy;function Ey(t){return Bu(decodeURIComponent(t))}M.unescapeFragment=Ey;function Sy(t){return encodeURIComponent(oo(t))}M.escapeFragment=Sy;function oo(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}M.escapeJsonPointer=oo;function Bu(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}M.unescapeJsonPointer=Bu;function $y(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}M.eachItem=$y;function zu({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(s,i,o,a)=>{let c=o===void 0?i:o instanceof W.Name?(i instanceof W.Name?t(s,i,o):e(s,i,o),o):i instanceof W.Name?(e(s,o,i),i):r(i,o);return a===W.Name&&!(c instanceof W.Name)?n(s,c):c}}M.mergeEvaluated={props:zu({mergeNames:(t,e,r)=>t.if((0,W._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,W._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,W._)`${r} || {}`).code((0,W._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,W._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,W._)`${r} || {}`),ao(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:{...t,...e},resultToName:Gu}),items:zu({mergeNames:(t,e,r)=>t.if((0,W._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,W._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,W._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,W._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Gu(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,W._)`{}`);return e!==void 0&&ao(t,r,e),r}M.evaluatedPropsToName=Gu;function ao(t,e,r){Object.keys(r).forEach(n=>t.assign((0,W._)`${e}${(0,W.getProperty)(n)}`,!0))}M.setEvaluated=ao;var Uu={};function Py(t,e){return t.scopeValue("func",{ref:e,code:Uu[e.code]||(Uu[e.code]=new gy._Code(e.code))})}M.useFunc=Py;var io;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(io||(M.Type=io={}));function Oy(t,e,r){if(t instanceof W.Name){let n=e===io.Num;return r?n?(0,W._)`"[" + ${t} + "]"`:(0,W._)`"['" + ${t} + "']"`:n?(0,W._)`"/" + ${t}`:(0,W._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,W.getProperty)(t).toString():"/"+oo(t)}M.getErrorPath=Oy;function Wu(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}M.checkStrictMode=Wu});var it=v(co=>{"use strict";u();Object.defineProperty(co,"__esModule",{value:!0});var ye=I(),Ty={data:new ye.Name("data"),valCxt:new ye.Name("valCxt"),instancePath:new ye.Name("instancePath"),parentData:new ye.Name("parentData"),parentDataProperty:new ye.Name("parentDataProperty"),rootData:new ye.Name("rootData"),dynamicAnchors:new ye.Name("dynamicAnchors"),vErrors:new ye.Name("vErrors"),errors:new ye.Name("errors"),this:new ye.Name("this"),self:new ye.Name("self"),scope:new ye.Name("scope"),json:new ye.Name("json"),jsonPos:new ye.Name("jsonPos"),jsonLen:new ye.Name("jsonLen"),jsonPart:new ye.Name("jsonPart")};co.default=Ty});var Xr=v(ge=>{"use strict";u();Object.defineProperty(ge,"__esModule",{value:!0});ge.extendErrors=ge.resetErrorsCount=ge.reportExtraError=ge.reportError=ge.keyword$DataError=ge.keywordError=void 0;var U=I(),ds=z(),Ee=it();ge.keywordError={message:({keyword:t})=>(0,U.str)`must pass "${t}" keyword validation`};ge.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,U.str)`"${t}" keyword must be ${e} ($data)`:(0,U.str)`"${t}" keyword is invalid ($data)`};function ky(t,e=ge.keywordError,r,n){let{it:s}=t,{gen:i,compositeRule:o,allErrors:a}=s,c=Yu(t,e,r);n??(o||a)?Ku(i,c):Ju(s,(0,U._)`[${c}]`)}ge.reportError=ky;function xy(t,e=ge.keywordError,r){let{it:n}=t,{gen:s,compositeRule:i,allErrors:o}=n,a=Yu(t,e,r);Ku(s,a),i||o||Ju(n,Ee.default.vErrors)}ge.reportExtraError=xy;function Ry(t,e){t.assign(Ee.default.errors,e),t.if((0,U._)`${Ee.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,U._)`${Ee.default.vErrors}.length`,e),()=>t.assign(Ee.default.vErrors,null)))}ge.resetErrorsCount=Ry;function Cy({gen:t,keyword:e,schemaValue:r,data:n,errsCount:s,it:i}){if(s===void 0)throw new Error("ajv implementation error");let o=t.name("err");t.forRange("i",s,Ee.default.errors,a=>{t.const(o,(0,U._)`${Ee.default.vErrors}[${a}]`),t.if((0,U._)`${o}.instancePath === undefined`,()=>t.assign((0,U._)`${o}.instancePath`,(0,U.strConcat)(Ee.default.instancePath,i.errorPath))),t.assign((0,U._)`${o}.schemaPath`,(0,U.str)`${i.errSchemaPath}/${e}`),i.opts.verbose&&(t.assign((0,U._)`${o}.schema`,r),t.assign((0,U._)`${o}.data`,n))})}ge.extendErrors=Cy;function Ku(t,e){let r=t.const("err",e);t.if((0,U._)`${Ee.default.vErrors} === null`,()=>t.assign(Ee.default.vErrors,(0,U._)`[${r}]`),(0,U._)`${Ee.default.vErrors}.push(${r})`),t.code((0,U._)`${Ee.default.errors}++`)}function Ju(t,e){let{gen:r,validateName:n,schemaEnv:s}=t;s.$async?r.throw((0,U._)`new ${t.ValidationError}(${e})`):(r.assign((0,U._)`${n}.errors`,e),r.return(!1))}var Dt={keyword:new U.Name("keyword"),schemaPath:new U.Name("schemaPath"),params:new U.Name("params"),propertyName:new U.Name("propertyName"),message:new U.Name("message"),schema:new U.Name("schema"),parentSchema:new U.Name("parentSchema")};function Yu(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,U._)`{}`:Ny(t,e,r)}function Ny(t,e,r={}){let{gen:n,it:s}=t,i=[Ay(s,r),jy(t,r)];return Iy(t,e,i),n.object(...i)}function Ay({errorPath:t},{instancePath:e}){let r=e?(0,U.str)`${t}${(0,ds.getErrorPath)(e,ds.Type.Str)}`:t;return[Ee.default.instancePath,(0,U.strConcat)(Ee.default.instancePath,r)]}function jy({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let s=n?e:(0,U.str)`${e}/${t}`;return r&&(s=(0,U.str)`${s}${(0,ds.getErrorPath)(r,ds.Type.Str)}`),[Dt.schemaPath,s]}function Iy(t,{params:e,message:r},n){let{keyword:s,data:i,schemaValue:o,it:a}=t,{opts:c,propertyName:l,topSchemaRef:f,schemaPath:d}=a;n.push([Dt.keyword,s],[Dt.params,typeof e=="function"?e(t):e||(0,U._)`{}`]),c.messages&&n.push([Dt.message,typeof r=="function"?r(t):r]),c.verbose&&n.push([Dt.schema,o],[Dt.parentSchema,(0,U._)`${f}${d}`],[Ee.default.data,i]),l&&n.push([Dt.propertyName,l])}});var Xu=v(ar=>{"use strict";u();Object.defineProperty(ar,"__esModule",{value:!0});ar.boolOrEmptySchema=ar.topBoolOrEmptySchema=void 0;var qy=Xr(),Dy=I(),My=it(),Ly={message:"boolean schema is false"};function Fy(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Qu(t,!1):typeof r=="object"&&r.$async===!0?e.return(My.default.data):(e.assign((0,Dy._)`${n}.errors`,null),e.return(!0))}ar.topBoolOrEmptySchema=Fy;function zy(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Qu(t)):r.var(e,!0)}ar.boolOrEmptySchema=zy;function Qu(t,e){let{gen:r,data:n}=t,s={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,qy.reportError)(s,Ly,void 0,e)}});var uo=v(cr=>{"use strict";u();Object.defineProperty(cr,"__esModule",{value:!0});cr.getRules=cr.isJSONType=void 0;var Uy=["string","number","integer","boolean","null","object","array"],Hy=new Set(Uy);function Vy(t){return typeof t=="string"&&Hy.has(t)}cr.isJSONType=Vy;function By(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...t,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}cr.getRules=By});var lo=v(yt=>{"use strict";u();Object.defineProperty(yt,"__esModule",{value:!0});yt.shouldUseRule=yt.shouldUseGroup=yt.schemaHasRulesForType=void 0;function Gy({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Zu(t,n)}yt.schemaHasRulesForType=Gy;function Zu(t,e){return e.rules.some(r=>el(t,r))}yt.shouldUseGroup=Zu;function el(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}yt.shouldUseRule=el});var Zr=v(_e=>{"use strict";u();Object.defineProperty(_e,"__esModule",{value:!0});_e.reportTypeError=_e.checkDataTypes=_e.checkDataType=_e.coerceAndCheckDataType=_e.getJSONTypes=_e.getSchemaTypes=_e.DataType=void 0;var Wy=uo(),Ky=lo(),Jy=Xr(),j=I(),tl=z(),ur;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(ur||(_e.DataType=ur={}));function Yy(t){let e=rl(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}_e.getSchemaTypes=Yy;function rl(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Wy.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}_e.getJSONTypes=rl;function Qy(t,e){let{gen:r,data:n,opts:s}=t,i=Xy(e,s.coerceTypes),o=e.length>0&&!(i.length===0&&e.length===1&&(0,Ky.schemaHasRulesForType)(t,e[0]));if(o){let a=ho(e,n,s.strictNumbers,ur.Wrong);r.if(a,()=>{i.length?Zy(t,e,i):po(t)})}return o}_e.coerceAndCheckDataType=Qy;var nl=new Set(["string","number","integer","boolean","null"]);function Xy(t,e){return e?t.filter(r=>nl.has(r)||e==="array"&&r==="array"):[]}function Zy(t,e,r){let{gen:n,data:s,opts:i}=t,o=n.let("dataType",(0,j._)`typeof ${s}`),a=n.let("coerced",(0,j._)`undefined`);i.coerceTypes==="array"&&n.if((0,j._)`${o} == 'object' && Array.isArray(${s}) && ${s}.length == 1`,()=>n.assign(s,(0,j._)`${s}[0]`).assign(o,(0,j._)`typeof ${s}`).if(ho(e,s,i.strictNumbers),()=>n.assign(a,s))),n.if((0,j._)`${a} !== undefined`);for(let l of r)(nl.has(l)||l==="array"&&i.coerceTypes==="array")&&c(l);n.else(),po(t),n.endIf(),n.if((0,j._)`${a} !== undefined`,()=>{n.assign(s,a),eg(t,a)});function c(l){switch(l){case"string":n.elseIf((0,j._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,j._)`"" + ${s}`).elseIf((0,j._)`${s} === null`).assign(a,(0,j._)`""`);return;case"number":n.elseIf((0,j._)`${o} == "boolean" || ${s} === null
3
3
  || (${o} == "string" && ${s} && ${s} == +${s})`).assign(a,(0,j._)`+${s}`);return;case"integer":n.elseIf((0,j._)`${o} === "boolean" || ${s} === null
4
4
  || (${o} === "string" && ${s} && ${s} == +${s} && !(${s} % 1))`).assign(a,(0,j._)`+${s}`);return;case"boolean":n.elseIf((0,j._)`${s} === "false" || ${s} === 0 || ${s} === null`).assign(a,!1).elseIf((0,j._)`${s} === "true" || ${s} === 1`).assign(a,!0);return;case"null":n.elseIf((0,j._)`${s} === "" || ${s} === 0 || ${s} === false`),n.assign(a,null);return;case"array":n.elseIf((0,j._)`${o} === "string" || ${o} === "number"
@@ -1 +1 @@
1
- import{Na as a,Oa as b,Pa as c,Qa as d,Ra as e}from"./chunk-PRNHS74J.js";import"./chunk-PRKBO42R.js";import"./chunk-LH4VO6EV.js";import"./chunk-KVWHPGOA.js";import"./chunk-SVA22NZQ.js";import"./chunk-FU2Y2M3M.js";import"./chunk-QYR5VPQA.js";import"./chunk-EENHXSWU.js";import"./chunk-JBSYWYIP.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-QUTQDXSL.js";import"./chunk-VPRTJUIN.js";export{e as addBugsnagMetadata,c as cleanStackFrameFilePath,a as errorHandler,d as registerCleanBugsnagErrorsFromWithinPlugins,b as sendErrorToBugsnag};
1
+ import{Na as a,Oa as b,Pa as c,Qa as d,Ra as e}from"./chunk-7ES6PV7M.js";import"./chunk-PRKBO42R.js";import"./chunk-PBKIXB7L.js";import"./chunk-66TIGB4U.js";import"./chunk-SVA22NZQ.js";import"./chunk-FU2Y2M3M.js";import"./chunk-QYR5VPQA.js";import"./chunk-EENHXSWU.js";import"./chunk-JBSYWYIP.js";import"./chunk-T4M5CWAO.js";import"./chunk-PRVQAHWI.js";import"./chunk-QUTQDXSL.js";import"./chunk-VPRTJUIN.js";export{e as addBugsnagMetadata,c as cleanStackFrameFilePath,a as errorHandler,d as registerCleanBugsnagErrorsFromWithinPlugins,b as sendErrorToBugsnag};
@@ -1 +1 @@
1
- import{d as a}from"../chunk-YPE4BWWD.js";import"../chunk-PRNHS74J.js";import"../chunk-PRKBO42R.js";import"../chunk-LH4VO6EV.js";import"../chunk-KVWHPGOA.js";import"../chunk-SVA22NZQ.js";import"../chunk-FU2Y2M3M.js";import"../chunk-QYR5VPQA.js";import"../chunk-EENHXSWU.js";import"../chunk-JBSYWYIP.js";import"../chunk-T4M5CWAO.js";import"../chunk-PRVQAHWI.js";import"../chunk-QUTQDXSL.js";import{g as o}from"../chunk-VPRTJUIN.js";o();export{a as default};
1
+ import{d as a}from"../chunk-675GKVCB.js";import"../chunk-7ES6PV7M.js";import"../chunk-PRKBO42R.js";import"../chunk-PBKIXB7L.js";import"../chunk-66TIGB4U.js";import"../chunk-SVA22NZQ.js";import"../chunk-FU2Y2M3M.js";import"../chunk-QYR5VPQA.js";import"../chunk-EENHXSWU.js";import"../chunk-JBSYWYIP.js";import"../chunk-T4M5CWAO.js";import"../chunk-PRVQAHWI.js";import"../chunk-QUTQDXSL.js";import{g as o}from"../chunk-VPRTJUIN.js";o();export{a as default};
@@ -1 +1 @@
1
- import{e as c}from"../chunk-2E6Y4J4T.js";import{Ca as s,a}from"../chunk-PRNHS74J.js";import"../chunk-PRKBO42R.js";import{O as i}from"../chunk-LH4VO6EV.js";import{Ed as m,lb as t}from"../chunk-KVWHPGOA.js";import"../chunk-SVA22NZQ.js";import"../chunk-FU2Y2M3M.js";import"../chunk-QYR5VPQA.js";import"../chunk-EENHXSWU.js";import"../chunk-JBSYWYIP.js";import"../chunk-T4M5CWAO.js";import"../chunk-PRVQAHWI.js";import"../chunk-QUTQDXSL.js";import{g as e}from"../chunk-VPRTJUIN.js";e();e();var d=async n=>{let r=f({id:n.Command.id,aliases:n.Command.aliases,pluginAlias:n.Command.plugin?.alias}),o=n.argv;h(),m(`Running command ${r.command}`),await s({commandContent:r,args:o,commandClass:n.Command}),c(n.Command.id)};function f(n){let r=p(n.pluginAlias);return r??(r=l(n.id,n.aliases)),r}function l(n,r){return{command:n.replace(/:/g," "),topic:C(n),alias:g(r)}}function p(n){if(n?.startsWith("@shopify/create-"))return{command:n.substring(n.indexOf("/")+1)}}function C(n){if(n.lastIndexOf(":")!==-1)return n.slice(0,n.lastIndexOf(":")).replace(/:/g," ")}function g(n){let r=n.find(o=>o.split(":").every(u=>process.argv.includes(u)));if(r)return r.replace(/:/g," ")}function h(){let n=a;t(n)||i("@shopify/cli",n,{cacheExpiryInHours:24})}export{d as default};
1
+ import{e as c}from"../chunk-IDQ4X47Z.js";import{Ca as s,a}from"../chunk-7ES6PV7M.js";import"../chunk-PRKBO42R.js";import{O as i}from"../chunk-PBKIXB7L.js";import{Ed as m,lb as t}from"../chunk-66TIGB4U.js";import"../chunk-SVA22NZQ.js";import"../chunk-FU2Y2M3M.js";import"../chunk-QYR5VPQA.js";import"../chunk-EENHXSWU.js";import"../chunk-JBSYWYIP.js";import"../chunk-T4M5CWAO.js";import"../chunk-PRVQAHWI.js";import"../chunk-QUTQDXSL.js";import{g as e}from"../chunk-VPRTJUIN.js";e();e();var d=async n=>{let r=f({id:n.Command.id,aliases:n.Command.aliases,pluginAlias:n.Command.plugin?.alias}),o=n.argv;h(),m(`Running command ${r.command}`),await s({commandContent:r,args:o,commandClass:n.Command}),c(n.Command.id)};function f(n){let r=p(n.pluginAlias);return r??(r=l(n.id,n.aliases)),r}function l(n,r){return{command:n.replace(/:/g," "),topic:C(n),alias:g(r)}}function p(n){if(n?.startsWith("@shopify/create-"))return{command:n.substring(n.indexOf("/")+1)}}function C(n){if(n.lastIndexOf(":")!==-1)return n.slice(0,n.lastIndexOf(":")).replace(/:/g," ")}function g(n){let r=n.find(o=>o.split(":").every(u=>process.argv.includes(u)));if(r)return r.replace(/:/g," ")}function h(){let n=a;t(n)||i("@shopify/cli",n,{cacheExpiryInHours:24})}export{d as default};