pollination-react-io 1.52.2 → 1.53.0

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.
@@ -42293,6 +42293,189 @@ var SelectRecipe = function (_a) {
42293
42293
  } }, "Showing ".concat((_c = recipes === null || recipes === void 0 ? void 0 : recipes.length) !== null && _c !== void 0 ? _c : 0, " of ").concat(total, " recipes"))), onScrollReachEnd: onScrollReachEnd }));
42294
42294
  };
42295
42295
 
42296
+ var css_248z$9 = ".react-tabs {\n -webkit-tap-highlight-color: transparent;\n}\n\n.react-tabs__tab-list {\n border-bottom: 1px solid #aaa;\n margin: 0 0 10px;\n padding: 0;\n}\n\n.react-tabs__tab {\n display: inline-block;\n border: 1px solid transparent;\n border-bottom: none;\n bottom: -1px;\n position: relative;\n list-style: none;\n padding: 6px 12px;\n cursor: pointer;\n}\n\n.react-tabs__tab--selected {\n background: #fff;\n border-color: #aaa;\n color: black;\n border-radius: 5px 5px 0 0;\n}\n\n.react-tabs__tab--disabled {\n color: GrayText;\n cursor: default;\n}\n\n.react-tabs__tab:focus {\n outline: none;\n}\n\n.react-tabs__tab:focus:after {\n content: '';\n position: absolute;\n height: 5px;\n left: -4px;\n right: -4px;\n bottom: -5px;\n background: #fff;\n}\n\n.react-tabs__tab-panel {\n display: none;\n}\n\n.react-tabs__tab-panel--selected {\n display: block;\n}\n";
42297
+ styleInject(css_248z$9);
42298
+
42299
+ let e$1={data:""},t$1=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e$1,l$1=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a$1=/\/\*[^]*?\*\/| +/g,n$2=/\n+/g,o$1=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o$1(c,n):n+"{"+o$1(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o$1(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o$1.p?o$1.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c$1={},s$1=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s$1(e[r]);return t}return e},i$1=(e,t,r,i,p)=>{let u=s$1(e),d=c$1[u]||(c$1[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c$1[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l$1.exec(e.replace(a$1,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n$2," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n$2," ").trim();return o[0]})(e);c$1[d]=o$1(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c$1.g?c$1.g:null;return r&&(c$1.g=c$1[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c$1[d],t,i,f),d},p$1=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o$1(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u$2(e){let r=this||{},l=e.call?e(r.p):e;return i$1(l.unshift?l.raw?p$1(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t$1(r.target),r.g,r.o,r.k)}let d$1,f$2,g$1;u$2.bind({g:1});let h$2=u$2.bind({k:1});function m$1(e,t,r,l){o$1.p=t,d$1=e,f$2=r,g$1=l;}function j$1(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f$2&&f$2()},c),r.o=/ *go\d+/.test(s),c.className=u$2.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g$1&&i[0]&&g$1(c),d$1(i,c)}return t?t(a):a}}
42300
+
42301
+ var W$1=e=>typeof e=="function",T$1=(e,t)=>W$1(e)?e(t):e;var U$1=(()=>{let e=0;return ()=>(++e).toString()})(),b$1=(()=>{let e;return ()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches;}return e}})();var Q$1=20;var S$1=new Map,X$1=1e3,$$1=e=>{if(S$1.has(e))return;let t=setTimeout(()=>{S$1.delete(e),u$1({type:4,toastId:e});},X$1);S$1.set(e,t);},J$1=e=>{let t=S$1.get(e);t&&clearTimeout(t);},v$1=(e,t)=>{switch(t.type){case 0:return {...e,toasts:[t.toast,...e.toasts].slice(0,Q$1)};case 1:return t.toast.id&&J$1(t.toast.id),{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case 2:let{toast:o}=t;return e.toasts.find(r=>r.id===o.id)?v$1(e,{type:1,toast:o}):v$1(e,{type:0,toast:o});case 3:let{toastId:s}=t;return s?$$1(s):e.toasts.forEach(r=>{$$1(r.id);}),{...e,toasts:e.toasts.map(r=>r.id===s||s===void 0?{...r,visible:!1}:r)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};case 5:return {...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return {...e,pausedAt:void 0,toasts:e.toasts.map(r=>({...r,pauseDuration:r.pauseDuration+a}))}}},A$1=[],P$1={toasts:[],pausedAt:void 0},u$1=e=>{P$1=v$1(P$1,e),A$1.forEach(t=>{t(P$1);});},Y$1={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},I$1=(e={})=>{let[t,o]=useState(P$1);useEffect(()=>(A$1.push(o),()=>{let a=A$1.indexOf(o);a>-1&&A$1.splice(a,1);}),[t]);let s=t.toasts.map(a=>{var r,c;return {...e,...e[a.type],...a,duration:a.duration||((r=e[a.type])==null?void 0:r.duration)||(e==null?void 0:e.duration)||Y$1[a.type],style:{...e.style,...(c=e[a.type])==null?void 0:c.style,...a.style}}});return {...t,toasts:s}};var G$1=(e,t="blank",o)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...o,id:(o==null?void 0:o.id)||U$1()}),h$1=e=>(t,o)=>{let s=G$1(t,e,o);return u$1({type:2,toast:s}),s.id},n$1=(e,t)=>h$1("blank")(e,t);n$1.error=h$1("error");n$1.success=h$1("success");n$1.loading=h$1("loading");n$1.custom=h$1("custom");n$1.dismiss=e=>{u$1({type:3,toastId:e});};n$1.remove=e=>u$1({type:4,toastId:e});n$1.promise=(e,t,o)=>{let s=n$1.loading(t.loading,{...o,...o==null?void 0:o.loading});return e.then(a=>(n$1.success(T$1(t.success,a),{id:s,...o,...o==null?void 0:o.success}),a)).catch(a=>{n$1.error(T$1(t.error,a),{id:s,...o,...o==null?void 0:o.error});}),e};var Z$1=(e,t)=>{u$1({type:1,toast:{id:e,height:t}});},ee$1=()=>{u$1({type:5,time:Date.now()});},D$1=e=>{let{toasts:t,pausedAt:o}=I$1(e);useEffect(()=>{if(o)return;let r=Date.now(),c=t.map(i=>{if(i.duration===1/0)return;let d=(i.duration||0)+i.pauseDuration-(r-i.createdAt);if(d<0){i.visible&&n$1.dismiss(i.id);return}return setTimeout(()=>n$1.dismiss(i.id),d)});return ()=>{c.forEach(i=>i&&clearTimeout(i));}},[t,o]);let s=useCallback(()=>{o&&u$1({type:6,time:Date.now()});},[o]),a=useCallback((r,c)=>{let{reverseOrder:i=!1,gutter:d=8,defaultPosition:p}=c||{},g=t.filter(m=>(m.position||p)===(r.position||p)&&m.height),E=g.findIndex(m=>m.id===r.id),x=g.filter((m,R)=>R<E&&m.visible).length;return g.filter(m=>m.visible).slice(...i?[x+1]:[0,x]).reduce((m,R)=>m+(R.height||0)+d,0)},[t]);return {toasts:t,handlers:{updateHeight:Z$1,startPause:ee$1,endPause:s,calculateOffset:a}}};var oe$1=h$2`
42302
+ from {
42303
+ transform: scale(0) rotate(45deg);
42304
+ opacity: 0;
42305
+ }
42306
+ to {
42307
+ transform: scale(1) rotate(45deg);
42308
+ opacity: 1;
42309
+ }`,re$1=h$2`
42310
+ from {
42311
+ transform: scale(0);
42312
+ opacity: 0;
42313
+ }
42314
+ to {
42315
+ transform: scale(1);
42316
+ opacity: 1;
42317
+ }`,se$1=h$2`
42318
+ from {
42319
+ transform: scale(0) rotate(90deg);
42320
+ opacity: 0;
42321
+ }
42322
+ to {
42323
+ transform: scale(1) rotate(90deg);
42324
+ opacity: 1;
42325
+ }`,_$1=j$1("div")`
42326
+ width: 20px;
42327
+ opacity: 0;
42328
+ height: 20px;
42329
+ border-radius: 10px;
42330
+ background: ${e=>e.primary||"#ff4b4b"};
42331
+ position: relative;
42332
+ transform: rotate(45deg);
42333
+
42334
+ animation: ${oe$1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
42335
+ forwards;
42336
+ animation-delay: 100ms;
42337
+
42338
+ &:after,
42339
+ &:before {
42340
+ content: '';
42341
+ animation: ${re$1} 0.15s ease-out forwards;
42342
+ animation-delay: 150ms;
42343
+ position: absolute;
42344
+ border-radius: 3px;
42345
+ opacity: 0;
42346
+ background: ${e=>e.secondary||"#fff"};
42347
+ bottom: 9px;
42348
+ left: 4px;
42349
+ height: 2px;
42350
+ width: 12px;
42351
+ }
42352
+
42353
+ &:before {
42354
+ animation: ${se$1} 0.15s ease-out forwards;
42355
+ animation-delay: 180ms;
42356
+ transform: rotate(90deg);
42357
+ }
42358
+ `;var ne$1=h$2`
42359
+ from {
42360
+ transform: rotate(0deg);
42361
+ }
42362
+ to {
42363
+ transform: rotate(360deg);
42364
+ }
42365
+ `,V$1=j$1("div")`
42366
+ width: 12px;
42367
+ height: 12px;
42368
+ box-sizing: border-box;
42369
+ border: 2px solid;
42370
+ border-radius: 100%;
42371
+ border-color: ${e=>e.secondary||"#e0e0e0"};
42372
+ border-right-color: ${e=>e.primary||"#616161"};
42373
+ animation: ${ne$1} 1s linear infinite;
42374
+ `;var pe$1=h$2`
42375
+ from {
42376
+ transform: scale(0) rotate(45deg);
42377
+ opacity: 0;
42378
+ }
42379
+ to {
42380
+ transform: scale(1) rotate(45deg);
42381
+ opacity: 1;
42382
+ }`,de$1=h$2`
42383
+ 0% {
42384
+ height: 0;
42385
+ width: 0;
42386
+ opacity: 0;
42387
+ }
42388
+ 40% {
42389
+ height: 0;
42390
+ width: 6px;
42391
+ opacity: 1;
42392
+ }
42393
+ 100% {
42394
+ opacity: 1;
42395
+ height: 10px;
42396
+ }`,w$1=j$1("div")`
42397
+ width: 20px;
42398
+ opacity: 0;
42399
+ height: 20px;
42400
+ border-radius: 10px;
42401
+ background: ${e=>e.primary||"#61d345"};
42402
+ position: relative;
42403
+ transform: rotate(45deg);
42404
+
42405
+ animation: ${pe$1} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
42406
+ forwards;
42407
+ animation-delay: 100ms;
42408
+ &:after {
42409
+ content: '';
42410
+ box-sizing: border-box;
42411
+ animation: ${de$1} 0.2s ease-out forwards;
42412
+ opacity: 0;
42413
+ animation-delay: 200ms;
42414
+ position: absolute;
42415
+ border-right: 2px solid;
42416
+ border-bottom: 2px solid;
42417
+ border-color: ${e=>e.secondary||"#fff"};
42418
+ bottom: 6px;
42419
+ left: 6px;
42420
+ height: 10px;
42421
+ width: 6px;
42422
+ }
42423
+ `;var ue$1=j$1("div")`
42424
+ position: absolute;
42425
+ `,le$1=j$1("div")`
42426
+ position: relative;
42427
+ display: flex;
42428
+ justify-content: center;
42429
+ align-items: center;
42430
+ min-width: 20px;
42431
+ min-height: 20px;
42432
+ `,Te=h$2`
42433
+ from {
42434
+ transform: scale(0.6);
42435
+ opacity: 0.4;
42436
+ }
42437
+ to {
42438
+ transform: scale(1);
42439
+ opacity: 1;
42440
+ }`,fe$1=j$1("div")`
42441
+ position: relative;
42442
+ transform: scale(0.6);
42443
+ opacity: 0.4;
42444
+ min-width: 20px;
42445
+ animation: ${Te} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
42446
+ forwards;
42447
+ `,M$1=({toast:e})=>{let{icon:t,type:o,iconTheme:s}=e;return t!==void 0?typeof t=="string"?React.createElement(fe$1,null,t):t:o==="blank"?null:React.createElement(le$1,null,React.createElement(V$1,{...s}),o!=="loading"&&React.createElement(ue$1,null,o==="error"?React.createElement(_$1,{...s}):React.createElement(w$1,{...s})))};var ye$1=e=>`
42448
+ 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
42449
+ 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
42450
+ `,ge$1=e=>`
42451
+ 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
42452
+ 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
42453
+ `,he$1="0%{opacity:0;} 100%{opacity:1;}",xe="0%{opacity:1;} 100%{opacity:0;}",be$1=j$1("div")`
42454
+ display: flex;
42455
+ align-items: center;
42456
+ background: #fff;
42457
+ color: #363636;
42458
+ line-height: 1.3;
42459
+ will-change: transform;
42460
+ box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
42461
+ max-width: 350px;
42462
+ pointer-events: auto;
42463
+ padding: 8px 10px;
42464
+ border-radius: 8px;
42465
+ `,Se$1=j$1("div")`
42466
+ display: flex;
42467
+ justify-content: center;
42468
+ margin: 4px 10px;
42469
+ color: inherit;
42470
+ flex: 1 1 auto;
42471
+ white-space: pre-line;
42472
+ `,Ae=(e,t)=>{let s=e.includes("top")?1:-1,[a,r]=b$1()?[he$1,xe]:[ye$1(s),ge$1(s)];return {animation:t?`${h$2(a)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${h$2(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},F$1=React.memo(({toast:e,position:t,style:o,children:s})=>{let a=e.height?Ae(e.position||t||"top-center",e.visible):{opacity:0},r=React.createElement(M$1,{toast:e}),c=React.createElement(Se$1,{...e.ariaProps},T$1(e.message,e));return React.createElement(be$1,{className:e.className,style:{...a,...o,...e.style}},typeof s=="function"?s({icon:r,message:c}):React.createElement(React.Fragment,null,r,c))});m$1(React.createElement);var Ee$1=({id:e,className:t,style:o,onHeightUpdate:s,children:a})=>{let r=React.useCallback(c=>{if(c){let i=()=>{let d=c.getBoundingClientRect().height;s(e,d);};i(),new MutationObserver(i).observe(c,{subtree:!0,childList:!0,characterData:!0});}},[e,s]);return React.createElement("div",{ref:r,className:t,style:o},a)},Re=(e,t)=>{let o=e.includes("top"),s=o?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return {left:0,right:0,display:"flex",position:"absolute",transition:b$1()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(o?1:-1)}px)`,...s,...a}},ve$1=u$2`
42473
+ z-index: 9999;
42474
+ > * {
42475
+ pointer-events: auto;
42476
+ }
42477
+ `,O$1=16,Ie=({reverseOrder:e,position:t="top-center",toastOptions:o,gutter:s,children:a,containerStyle:r,containerClassName:c})=>{let{toasts:i,handlers:d}=D$1(o);return React.createElement("div",{style:{position:"fixed",zIndex:9999,top:O$1,left:O$1,right:O$1,bottom:O$1,pointerEvents:"none",...r},className:c,onMouseEnter:d.startPause,onMouseLeave:d.endPause},i.map(p=>{let g=p.position||t,E=d.calculateOffset(p,{reverseOrder:e,gutter:s,defaultPosition:t}),x=Re(g,E);return React.createElement(Ee$1,{id:p.id,key:p.id,onHeightUpdate:d.updateHeight,className:p.visible?ve$1:"",style:x},p.type==="custom"?T$1(p.message,p):a?a(p):React.createElement(F$1,{toast:p,position:g}))}))};var _t=n$1;
42478
+
42296
42479
  var isCheckBoxInput = (element) => element.type === 'checkbox';
42297
42480
 
42298
42481
  var isDateObject = (value) => value instanceof Date;
@@ -44266,711 +44449,203 @@ function useForm(props = {}) {
44266
44449
  return _formControl.current;
44267
44450
  }
44268
44451
 
44269
- var e$1=function(i,e,t){if(i&&"reportValidity"in i){var f=get(t,e);i.setCustomValidity(f&&f.message||""),i.reportValidity();}},t$1=function(r,i){var t=function(t){var f=i.fields[t];f&&f.ref&&"reportValidity"in f.ref?e$1(f.ref,t,r):f.refs&&f.refs.forEach(function(i){return e$1(i,t,r)});};for(var f in i.fields)t(f);},f$2=function(e,f){f.shouldUseNativeValidation&&t$1(e,f);var o={};for(var a in e){var n=get(f.fields,a);set(o,a,Object.assign(e[a],{ref:n&&n.ref}));}return o};
44452
+ var e=function(i,e,t){if(i&&"reportValidity"in i){var f=get(t,e);i.setCustomValidity(f&&f.message||""),i.reportValidity();}},t=function(r,i){var t=function(t){var f=i.fields[t];f&&f.ref&&"reportValidity"in f.ref?e(f.ref,t,r):f.refs&&f.refs.forEach(function(i){return e(i,t,r)});};for(var f in i.fields)t(f);},f$1=function(e,f){f.shouldUseNativeValidation&&t(e,f);var o={};for(var a in e){var n=get(f.fields,a);set(o,a,Object.assign(e[a],{ref:n&&n.ref}));}return o};
44270
44453
 
44271
- function s$1(){return (s$1=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s]);}return e}).apply(this,arguments)}function a$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o$1(e){var t={exports:{}};return e(t,t.exports),t.exports}var n$2=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class s extends r{constructor(e){if(super(),!t.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}}}t.Name=s;class a extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e;}toString(){return this.str}emptyStr(){if(this._items.length>1)return !1;const e=this._items[0];return ""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof s&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function o(e,...t){const r=[e[0]];let s=0;for(;s<t.length;)c(r,t[s]),r.push(e[++s]);return new a(r)}t._Code=a,t.nil=new a(""),t._=o;const n=new a("+");function i(e,...t){const r=[d(e[0])];let s=0;for(;s<t.length;)r.push(n),c(r,t[s]),r.push(n,d(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===n){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+";}t++;}}(r),new a(r)}function c(e,t){var r;t instanceof a?e.push(...t._items):e.push(t instanceof s?t:"number"==typeof(r=t)||"boolean"==typeof r||null===r?r:d(Array.isArray(r)?r.join(","):r));}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof s||'"'!==e[e.length-1])return;return "string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return "string"!=typeof t||'"'!==t[0]||e instanceof s?void 0:`"${e}${t.slice(1)}`}function d(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=i,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},t.stringify=function(e){return new a(d(e))},t.safeStringify=d,t.getProperty=function(e){return "string"==typeof e&&t.IDENTIFIER.test(e)?new a(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new a(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new a(e.toString())};}),i$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value;}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed";}(s=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n$2.Name("const"),let:new n$2.Name("let"),var:new n$2.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t;}toName(e){return e instanceof n$2.Name?e:this.name(e)}name(e){return new n$2.Name(this._newName(e))}_newName(e){return `${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.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}}}t.Scope=a;class o extends n$2.Name{constructor(e,t){super(t),this.prefix=e;}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n$2._`.${new n$2.Name(t)}[${r}]`;}}t.ValueScopeName=o;const i=n$2._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i:n$2.nil};}get(){return this._scope}name(e){return new o(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e),{prefix:a}=s,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let n=this._values[a];if(n){const e=n.get(o);if(e)return e}else n=this._values[a]=new Map;n.set(o,s);const i=this._scope[a]||(this._scope[a]=[]),c=i.length;return i[c]=t.ref,s.setValue(t,{property:a,itemIndex:c}),s}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n$2._`${e}${t.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(e,a,o={},i){let c=n$2.nil;for(const l in e){const d=e[l];if(!d)continue;const u=o[l]=o[l]||new Map;d.forEach(e=>{if(u.has(e))return;u.set(e,s.Started);let o=a(e);if(o)c=n$2._`${c}${this.opts.es5?t.varKinds.var:t.varKinds.const} ${e} = ${o};${this.opts._n}`;else {if(!(o=null==i?void 0:i(e)))throw new r(e);c=n$2._`${c}${o}${this.opts._n}`;}u.set(e,s.Completed);});}return c}};}),c$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var r=n$2;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var s=i$1;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n$2._Code(">"),GTE:new n$2._Code(">="),LT:new n$2._Code("<"),LTE:new n$2._Code("<="),EQ:new n$2._Code("==="),NEQ:new n$2._Code("!=="),NOT:new n$2._Code("!"),OR:new n$2._Code("||"),AND:new n$2._Code("&&"),ADD:new n$2._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class o extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r;}render({es5:e,_n:t}){return `${e?i$1.varKinds.var:this.varKind} ${this.name}${void 0===this.rhs?"":` = ${this.rhs}`};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,e,t)),this}get names(){return this.rhs instanceof n$2._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r;}render({_n:e}){return `${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n$2.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,e,t),this}get names(){return C(this.lhs instanceof n$2.Name?{}:{...this.lhs.names},this.rhs)}}class l extends c{constructor(e,t,r,s){super(e,r,s),this.op=t;}render({_n:e}){return `${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={};}render({_n:e}){return `${this.label}:`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={};}render({_n:e}){return `break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e;}render({_n:e}){return `throw ${this.error};`+e}get names(){return this.error.names}}class h extends a{constructor(e){super(),this.code=e;}render({_n:e}){return `${this.code};`+e}optimizeNodes(){return `${this.code}`?this:void 0}optimizeNames(e,t){return this.code=O(this.code,e,t),this}get names(){return this.code instanceof n$2._CodeOrName?this.code.names:{}}}class p extends a{constructor(e=[]){super(),this.nodes=e;}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1);}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let s=r.length;for(;s--;){const a=r[s];a.optimizeNames(e,t)||(x(e,a.names),r.splice(s,1));}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>j(e,t.names),{})}}class m extends p{render(e){return "{"+e._n+super.render(e)+"}"+e._n}}class y extends p{}class v extends m{}v.kind="else";class g extends m{constructor(e,t){super(t),this.condition=e;}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e;}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(T(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=O(this.condition,e,t),this}get names(){const e=super.names;return C(e,this.condition),this.else&&j(e,this.else.names),e}}g.kind="if";class $ extends m{}$.kind="for";class _ extends ${constructor(e){super(),this.iteration=e;}render(e){return `for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=O(this.iteration,e,t),this}get names(){return j(super.names,this.iteration.names)}}class w extends ${constructor(e,t,r,s){super(),this.varKind=e,this.name=t,this.from=r,this.to=s;}render(e){const t=e.es5?i$1.varKinds.var:this.varKind,{name:r,from:s,to:a}=this;return `for(${t} ${r}=${s}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){const e=C(super.names,this.from);return C(e,this.to)}}class b extends ${constructor(e,t,r,s){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=s;}render(e){return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=O(this.iterable,e,t),this}get names(){return j(super.names,this.iterable.names)}}class E extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r;}render(e){return `${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}E.kind="func";class P extends p{render(e){return "return "+super.render(e)}}P.kind="return";class S extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,s;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(s=this.finally)||void 0===s||s.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&j(e,this.catch.names),this.finally&&j(e,this.finally.names),e}}class k extends m{constructor(e){super(),this.error=e;}render(e){return `catch(${this.error})`+super.render(e)}}k.kind="catch";class N extends m{render(e){return "finally"+super.render(e)}}function j(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function C(e,t){return t instanceof n$2._CodeOrName?j(e,t.names):e}function O(e,t,r){return e instanceof n$2.Name?a(e):(s=e)instanceof n$2._Code&&s._items.some(e=>e instanceof n$2.Name&&1===t[e.str]&&void 0!==r[e.str])?new n$2._Code(e._items.reduce((e,t)=>(t instanceof n$2.Name&&(t=a(t)),t instanceof n$2._Code?e.push(...t._items):e.push(t),e),[])):e;var s;function a(e){const s=r[e.str];return void 0===s||1!==t[e.str]?e:(delete t[e.str],s)}}function x(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0);}function T(e){return "boolean"==typeof e||"number"==typeof e||null===e?!e:n$2._`!${A(e)}`}N.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i$1.Scope({parent:e}),this._nodes=[new y];}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return (this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){const a=this._scope.toName(t);return void 0!==r&&s&&(this._constants[a.str]=r),this._leafNode(new o(e,a,r)),a}const(e,t,r){return this._def(i$1.varKinds.const,e,t,r)}let(e,t,r){return this._def(i$1.varKinds.let,e,t,r)}var(e,t,r){return this._def(i$1.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return "function"==typeof e?e():e!==n$2.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,s]of e)t.length>1&&t.push(","),t.push(r),(r!==s||this.opts.es5)&&(t.push(":"),(0, n$2.addCodeArg)(t,s));return t.push("}"),new n$2._Code(t)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new _(e),t)}forRange(e,t,r,s,a=(this.opts.es5?i$1.varKinds.var:i$1.varKinds.let)){const o=this._scope.toName(e);return this._for(new w(a,o,t,r),()=>s(o))}forOf(e,t,r,s=i$1.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n$2.Name?t:this.var("_arr",t);return this.forRange("_i",0,n$2._`${e}.length`,t=>{this.var(a,n$2._`${e}[${t}]`),r(a);})}return this._for(new b("of",s,a,t),()=>r(a))}forIn(e,t,r,s=(this.opts.es5?i$1.varKinds.var:i$1.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n$2._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new b("in",s,a,t),()=>r(a))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new S;if(this._blockNode(s),this.code(e),t){const e=this.name("e");this._currNode=s.catch=new k(e),t(e);}return r&&(this._currNode=s.finally=new N,this.code(r)),this._endBlockNode(k,N)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n$2.nil,r,s){return this._blockNode(new E(e,t,r)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(E)}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,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e;}},t.not=T;const R=D(t.operators.AND);t.and=function(...e){return e.reduce(R)};const I=D(t.operators.OR);function D(e){return (t,r)=>t===n$2.nil?r:r===n$2.nil?t:n$2._`${A(t)} ${e} ${A(r)}`}function A(e){return e instanceof n$2.Name?e:n$2._`(${e})`}t.or=function(...e){return e.reduce(I)};}),l$1=o$1(function(e,t){function r(e,t=e.schema){const{opts:r,self:s}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const a=s.RULES.keywords;for(const r in t)a[r]||h(e,`unknown keyword: "${r}"`);}function s(e,t){if("boolean"==typeof e)return !e;for(const r in e)if(t[r])return !0;return !1}function a(e){return "number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function o(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:s}){return (a,o,n,i)=>{const l=void 0===n?o:n instanceof c$1.Name?(o instanceof c$1.Name?e(a,o,n):t(a,o,n),n):o instanceof c$1.Name?(t(a,n,o),o):r(o,n);return i!==c$1.Name||l instanceof c$1.Name?l:s(a,l)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",c$1._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach(r=>e.assign(c$1._`${t}${(0, c$1.getProperty)(r)}`,!0));}Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0,t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return "boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=r,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return !e;for(const r in e)if("$ref"!==r&&t.all[r])return !0;return !1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,s,a){if(!a){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return c$1._`${r}`}return c$1._`${e}${t}${(0, c$1.getProperty)(s)}`},t.unescapeFragment=function(e){return o(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=o,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e);},t.mergeEvaluated={props:i({mergeNames:(e,t,r)=>e.if(c$1._`${r} !== true && ${t} !== undefined`,()=>{e.if(c$1._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,c$1._`${r} || {}`).code(c$1._`Object.assign(${r}, ${t})`));}),mergeToName:(e,t,r)=>e.if(c$1._`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,c$1._`${r} || {}`),d(e,r,t));}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:i({mergeNames:(e,t,r)=>e.if(c$1._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,c$1._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(c$1._`${r} !== true`,()=>e.assign(r,!0===t||c$1._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=d;const u={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t);}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new n$2._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str";}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof c$1.Name){const s=t===f.Num;return r?s?c$1._`"[" + ${e} + "]"`:c$1._`"['" + ${e} + "']"`:s?c$1._`"/" + ${e}`:c$1._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0, c$1.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=h;});const d$1={data:new c$1.Name("data"),valCxt:new c$1.Name("valCxt"),instancePath:new c$1.Name("instancePath"),parentData:new c$1.Name("parentData"),parentDataProperty:new c$1.Name("parentDataProperty"),rootData:new c$1.Name("rootData"),dynamicAnchors:new c$1.Name("dynamicAnchors"),vErrors:new c$1.Name("vErrors"),errors:new c$1.Name("errors"),this:new c$1.Name("this"),self:new c$1.Name("self"),scope:new c$1.Name("scope"),json:new c$1.Name("json"),jsonPos:new c$1.Name("jsonPos"),jsonLen:new c$1.Name("jsonLen"),jsonPart:new c$1.Name("jsonPart")};var u$2=/*#__PURE__*/Object.defineProperty({default:d$1},"__esModule",{value:!0}),f$1=o$1(function(e,t){function r(e,t){const r=e.const("err",t);e.if(c$1._`${u$2.default.vErrors} === null`,()=>e.assign(u$2.default.vErrors,c$1._`[${r}]`),c$1._`${u$2.default.vErrors}.push(${r})`),e.code(c$1._`${u$2.default.errors}++`);}function s(e,t){const{gen:r,validateName:s,schemaEnv:a}=e;a.$async?r.throw(c$1._`new ${e.ValidationError}(${t})`):(r.assign(c$1._`${s}.errors`,t),r.return(!1));}Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0,t.keywordError={message:({keyword:e})=>c$1.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?c$1.str`"${e}" keyword must be ${t} ($data)`:c$1.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,a=t.keywordError,n,i){const{it:l}=e,{gen:d,compositeRule:u,allErrors:f}=l,h=o(e,a,n);(null!=i?i:u||f)?r(d,h):s(l,c$1._`[${h}]`);},t.reportExtraError=function(e,a=t.keywordError,n){const{it:i}=e,{gen:c,compositeRule:l,allErrors:d}=i;r(c,o(e,a,n)),l||d||s(i,u$2.default.vErrors);},t.resetErrorsCount=function(e,t){e.assign(u$2.default.errors,t),e.if(c$1._`${u$2.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(c$1._`${u$2.default.vErrors}.length`,t),()=>e.assign(u$2.default.vErrors,null)));},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:s,errsCount:a,it:o}){if(void 0===a)throw new Error("ajv implementation error");const n=e.name("err");e.forRange("i",a,u$2.default.errors,a=>{e.const(n,c$1._`${u$2.default.vErrors}[${a}]`),e.if(c$1._`${n}.instancePath === undefined`,()=>e.assign(c$1._`${n}.instancePath`,(0, c$1.strConcat)(u$2.default.instancePath,o.errorPath))),e.assign(c$1._`${n}.schemaPath`,c$1.str`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign(c$1._`${n}.schema`,r),e.assign(c$1._`${n}.data`,s));});};const a={keyword:new c$1.Name("keyword"),schemaPath:new c$1.Name("schemaPath"),params:new c$1.Name("params"),propertyName:new c$1.Name("propertyName"),message:new c$1.Name("message"),schema:new c$1.Name("schema"),parentSchema:new c$1.Name("parentSchema")};function o(e,t,r){const{createErrors:s}=e.it;return !1===s?c$1._`{}`:function(e,t,r={}){const{gen:s,it:o}=e,l=[n(o,r),i(e,r)];return function(e,{params:t,message:r},s){const{keyword:o,data:n,schemaValue:i,it:l}=e,{opts:d,propertyName:f,topSchemaRef:h,schemaPath:p}=l;s.push([a.keyword,o],[a.params,"function"==typeof t?t(e):t||c$1._`{}`]),d.messages&&s.push([a.message,"function"==typeof r?r(e):r]),d.verbose&&s.push([a.schema,i],[a.parentSchema,c$1._`${h}${p}`],[u$2.default.data,n]),f&&s.push([a.propertyName,f]);}(e,t,l),s.object(...l)}(e,t,r)}function n({errorPath:e},{instancePath:t}){const r=t?c$1.str`${e}${(0, l$1.getErrorPath)(t,l$1.Type.Str)}`:e;return [u$2.default.instancePath,(0, c$1.strConcat)(u$2.default.instancePath,r)]}function i({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let o=s?t:c$1.str`${t}/${e}`;return r&&(o=c$1.str`${o}${(0, l$1.getErrorPath)(r,l$1.Type.Str)}`),[a.schemaPath,o]}}),h$2=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const r={message:"boolean schema is false"};function s(e,t){const{gen:s,data:a}=e;(0, f$1.reportError)({gen:s,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},r,void 0,t);}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:a}=e;!1===r?s(e,!1):"object"==typeof r&&!0===r.$async?t.return(u$2.default.data):(t.assign(c$1._`${a}.errors`,null),t.return(!0));},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:a}=e;!1===a?(r.var(t,!1),s(e)):r.var(t,!0);};}),p$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return "string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return {types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};}),m$1=o$1(function(e,t){function r(e,t){return t.rules.some(t=>s(e,t))}function s(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},s){const a=t.RULES.types[s];return a&&!0!==a&&r(e,a)},t.shouldUseGroup=r,t.shouldUseRule=s;}),y=o$1(function(e,t){var r;function s(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(p$1.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0,function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong";}(r=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=s(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else {if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null");}return t},t.getJSONTypes=s,t.coerceAndCheckDataType=function(e,t){const{gen:s,data:o,opts:i}=e,l=function(e,t){return t?e.filter(e=>a.has(e)||"array"===t&&"array"===e):[]}(t,i.coerceTypes),u=t.length>0&&!(0===l.length&&1===t.length&&(0, m$1.schemaHasRulesForType)(e,t[0]));if(u){const u=n(t,o,i.strictNumbers,r.Wrong);s.if(u,()=>{l.length?function(e,t,r){const{gen:s,data:o,opts:i}=e,l=s.let("dataType",c$1._`typeof ${o}`),u=s.let("coerced",c$1._`undefined`);"array"===i.coerceTypes&&s.if(c$1._`${l} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,c$1._`${o}[0]`).assign(l,c$1._`typeof ${o}`).if(n(t,o,i.strictNumbers),()=>s.assign(u,o))),s.if(c$1._`${u} !== undefined`);for(const e of r)(a.has(e)||"array"===e&&"array"===i.coerceTypes)&&f(e);function f(e){switch(e){case"string":return void s.elseIf(c$1._`${l} == "number" || ${l} == "boolean"`).assign(u,c$1._`"" + ${o}`).elseIf(c$1._`${o} === null`).assign(u,c$1._`""`);case"number":return void s.elseIf(c$1._`${l} == "boolean" || ${o} === null
44272
- || (${l} == "string" && ${o} && ${o} == +${o})`).assign(u,c$1._`+${o}`);case"integer":return void s.elseIf(c$1._`${l} === "boolean" || ${o} === null
44273
- || (${l} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(u,c$1._`+${o}`);case"boolean":return void s.elseIf(c$1._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(u,!1).elseIf(c$1._`${o} === "true" || ${o} === 1`).assign(u,!0);case"null":return s.elseIf(c$1._`${o} === "" || ${o} === 0 || ${o} === false`),void s.assign(u,null);case"array":s.elseIf(c$1._`${l} === "string" || ${l} === "number"
44274
- || ${l} === "boolean" || ${o} === null`).assign(u,c$1._`[${o}]`);}}s.else(),d(e),s.endIf(),s.if(c$1._`${u} !== undefined`,()=>{s.assign(o,u),function({gen:e,parentData:t,parentDataProperty:r},s){e.if(c$1._`${t} !== undefined`,()=>e.assign(c$1._`${t}[${r}]`,s));}(e,u);});}(e,t,l):d(e);});}return u};const a=new Set(["string","number","integer","boolean","null"]);function o(e,t,s,a=r.Correct){const o=a===r.Correct?c$1.operators.EQ:c$1.operators.NEQ;let n;switch(e){case"null":return c$1._`${t} ${o} null`;case"array":n=c$1._`Array.isArray(${t})`;break;case"object":n=c$1._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":n=i(c$1._`!(${t} % 1) && !isNaN(${t})`);break;case"number":n=i();break;default:return c$1._`typeof ${t} ${o} ${e}`}return a===r.Correct?n:(0, c$1.not)(n);function i(e=c$1.nil){return (0, c$1.and)(c$1._`typeof ${t} == "number"`,e,s?c$1._`isFinite(${t})`:c$1.nil)}}function n(e,t,r,s){if(1===e.length)return o(e[0],t,r,s);let a;const n=(0, l$1.toHash)(e);if(n.array&&n.object){const e=c$1._`typeof ${t} != "object"`;a=n.null?e:c$1._`!${t} || ${e}`,delete n.null,delete n.array,delete n.object;}else a=c$1.nil;n.number&&delete n.integer;for(const e in n)a=(0, c$1.and)(a,o(e,t,r,s));return a}t.checkDataType=o,t.checkDataTypes=n;const i={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?c$1._`{type: ${e}}`:c$1._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:s}=e,a=(0, l$1.schemaRefOrVal)(e,s,"type");return {gen:t,keyword:"type",data:r,schema:s.type,schemaCode:a,schemaValue:a,parentSchema:s,params:{},it:e}}(e);(0, f$1.reportError)(t,i);}t.reportTypeError=d;}),v$1=o$1(function(e,t){function r(e,t,r){const{gen:s,compositeRule:a,data:o,opts:n}=e;if(void 0===r)return;const i=c$1._`${o}${(0, c$1.getProperty)(t)}`;if(a)return void(0, l$1.checkStrictMode)(e,`default is ignored for: ${i}`);let d=c$1._`${i} === undefined`;"empty"===n.useDefaults&&(d=c$1._`${d} || ${i} === null || ${i} === ""`),s.if(d,c$1._`${i} = ${(0, c$1.stringify)(r)}`);}Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0,t.assignDefaults=function(e,t){const{properties:s,items:a}=e.schema;if("object"===t&&s)for(const t in s)r(e,t,s[t].default);else "array"===t&&Array.isArray(a)&&a.forEach((t,s)=>r(e,s,t.default));};}),g$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=l$1;function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:c$1._`Object.prototype.hasOwnProperty`})}function a(e,t,r){return c$1._`${s(e)}.call(${t}, ${r})`}function o(e,t,r,s){const o=c$1._`${t}${(0, c$1.getProperty)(r)} === undefined`;return s?(0, c$1.or)(o,(0, c$1.not)(a(e,t,r))):o}function n(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:s,it:a}=e;r.if(o(r,s,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:c$1._`${t}`},!0),e.error();});},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},s,a){return (0, c$1.or)(...s.map(s=>(0, c$1.and)(o(e,t,s,r.ownProperties),c$1._`${a} = ${s}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error();},t.hasPropFunc=s,t.isOwnProperty=a,t.propertyInData=function(e,t,r,s){const o=c$1._`${t}${(0, c$1.getProperty)(r)} !== undefined`;return s?c$1._`${o} && ${a(e,t,r)}`:o},t.noPropertyInData=o,t.allSchemaProperties=n,t.schemaProperties=function(e,t){return n(t).filter(r=>!(0, l$1.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:a,errorPath:o},it:n},i,l,d){const f=d?c$1._`${e}, ${t}, ${s}${a}`:t,h=[[u$2.default.instancePath,(0, c$1.strConcat)(u$2.default.instancePath,o)],[u$2.default.parentData,n.parentData],[u$2.default.parentDataProperty,n.parentDataProperty],[u$2.default.rootData,u$2.default.rootData]];n.opts.dynamicRef&&h.push([u$2.default.dynamicAnchors,u$2.default.dynamicAnchors]);const p=c$1._`${f}, ${r.object(...h)}`;return l!==c$1.nil?c$1._`${i}.call(${l}, ${p})`:c$1._`${i}(${p})`};const i=c$1._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},s){const a=t.unicodeRegExp?"u":"",{regExp:o}=t.code,n=o(s,a);return e.scopeValue("pattern",{key:n.toString(),ref:n,code:c$1._`${"new RegExp"===o.code?i:(0, r.useFunc)(e,o)}(${s}, ${a})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:s,it:a}=e,o=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return n(()=>t.assign(e,!1)),e}return t.var(o,!0),n(()=>t.break()),o;function n(a){const n=t.const("len",c$1._`${r}.length`);t.forRange("i",0,n,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:l$1.Type.Num},o),t.if((0, c$1.not)(o),a);});}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:s,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(e=>(0, l$1.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;const o=t.let("valid",!1),n=t.name("_valid");t.block(()=>r.forEach((r,a)=>{const i=e.subschema({keyword:s,schemaProp:a,compositeRule:!0},n);t.assign(o,c$1._`${o} || ${n}`),e.mergeValidEvaluated(i,n)||t.if((0, c$1.not)(o));})),e.result(o,()=>e.reset(),()=>e.error(!0));};}),$$1=o$1(function(e,t){function r(e){const{gen:t,data:r,it:s}=e;t.if(s.parentData,()=>t.assign(r,c$1._`${s.parentData}[${s.parentDataProperty}]`));}function s(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0, c$1.stringify)(r)})}Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0,t.macroKeywordCode=function(e,t){const{gen:r,keyword:a,schema:o,parentSchema:n,it:i}=e,l=t.macro.call(i.self,o,n,i),d=s(r,a,l);!1!==i.opts.validateSchema&&i.self.validateSchema(l,!0);const u=r.name("valid");e.subschema({schema:l,schemaPath:c$1.nil,errSchemaPath:`${i.errSchemaPath}/${a}`,topSchemaRef:d,compositeRule:!0},u),e.pass(u,()=>e.error(!0));},t.funcKeywordCode=function(e,t){var a;const{gen:o,keyword:n,schema:i,parentSchema:l,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const p=!d&&t.compile?t.compile.call(h.self,i,l,h):t.validate,m=s(o,n,p),y=o.let("valid");function v(r=(t.async?c$1._`await `:c$1.nil)){o.assign(y,c$1._`${r}${(0, g$1.callValidateCode)(e,m,h.opts.passContext?u$2.default.this:u$2.default.self,!("compile"in t&&!d||!1===t.schema))}`,t.modifying);}function $(e){var r;o.if((0, c$1.not)(null!==(r=t.valid)&&void 0!==r?r:y),e);}e.block$data(y,function(){if(!1===t.errors)v(),t.modifying&&r(e),$(()=>e.error());else {const s=t.async?function(){const e=o.let("ruleErrs",null);return o.try(()=>v(c$1._`await `),t=>o.assign(y,!1).if(c$1._`${t} instanceof ${h.ValidationError}`,()=>o.assign(e,c$1._`${t}.errors`),()=>o.throw(t))),e}():function(){const e=c$1._`${m}.errors`;return o.assign(e,null),v(c$1.nil),e}();t.modifying&&r(e),$(()=>function(e,t){const{gen:r}=e;r.if(c$1._`Array.isArray(${t})`,()=>{r.assign(u$2.default.vErrors,c$1._`${u$2.default.vErrors} === null ? ${t} : ${u$2.default.vErrors}.concat(${t})`).assign(u$2.default.errors,c$1._`${u$2.default.vErrors}.length`),(0, f$1.extendErrors)(e);},()=>e.error());}(e,s));}}),e.ok(null!==(a=t.valid)&&void 0!==a?a:y);},t.validSchemaType=function(e,t,r=!1){return !t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:s},a,o){if(Array.isArray(a.keyword)?!a.keyword.includes(o):a.keyword!==o)throw new Error("ajv implementation error");const n=a.dependencies;if(null==n?void 0:n.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${o}: ${n.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${s}": `+r.errorsText(a.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e);}};}),_$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0,t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:s,schemaPath:a,errSchemaPath:o,topSchemaRef:n}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:c$1._`${e.schemaPath}${(0, c$1.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:c$1._`${e.schemaPath}${(0, c$1.getProperty)(t)}${(0, c$1.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0, l$1.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===a||void 0===o||void 0===n)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return {schema:s,schemaPath:a,topSchemaRef:n,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:s,data:a,dataTypes:o,propertyName:n}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:i}=t;if(void 0!==r){const{errorPath:a,dataPathArr:o,opts:n}=t;d(i.let("data",c$1._`${t.data}${(0, c$1.getProperty)(r)}`,!0)),e.errorPath=c$1.str`${a}${(0, l$1.getErrorPath)(r,s,n.jsPropertySyntax)}`,e.parentDataProperty=c$1._`${r}`,e.dataPathArr=[...o,e.parentDataProperty];}function d(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r];}void 0!==a&&(d(a instanceof c$1.Name?a:i.let("data",a,!0)),void 0!==n&&(e.propertyName=n)),o&&(e.dataTypes=o);},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:a,allErrors:o}){void 0!==s&&(e.compositeRule=s),void 0!==a&&(e.createErrors=a),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r;};}),w$1=function e(t,r){if(t===r)return !0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return !1;var s,a,o;if(Array.isArray(t)){if((s=t.length)!=r.length)return !1;for(a=s;0!=a--;)if(!e(t[a],r[a]))return !1;return !0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((s=(o=Object.keys(t)).length)!==Object.keys(r).length)return !1;for(a=s;0!=a--;)if(!Object.prototype.hasOwnProperty.call(r,o[a]))return !1;for(a=s;0!=a--;){var n=o[a];if(!e(t[n],r[n]))return !1}return !0}return t!=t&&r!=r},b$1=o$1(function(e){var t=e.exports=function(e,t,s){"function"==typeof t&&(s=t,t={}),r(t,"function"==typeof(s=t.cb||s)?s:s.pre||function(){},s.post||function(){},e,"",e);};function r(e,s,a,o,n,i,c,l,d,u){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var f in s(o,n,i,c,l,d,u),o){var h=o[f];if(Array.isArray(h)){if(f in t.arrayKeywords)for(var p=0;p<h.length;p++)r(e,s,a,h[p],n+"/"+f+"/"+p,i,n,f,o,p);}else if(f in t.propsKeywords){if(h&&"object"==typeof h)for(var m in h)r(e,s,a,h[m],n+"/"+f+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),i,n,f,o,m);}else (f in t.keywords||e.allKeys&&!(f in t.skipKeywords))&&r(e,s,a,h,n+"/"+f,i,n,f,o);}a(o,n,i,c,l,d,u);}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};}),E=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return "boolean"==typeof e||(!0===t?!a(e):!!t&&o(e)<=t)};const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e){for(const t in e){if(s.has(t))return !0;const r=e[t];if(Array.isArray(r)&&r.some(a))return !0;if("object"==typeof r&&a(r))return !0}return !1}function o(e){let t=0;for(const s in e){if("$ref"===s)return Infinity;if(t++,!r.has(s)&&("object"==typeof e[s]&&(0, l$1.eachItem)(e[s],e=>t+=o(e)),Infinity===t))return Infinity}return t}function n(e,t="",r){!1!==r&&(t=d(t));const s=e.parse(t);return i(e,s)}function i(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=n,t._getFullPath=i;const c=/#\/?$/;function d(e){return e?e.replace(c,""):""}t.normalizeId=d,t.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const u=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return {};const{schemaId:r,uriResolver:s}=this.opts,a=d(e[r]||t),o={"":a},i=n(s,a,!1),c={},l=new Set;return b$1(e,{allKeys:!0},(e,t,s,a)=>{if(void 0===a)return;const n=i+t;let p=o[a];function m(t){if(t=d(p?(0, this.opts.uriResolver.resolve)(p,t):t),l.has(t))throw h(t);l.add(t);let r=this.refs[t];return "string"==typeof r&&(r=this.refs[r]),"object"==typeof r?f(e,r.schema,t):t!==d(n)&&("#"===t[0]?(f(e,c[t],t),c[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);m.call(this,`#${e}`);}}"string"==typeof e[r]&&(p=m.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),o[t]=p;}),c;function f(e,t,r){if(void 0!==t&&!w$1(e,t))throw h(r)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}};}),P$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=y;function s({gen:e,validateName:t,schema:r,schemaEnv:s,opts:o},n){o.code.es5?e.func(t,c$1._`${u$2.default.data}, ${u$2.default.valCxt}`,s.$async,()=>{e.code(c$1._`"use strict"; ${a(r,o)}`),function(e,t){e.if(u$2.default.valCxt,()=>{e.var(u$2.default.instancePath,c$1._`${u$2.default.valCxt}.${u$2.default.instancePath}`),e.var(u$2.default.parentData,c$1._`${u$2.default.valCxt}.${u$2.default.parentData}`),e.var(u$2.default.parentDataProperty,c$1._`${u$2.default.valCxt}.${u$2.default.parentDataProperty}`),e.var(u$2.default.rootData,c$1._`${u$2.default.valCxt}.${u$2.default.rootData}`),t.dynamicRef&&e.var(u$2.default.dynamicAnchors,c$1._`${u$2.default.valCxt}.${u$2.default.dynamicAnchors}`);},()=>{e.var(u$2.default.instancePath,c$1._`""`),e.var(u$2.default.parentData,c$1._`undefined`),e.var(u$2.default.parentDataProperty,c$1._`undefined`),e.var(u$2.default.rootData,u$2.default.data),t.dynamicRef&&e.var(u$2.default.dynamicAnchors,c$1._`{}`);});}(e,o),e.code(n);}):e.func(t,c$1._`${u$2.default.data}, ${function(e){return c$1._`{${u$2.default.instancePath}="", ${u$2.default.parentData}, ${u$2.default.parentDataProperty}, ${u$2.default.rootData}=${u$2.default.data}${e.dynamicRef?c$1._`, ${u$2.default.dynamicAnchors}={}`:c$1.nil}}={}`}(o)}`,s.$async,()=>e.code(a(r,o)).code(n));}function a(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?c$1._`/*# sourceURL=${r} */`:c$1.nil}function o({schema:e,self:t}){if("boolean"==typeof e)return !e;for(const r in e)if(t.RULES.all[r])return !0;return !1}function n(e){return "boolean"!=typeof e.schema}function i(e){(0, l$1.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:s,self:a}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0, l$1.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`);}(e);}function d(e,t){if(e.opts.jtd)return g(e,[],!1,t);const r=(0, y.getSchemaTypes)(e.schema);g(e,r,!(0, y.coerceAndCheckDataType)(e,r),t);}function p({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:a}){const o=r.$comment;if(!0===a.$comment)e.code(c$1._`${u$2.default.self}.logger.log(${o})`);else if("function"==typeof a.$comment){const r=c$1.str`${s}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(c$1._`${u$2.default.self}.opts.$comment(${o}, ${r}, ${a}.schema)`);}}function g(e,t,s,a){const{gen:o,schema:n,data:i,allErrors:d,opts:f,self:h}=e,{RULES:p}=h;function y(l){(0, m$1.shouldUseGroup)(n,l)&&(l.type?(o.if((0, r.checkDataType)(l.type,i,f.strictNumbers)),w(e,l),1===t.length&&t[0]===l.type&&s&&(o.else(),(0, r.reportTypeError)(e)),o.endIf()):w(e,l),d||o.if(c$1._`${u$2.default.errors} === ${a||0}`));}!n.$ref||!f.ignoreKeywordsWithRef&&(0, l$1.schemaHasRulesButRef)(n,p)?(f.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach(t=>{b(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`);}),e.dataTypes=e.dataTypes.filter(e=>b(t,e))):e.dataTypes=t);}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword");}(e,t),function(e,t){const r=e.self.RULES.all;for(const s in r){const a=r[s];if("object"==typeof a&&(0, m$1.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;r.length&&!r.some(e=>{return (r=t).includes(s=e)||"number"===s&&r.includes("integer");var r,s;})&&P(e,`missing type "${r.join(",")}" for keyword "${s}"`);}}}(e,e.dataTypes));}(e,t),o.block(()=>{for(const e of p.rules)y(e);y(p.post);})):o.block(()=>k(e,"$ref",p.all.$ref.definition));}function w(e,t){const{gen:r,schema:s,opts:{useDefaults:a}}=e;a&&(0, v$1.assignDefaults)(e,t.type),r.block(()=>{for(const r of t.rules)(0, m$1.shouldUseRule)(s,r)&&k(e,r.keyword,r.definition,t.type);});}function b(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){(0, l$1.checkStrictMode)(e,t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,e.opts.strictTypes);}t.validateFunctionCode=function(e){n(e)&&(i(e),o(e))?function(e){const{schema:t,opts:r,gen:a}=e;s(e,()=>{r.$comment&&t.$comment&&p(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0, l$1.checkStrictMode)(e,"default is ignored in the schema root");}(e),a.let(u$2.default.vErrors,null),a.let(u$2.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",c$1._`${r}.evaluated`),t.if(c$1._`${e.evaluated}.dynamicProps`,()=>t.assign(c$1._`${e.evaluated}.props`,c$1._`undefined`)),t.if(c$1._`${e.evaluated}.dynamicItems`,()=>t.assign(c$1._`${e.evaluated}.items`,c$1._`undefined`));}(e),d(e),function(e){const{gen:t,schemaEnv:r,validateName:s,ValidationError:a,opts:o}=e;r.$async?t.if(c$1._`${u$2.default.errors} === 0`,()=>t.return(u$2.default.data),()=>t.throw(c$1._`new ${a}(${u$2.default.vErrors})`)):(t.assign(c$1._`${s}.errors`,u$2.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:s}){r instanceof c$1.Name&&e.assign(c$1._`${t}.props`,r),s instanceof c$1.Name&&e.assign(c$1._`${t}.items`,s);}(e),t.return(c$1._`${u$2.default.errors} === 0`));}(e);});}(e):s(e,()=>(0, h$2.topBoolOrEmptySchema)(e));};class S{constructor(e,t,r){if((0, $$1.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0, l$1.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",C(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0, $$1.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u$2.default.errors));}result(e,t,r){this.failResult((0, c$1.not)(e),t,r);}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else();}pass(e,t){this.failResult((0, c$1.not)(e),void 0,t);}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else();}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(c$1._`${t} !== undefined && (${(0, c$1.or)(this.invalid$data(),e)})`);}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r);}_error(e,t){(e?f$1.reportExtraError:f$1.reportError)(this,this.def.error,t);}$dataError(){(0, f$1.reportError)(this,this.def.$dataError||f$1.keyword$DataError);}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0, f$1.resetErrorsCount)(this.gen,this.errsCount);}ok(e){this.allErrors||this.gen.if(e);}setParams(e,t){t?Object.assign(this.params,e):this.params=e;}block$data(e,t,r=c$1.nil){this.gen.block(()=>{this.check$data(e,r),t();});}check$data(e=c$1.nil,t=c$1.nil){if(!this.$data)return;const{gen:r,schemaCode:s,schemaType:a,def:o}=this;r.if((0, c$1.or)(c$1._`${s} === undefined`,t)),e!==c$1.nil&&r.assign(e,!0),(a.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==c$1.nil&&r.assign(e,!1)),r.else();}invalid$data(){const{gen:e,schemaCode:t,schemaType:s,def:a,it:o}=this;return (0, c$1.or)(function(){if(s.length){if(!(t instanceof c$1.Name))throw new Error("ajv implementation error");const e=Array.isArray(s)?s:[s];return c$1._`${(0, r.checkDataTypes)(e,t,o.opts.strictNumbers,r.DataType.Wrong)}`}return c$1.nil}(),function(){if(a.validateSchema){const r=e.scopeValue("validate$data",{ref:a.validateSchema});return c$1._`!${r}(${t})`}return c$1.nil}())}subschema(e,t){const r=(0, _$1.getSubschema)(this.it,e);(0, _$1.extendSubschemaData)(r,this.it,e),(0, _$1.extendSubschemaMode)(r,e);const s={...this.it,...r,items:void 0,props:void 0};return function(e,t){n(e)&&(i(e),o(e))?function(e,t){const{schema:r,gen:s,opts:a}=e;a.$comment&&r.$comment&&p(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0, E.resolveUrl)(e.opts.uriResolver,e.baseId,t));}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=s.const("_errs",u$2.default.errors);d(e,o),s.var(t,c$1._`${o} === ${u$2.default.errors}`);}(e,t):(0, h$2.boolOrEmptySchema)(e,t);}(s,t),s}mergeEvaluated(e,t){const{it:r,gen:s}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=l$1.mergeEvaluated.props(s,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=l$1.mergeEvaluated.items(s,e.items,r.items,t)));}mergeValidEvaluated(e,t){const{it:r,gen:s}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return s.if(t,()=>this.mergeEvaluated(e,c$1.Name)),!0}}function k(e,t,r,s){const a=new S(e,r,t);"code"in r?r.code(a,s):a.$data&&r.validate?(0, $$1.funcKeywordCode)(a,r):"macro"in r?(0, $$1.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0, $$1.funcKeywordCode)(a,r);}t.KeywordCxt=S;const N=/^\/(?:[^~]|~0|~1)*$/,j=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let a,o;if(""===e)return u$2.default.rootData;if("/"===e[0]){if(!N.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,o=u$2.default.rootData;}else {const n=j.exec(e);if(!n)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+n[1];if(a=n[2],"#"===a){if(i>=t)throw new Error(d("property/index",i));return s[t-i]}if(i>t)throw new Error(d("data",i));if(o=r[t-i],!a)return o}let n=o;const i=a.split("/");for(const e of i)e&&(o=c$1._`${o}${(0, c$1.getProperty)((0, l$1.unescapeJsonPointer)(e))}`,n=c$1._`${n} && ${o}`);return n;function d(e,r){return `Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=C;});class S$1 extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0;}}var k=/*#__PURE__*/Object.defineProperty({default:S$1},"__esModule",{value:!0});class N extends Error{constructor(e,t,r,s){super(s||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0, E.resolveUrl)(e,t,r),this.missingSchema=(0, E.normalizeId)((0, E.getFullPath)(e,this.missingRef));}}var j$1=/*#__PURE__*/Object.defineProperty({default:N},"__esModule",{value:!0}),C=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;class r{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0, E.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={};}}function s(e){const t=o.call(this,e);if(t)return t;const r=(0, E.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:a}=this.opts.code,{ownProperties:n}=this.opts,i=new c$1.CodeGen(this.scope,{es5:s,lines:a,ownProperties:n});let l;e.$async&&(l=i.scopeValue("Error",{ref:k.default,code:c$1._`require("ajv/dist/runtime/validation_error").default`}));const d=i.scopeName("validate");e.validateName=d;const f={gen:i,allErrors:this.opts.allErrors,data:u$2.default.data,parentData:u$2.default.parentData,parentDataProperty:u$2.default.parentDataProperty,dataNames:[u$2.default.data],dataPathArr:[c$1.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0, c$1.stringify)(e.schema)}:{ref:e.schema}),validateName:d,ValidationError:l,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:c$1.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:c$1._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,P$1.validateFunctionCode)(f),i.optimize(this.opts.code.optimize);const t=i.toString();h=`${i.scopeRefs(u$2.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const r=new Function(`${u$2.default.self}`,`${u$2.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:d,validateCode:t,scopeValues:i._values}),this.opts.unevaluated){const{props:e,items:t}=f;r.evaluated={props:e instanceof c$1.Name?void 0:e,items:t instanceof c$1.Name?void 0:t,dynamicProps:e instanceof c$1.Name,dynamicItems:t instanceof c$1.Name},r.source&&(r.source.evaluated=(0,c$1.stringify)(r.evaluated));}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e);}}function a(e){return (0, E.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:s.call(this,e)}function o(e){for(const s of this._compilations)if((t=s).schema===(r=e).schema&&t.root===r.root&&t.baseId===r.baseId)return s;var t,r;}function n(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||i.call(this,e,t)}function i(e,t){const a=this.opts.uriResolver.parse(t),o=(0, E._getFullPath)(this.opts.uriResolver,a);let n=(0, E.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return f.call(this,a,e);const c=(0, E.normalizeId)(o),l=this.refs[c]||this.schemas[c];if("string"==typeof l){const t=i.call(this,e,l);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,a,t)}if("object"==typeof(null==l?void 0:l.schema)){if(l.validate||s.call(this,l),c===(0, E.normalizeId)(t)){const{schema:t}=l,{schemaId:s}=this.opts,a=t[s];return a&&(n=(0, E.resolveUrl)(this.opts.uriResolver,n,a)),new r({schema:t,schemaId:s,root:e,baseId:n})}return f.call(this,a,l)}}t.SchemaEnv=r,t.compileSchema=s,t.resolveRef=function(e,t,s){var o;s=(0, E.resolveUrl)(this.opts.uriResolver,t,s);const i=e.refs[s];if(i)return i;let c=n.call(this,e,s);if(void 0===c){const a=null===(o=e.localRefs)||void 0===o?void 0:o[s],{schemaId:n}=this.opts;a&&(c=new r({schema:a,schemaId:n,root:e,baseId:t}));}return void 0!==c?e.refs[s]=a.call(this,c):void 0},t.getCompilingSchema=o,t.resolveSchema=i;const d=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:s,root:a}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const r of e.fragment.slice(1).split("/")){if("boolean"==typeof s)return;const e=s[(0, l$1.unescapeFragment)(r)];if(void 0===e)return;const a="object"==typeof(s=e)&&s[this.opts.schemaId];!d.has(r)&&a&&(t=(0, E.resolveUrl)(this.opts.uriResolver,t,a));}let n;if("boolean"!=typeof s&&s.$ref&&!(0, l$1.schemaHasRulesButRef)(s,this.RULES)){const e=(0, E.resolveUrl)(this.opts.uriResolver,t,s.$ref);n=i.call(this,a,e);}const{schemaId:c}=this.opts;return n=n||new r({schema:s,schemaId:c,root:a,baseId:t}),n.schema!==n.root.schema?n:void 0}}),O$1={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},x=o$1(function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var s=t.length-1,a=1;a<s;++a)t[a]=t[a].slice(1,-1);return t[s]=t[s].slice(1),t.join("")}return t[0]}function r(e){return "(?:"+e+")"}function s(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function a(e){return e.toUpperCase()}function o(e){var s="[A-Za-z]",a="[0-9]",o=t(a,"[A-Fa-f]"),n=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",i),l=e?"[\\uE000-\\uF8FF]":"[]",d=t(s,a,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(s+t(s,a,"[\\+\\-\\.]")+"*"),r(r(n+"|"+t(d,i,"[\\:]"))+"*");var u=r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("0?[1-9][0-9]")+"|0?0?"+a),f=r(u+"\\."+u+"\\."+u+"\\."+u),h=r(o+"{1,4}"),p=r(r(h+"\\:"+h)+"|"+f),m=r(r(h+"\\:")+"{6}"+p),y=r("\\:\\:"+r(h+"\\:")+"{5}"+p),v=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+p),g=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+p),$=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+p),_=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+p),w=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+p),b=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),E=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),P=r([m,y,v,g,$,_,w,b,E].join("|")),S=r(r(d+"|"+n)+"+");r("[vV]"+o+"+\\."+t(d,i,"[\\:]")+"+"),r(r(n+"|"+t(d,i))+"*");var k=r(n+"|"+t(d,i,"[\\:\\@]"));return r(r(n+"|"+t(d,i,"[\\@]"))+"+"),r(r(k+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:new RegExp(t("[^]",s,a,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",d,i),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",d,i),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",d,i),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",d,i),"g"),NOT_QUERY:new RegExp(t("[^\\%]",d,i,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",d,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",d,i),"g"),UNRESERVED:new RegExp(d,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",d,c),"g"),PCT_ENCODED:new RegExp(n,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+P+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+S+")")+"?\\]?$")}}var n=o(!1),i=o(!0),c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],s=!0,a=!1,o=void 0;try{for(var n,i=e[Symbol.iterator]();!(s=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e;}finally{try{!s&&i.return&&i.return();}finally{if(a)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=2147483647,d=36,u=/^xn--/,f=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,y=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,t){var r=e.split("@"),s="";return r.length>1&&(s=r[0]+"@",e=r[1]),s+function(e,t){for(var r=[],s=e.length;s--;)r[s]=t(e[s]);return r}((e=e.replace(h,".")).split("."),t).join(".")}var $=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},_=function(e,t,r){var s=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;s+=d)e=m(e/35);return m(s+36*e/(e+38))},w=function(e){return g(e,function(e){return f.test(e)?"xn--"+function(e){var t=[],r=(e=function(e){for(var t=[],r=0,s=e.length;r<s;){var a=e.charCodeAt(r++);if(a>=55296&&a<=56319&&r<s){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&a)<<10)+(1023&o)+65536):(t.push(a),r--);}else t.push(a);}return t}(e)).length,s=128,a=0,o=72,n=!0,i=!1,c=void 0;try{for(var u,f=e[Symbol.iterator]();!(n=(u=f.next()).done);n=!0){var h=u.value;h<128&&t.push(y(h));}}catch(e){i=!0,c=e;}finally{try{!n&&f.return&&f.return();}finally{if(i)throw c}}var p=t.length,g=p;for(p&&t.push("-");g<r;){var w=l,b=!0,E=!1,P=void 0;try{for(var S,k=e[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var N=S.value;N>=s&&N<w&&(w=N);}}catch(e){E=!0,P=e;}finally{try{!b&&k.return&&k.return();}finally{if(E)throw P}}var j=g+1;w-s>m((l-a)/j)&&v("overflow"),a+=(w-s)*j,s=w;var C=!0,O=!1,x=void 0;try{for(var T,R=e[Symbol.iterator]();!(C=(T=R.next()).done);C=!0){var I=T.value;if(I<s&&++a>l&&v("overflow"),I==s){for(var D=a,A=d;;A+=d){var M=A<=o?1:A>=o+26?26:A-o;if(D<M)break;var V=D-M,F=d-M;t.push(y($(M+V%F,0))),D=m(V/F);}t.push(y($(D,0))),o=_(a,j,g==p),a=0,++g;}}}catch(e){O=!0,x=e;}finally{try{!C&&R.return&&R.return();}finally{if(O)throw x}}++a,++s;}return t.join("")}(e):e})},b=function(e){return g(e,function(e){return u.test(e)?function(e){var t,r=[],s=e.length,a=0,o=128,n=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var c=0;c<i;++c)e.charCodeAt(c)>=128&&v("not-basic"),r.push(e.charCodeAt(c));for(var u=i>0?i+1:0;u<s;){for(var f=a,h=1,p=d;;p+=d){u>=s&&v("invalid-input");var y=(t=e.charCodeAt(u++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:d;(y>=d||y>m((l-a)/h))&&v("overflow"),a+=y*h;var g=p<=n?1:p>=n+26?26:p-n;if(y<g)break;var $=d-g;h>m(l/$)&&v("overflow"),h*=$;}var w=r.length+1;n=_(a-f,w,0==f),m(a/w)>l-o&&v("overflow"),o+=m(a/w),a%=w,r.splice(a++,0,o);}return String.fromCodePoint.apply(String,r)}(e.slice(4).toLowerCase()):e})},E={};function P(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function S(e){for(var t="",r=0,s=e.length;r<s;){var a=parseInt(e.substr(r+1,2),16);if(a<128)t+=String.fromCharCode(a),r+=3;else if(a>=194&&a<224){if(s-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&a)<<6|63&o);}else t+=e.substr(r,6);r+=6;}else if(a>=224){if(s-r>=9){var n=parseInt(e.substr(r+4,2),16),i=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&a)<<12|(63&n)<<6|63&i);}else t+=e.substr(r,9);r+=9;}else t+=e.substr(r,3),r+=3;}return t}function k(e,t){function r(e){var r=S(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,P).replace(t.PCT_ENCODED,a)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,P).replace(t.PCT_ENCODED,a)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,P).replace(t.PCT_ENCODED,a)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,P).replace(t.PCT_ENCODED,a)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,P).replace(t.PCT_ENCODED,a)),e}function N(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,t){var r=e.match(t.IPV4ADDRESS)||[],s=c(r,2)[1];return s?s.split(".").map(N).join("."):e}function C(e,t){var r=e.match(t.IPV6ADDRESS)||[],s=c(r,3),a=s[1],o=s[2];if(a){for(var n=a.toLowerCase().split("::").reverse(),i=c(n,2),l=i[0],d=i[1],u=d?d.split(":").map(N):[],f=l.split(":").map(N),h=t.IPV4ADDRESS.test(f[f.length-1]),p=h?7:8,m=f.length-p,y=Array(p),v=0;v<p;++v)y[v]=u[v]||f[m+v]||"";h&&(y[p-1]=j(y[p-1],t));var g=y.reduce(function(e,t,r){if(!t||"0"===t){var s=e[e.length-1];s&&s.index+s.length===r?s.length++:e.push({index:r,length:1});}return e},[]).sort(function(e,t){return t.length-e.length})[0],$=void 0;if(g&&g.length>1){var _=y.slice(0,g.index),w=y.slice(g.index+g.length);$=_.join(":")+"::"+w.join(":");}else $=y.join(":");return o&&($+="%"+o),$}return e}var O=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,x=void 0==="".match(/(){0}/)[1];function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},s=!1!==t.iri?i:n;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var a=e.match(O);if(a){x?(r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5])):(r.scheme=a[1]||void 0,r.userinfo=-1!==e.indexOf("@")?a[3]:void 0,r.host=-1!==e.indexOf("//")?a[4]:void 0,r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=-1!==e.indexOf("?")?a[7]:void 0,r.fragment=-1!==e.indexOf("#")?a[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?a[4]:void 0)),r.host&&(r.host=C(j(r.host,s),s)),r.reference=void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?"relative":void 0===r.fragment?"absolute":"uri":"same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=E[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)k(r,s);else {if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=w(r.host.replace(s.PCT_ENCODED,S).toLowerCase());}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e;}k(r,n);}o&&o.parse&&o.parse(r,t);}else r.error=r.error||"URI can not be parsed.";return r}function R(e,t){var r=!1!==t.iri?i:n,s=[];return void 0!==e.userinfo&&(s.push(e.userinfo),s.push("@")),void 0!==e.host&&s.push(C(j(String(e.host),r),r).replace(r.IPV6ADDRESS,function(e,t,r){return "["+t+(r?"%25"+r:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(s.push(":"),s.push(String(e.port))),s.length?s.join(""):void 0}var I=/^\.\.?\//,D=/^\/\.(\/|$)/,A=/^\/\.\.(\/|$)/,M=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var t=[];e.length;)if(e.match(I))e=e.replace(I,"");else if(e.match(D))e=e.replace(D,"/");else if(e.match(A))e=e.replace(A,"/"),t.pop();else if("."===e||".."===e)e="";else {var r=e.match(M);if(!r)throw new Error("Unexpected dot segment condition");var s=r[0];e=e.slice(s.length),t.push(s);}return t.join("")}function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?i:n,s=[],a=E[(t.scheme||e.scheme||"").toLowerCase()];if(a&&a.serialize&&a.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||a&&a.domainHost)try{e.host=t.iri?b(e.host):w(e.host.replace(r.PCT_ENCODED,S).toLowerCase());}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r;}k(e,r),"suffix"!==t.reference&&e.scheme&&(s.push(e.scheme),s.push(":"));var o=R(e,t);if(void 0!==o&&("suffix"!==t.reference&&s.push("//"),s.push(o),e.path&&"/"!==e.path.charAt(0)&&s.push("/")),void 0!==e.path){var c=e.path;t.absolutePath||a&&a.absolutePath||(c=V(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),s.push(c);}return void 0!==e.query&&(s.push("?"),s.push(e.query)),void 0!==e.fragment&&(s.push("#"),s.push(e.fragment)),s.join("")}function U(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={};return arguments[3]||(e=T(F(e,r),r),t=T(F(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=V(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=V(t.path||""),s.query=t.query):(t.path?("/"===t.path.charAt(0)?s.path=V(t.path):(s.path=void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:t.path:"/"+t.path,s.path=V(s.path)),s.query=t.query):(s.path=e.path,s.query=void 0!==t.query?t.query:e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function q(e,t){return e&&e.toString().replace(t&&t.iri?i.PCT_ENCODED:n.PCT_ENCODED,S)}var z={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},K={scheme:"https",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize};function L(e){return "boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=L(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(L(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),s=c(r,2),a=s[0],o=s[1];e.path=a&&"/"!==a?a:void 0,e.query=o,e.resourceName=void 0;}return e.fragment=void 0,e}},G={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},J={},B="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",W="[0-9A-Fa-f]",Q=r(r("%[EFef][0-9A-Fa-f]%"+W+W+"%"+W+W)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+W+W)+"|"+r("%"+W+W)),Z=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Y=new RegExp(B,"g"),X=new RegExp(Q,"g"),ee=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Z),"g"),te=new RegExp(t("[^]",B,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=te;function se(e){var t=S(e);return t.match(Y)?t:e}var ae={scheme:"mailto",parse:function(e,t){var r=e,s=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var a=!1,o={},n=r.query.split("&"),i=0,c=n.length;i<c;++i){var l=n[i].split("=");switch(l[0]){case"to":for(var d=l[1].split(","),u=0,f=d.length;u<f;++u)s.push(d[u]);break;case"subject":r.subject=q(l[1],t);break;case"body":r.body=q(l[1],t);break;default:a=!0,o[q(l[0],t)]=q(l[1],t);}}a&&(r.headers=o);}r.query=void 0;for(var h=0,p=s.length;h<p;++h){var m=s[h].split("@");if(m[0]=q(m[0]),t.unicodeSupport)m[1]=q(m[1],t).toLowerCase();else try{m[1]=w(q(m[1],t).toLowerCase());}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e;}s[h]=m.join("@");}return r},serialize:function(e,t){var r,s=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var n=0,i=o.length;n<i;++n){var c=String(o[n]),l=c.lastIndexOf("@"),d=c.slice(0,l).replace(X,se).replace(X,a).replace(ee,P),u=c.slice(l+1);try{u=t.iri?b(u):w(q(u,t).toLowerCase());}catch(e){s.error=s.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e;}o[n]=d+"@"+u;}s.path=o.join(",");}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var p in f)f[p]!==J[p]&&h.push(p.replace(X,se).replace(X,a).replace(te,P)+"="+f[p].replace(X,se).replace(X,a).replace(re,P));return h.length&&(s.query=h.join("&")),s}},oe=/^([^\:]+)\:(.*)/,ne={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(oe),s=e;if(r){var a=t.scheme||s.scheme||"urn",o=r[1].toLowerCase(),n=r[2],i=E[a+":"+(t.nid||o)];s.nid=o,s.nss=n,s.path=void 0,i&&(s=i.parse(s,t));}else s.error=s.error||"URN can not be parsed.";return s},serialize:function(e,t){var r=e.nid,s=E[(t.scheme||e.scheme||"urn")+":"+(t.nid||r)];s&&(e=s.serialize(e,t));var a=e;return a.path=(r||t.nid)+":"+e.nss,a}},ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};E[z.scheme]=z,E[K.scheme]=K,E[H.scheme]=H,E[G.scheme]=G,E[ae.scheme]=ae,E[ne.scheme]=ne,E[ce.scheme]=ce,e.SCHEMES=E,e.pctEncChar=P,e.pctDecChars=S,e.parse=T,e.removeDotSegments=V,e.serialize=F,e.resolveComponents=U,e.resolve=function(e,t,r){var s=function(e,t){var r={scheme:"null"};if(t)for(var s in t)r[s]=t[s];return r}(0,r);return F(U(T(e,s),T(t,s),s,!0),s)},e.normalize=function(e,t){return "string"==typeof e?e=F(T(e,t),t):"object"===s(e)&&(e=T(F(e,t),t)),e},e.equal=function(e,t,r){return "string"==typeof e?e=F(T(e,r),r):"object"===s(e)&&(e=F(e,r)),"string"==typeof t?t=F(T(t,r),r):"object"===s(t)&&(t=F(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?i.ESCAPE:n.ESCAPE,P)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0});}(t);});x.code='require("ajv/dist/runtime/uri").default';var T$1=/*#__PURE__*/Object.defineProperty({default:x},"__esModule",{value:!0}),R=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0,Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return P$1.KeywordCxt}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c$1._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c$1.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c$1.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c$1.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c$1.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c$1.CodeGen}});const r=c$1,s=(e,t)=>new RegExp(e,t);s.code="new RegExp";const a=["removeAdditional","useDefaults","coerceTypes"],o=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),n={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},i={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function d(e){var t,r,a,o,n,i,c,l,d,u,f,h,p,m,y,v,g,$,_,w,b,E,P,S,k;const N=e.strict,j=null===(t=e.code)||void 0===t?void 0:t.optimize,C=!0===j||void 0===j?1:j||0,O=null!==(a=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==a?a:s,x=null!==(o=e.uriResolver)&&void 0!==o?o:T$1.default;return {strictSchema:null===(i=null!==(n=e.strictSchema)&&void 0!==n?n:N)||void 0===i||i,strictNumbers:null===(l=null!==(c=e.strictNumbers)&&void 0!==c?c:N)||void 0===l||l,strictTypes:null!==(u=null!==(d=e.strictTypes)&&void 0!==d?d:N)&&void 0!==u?u:"log",strictTuples:null!==(h=null!==(f=e.strictTuples)&&void 0!==f?f:N)&&void 0!==h?h:"log",strictRequired:null!==(m=null!==(p=e.strictRequired)&&void 0!==p?p:N)&&void 0!==m&&m,code:e.code?{...e.code,optimize:C,regExp:O}:{optimize:C,regExp:O},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(_=e.inlineRefs)||void 0===_||_,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(b=e.addUsedSchema)||void 0===b||b,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(k=e.int32range)||void 0===k||k,uriResolver:x}}class u{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...d(e)};const{es5:t,lines:s}=this.opts.code;this.scope=new r.ValueScope({scope:{},prefixes:o,es5:t,lines:s}),this.logger=function(e){if(!1===e)return _;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const a=e.validateFormats;e.validateFormats=!1,this.RULES=(0, p$1.getRules)(),f.call(this,n,e,"NOT SUPPORTED"),f.call(this,i,e,"DEPRECATED","warn"),this._metaOpts=$.call(this),e.formats&&v.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&g.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),m.call(this),e.validateFormats=a;}_addVocabularies(){this.addKeyword("$async");}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let s=O$1;"id"===r&&(s={...O$1},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[r],!1);}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const s=r(t);return "$async"in r||(this.errors=r.errors),s}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return s.call(this,e,t);async function s(e,t){await a.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function a(e){e&&!this.getSchema(e)&&await s.call(this,{$ref:e},!0);}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof j$1.default))throw t;return n.call(this,t),await i.call(this,t.missingSchema),o.call(this,e)}}function n({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function i(e){const r=await c.call(this,e);this.refs[e]||await a.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t);}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e];}}}addSchema(e,t,r,s=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,s);return this}let a;if("object"==typeof e){const{schemaId:t}=this.opts;if(a=e[t],void 0!==a&&"string"!=typeof a)throw new Error(`schema ${t} must be string`)}return t=(0, E.normalizeId)(t||a),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,s,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return !0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const s=this.validate(r,e);if(!s&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e);}return s}getSchema(e){let t;for(;"string"==typeof(t=h.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,s=new C.SchemaEnv({schema:{},schemaId:r});if(t=C.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t;}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=h.call(this,e);return "object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0, E.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else {if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(b.call(this,r,t),!t)return (0, l$1.eachItem)(r,e=>S.call(this,e)),this;x.call(this,t);const s={...t,type:(0, y.getJSONTypes)(t.type),schemaType:(0, y.getJSONTypes)(t.schemaType)};return (0, l$1.eachItem)(r,0===s.type.length?e=>S.call(this,e,s):e=>s.type.forEach(t=>S.call(this,e,s,t))),this}getKeyword(e){const t=this.RULES.all[e];return "object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1);}return this}addFormat(e,t){return "string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const s of t){const t=s.split("/").slice(1);let a=e;for(const e of t)a=a[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:s}=t.definition,o=a[e];s&&o&&(a[e]=I(o));}}return e}_removeAllSchemas(e,t){for(const r in e){const s=e[r];t&&!t.test(r)||("string"==typeof s?delete e[r]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[r]));}}_addSchema(e,t,r,s=this.opts.validateSchema,a=this.opts.addUsedSchema){let o;const{schemaId:n}=this.opts;if("object"==typeof e)o=e[n];else {if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(void 0!==i)return i;r=(0, E.normalizeId)(o||r);const c=E.getSchemaRefs.call(this,e,r);return i=new C.SchemaEnv({schema:e,schemaId:n,meta:t,baseId:r,localRefs:c}),this._cache.set(i.schema,i),a&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=i),s&&this.validateSchema(e,!0),i}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):C.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{C.compileSchema.call(this,e);}finally{this.opts=t;}}}function f(e,t,r,s="error"){for(const a in e){const o=a;o in t&&this.logger[s](`${r}: option ${a}. ${e[o]}`);}}function h(e){return e=(0, E.normalizeId)(e),this.schemas[e]||this.refs[e]}function m(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t);}function v(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t);}}function g(e){if(Array.isArray(e))this.addVocabulary(e);else {this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r);}}}function $(){const e={...this.opts};for(const t of a)delete e[t];return e}t.default=u,u.ValidationError=k.default,u.MissingRefError=j$1.default;const _={log(){},warn(){},error(){}},w=/^[a-z_$][a-z0-9_$:-]*$/i;function b(e,t){const{RULES:r}=this;if((0, l$1.eachItem)(e,e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!w.test(e))throw new Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function S(e,t,r){var s;const a=null==t?void 0:t.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let n=a?o.post:o.rules.find(({type:e})=>e===r);if(n||(n={type:r,rules:[]},o.rules.push(n)),o.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0, y.getJSONTypes)(t.type),schemaType:(0, y.getJSONTypes)(t.schemaType)}};t.before?N.call(this,n,i,t.before):n.rules.push(i),o.all[e]=i,null===(s=t.implements)||void 0===s||s.forEach(e=>this.addKeyword(e));}function N(e,t,r){const s=e.rules.findIndex(e=>e.keyword===r);s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`));}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0));}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function I(e){return {anyOf:[e,R]}}}),I$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},"__esModule",{value:!0}),D$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:l,opts:d,self:u}=o,{root:f}=i;if(("#"===r||"#/"===r)&&n===f.baseId)return function(){if(i===f)return a(e,l,i,i.$async);const r=t.scopeValue("root",{ref:f});return a(e,c$1._`${r}.validate`,f,f.$async)}();const h=C.resolveRef.call(u,f,n,r);if(void 0===h)throw new j$1.default(o.opts.uriResolver,n,r);return h instanceof C.SchemaEnv?function(t){const r=s(e,t);a(e,r,t,t.$async);}(h):function(s){const a=t.scopeValue("schema",!0===d.code.source?{ref:s,code:(0, c$1.stringify)(s)}:{ref:s}),o=t.name("valid"),n=e.subschema({schema:s,dataTypes:[],schemaPath:c$1.nil,topSchemaRef:a,errSchemaPath:r},o);e.mergeEvaluated(n),e.ok(o);}(h)}};function s(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):c$1._`${r.scopeValue("wrapper",{ref:t})}.validate`}function a(e,t,r,s){const{gen:a,it:o}=e,{allErrors:n,schemaEnv:i,opts:d}=o,f=d.passContext?u$2.default.this:c$1.nil;function h(e){const t=c$1._`${e}.errors`;a.assign(u$2.default.vErrors,c$1._`${u$2.default.vErrors} === null ? ${t} : ${u$2.default.vErrors}.concat(${t})`),a.assign(u$2.default.errors,c$1._`${u$2.default.vErrors}.length`);}function p(e){var t;if(!o.opts.unevaluated)return;const s=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==o.props)if(s&&!s.dynamicProps)void 0!==s.props&&(o.props=l$1.mergeEvaluated.props(a,s.props,o.props));else {const t=a.var("props",c$1._`${e}.evaluated.props`);o.props=l$1.mergeEvaluated.props(a,t,o.props,c$1.Name);}if(!0!==o.items)if(s&&!s.dynamicItems)void 0!==s.items&&(o.items=l$1.mergeEvaluated.items(a,s.items,o.items));else {const t=a.var("items",c$1._`${e}.evaluated.items`);o.items=l$1.mergeEvaluated.items(a,t,o.items,c$1.Name);}}s?function(){if(!i.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try(()=>{a.code(c$1._`await ${(0, g$1.callValidateCode)(e,t,f)}`),p(t),n||a.assign(r,!0);},e=>{a.if(c$1._`!(${e} instanceof ${o.ValidationError})`,()=>a.throw(e)),h(e),n||a.assign(r,!1);}),e.ok(r);}():e.result((0, g$1.callValidateCode)(e,t,f),()=>p(t),()=>h(t));}t.getValidate=s,t.callRef=a,t.default=r;}),A$1=/*#__PURE__*/Object.defineProperty({default:["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",I$1.default,D$1.default]},"__esModule",{value:!0});const M$1=c$1.operators,V$1={maximum:{okStr:"<=",ok:M$1.LTE,fail:M$1.GT},minimum:{okStr:">=",ok:M$1.GTE,fail:M$1.LT},exclusiveMaximum:{okStr:"<",ok:M$1.LT,fail:M$1.GTE},exclusiveMinimum:{okStr:">",ok:M$1.GT,fail:M$1.LTE}},F$1={message:({keyword:e,schemaCode:t})=>c$1.str`must be ${V$1[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>c$1._`{comparison: ${V$1[e].okStr}, limit: ${t}}`},U$1={keyword:Object.keys(V$1),type:"number",schemaType:"number",$data:!0,error:F$1,code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(c$1._`${r} ${V$1[t].fail} ${s} || isNaN(${r})`);}};var q=/*#__PURE__*/Object.defineProperty({default:U$1},"__esModule",{value:!0}),z=/*#__PURE__*/Object.defineProperty({default:{keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>c$1.str`must be multiple of ${e}`,params:({schemaCode:e})=>c$1._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:s,it:a}=e,o=a.opts.multipleOfPrecision,n=t.let("res"),i=o?c$1._`Math.abs(Math.round(${n}) - ${n}) > 1e-${o}`:c$1._`${n} !== parseInt(${n})`;e.fail$data(c$1._`(${s} === 0 || (${n} = ${r}/${s}, ${i}))`);}}},"__esModule",{value:!0});function K(e){const t=e.length;let r,s=0,a=0;for(;a<t;)s++,r=e.charCodeAt(a++),r>=55296&&r<=56319&&a<t&&(r=e.charCodeAt(a),56320==(64512&r)&&a++);return s}var L=K;K.code='require("ajv/dist/runtime/ucs2length").default';var H=/*#__PURE__*/Object.defineProperty({default:L},"__esModule",{value:!0}),G$1=/*#__PURE__*/Object.defineProperty({default:{keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>c$1.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>c$1._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,o="maxLength"===t?c$1.operators.GT:c$1.operators.LT,n=!1===a.opts.unicode?c$1._`${r}.length`:c$1._`${(0, l$1.useFunc)(e.gen,H.default)}(${r})`;e.fail$data(c$1._`${n} ${o} ${s}`);}}},"__esModule",{value:!0}),J$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>c$1.str`must match pattern "${e}"`,params:({schemaCode:e})=>c$1._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:a,it:o}=e,n=r?c$1._`(new RegExp(${a}, ${o.opts.unicodeRegExp?"u":""}))`:(0, g$1.usePattern)(e,s);e.fail$data(c$1._`!${n}.test(${t})`);}}},"__esModule",{value:!0}),B=/*#__PURE__*/Object.defineProperty({default:{keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>c$1.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>c$1._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(c$1._`Object.keys(${r}).length ${"maxProperties"===t?c$1.operators.GT:c$1.operators.LT} ${s}`);}}},"__esModule",{value:!0}),W$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>c$1.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>c$1._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:o,it:n}=e,{opts:i}=n;if(!o&&0===r.length)return;const d=r.length>=i.loopRequired;if(n.allErrors?function(){if(d||o)e.block$data(c$1.nil,u);else for(const t of r)(0, g$1.checkReportMissingProp)(e,t);}():function(){const n=t.let("missing");if(d||o){const r=t.let("valid",!0);e.block$data(r,()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,()=>{t.assign(o,(0, g$1.propertyInData)(t,a,r,i.ownProperties)),t.if((0, c$1.not)(o),()=>{e.error(),t.break();});},c$1.nil);}(n,r)),e.ok(r);}else t.if((0, g$1.checkMissingProp)(e,r,n)),(0, g$1.reportMissingProp)(e,n),t.else();}(),i.strictRequired){const t=e.parentSchema.properties,{definedProperties:s}=e.it;for(const e of r)void 0!==(null==t?void 0:t[e])||s.has(e)||(0, l$1.checkStrictMode)(n,`required property "${e}" is not defined at "${n.schemaEnv.baseId+n.errSchemaPath}" (strictRequired)`,n.opts.strictRequired);}function u(){t.forOf("prop",s,r=>{e.setParams({missingProperty:r}),t.if((0, g$1.noPropertyInData)(t,a,r,i.ownProperties),()=>e.error());});}}}},"__esModule",{value:!0}),Q$1=/*#__PURE__*/Object.defineProperty({default:{keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>c$1.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>c$1._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(c$1._`${r}.length ${"maxItems"===t?c$1.operators.GT:c$1.operators.LT} ${s}`);}}},"__esModule",{value:!0});w$1.code='require("ajv/dist/runtime/equal").default';var Z$1=/*#__PURE__*/Object.defineProperty({default:w$1},"__esModule",{value:!0}),Y$1=/*#__PURE__*/Object.defineProperty({default:[q.default,z.default,G$1.default,J$1.default,B.default,W$1.default,Q$1.default,Object.defineProperty({default:{keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>c$1.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>c$1._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:s,schema:a,parentSchema:o,schemaCode:n,it:i}=e;if(!s&&!a)return;const d=t.let("valid"),u=o.items?(0, y.getSchemaTypes)(o.items):[];function f(s,a){const o=t.name("item"),n=(0, y.checkDataTypes)(u,o,i.opts.strictNumbers,y.DataType.Wrong),l=t.const("indices",c$1._`{}`);t.for(c$1._`;${s}--;`,()=>{t.let(o,c$1._`${r}[${s}]`),t.if(n,c$1._`continue`),u.length>1&&t.if(c$1._`typeof ${o} == "string"`,c$1._`${o} += "_"`),t.if(c$1._`typeof ${l}[${o}] == "number"`,()=>{t.assign(a,c$1._`${l}[${o}]`),e.error(),t.assign(d,!1).break();}).code(c$1._`${l}[${o}] = ${s}`);});}function h(s,a){const o=(0, l$1.useFunc)(t,Z$1.default),n=t.name("outer");t.label(n).for(c$1._`;${s}--;`,()=>t.for(c$1._`${a} = ${s}; ${a}--;`,()=>t.if(c$1._`${o}(${r}[${s}], ${r}[${a}])`,()=>{e.error(),t.assign(d,!1).break(n);})));}e.block$data(d,function(){const s=t.let("i",c$1._`${r}.length`),a=t.let("j");e.setParams({i:s,j:a}),t.assign(d,!0),t.if(c$1._`${s} > 1`,()=>(u.length>0&&!u.some(e=>"object"===e||"array"===e)?f:h)(s,a));},c$1._`${n} === false`),e.ok(d);}}},"__esModule",{value:!0}).default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Object.defineProperty({default:{keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>c$1._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:o}=e;s||o&&"object"==typeof o?e.fail$data(c$1._`!${(0, l$1.useFunc)(t,Z$1.default)}(${r}, ${a})`):e.fail(c$1._`${o} !== ${r}`);}}},"__esModule",{value:!0}).default,Object.defineProperty({default:{keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>c$1._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:o,it:n}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");let i;const d=()=>null!=i?i:i=(0, l$1.useFunc)(t,Z$1.default);let u;if(a.length>=n.opts.loopEnum||s)u=t.let("valid"),e.block$data(u,function(){t.assign(u,!1),t.forOf("v",o,e=>t.if(c$1._`${d()}(${r}, ${e})`,()=>t.assign(u,!0).break()));});else {if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",o);u=(0, c$1.or)(...a.map((t,s)=>function(e,t){const s=a[t];return "object"==typeof s&&null!==s?c$1._`${d()}(${r}, ${e}[${t}])`:c$1._`${r} === ${s}`}(e,s)));}e.pass(u);}}},"__esModule",{value:!0}).default]},"__esModule",{value:!0}),X$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>c$1.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c$1._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:a}=t;Array.isArray(a)?s(e,a):(0, l$1.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');}};function s(e,t){const{gen:r,schema:s,data:a,keyword:o,it:n}=e;n.items=!0;const i=r.const("len",c$1._`${a}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(c$1._`${i} <= ${t.length}`);else if("object"==typeof s&&!(0, l$1.alwaysValidSchema)(n,s)){const s=r.var("valid",c$1._`${i} <= ${t.length}`);r.if((0, c$1.not)(s),()=>function(s){r.forRange("i",t.length,i,t=>{e.subschema({keyword:o,dataProp:t,dataPropType:l$1.Type.Num},s),n.allErrors||r.if((0, c$1.not)(s),()=>r.break());});}(s)),e.ok(s);}}t.validateAdditionalItems=s,t.default=r;}),ee$1=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,(0, l$1.alwaysValidSchema)(r,t)||e.ok((0, g$1.validateArray)(e));}};function s(e,t,r=e.schema){const{gen:s,parentSchema:a,data:o,keyword:n,it:i}=e;!function(e){const{opts:s,errSchemaPath:a}=i,o=r.length;s.strictTuples&&(o!==e.minItems||o!==e.maxItems&&!1!==e[t])&&(0, l$1.checkStrictMode)(i,`"${n}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`,s.strictTuples);}(a),i.opts.unevaluated&&r.length&&!0!==i.items&&(i.items=l$1.mergeEvaluated.items(s,r.length,i.items));const d=s.name("valid"),u=s.const("len",c$1._`${o}.length`);r.forEach((t,r)=>{(0, l$1.alwaysValidSchema)(i,t)||(s.if(c$1._`${u} > ${r}`,()=>e.subschema({keyword:n,schemaProp:r,dataProp:r},d)),e.ok(d));});}t.validateTuple=s,t.default=r;}),te=/*#__PURE__*/Object.defineProperty({default:{keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0, ee$1.validateTuple)(e,"items")}},"__esModule",{value:!0}),re$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>c$1.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c$1._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:s}=e,{prefixItems:a}=r;s.items=!0,(0, l$1.alwaysValidSchema)(s,t)||(a?(0, X$1.validateAdditionalItems)(e,a):e.ok((0, g$1.validateArray)(e)));}}},"__esModule",{value:!0}),se$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?c$1.str`must contain at least ${e} valid item(s)`:c$1.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?c$1._`{minContains: ${e}}`:c$1._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:a,it:o}=e;let n,i;const{minContains:d,maxContains:u}=s;o.opts.next?(n=void 0===d?1:d,i=u):n=1;const f=t.const("len",c$1._`${a}.length`);if(e.setParams({min:n,max:i}),void 0===i&&0===n)return void(0, l$1.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==i&&n>i)return (0, l$1.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0, l$1.alwaysValidSchema)(o,r)){let t=c$1._`${f} >= ${n}`;return void 0!==i&&(t=c$1._`${t} && ${f} <= ${i}`),void e.pass(t)}o.items=!0;const h=t.name("valid");function p(){const e=t.name("_valid"),r=t.let("count",0);m(e,()=>t.if(e,()=>function(e){t.code(c$1._`${e}++`),void 0===i?t.if(c$1._`${e} >= ${n}`,()=>t.assign(h,!0).break()):(t.if(c$1._`${e} > ${i}`,()=>t.assign(h,!1).break()),1===n?t.assign(h,!0):t.if(c$1._`${e} >= ${n}`,()=>t.assign(h,!0)));}(r)));}function m(r,s){t.forRange("i",0,f,t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:l$1.Type.Num,compositeRule:!0},r),s();});}void 0===i&&1===n?m(h,()=>t.if(h,()=>t.break())):0===n?(t.let(h,!0),void 0!==i&&t.if(c$1._`${a}.length > 0`,p)):(t.let(h,!1),p()),e.result(h,()=>e.reset());}}},"__esModule",{value:!0}),ae=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0,t.error={message:({params:{property:e,depsCount:t,deps:r}})=>c$1.str`must have ${1===t?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>c$1._`{property: ${e},
44454
+ function s(){return (s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s]);}return e}).apply(this,arguments)}function a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function o(e){var t={exports:{}};return e(t,t.exports),t.exports}var n=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class s extends r{constructor(e){if(super(),!t.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}}}t.Name=s;class a extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e;}toString(){return this.str}emptyStr(){if(this._items.length>1)return !1;const e=this._items[0];return ""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof s&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function o(e,...t){const r=[e[0]];let s=0;for(;s<t.length;)c(r,t[s]),r.push(e[++s]);return new a(r)}t._Code=a,t.nil=new a(""),t._=o;const n=new a("+");function i(e,...t){const r=[d(e[0])];let s=0;for(;s<t.length;)r.push(n),c(r,t[s]),r.push(n,d(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===n){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+";}t++;}}(r),new a(r)}function c(e,t){var r;t instanceof a?e.push(...t._items):e.push(t instanceof s?t:"number"==typeof(r=t)||"boolean"==typeof r||null===r?r:d(Array.isArray(r)?r.join(","):r));}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof s||'"'!==e[e.length-1])return;return "string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return "string"!=typeof t||'"'!==t[0]||e instanceof s?void 0:`"${e}${t.slice(1)}`}function d(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=i,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},t.stringify=function(e){return new a(d(e))},t.safeStringify=d,t.getProperty=function(e){return "string"==typeof e&&t.IDENTIFIER.test(e)?new a(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new a(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new a(e.toString())};}),i=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;class r extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value;}}var s;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed";}(s=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t;}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return `${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.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}}}t.Scope=a;class o extends n.Name{constructor(e,t){super(t),this.prefix=e;}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`;}}t.ValueScopeName=o;const i=n._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i:n.nil};}get(){return this._scope}name(e){return new o(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e),{prefix:a}=s,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let n=this._values[a];if(n){const e=n.get(o);if(e)return e}else n=this._values[a]=new Map;n.set(o,s);const i=this._scope[a]||(this._scope[a]=[]),c=i.length;return i[c]=t.ref,s.setValue(t,{property:a,itemIndex:c}),s}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`})}scopeCode(e=this._values,t,r){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,r)}_reduceValues(e,a,o={},i){let c=n.nil;for(const l in e){const d=e[l];if(!d)continue;const u=o[l]=o[l]||new Map;d.forEach(e=>{if(u.has(e))return;u.set(e,s.Started);let o=a(e);if(o)c=n._`${c}${this.opts.es5?t.varKinds.var:t.varKinds.const} ${e} = ${o};${this.opts._n}`;else {if(!(o=null==i?void 0:i(e)))throw new r(e);c=n._`${c}${o}${this.opts._n}`;}u.set(e,s.Completed);});}return c}};}),c=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var r=n;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}});var s=i;Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class o extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r;}render({es5:e,_n:t}){return `${e?i.varKinds.var:this.varKind} ${this.name}${void 0===this.rhs?"":` = ${this.rhs}`};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=O(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r;}render({_n:e}){return `${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=O(this.rhs,e,t),this}get names(){return C(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class l extends c{constructor(e,t,r,s){super(e,r,s),this.op=t;}render({_n:e}){return `${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends a{constructor(e){super(),this.label=e,this.names={};}render({_n:e}){return `${this.label}:`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={};}render({_n:e}){return `break${this.label?` ${this.label}`:""};`+e}}class f extends a{constructor(e){super(),this.error=e;}render({_n:e}){return `throw ${this.error};`+e}get names(){return this.error.names}}class h extends a{constructor(e){super(),this.code=e;}render({_n:e}){return `${this.code};`+e}optimizeNodes(){return `${this.code}`?this:void 0}optimizeNames(e,t){return this.code=O(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class p extends a{constructor(e=[]){super(),this.nodes=e;}render(e){return this.nodes.reduce((t,r)=>t+r.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1);}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let s=r.length;for(;s--;){const a=r[s];a.optimizeNames(e,t)||(x(e,a.names),r.splice(s,1));}return r.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>j(e,t.names),{})}}class m extends p{render(e){return "{"+e._n+super.render(e)+"}"+e._n}}class y extends p{}class v extends m{}v.kind="else";class g extends m{constructor(e,t){super(t),this.condition=e;}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e;}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(T(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=O(this.condition,e,t),this}get names(){const e=super.names;return C(e,this.condition),this.else&&j(e,this.else.names),e}}g.kind="if";class $ extends m{}$.kind="for";class _ extends ${constructor(e){super(),this.iteration=e;}render(e){return `for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=O(this.iteration,e,t),this}get names(){return j(super.names,this.iteration.names)}}class w extends ${constructor(e,t,r,s){super(),this.varKind=e,this.name=t,this.from=r,this.to=s;}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:s,to:a}=this;return `for(${t} ${r}=${s}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){const e=C(super.names,this.from);return C(e,this.to)}}class b extends ${constructor(e,t,r,s){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=s;}render(e){return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=O(this.iterable,e,t),this}get names(){return j(super.names,this.iterable.names)}}class E extends m{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r;}render(e){return `${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}E.kind="func";class P extends p{render(e){return "return "+super.render(e)}}P.kind="return";class S extends m{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,s;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(s=this.finally)||void 0===s||s.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&j(e,this.catch.names),this.finally&&j(e,this.finally.names),e}}class k extends m{constructor(e){super(),this.error=e;}render(e){return `catch(${this.error})`+super.render(e)}}k.kind="catch";class N extends m{render(e){return "finally"+super.render(e)}}function j(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function C(e,t){return t instanceof n._CodeOrName?j(e,t.names):e}function O(e,t,r){return e instanceof n.Name?a(e):(s=e)instanceof n._Code&&s._items.some(e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str])?new n._Code(e._items.reduce((e,t)=>(t instanceof n.Name&&(t=a(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e),[])):e;var s;function a(e){const s=r[e.str];return void 0===s||1!==t[e.str]?e:(delete t[e.str],s)}}function x(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0);}function T(e){return "boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${A(e)}`}N.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new y];}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return (this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){const a=this._scope.toName(t);return void 0!==r&&s&&(this._constants[a.str]=r),this._leafNode(new o(e,a,r)),a}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return "function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,s]of e)t.length>1&&t.push(","),t.push(r),(r!==s||this.opts.es5)&&(t.push(":"),(0, n.addCodeArg)(t,s));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new _(e),t)}forRange(e,t,r,s,a=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const o=this._scope.toName(e);return this._for(new w(a,o,t,r),()=>s(o))}forOf(e,t,r,s=i.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,t=>{this.var(a,n._`${e}[${t}]`),r(a);})}return this._for(new b("of",s,a,t),()=>r(a))}forIn(e,t,r,s=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new b("in",s,a,t),()=>r(a))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new P;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(P)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new S;if(this._blockNode(s),this.code(e),t){const e=this.name("e");this._currNode=s.catch=new k(e),t(e);}return r&&(this._currNode=s.finally=new N,this.code(r)),this._endBlockNode(k,N)}throw(e){return this._leafNode(new f(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,s){return this._blockNode(new E(e,t,r)),s&&this.code(s).endFunc(),this}endFunc(){return this._endBlockNode(E)}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,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e;}},t.not=T;const R=D(t.operators.AND);t.and=function(...e){return e.reduce(R)};const I=D(t.operators.OR);function D(e){return (t,r)=>t===n.nil?r:r===n.nil?t:n._`${A(t)} ${e} ${A(r)}`}function A(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(I)};}),l=o(function(e,t){function r(e,t=e.schema){const{opts:r,self:s}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const a=s.RULES.keywords;for(const r in t)a[r]||h(e,`unknown keyword: "${r}"`);}function s(e,t){if("boolean"==typeof e)return !e;for(const r in e)if(t[r])return !0;return !1}function a(e){return "number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function o(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:s}){return (a,o,n,i)=>{const l=void 0===n?o:n instanceof c.Name?(o instanceof c.Name?e(a,o,n):t(a,o,n),n):o instanceof c.Name?(t(a,n,o),o):r(o,n);return i!==c.Name||l instanceof c.Name?l:s(a,l)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",c._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach(r=>e.assign(c._`${t}${(0, c.getProperty)(r)}`,!0));}Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0,t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return "boolean"==typeof t?t:0===Object.keys(t).length||(r(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=r,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return !e;for(const r in e)if("$ref"!==r&&t.all[r])return !0;return !1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,s,a){if(!a){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return c._`${r}`}return c._`${e}${t}${(0, c.getProperty)(s)}`},t.unescapeFragment=function(e){return o(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=o,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e);},t.mergeEvaluated={props:i({mergeNames:(e,t,r)=>e.if(c._`${r} !== true && ${t} !== undefined`,()=>{e.if(c._`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,c._`${r} || {}`).code(c._`Object.assign(${r}, ${t})`));}),mergeToName:(e,t,r)=>e.if(c._`${r} !== true`,()=>{!0===t?e.assign(r,!0):(e.assign(r,c._`${r} || {}`),d(e,r,t));}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:i({mergeNames:(e,t,r)=>e.if(c._`${r} !== true && ${t} !== undefined`,()=>e.assign(r,c._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if(c._`${r} !== true`,()=>e.assign(r,!0===t||c._`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=d;const u={};var f;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t);}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:u[t.code]||(u[t.code]=new n._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str";}(f=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof c.Name){const s=t===f.Num;return r?s?c._`"[" + ${e} + "]"`:c._`"['" + ${e} + "']"`:s?c._`"/" + ${e}`:c._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0, c.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=h;});const d={data:new c.Name("data"),valCxt:new c.Name("valCxt"),instancePath:new c.Name("instancePath"),parentData:new c.Name("parentData"),parentDataProperty:new c.Name("parentDataProperty"),rootData:new c.Name("rootData"),dynamicAnchors:new c.Name("dynamicAnchors"),vErrors:new c.Name("vErrors"),errors:new c.Name("errors"),this:new c.Name("this"),self:new c.Name("self"),scope:new c.Name("scope"),json:new c.Name("json"),jsonPos:new c.Name("jsonPos"),jsonLen:new c.Name("jsonLen"),jsonPart:new c.Name("jsonPart")};var u=/*#__PURE__*/Object.defineProperty({default:d},"__esModule",{value:!0}),f=o(function(e,t){function r(e,t){const r=e.const("err",t);e.if(c._`${u.default.vErrors} === null`,()=>e.assign(u.default.vErrors,c._`[${r}]`),c._`${u.default.vErrors}.push(${r})`),e.code(c._`${u.default.errors}++`);}function s(e,t){const{gen:r,validateName:s,schemaEnv:a}=e;a.$async?r.throw(c._`new ${e.ValidationError}(${t})`):(r.assign(c._`${s}.errors`,t),r.return(!1));}Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0,t.keywordError={message:({keyword:e})=>c.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?c.str`"${e}" keyword must be ${t} ($data)`:c.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,a=t.keywordError,n,i){const{it:l}=e,{gen:d,compositeRule:u,allErrors:f}=l,h=o(e,a,n);(null!=i?i:u||f)?r(d,h):s(l,c._`[${h}]`);},t.reportExtraError=function(e,a=t.keywordError,n){const{it:i}=e,{gen:c,compositeRule:l,allErrors:d}=i;r(c,o(e,a,n)),l||d||s(i,u.default.vErrors);},t.resetErrorsCount=function(e,t){e.assign(u.default.errors,t),e.if(c._`${u.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(c._`${u.default.vErrors}.length`,t),()=>e.assign(u.default.vErrors,null)));},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:s,errsCount:a,it:o}){if(void 0===a)throw new Error("ajv implementation error");const n=e.name("err");e.forRange("i",a,u.default.errors,a=>{e.const(n,c._`${u.default.vErrors}[${a}]`),e.if(c._`${n}.instancePath === undefined`,()=>e.assign(c._`${n}.instancePath`,(0, c.strConcat)(u.default.instancePath,o.errorPath))),e.assign(c._`${n}.schemaPath`,c.str`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign(c._`${n}.schema`,r),e.assign(c._`${n}.data`,s));});};const a={keyword:new c.Name("keyword"),schemaPath:new c.Name("schemaPath"),params:new c.Name("params"),propertyName:new c.Name("propertyName"),message:new c.Name("message"),schema:new c.Name("schema"),parentSchema:new c.Name("parentSchema")};function o(e,t,r){const{createErrors:s}=e.it;return !1===s?c._`{}`:function(e,t,r={}){const{gen:s,it:o}=e,l=[n(o,r),i(e,r)];return function(e,{params:t,message:r},s){const{keyword:o,data:n,schemaValue:i,it:l}=e,{opts:d,propertyName:f,topSchemaRef:h,schemaPath:p}=l;s.push([a.keyword,o],[a.params,"function"==typeof t?t(e):t||c._`{}`]),d.messages&&s.push([a.message,"function"==typeof r?r(e):r]),d.verbose&&s.push([a.schema,i],[a.parentSchema,c._`${h}${p}`],[u.default.data,n]),f&&s.push([a.propertyName,f]);}(e,t,l),s.object(...l)}(e,t,r)}function n({errorPath:e},{instancePath:t}){const r=t?c.str`${e}${(0, l.getErrorPath)(t,l.Type.Str)}`:e;return [u.default.instancePath,(0, c.strConcat)(u.default.instancePath,r)]}function i({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:s}){let o=s?t:c.str`${t}/${e}`;return r&&(o=c.str`${o}${(0, l.getErrorPath)(r,l.Type.Str)}`),[a.schemaPath,o]}}),h=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const r={message:"boolean schema is false"};function s(e,t){const{gen:s,data:a}=e;(0, f.reportError)({gen:s,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e},r,void 0,t);}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:a}=e;!1===r?s(e,!1):"object"==typeof r&&!0===r.$async?t.return(u.default.data):(t.assign(c._`${a}.errors`,null),t.return(!0));},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:a}=e;!1===a?(r.var(t,!1),s(e)):r.var(t,!0);};}),p=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return "string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return {types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}};}),m=o(function(e,t){function r(e,t){return t.rules.some(t=>s(e,t))}function s(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some(t=>void 0!==e[t]))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},s){const a=t.RULES.types[s];return a&&!0!==a&&r(e,a)},t.shouldUseGroup=r,t.shouldUseRule=s;}),y=o(function(e,t){var r;function s(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(p.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0,function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong";}(r=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=s(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else {if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null");}return t},t.getJSONTypes=s,t.coerceAndCheckDataType=function(e,t){const{gen:s,data:o,opts:i}=e,l=function(e,t){return t?e.filter(e=>a.has(e)||"array"===t&&"array"===e):[]}(t,i.coerceTypes),u=t.length>0&&!(0===l.length&&1===t.length&&(0, m.schemaHasRulesForType)(e,t[0]));if(u){const u=n(t,o,i.strictNumbers,r.Wrong);s.if(u,()=>{l.length?function(e,t,r){const{gen:s,data:o,opts:i}=e,l=s.let("dataType",c._`typeof ${o}`),u=s.let("coerced",c._`undefined`);"array"===i.coerceTypes&&s.if(c._`${l} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,c._`${o}[0]`).assign(l,c._`typeof ${o}`).if(n(t,o,i.strictNumbers),()=>s.assign(u,o))),s.if(c._`${u} !== undefined`);for(const e of r)(a.has(e)||"array"===e&&"array"===i.coerceTypes)&&f(e);function f(e){switch(e){case"string":return void s.elseIf(c._`${l} == "number" || ${l} == "boolean"`).assign(u,c._`"" + ${o}`).elseIf(c._`${o} === null`).assign(u,c._`""`);case"number":return void s.elseIf(c._`${l} == "boolean" || ${o} === null
44455
+ || (${l} == "string" && ${o} && ${o} == +${o})`).assign(u,c._`+${o}`);case"integer":return void s.elseIf(c._`${l} === "boolean" || ${o} === null
44456
+ || (${l} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(u,c._`+${o}`);case"boolean":return void s.elseIf(c._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(u,!1).elseIf(c._`${o} === "true" || ${o} === 1`).assign(u,!0);case"null":return s.elseIf(c._`${o} === "" || ${o} === 0 || ${o} === false`),void s.assign(u,null);case"array":s.elseIf(c._`${l} === "string" || ${l} === "number"
44457
+ || ${l} === "boolean" || ${o} === null`).assign(u,c._`[${o}]`);}}s.else(),d(e),s.endIf(),s.if(c._`${u} !== undefined`,()=>{s.assign(o,u),function({gen:e,parentData:t,parentDataProperty:r},s){e.if(c._`${t} !== undefined`,()=>e.assign(c._`${t}[${r}]`,s));}(e,u);});}(e,t,l):d(e);});}return u};const a=new Set(["string","number","integer","boolean","null"]);function o(e,t,s,a=r.Correct){const o=a===r.Correct?c.operators.EQ:c.operators.NEQ;let n;switch(e){case"null":return c._`${t} ${o} null`;case"array":n=c._`Array.isArray(${t})`;break;case"object":n=c._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":n=i(c._`!(${t} % 1) && !isNaN(${t})`);break;case"number":n=i();break;default:return c._`typeof ${t} ${o} ${e}`}return a===r.Correct?n:(0, c.not)(n);function i(e=c.nil){return (0, c.and)(c._`typeof ${t} == "number"`,e,s?c._`isFinite(${t})`:c.nil)}}function n(e,t,r,s){if(1===e.length)return o(e[0],t,r,s);let a;const n=(0, l.toHash)(e);if(n.array&&n.object){const e=c._`typeof ${t} != "object"`;a=n.null?e:c._`!${t} || ${e}`,delete n.null,delete n.array,delete n.object;}else a=c.nil;n.number&&delete n.integer;for(const e in n)a=(0, c.and)(a,o(e,t,r,s));return a}t.checkDataType=o,t.checkDataTypes=n;const i={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?c._`{type: ${e}}`:c._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:r,schema:s}=e,a=(0, l.schemaRefOrVal)(e,s,"type");return {gen:t,keyword:"type",data:r,schema:s.type,schemaCode:a,schemaValue:a,parentSchema:s,params:{},it:e}}(e);(0, f.reportError)(t,i);}t.reportTypeError=d;}),v=o(function(e,t){function r(e,t,r){const{gen:s,compositeRule:a,data:o,opts:n}=e;if(void 0===r)return;const i=c._`${o}${(0, c.getProperty)(t)}`;if(a)return void(0, l.checkStrictMode)(e,`default is ignored for: ${i}`);let d=c._`${i} === undefined`;"empty"===n.useDefaults&&(d=c._`${d} || ${i} === null || ${i} === ""`),s.if(d,c._`${i} = ${(0, c.stringify)(r)}`);}Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0,t.assignDefaults=function(e,t){const{properties:s,items:a}=e.schema;if("object"===t&&s)for(const t in s)r(e,t,s[t].default);else "array"===t&&Array.isArray(a)&&a.forEach((t,s)=>r(e,s,t.default));};}),g=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const r=l;function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:c._`Object.prototype.hasOwnProperty`})}function a(e,t,r){return c._`${s(e)}.call(${t}, ${r})`}function o(e,t,r,s){const o=c._`${t}${(0, c.getProperty)(r)} === undefined`;return s?(0, c.or)(o,(0, c.not)(a(e,t,r))):o}function n(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:s,it:a}=e;r.if(o(r,s,t,a.opts.ownProperties),()=>{e.setParams({missingProperty:c._`${t}`},!0),e.error();});},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},s,a){return (0, c.or)(...s.map(s=>(0, c.and)(o(e,t,s,r.ownProperties),c._`${a} = ${s}`)))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error();},t.hasPropFunc=s,t.isOwnProperty=a,t.propertyInData=function(e,t,r,s){const o=c._`${t}${(0, c.getProperty)(r)} !== undefined`;return s?c._`${o} && ${a(e,t,r)}`:o},t.noPropertyInData=o,t.allSchemaProperties=n,t.schemaProperties=function(e,t){return n(t).filter(r=>!(0, l.alwaysValidSchema)(e,t[r]))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:s,schemaPath:a,errorPath:o},it:n},i,l,d){const f=d?c._`${e}, ${t}, ${s}${a}`:t,h=[[u.default.instancePath,(0, c.strConcat)(u.default.instancePath,o)],[u.default.parentData,n.parentData],[u.default.parentDataProperty,n.parentDataProperty],[u.default.rootData,u.default.rootData]];n.opts.dynamicRef&&h.push([u.default.dynamicAnchors,u.default.dynamicAnchors]);const p=c._`${f}, ${r.object(...h)}`;return l!==c.nil?c._`${i}.call(${l}, ${p})`:c._`${i}(${p})`};const i=c._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},s){const a=t.unicodeRegExp?"u":"",{regExp:o}=t.code,n=o(s,a);return e.scopeValue("pattern",{key:n.toString(),ref:n,code:c._`${"new RegExp"===o.code?i:(0, r.useFunc)(e,o)}(${s}, ${a})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:s,it:a}=e,o=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return n(()=>t.assign(e,!1)),e}return t.var(o,!0),n(()=>t.break()),o;function n(a){const n=t.const("len",c._`${r}.length`);t.forRange("i",0,n,r=>{e.subschema({keyword:s,dataProp:r,dataPropType:l.Type.Num},o),t.if((0, c.not)(o),a);});}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:s,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(e=>(0, l.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;const o=t.let("valid",!1),n=t.name("_valid");t.block(()=>r.forEach((r,a)=>{const i=e.subschema({keyword:s,schemaProp:a,compositeRule:!0},n);t.assign(o,c._`${o} || ${n}`),e.mergeValidEvaluated(i,n)||t.if((0, c.not)(o));})),e.result(o,()=>e.reset(),()=>e.error(!0));};}),$=o(function(e,t){function r(e){const{gen:t,data:r,it:s}=e;t.if(s.parentData,()=>t.assign(r,c._`${s.parentData}[${s.parentDataProperty}]`));}function s(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0, c.stringify)(r)})}Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0,t.macroKeywordCode=function(e,t){const{gen:r,keyword:a,schema:o,parentSchema:n,it:i}=e,l=t.macro.call(i.self,o,n,i),d=s(r,a,l);!1!==i.opts.validateSchema&&i.self.validateSchema(l,!0);const u=r.name("valid");e.subschema({schema:l,schemaPath:c.nil,errSchemaPath:`${i.errSchemaPath}/${a}`,topSchemaRef:d,compositeRule:!0},u),e.pass(u,()=>e.error(!0));},t.funcKeywordCode=function(e,t){var a;const{gen:o,keyword:n,schema:i,parentSchema:l,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const p=!d&&t.compile?t.compile.call(h.self,i,l,h):t.validate,m=s(o,n,p),y=o.let("valid");function v(r=(t.async?c._`await `:c.nil)){o.assign(y,c._`${r}${(0, g.callValidateCode)(e,m,h.opts.passContext?u.default.this:u.default.self,!("compile"in t&&!d||!1===t.schema))}`,t.modifying);}function $(e){var r;o.if((0, c.not)(null!==(r=t.valid)&&void 0!==r?r:y),e);}e.block$data(y,function(){if(!1===t.errors)v(),t.modifying&&r(e),$(()=>e.error());else {const s=t.async?function(){const e=o.let("ruleErrs",null);return o.try(()=>v(c._`await `),t=>o.assign(y,!1).if(c._`${t} instanceof ${h.ValidationError}`,()=>o.assign(e,c._`${t}.errors`),()=>o.throw(t))),e}():function(){const e=c._`${m}.errors`;return o.assign(e,null),v(c.nil),e}();t.modifying&&r(e),$(()=>function(e,t){const{gen:r}=e;r.if(c._`Array.isArray(${t})`,()=>{r.assign(u.default.vErrors,c._`${u.default.vErrors} === null ? ${t} : ${u.default.vErrors}.concat(${t})`).assign(u.default.errors,c._`${u.default.vErrors}.length`),(0, f.extendErrors)(e);},()=>e.error());}(e,s));}}),e.ok(null!==(a=t.valid)&&void 0!==a?a:y);},t.validSchemaType=function(e,t,r=!1){return !t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e)},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:s},a,o){if(Array.isArray(a.keyword)?!a.keyword.includes(o):a.keyword!==o)throw new Error("ajv implementation error");const n=a.dependencies;if(null==n?void 0:n.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${o}: ${n.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${s}": `+r.errorsText(a.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e);}};}),_=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0,t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:s,schemaPath:a,errSchemaPath:o,topSchemaRef:n}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===r?{schema:s,schemaPath:c._`${e.schemaPath}${(0, c.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[r],schemaPath:c._`${e.schemaPath}${(0, c.getProperty)(t)}${(0, c.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0, l.escapeFragment)(r)}`}}if(void 0!==s){if(void 0===a||void 0===o||void 0===n)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return {schema:s,schemaPath:a,topSchemaRef:n,errSchemaPath:o}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:s,data:a,dataTypes:o,propertyName:n}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:i}=t;if(void 0!==r){const{errorPath:a,dataPathArr:o,opts:n}=t;d(i.let("data",c._`${t.data}${(0, c.getProperty)(r)}`,!0)),e.errorPath=c.str`${a}${(0, l.getErrorPath)(r,s,n.jsPropertySyntax)}`,e.parentDataProperty=c._`${r}`,e.dataPathArr=[...o,e.parentDataProperty];}function d(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r];}void 0!==a&&(d(a instanceof c.Name?a:i.let("data",a,!0)),void 0!==n&&(e.propertyName=n)),o&&(e.dataTypes=o);},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:a,allErrors:o}){void 0!==s&&(e.compositeRule=s),void 0!==a&&(e.createErrors=a),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r;};}),w=function e(t,r){if(t===r)return !0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return !1;var s,a,o;if(Array.isArray(t)){if((s=t.length)!=r.length)return !1;for(a=s;0!=a--;)if(!e(t[a],r[a]))return !1;return !0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((s=(o=Object.keys(t)).length)!==Object.keys(r).length)return !1;for(a=s;0!=a--;)if(!Object.prototype.hasOwnProperty.call(r,o[a]))return !1;for(a=s;0!=a--;){var n=o[a];if(!e(t[n],r[n]))return !1}return !0}return t!=t&&r!=r},b=o(function(e){var t=e.exports=function(e,t,s){"function"==typeof t&&(s=t,t={}),r(t,"function"==typeof(s=t.cb||s)?s:s.pre||function(){},s.post||function(){},e,"",e);};function r(e,s,a,o,n,i,c,l,d,u){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var f in s(o,n,i,c,l,d,u),o){var h=o[f];if(Array.isArray(h)){if(f in t.arrayKeywords)for(var p=0;p<h.length;p++)r(e,s,a,h[p],n+"/"+f+"/"+p,i,n,f,o,p);}else if(f in t.propsKeywords){if(h&&"object"==typeof h)for(var m in h)r(e,s,a,h[m],n+"/"+f+"/"+m.replace(/~/g,"~0").replace(/\//g,"~1"),i,n,f,o,m);}else (f in t.keywords||e.allKeys&&!(f in t.skipKeywords))&&r(e,s,a,h,n+"/"+f,i,n,f,o);}a(o,n,i,c,l,d,u);}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};}),E=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return "boolean"==typeof e||(!0===t?!a(e):!!t&&o(e)<=t)};const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(e){for(const t in e){if(s.has(t))return !0;const r=e[t];if(Array.isArray(r)&&r.some(a))return !0;if("object"==typeof r&&a(r))return !0}return !1}function o(e){let t=0;for(const s in e){if("$ref"===s)return Infinity;if(t++,!r.has(s)&&("object"==typeof e[s]&&(0, l.eachItem)(e[s],e=>t+=o(e)),Infinity===t))return Infinity}return t}function n(e,t="",r){!1!==r&&(t=d(t));const s=e.parse(t);return i(e,s)}function i(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=n,t._getFullPath=i;const c=/#\/?$/;function d(e){return e?e.replace(c,""):""}t.normalizeId=d,t.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const u=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return {};const{schemaId:r,uriResolver:s}=this.opts,a=d(e[r]||t),o={"":a},i=n(s,a,!1),c={},l=new Set;return b(e,{allKeys:!0},(e,t,s,a)=>{if(void 0===a)return;const n=i+t;let p=o[a];function m(t){if(t=d(p?(0, this.opts.uriResolver.resolve)(p,t):t),l.has(t))throw h(t);l.add(t);let r=this.refs[t];return "string"==typeof r&&(r=this.refs[r]),"object"==typeof r?f(e,r.schema,t):t!==d(n)&&("#"===t[0]?(f(e,c[t],t),c[t]=e):this.refs[t]=n),t}function y(e){if("string"==typeof e){if(!u.test(e))throw new Error(`invalid anchor "${e}"`);m.call(this,`#${e}`);}}"string"==typeof e[r]&&(p=m.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),o[t]=p;}),c;function f(e,t,r){if(void 0!==t&&!w(e,t))throw h(r)}function h(e){return new Error(`reference "${e}" resolves to more than one schema`)}};}),P=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const r=y;function s({gen:e,validateName:t,schema:r,schemaEnv:s,opts:o},n){o.code.es5?e.func(t,c._`${u.default.data}, ${u.default.valCxt}`,s.$async,()=>{e.code(c._`"use strict"; ${a(r,o)}`),function(e,t){e.if(u.default.valCxt,()=>{e.var(u.default.instancePath,c._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,c._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,c._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,c._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,c._`${u.default.valCxt}.${u.default.dynamicAnchors}`);},()=>{e.var(u.default.instancePath,c._`""`),e.var(u.default.parentData,c._`undefined`),e.var(u.default.parentDataProperty,c._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,c._`{}`);});}(e,o),e.code(n);}):e.func(t,c._`${u.default.data}, ${function(e){return c._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?c._`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}(o)}`,s.$async,()=>e.code(a(r,o)).code(n));}function a(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?c._`/*# sourceURL=${r} */`:c.nil}function o({schema:e,self:t}){if("boolean"==typeof e)return !e;for(const r in e)if(t.RULES.all[r])return !0;return !1}function n(e){return "boolean"!=typeof e.schema}function i(e){(0, l.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:s,self:a}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0, l.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`);}(e);}function d(e,t){if(e.opts.jtd)return g(e,[],!1,t);const r=(0, y.getSchemaTypes)(e.schema);g(e,r,!(0, y.coerceAndCheckDataType)(e,r),t);}function p({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:a}){const o=r.$comment;if(!0===a.$comment)e.code(c._`${u.default.self}.logger.log(${o})`);else if("function"==typeof a.$comment){const r=c.str`${s}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(c._`${u.default.self}.opts.$comment(${o}, ${r}, ${a}.schema)`);}}function g(e,t,s,a){const{gen:o,schema:n,data:i,allErrors:d,opts:f,self:h}=e,{RULES:p}=h;function y(l){(0, m.shouldUseGroup)(n,l)&&(l.type?(o.if((0, r.checkDataType)(l.type,i,f.strictNumbers)),w(e,l),1===t.length&&t[0]===l.type&&s&&(o.else(),(0, r.reportTypeError)(e)),o.endIf()):w(e,l),d||o.if(c._`${u.default.errors} === ${a||0}`));}!n.$ref||!f.ignoreKeywordsWithRef&&(0, l.schemaHasRulesButRef)(n,p)?(f.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach(t=>{b(e.dataTypes,t)||P(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`);}),e.dataTypes=e.dataTypes.filter(e=>b(t,e))):e.dataTypes=t);}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&P(e,"use allowUnionTypes to allow union type keyword");}(e,t),function(e,t){const r=e.self.RULES.all;for(const s in r){const a=r[s];if("object"==typeof a&&(0, m.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;r.length&&!r.some(e=>{return (r=t).includes(s=e)||"number"===s&&r.includes("integer");var r,s;})&&P(e,`missing type "${r.join(",")}" for keyword "${s}"`);}}}(e,e.dataTypes));}(e,t),o.block(()=>{for(const e of p.rules)y(e);y(p.post);})):o.block(()=>k(e,"$ref",p.all.$ref.definition));}function w(e,t){const{gen:r,schema:s,opts:{useDefaults:a}}=e;a&&(0, v.assignDefaults)(e,t.type),r.block(()=>{for(const r of t.rules)(0, m.shouldUseRule)(s,r)&&k(e,r.keyword,r.definition,t.type);});}function b(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function P(e,t){(0, l.checkStrictMode)(e,t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,e.opts.strictTypes);}t.validateFunctionCode=function(e){n(e)&&(i(e),o(e))?function(e){const{schema:t,opts:r,gen:a}=e;s(e,()=>{r.$comment&&t.$comment&&p(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0, l.checkStrictMode)(e,"default is ignored in the schema root");}(e),a.let(u.default.vErrors,null),a.let(u.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",c._`${r}.evaluated`),t.if(c._`${e.evaluated}.dynamicProps`,()=>t.assign(c._`${e.evaluated}.props`,c._`undefined`)),t.if(c._`${e.evaluated}.dynamicItems`,()=>t.assign(c._`${e.evaluated}.items`,c._`undefined`));}(e),d(e),function(e){const{gen:t,schemaEnv:r,validateName:s,ValidationError:a,opts:o}=e;r.$async?t.if(c._`${u.default.errors} === 0`,()=>t.return(u.default.data),()=>t.throw(c._`new ${a}(${u.default.vErrors})`)):(t.assign(c._`${s}.errors`,u.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:s}){r instanceof c.Name&&e.assign(c._`${t}.props`,r),s instanceof c.Name&&e.assign(c._`${t}.items`,s);}(e),t.return(c._`${u.default.errors} === 0`));}(e);});}(e):s(e,()=>(0, h.topBoolOrEmptySchema)(e));};class S{constructor(e,t,r){if((0, $.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0, l.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",C(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0, $.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u.default.errors));}result(e,t,r){this.failResult((0, c.not)(e),t,r);}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else();}pass(e,t){this.failResult((0, c.not)(e),void 0,t);}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else();}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(c._`${t} !== undefined && (${(0, c.or)(this.invalid$data(),e)})`);}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r);}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t);}$dataError(){(0, f.reportError)(this,this.def.$dataError||f.keyword$DataError);}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0, f.resetErrorsCount)(this.gen,this.errsCount);}ok(e){this.allErrors||this.gen.if(e);}setParams(e,t){t?Object.assign(this.params,e):this.params=e;}block$data(e,t,r=c.nil){this.gen.block(()=>{this.check$data(e,r),t();});}check$data(e=c.nil,t=c.nil){if(!this.$data)return;const{gen:r,schemaCode:s,schemaType:a,def:o}=this;r.if((0, c.or)(c._`${s} === undefined`,t)),e!==c.nil&&r.assign(e,!0),(a.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==c.nil&&r.assign(e,!1)),r.else();}invalid$data(){const{gen:e,schemaCode:t,schemaType:s,def:a,it:o}=this;return (0, c.or)(function(){if(s.length){if(!(t instanceof c.Name))throw new Error("ajv implementation error");const e=Array.isArray(s)?s:[s];return c._`${(0, r.checkDataTypes)(e,t,o.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}(),function(){if(a.validateSchema){const r=e.scopeValue("validate$data",{ref:a.validateSchema});return c._`!${r}(${t})`}return c.nil}())}subschema(e,t){const r=(0, _.getSubschema)(this.it,e);(0, _.extendSubschemaData)(r,this.it,e),(0, _.extendSubschemaMode)(r,e);const s={...this.it,...r,items:void 0,props:void 0};return function(e,t){n(e)&&(i(e),o(e))?function(e,t){const{schema:r,gen:s,opts:a}=e;a.$comment&&r.$comment&&p(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0, E.resolveUrl)(e.opts.uriResolver,e.baseId,t));}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=s.const("_errs",u.default.errors);d(e,o),s.var(t,c._`${o} === ${u.default.errors}`);}(e,t):(0, h.boolOrEmptySchema)(e,t);}(s,t),s}mergeEvaluated(e,t){const{it:r,gen:s}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=l.mergeEvaluated.props(s,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=l.mergeEvaluated.items(s,e.items,r.items,t)));}mergeValidEvaluated(e,t){const{it:r,gen:s}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return s.if(t,()=>this.mergeEvaluated(e,c.Name)),!0}}function k(e,t,r,s){const a=new S(e,r,t);"code"in r?r.code(a,s):a.$data&&r.validate?(0, $.funcKeywordCode)(a,r):"macro"in r?(0, $.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0, $.funcKeywordCode)(a,r);}t.KeywordCxt=S;const N=/^\/(?:[^~]|~0|~1)*$/,j=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let a,o;if(""===e)return u.default.rootData;if("/"===e[0]){if(!N.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,o=u.default.rootData;}else {const n=j.exec(e);if(!n)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+n[1];if(a=n[2],"#"===a){if(i>=t)throw new Error(d("property/index",i));return s[t-i]}if(i>t)throw new Error(d("data",i));if(o=r[t-i],!a)return o}let n=o;const i=a.split("/");for(const e of i)e&&(o=c._`${o}${(0, c.getProperty)((0, l.unescapeJsonPointer)(e))}`,n=c._`${n} && ${o}`);return n;function d(e,r){return `Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=C;});class S extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0;}}var k=/*#__PURE__*/Object.defineProperty({default:S},"__esModule",{value:!0});class N extends Error{constructor(e,t,r,s){super(s||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0, E.resolveUrl)(e,t,r),this.missingSchema=(0, E.normalizeId)((0, E.getFullPath)(e,this.missingRef));}}var j=/*#__PURE__*/Object.defineProperty({default:N},"__esModule",{value:!0}),C=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;class r{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0, E.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={};}}function s(e){const t=o.call(this,e);if(t)return t;const r=(0, E.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:a}=this.opts.code,{ownProperties:n}=this.opts,i=new c.CodeGen(this.scope,{es5:s,lines:a,ownProperties:n});let l;e.$async&&(l=i.scopeValue("Error",{ref:k.default,code:c._`require("ajv/dist/runtime/validation_error").default`}));const d=i.scopeName("validate");e.validateName=d;const f={gen:i,allErrors:this.opts.allErrors,data:u.default.data,parentData:u.default.parentData,parentDataProperty:u.default.parentDataProperty,dataNames:[u.default.data],dataPathArr:[c.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0, c.stringify)(e.schema)}:{ref:e.schema}),validateName:d,ValidationError:l,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:c.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:c._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,P.validateFunctionCode)(f),i.optimize(this.opts.code.optimize);const t=i.toString();h=`${i.scopeRefs(u.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const r=new Function(`${u.default.self}`,`${u.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:d,validateCode:t,scopeValues:i._values}),this.opts.unevaluated){const{props:e,items:t}=f;r.evaluated={props:e instanceof c.Name?void 0:e,items:t instanceof c.Name?void 0:t,dynamicProps:e instanceof c.Name,dynamicItems:t instanceof c.Name},r.source&&(r.source.evaluated=(0,c.stringify)(r.evaluated));}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e);}}function a(e){return (0, E.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:s.call(this,e)}function o(e){for(const s of this._compilations)if((t=s).schema===(r=e).schema&&t.root===r.root&&t.baseId===r.baseId)return s;var t,r;}function n(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||i.call(this,e,t)}function i(e,t){const a=this.opts.uriResolver.parse(t),o=(0, E._getFullPath)(this.opts.uriResolver,a);let n=(0, E.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return f.call(this,a,e);const c=(0, E.normalizeId)(o),l=this.refs[c]||this.schemas[c];if("string"==typeof l){const t=i.call(this,e,l);if("object"!=typeof(null==t?void 0:t.schema))return;return f.call(this,a,t)}if("object"==typeof(null==l?void 0:l.schema)){if(l.validate||s.call(this,l),c===(0, E.normalizeId)(t)){const{schema:t}=l,{schemaId:s}=this.opts,a=t[s];return a&&(n=(0, E.resolveUrl)(this.opts.uriResolver,n,a)),new r({schema:t,schemaId:s,root:e,baseId:n})}return f.call(this,a,l)}}t.SchemaEnv=r,t.compileSchema=s,t.resolveRef=function(e,t,s){var o;s=(0, E.resolveUrl)(this.opts.uriResolver,t,s);const i=e.refs[s];if(i)return i;let c=n.call(this,e,s);if(void 0===c){const a=null===(o=e.localRefs)||void 0===o?void 0:o[s],{schemaId:n}=this.opts;a&&(c=new r({schema:a,schemaId:n,root:e,baseId:t}));}return void 0!==c?e.refs[s]=a.call(this,c):void 0},t.getCompilingSchema=o,t.resolveSchema=i;const d=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function f(e,{baseId:t,schema:s,root:a}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const r of e.fragment.slice(1).split("/")){if("boolean"==typeof s)return;const e=s[(0, l.unescapeFragment)(r)];if(void 0===e)return;const a="object"==typeof(s=e)&&s[this.opts.schemaId];!d.has(r)&&a&&(t=(0, E.resolveUrl)(this.opts.uriResolver,t,a));}let n;if("boolean"!=typeof s&&s.$ref&&!(0, l.schemaHasRulesButRef)(s,this.RULES)){const e=(0, E.resolveUrl)(this.opts.uriResolver,t,s.$ref);n=i.call(this,a,e);}const{schemaId:c}=this.opts;return n=n||new r({schema:s,schemaId:c,root:a,baseId:t}),n.schema!==n.root.schema?n:void 0}}),O={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1},x=o(function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var s=t.length-1,a=1;a<s;++a)t[a]=t[a].slice(1,-1);return t[s]=t[s].slice(1),t.join("")}return t[0]}function r(e){return "(?:"+e+")"}function s(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function a(e){return e.toUpperCase()}function o(e){var s="[A-Za-z]",a="[0-9]",o=t(a,"[A-Fa-f]"),n=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),i="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",c=t("[\\:\\/\\?\\#\\[\\]\\@]",i),l=e?"[\\uE000-\\uF8FF]":"[]",d=t(s,a,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]");r(s+t(s,a,"[\\+\\-\\.]")+"*"),r(r(n+"|"+t(d,i,"[\\:]"))+"*");var u=r(r("25[0-5]")+"|"+r("2[0-4][0-9]")+"|"+r("1[0-9][0-9]")+"|"+r("0?[1-9][0-9]")+"|0?0?"+a),f=r(u+"\\."+u+"\\."+u+"\\."+u),h=r(o+"{1,4}"),p=r(r(h+"\\:"+h)+"|"+f),m=r(r(h+"\\:")+"{6}"+p),y=r("\\:\\:"+r(h+"\\:")+"{5}"+p),v=r(r(h)+"?\\:\\:"+r(h+"\\:")+"{4}"+p),g=r(r(r(h+"\\:")+"{0,1}"+h)+"?\\:\\:"+r(h+"\\:")+"{3}"+p),$=r(r(r(h+"\\:")+"{0,2}"+h)+"?\\:\\:"+r(h+"\\:")+"{2}"+p),_=r(r(r(h+"\\:")+"{0,3}"+h)+"?\\:\\:"+h+"\\:"+p),w=r(r(r(h+"\\:")+"{0,4}"+h)+"?\\:\\:"+p),b=r(r(r(h+"\\:")+"{0,5}"+h)+"?\\:\\:"+h),E=r(r(r(h+"\\:")+"{0,6}"+h)+"?\\:\\:"),P=r([m,y,v,g,$,_,w,b,E].join("|")),S=r(r(d+"|"+n)+"+");r("[vV]"+o+"+\\."+t(d,i,"[\\:]")+"+"),r(r(n+"|"+t(d,i))+"*");var k=r(n+"|"+t(d,i,"[\\:\\@]"));return r(r(n+"|"+t(d,i,"[\\@]"))+"+"),r(r(k+"|"+t("[\\/\\?]",l))+"*"),{NOT_SCHEME:new RegExp(t("[^]",s,a,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",d,i),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",d,i),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",d,i),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",d,i),"g"),NOT_QUERY:new RegExp(t("[^\\%]",d,i,"[\\:\\@\\/\\?]",l),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",d,i,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",d,i),"g"),UNRESERVED:new RegExp(d,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",d,c),"g"),PCT_ENCODED:new RegExp(n,"g"),IPV4ADDRESS:new RegExp("^("+f+")$"),IPV6ADDRESS:new RegExp("^\\[?("+P+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+S+")")+"?\\]?$")}}var n=o(!1),i=o(!0),c=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],s=!0,a=!1,o=void 0;try{for(var n,i=e[Symbol.iterator]();!(s=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e;}finally{try{!s&&i.return&&i.return();}finally{if(a)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},l=2147483647,d=36,u=/^xn--/,f=/[^\0-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,y=String.fromCharCode;function v(e){throw new RangeError(p[e])}function g(e,t){var r=e.split("@"),s="";return r.length>1&&(s=r[0]+"@",e=r[1]),s+function(e,t){for(var r=[],s=e.length;s--;)r[s]=t(e[s]);return r}((e=e.replace(h,".")).split("."),t).join(".")}var $=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},_=function(e,t,r){var s=0;for(e=r?m(e/700):e>>1,e+=m(e/t);e>455;s+=d)e=m(e/35);return m(s+36*e/(e+38))},w=function(e){return g(e,function(e){return f.test(e)?"xn--"+function(e){var t=[],r=(e=function(e){for(var t=[],r=0,s=e.length;r<s;){var a=e.charCodeAt(r++);if(a>=55296&&a<=56319&&r<s){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&a)<<10)+(1023&o)+65536):(t.push(a),r--);}else t.push(a);}return t}(e)).length,s=128,a=0,o=72,n=!0,i=!1,c=void 0;try{for(var u,f=e[Symbol.iterator]();!(n=(u=f.next()).done);n=!0){var h=u.value;h<128&&t.push(y(h));}}catch(e){i=!0,c=e;}finally{try{!n&&f.return&&f.return();}finally{if(i)throw c}}var p=t.length,g=p;for(p&&t.push("-");g<r;){var w=l,b=!0,E=!1,P=void 0;try{for(var S,k=e[Symbol.iterator]();!(b=(S=k.next()).done);b=!0){var N=S.value;N>=s&&N<w&&(w=N);}}catch(e){E=!0,P=e;}finally{try{!b&&k.return&&k.return();}finally{if(E)throw P}}var j=g+1;w-s>m((l-a)/j)&&v("overflow"),a+=(w-s)*j,s=w;var C=!0,O=!1,x=void 0;try{for(var T,R=e[Symbol.iterator]();!(C=(T=R.next()).done);C=!0){var I=T.value;if(I<s&&++a>l&&v("overflow"),I==s){for(var D=a,A=d;;A+=d){var M=A<=o?1:A>=o+26?26:A-o;if(D<M)break;var V=D-M,F=d-M;t.push(y($(M+V%F,0))),D=m(V/F);}t.push(y($(D,0))),o=_(a,j,g==p),a=0,++g;}}}catch(e){O=!0,x=e;}finally{try{!C&&R.return&&R.return();}finally{if(O)throw x}}++a,++s;}return t.join("")}(e):e})},b=function(e){return g(e,function(e){return u.test(e)?function(e){var t,r=[],s=e.length,a=0,o=128,n=72,i=e.lastIndexOf("-");i<0&&(i=0);for(var c=0;c<i;++c)e.charCodeAt(c)>=128&&v("not-basic"),r.push(e.charCodeAt(c));for(var u=i>0?i+1:0;u<s;){for(var f=a,h=1,p=d;;p+=d){u>=s&&v("invalid-input");var y=(t=e.charCodeAt(u++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:d;(y>=d||y>m((l-a)/h))&&v("overflow"),a+=y*h;var g=p<=n?1:p>=n+26?26:p-n;if(y<g)break;var $=d-g;h>m(l/$)&&v("overflow"),h*=$;}var w=r.length+1;n=_(a-f,w,0==f),m(a/w)>l-o&&v("overflow"),o+=m(a/w),a%=w,r.splice(a++,0,o);}return String.fromCodePoint.apply(String,r)}(e.slice(4).toLowerCase()):e})},E={};function P(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function S(e){for(var t="",r=0,s=e.length;r<s;){var a=parseInt(e.substr(r+1,2),16);if(a<128)t+=String.fromCharCode(a),r+=3;else if(a>=194&&a<224){if(s-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&a)<<6|63&o);}else t+=e.substr(r,6);r+=6;}else if(a>=224){if(s-r>=9){var n=parseInt(e.substr(r+4,2),16),i=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&a)<<12|(63&n)<<6|63&i);}else t+=e.substr(r,9);r+=9;}else t+=e.substr(r,3),r+=3;}return t}function k(e,t){function r(e){var r=S(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,P).replace(t.PCT_ENCODED,a)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,P).replace(t.PCT_ENCODED,a)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,P).replace(t.PCT_ENCODED,a)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,P).replace(t.PCT_ENCODED,a)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,P).replace(t.PCT_ENCODED,a)),e}function N(e){return e.replace(/^0*(.*)/,"$1")||"0"}function j(e,t){var r=e.match(t.IPV4ADDRESS)||[],s=c(r,2)[1];return s?s.split(".").map(N).join("."):e}function C(e,t){var r=e.match(t.IPV6ADDRESS)||[],s=c(r,3),a=s[1],o=s[2];if(a){for(var n=a.toLowerCase().split("::").reverse(),i=c(n,2),l=i[0],d=i[1],u=d?d.split(":").map(N):[],f=l.split(":").map(N),h=t.IPV4ADDRESS.test(f[f.length-1]),p=h?7:8,m=f.length-p,y=Array(p),v=0;v<p;++v)y[v]=u[v]||f[m+v]||"";h&&(y[p-1]=j(y[p-1],t));var g=y.reduce(function(e,t,r){if(!t||"0"===t){var s=e[e.length-1];s&&s.index+s.length===r?s.length++:e.push({index:r,length:1});}return e},[]).sort(function(e,t){return t.length-e.length})[0],$=void 0;if(g&&g.length>1){var _=y.slice(0,g.index),w=y.slice(g.index+g.length);$=_.join(":")+"::"+w.join(":");}else $=y.join(":");return o&&($+="%"+o),$}return e}var O=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,x=void 0==="".match(/(){0}/)[1];function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},s=!1!==t.iri?i:n;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var a=e.match(O);if(a){x?(r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5])):(r.scheme=a[1]||void 0,r.userinfo=-1!==e.indexOf("@")?a[3]:void 0,r.host=-1!==e.indexOf("//")?a[4]:void 0,r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=-1!==e.indexOf("?")?a[7]:void 0,r.fragment=-1!==e.indexOf("#")?a[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?a[4]:void 0)),r.host&&(r.host=C(j(r.host,s),s)),r.reference=void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?"relative":void 0===r.fragment?"absolute":"uri":"same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=E[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)k(r,s);else {if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=w(r.host.replace(s.PCT_ENCODED,S).toLowerCase());}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e;}k(r,n);}o&&o.parse&&o.parse(r,t);}else r.error=r.error||"URI can not be parsed.";return r}function R(e,t){var r=!1!==t.iri?i:n,s=[];return void 0!==e.userinfo&&(s.push(e.userinfo),s.push("@")),void 0!==e.host&&s.push(C(j(String(e.host),r),r).replace(r.IPV6ADDRESS,function(e,t,r){return "["+t+(r?"%25"+r:"")+"]"})),"number"!=typeof e.port&&"string"!=typeof e.port||(s.push(":"),s.push(String(e.port))),s.length?s.join(""):void 0}var I=/^\.\.?\//,D=/^\/\.(\/|$)/,A=/^\/\.\.(\/|$)/,M=/^\/?(?:.|\n)*?(?=\/|$)/;function V(e){for(var t=[];e.length;)if(e.match(I))e=e.replace(I,"");else if(e.match(D))e=e.replace(D,"/");else if(e.match(A))e=e.replace(A,"/"),t.pop();else if("."===e||".."===e)e="";else {var r=e.match(M);if(!r)throw new Error("Unexpected dot segment condition");var s=r[0];e=e.slice(s.length),t.push(s);}return t.join("")}function F(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?i:n,s=[],a=E[(t.scheme||e.scheme||"").toLowerCase()];if(a&&a.serialize&&a.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||a&&a.domainHost)try{e.host=t.iri?b(e.host):w(e.host.replace(r.PCT_ENCODED,S).toLowerCase());}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r;}k(e,r),"suffix"!==t.reference&&e.scheme&&(s.push(e.scheme),s.push(":"));var o=R(e,t);if(void 0!==o&&("suffix"!==t.reference&&s.push("//"),s.push(o),e.path&&"/"!==e.path.charAt(0)&&s.push("/")),void 0!==e.path){var c=e.path;t.absolutePath||a&&a.absolutePath||(c=V(c)),void 0===o&&(c=c.replace(/^\/\//,"/%2F")),s.push(c);}return void 0!==e.query&&(s.push("?"),s.push(e.query)),void 0!==e.fragment&&(s.push("#"),s.push(e.fragment)),s.join("")}function U(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s={};return arguments[3]||(e=T(F(e,r),r),t=T(F(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=V(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=V(t.path||""),s.query=t.query):(t.path?("/"===t.path.charAt(0)?s.path=V(t.path):(s.path=void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:t.path:"/"+t.path,s.path=V(s.path)),s.query=t.query):(s.path=e.path,s.query=void 0!==t.query?t.query:e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function q(e,t){return e&&e.toString().replace(t&&t.iri?i.PCT_ENCODED:n.PCT_ENCODED,S)}var z={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},K={scheme:"https",domainHost:z.domainHost,parse:z.parse,serialize:z.serialize};function L(e){return "boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=L(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(L(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),s=c(r,2),a=s[0],o=s[1];e.path=a&&"/"!==a?a:void 0,e.query=o,e.resourceName=void 0;}return e.fragment=void 0,e}},G={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},J={},B="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",W="[0-9A-Fa-f]",Q=r(r("%[EFef][0-9A-Fa-f]%"+W+W+"%"+W+W)+"|"+r("%[89A-Fa-f][0-9A-Fa-f]%"+W+W)+"|"+r("%"+W+W)),Z=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Y=new RegExp(B,"g"),X=new RegExp(Q,"g"),ee=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',Z),"g"),te=new RegExp(t("[^]",B,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),re=te;function se(e){var t=S(e);return t.match(Y)?t:e}var ae={scheme:"mailto",parse:function(e,t){var r=e,s=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var a=!1,o={},n=r.query.split("&"),i=0,c=n.length;i<c;++i){var l=n[i].split("=");switch(l[0]){case"to":for(var d=l[1].split(","),u=0,f=d.length;u<f;++u)s.push(d[u]);break;case"subject":r.subject=q(l[1],t);break;case"body":r.body=q(l[1],t);break;default:a=!0,o[q(l[0],t)]=q(l[1],t);}}a&&(r.headers=o);}r.query=void 0;for(var h=0,p=s.length;h<p;++h){var m=s[h].split("@");if(m[0]=q(m[0]),t.unicodeSupport)m[1]=q(m[1],t).toLowerCase();else try{m[1]=w(q(m[1],t).toLowerCase());}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e;}s[h]=m.join("@");}return r},serialize:function(e,t){var r,s=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var n=0,i=o.length;n<i;++n){var c=String(o[n]),l=c.lastIndexOf("@"),d=c.slice(0,l).replace(X,se).replace(X,a).replace(ee,P),u=c.slice(l+1);try{u=t.iri?b(u):w(q(u,t).toLowerCase());}catch(e){s.error=s.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e;}o[n]=d+"@"+u;}s.path=o.join(",");}var f=e.headers=e.headers||{};e.subject&&(f.subject=e.subject),e.body&&(f.body=e.body);var h=[];for(var p in f)f[p]!==J[p]&&h.push(p.replace(X,se).replace(X,a).replace(te,P)+"="+f[p].replace(X,se).replace(X,a).replace(re,P));return h.length&&(s.query=h.join("&")),s}},oe=/^([^\:]+)\:(.*)/,ne={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(oe),s=e;if(r){var a=t.scheme||s.scheme||"urn",o=r[1].toLowerCase(),n=r[2],i=E[a+":"+(t.nid||o)];s.nid=o,s.nss=n,s.path=void 0,i&&(s=i.parse(s,t));}else s.error=s.error||"URN can not be parsed.";return s},serialize:function(e,t){var r=e.nid,s=E[(t.scheme||e.scheme||"urn")+":"+(t.nid||r)];s&&(e=s.serialize(e,t));var a=e;return a.path=(r||t.nid)+":"+e.nss,a}},ie=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ce={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(ie)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};E[z.scheme]=z,E[K.scheme]=K,E[H.scheme]=H,E[G.scheme]=G,E[ae.scheme]=ae,E[ne.scheme]=ne,E[ce.scheme]=ce,e.SCHEMES=E,e.pctEncChar=P,e.pctDecChars=S,e.parse=T,e.removeDotSegments=V,e.serialize=F,e.resolveComponents=U,e.resolve=function(e,t,r){var s=function(e,t){var r={scheme:"null"};if(t)for(var s in t)r[s]=t[s];return r}(0,r);return F(U(T(e,s),T(t,s),s,!0),s)},e.normalize=function(e,t){return "string"==typeof e?e=F(T(e,t),t):"object"===s(e)&&(e=T(F(e,t),t)),e},e.equal=function(e,t,r){return "string"==typeof e?e=F(T(e,r),r):"object"===s(e)&&(e=F(e,r)),"string"==typeof t?t=F(T(t,r),r):"object"===s(t)&&(t=F(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?i.ESCAPE:n.ESCAPE,P)},e.unescapeComponent=q,Object.defineProperty(e,"__esModule",{value:!0});}(t);});x.code='require("ajv/dist/runtime/uri").default';var T=/*#__PURE__*/Object.defineProperty({default:x},"__esModule",{value:!0}),R=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0,Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return P.KeywordCxt}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});const r=c,s=(e,t)=>new RegExp(e,t);s.code="new RegExp";const a=["removeAdditional","useDefaults","coerceTypes"],o=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),n={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},i={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function d(e){var t,r,a,o,n,i,c,l,d,u,f,h,p,m,y,v,g,$,_,w,b,E,P,S,k;const N=e.strict,j=null===(t=e.code)||void 0===t?void 0:t.optimize,C=!0===j||void 0===j?1:j||0,O=null!==(a=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==a?a:s,x=null!==(o=e.uriResolver)&&void 0!==o?o:T.default;return {strictSchema:null===(i=null!==(n=e.strictSchema)&&void 0!==n?n:N)||void 0===i||i,strictNumbers:null===(l=null!==(c=e.strictNumbers)&&void 0!==c?c:N)||void 0===l||l,strictTypes:null!==(u=null!==(d=e.strictTypes)&&void 0!==d?d:N)&&void 0!==u?u:"log",strictTuples:null!==(h=null!==(f=e.strictTuples)&&void 0!==f?f:N)&&void 0!==h?h:"log",strictRequired:null!==(m=null!==(p=e.strictRequired)&&void 0!==p?p:N)&&void 0!==m&&m,code:e.code?{...e.code,optimize:C,regExp:O}:{optimize:C,regExp:O},loopRequired:null!==(y=e.loopRequired)&&void 0!==y?y:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(_=e.inlineRefs)||void 0===_||_,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===(b=e.addUsedSchema)||void 0===b||b,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(P=e.validateFormats)||void 0===P||P,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(k=e.int32range)||void 0===k||k,uriResolver:x}}class u{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...d(e)};const{es5:t,lines:s}=this.opts.code;this.scope=new r.ValueScope({scope:{},prefixes:o,es5:t,lines:s}),this.logger=function(e){if(!1===e)return _;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const a=e.validateFormats;e.validateFormats=!1,this.RULES=(0, p.getRules)(),f.call(this,n,e,"NOT SUPPORTED"),f.call(this,i,e,"DEPRECATED","warn"),this._metaOpts=$.call(this),e.formats&&v.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&g.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),m.call(this),e.validateFormats=a;}_addVocabularies(){this.addKeyword("$async");}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let s=O;"id"===r&&(s={...O},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[r],!1);}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const s=r(t);return "$async"in r||(this.errors=r.errors),s}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return s.call(this,e,t);async function s(e,t){await a.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function a(e){e&&!this.getSchema(e)&&await s.call(this,{$ref:e},!0);}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof j.default))throw t;return n.call(this,t),await i.call(this,t.missingSchema),o.call(this,e)}}function n({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function i(e){const r=await c.call(this,e);this.refs[e]||await a.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t);}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e];}}}addSchema(e,t,r,s=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,s);return this}let a;if("object"==typeof e){const{schemaId:t}=this.opts;if(a=e[t],void 0!==a&&"string"!=typeof a)throw new Error(`schema ${t} must be string`)}return t=(0, E.normalizeId)(t||a),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,s,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return !0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const s=this.validate(r,e);if(!s&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e);}return s}getSchema(e){let t;for(;"string"==typeof(t=h.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,s=new C.SchemaEnv({schema:{},schemaId:r});if(t=C.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t;}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=h.call(this,e);return "object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{this._cache.delete(e);let t=e[this.opts.schemaId];return t&&(t=(0, E.normalizeId)(t),delete this.schemas[t],delete this.refs[t]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else {if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(b.call(this,r,t),!t)return (0, l.eachItem)(r,e=>S.call(this,e)),this;x.call(this,t);const s={...t,type:(0, y.getJSONTypes)(t.type),schemaType:(0, y.getJSONTypes)(t.schemaType)};return (0, l.eachItem)(r,0===s.type.length?e=>S.call(this,e,s):e=>s.type.forEach(t=>S.call(this,e,s,t))),this}getKeyword(e){const t=this.RULES.all[e];return "object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex(t=>t.keyword===e);t>=0&&r.rules.splice(t,1);}return this}addFormat(e,t){return "string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map(e=>`${r}${e.instancePath} ${e.message}`).reduce((e,r)=>e+t+r):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const s of t){const t=s.split("/").slice(1);let a=e;for(const e of t)a=a[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:s}=t.definition,o=a[e];s&&o&&(a[e]=I(o));}}return e}_removeAllSchemas(e,t){for(const r in e){const s=e[r];t&&!t.test(r)||("string"==typeof s?delete e[r]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[r]));}}_addSchema(e,t,r,s=this.opts.validateSchema,a=this.opts.addUsedSchema){let o;const{schemaId:n}=this.opts;if("object"==typeof e)o=e[n];else {if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(void 0!==i)return i;r=(0, E.normalizeId)(o||r);const c=E.getSchemaRefs.call(this,e,r);return i=new C.SchemaEnv({schema:e,schemaId:n,meta:t,baseId:r,localRefs:c}),this._cache.set(i.schema,i),a&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=i),s&&this.validateSchema(e,!0),i}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):C.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{C.compileSchema.call(this,e);}finally{this.opts=t;}}}function f(e,t,r,s="error"){for(const a in e){const o=a;o in t&&this.logger[s](`${r}: option ${a}. ${e[o]}`);}}function h(e){return e=(0, E.normalizeId)(e),this.schemas[e]||this.refs[e]}function m(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t);}function v(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t);}}function g(e){if(Array.isArray(e))this.addVocabulary(e);else {this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r);}}}function $(){const e={...this.opts};for(const t of a)delete e[t];return e}t.default=u,u.ValidationError=k.default,u.MissingRefError=j.default;const _={log(){},warn(){},error(){}},w=/^[a-z_$][a-z0-9_$:-]*$/i;function b(e,t){const{RULES:r}=this;if((0, l.eachItem)(e,e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!w.test(e))throw new Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function S(e,t,r){var s;const a=null==t?void 0:t.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let n=a?o.post:o.rules.find(({type:e})=>e===r);if(n||(n={type:r,rules:[]},o.rules.push(n)),o.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0, y.getJSONTypes)(t.type),schemaType:(0, y.getJSONTypes)(t.schemaType)}};t.before?N.call(this,n,i,t.before):n.rules.push(i),o.all[e]=i,null===(s=t.implements)||void 0===s||s.forEach(e=>this.addKeyword(e));}function N(e,t,r){const s=e.rules.findIndex(e=>e.keyword===r);s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`));}function x(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=I(t)),e.validateSchema=this.compile(t,!0));}const R={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function I(e){return {anyOf:[e,R]}}}),I=/*#__PURE__*/Object.defineProperty({default:{keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},"__esModule",{value:!0}),D=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const r={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:l,opts:d,self:u}=o,{root:f}=i;if(("#"===r||"#/"===r)&&n===f.baseId)return function(){if(i===f)return a(e,l,i,i.$async);const r=t.scopeValue("root",{ref:f});return a(e,c._`${r}.validate`,f,f.$async)}();const h=C.resolveRef.call(u,f,n,r);if(void 0===h)throw new j.default(o.opts.uriResolver,n,r);return h instanceof C.SchemaEnv?function(t){const r=s(e,t);a(e,r,t,t.$async);}(h):function(s){const a=t.scopeValue("schema",!0===d.code.source?{ref:s,code:(0, c.stringify)(s)}:{ref:s}),o=t.name("valid"),n=e.subschema({schema:s,dataTypes:[],schemaPath:c.nil,topSchemaRef:a,errSchemaPath:r},o);e.mergeEvaluated(n),e.ok(o);}(h)}};function s(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):c._`${r.scopeValue("wrapper",{ref:t})}.validate`}function a(e,t,r,s){const{gen:a,it:o}=e,{allErrors:n,schemaEnv:i,opts:d}=o,f=d.passContext?u.default.this:c.nil;function h(e){const t=c._`${e}.errors`;a.assign(u.default.vErrors,c._`${u.default.vErrors} === null ? ${t} : ${u.default.vErrors}.concat(${t})`),a.assign(u.default.errors,c._`${u.default.vErrors}.length`);}function p(e){var t;if(!o.opts.unevaluated)return;const s=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==o.props)if(s&&!s.dynamicProps)void 0!==s.props&&(o.props=l.mergeEvaluated.props(a,s.props,o.props));else {const t=a.var("props",c._`${e}.evaluated.props`);o.props=l.mergeEvaluated.props(a,t,o.props,c.Name);}if(!0!==o.items)if(s&&!s.dynamicItems)void 0!==s.items&&(o.items=l.mergeEvaluated.items(a,s.items,o.items));else {const t=a.var("items",c._`${e}.evaluated.items`);o.items=l.mergeEvaluated.items(a,t,o.items,c.Name);}}s?function(){if(!i.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try(()=>{a.code(c._`await ${(0, g.callValidateCode)(e,t,f)}`),p(t),n||a.assign(r,!0);},e=>{a.if(c._`!(${e} instanceof ${o.ValidationError})`,()=>a.throw(e)),h(e),n||a.assign(r,!1);}),e.ok(r);}():e.result((0, g.callValidateCode)(e,t,f),()=>p(t),()=>h(t));}t.getValidate=s,t.callRef=a,t.default=r;}),A=/*#__PURE__*/Object.defineProperty({default:["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",I.default,D.default]},"__esModule",{value:!0});const M=c.operators,V={maximum:{okStr:"<=",ok:M.LTE,fail:M.GT},minimum:{okStr:">=",ok:M.GTE,fail:M.LT},exclusiveMaximum:{okStr:"<",ok:M.LT,fail:M.GTE},exclusiveMinimum:{okStr:">",ok:M.GT,fail:M.LTE}},F={message:({keyword:e,schemaCode:t})=>c.str`must be ${V[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>c._`{comparison: ${V[e].okStr}, limit: ${t}}`},U={keyword:Object.keys(V),type:"number",schemaType:"number",$data:!0,error:F,code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(c._`${r} ${V[t].fail} ${s} || isNaN(${r})`);}};var q=/*#__PURE__*/Object.defineProperty({default:U},"__esModule",{value:!0}),z=/*#__PURE__*/Object.defineProperty({default:{keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>c.str`must be multiple of ${e}`,params:({schemaCode:e})=>c._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:s,it:a}=e,o=a.opts.multipleOfPrecision,n=t.let("res"),i=o?c._`Math.abs(Math.round(${n}) - ${n}) > 1e-${o}`:c._`${n} !== parseInt(${n})`;e.fail$data(c._`(${s} === 0 || (${n} = ${r}/${s}, ${i}))`);}}},"__esModule",{value:!0});function K(e){const t=e.length;let r,s=0,a=0;for(;a<t;)s++,r=e.charCodeAt(a++),r>=55296&&r<=56319&&a<t&&(r=e.charCodeAt(a),56320==(64512&r)&&a++);return s}var L=K;K.code='require("ajv/dist/runtime/ucs2length").default';var H=/*#__PURE__*/Object.defineProperty({default:L},"__esModule",{value:!0}),G=/*#__PURE__*/Object.defineProperty({default:{keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>c.str`must NOT have ${"maxLength"===e?"more":"fewer"} than ${t} characters`,params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,o="maxLength"===t?c.operators.GT:c.operators.LT,n=!1===a.opts.unicode?c._`${r}.length`:c._`${(0, l.useFunc)(e.gen,H.default)}(${r})`;e.fail$data(c._`${n} ${o} ${s}`);}}},"__esModule",{value:!0}),J=/*#__PURE__*/Object.defineProperty({default:{keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>c.str`must match pattern "${e}"`,params:({schemaCode:e})=>c._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:s,schemaCode:a,it:o}=e,n=r?c._`(new RegExp(${a}, ${o.opts.unicodeRegExp?"u":""}))`:(0, g.usePattern)(e,s);e.fail$data(c._`!${n}.test(${t})`);}}},"__esModule",{value:!0}),B=/*#__PURE__*/Object.defineProperty({default:{keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>c.str`must NOT have ${"maxProperties"===e?"more":"fewer"} than ${t} properties`,params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(c._`Object.keys(${r}).length ${"maxProperties"===t?c.operators.GT:c.operators.LT} ${s}`);}}},"__esModule",{value:!0}),W=/*#__PURE__*/Object.defineProperty({default:{keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>c.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>c._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:o,it:n}=e,{opts:i}=n;if(!o&&0===r.length)return;const d=r.length>=i.loopRequired;if(n.allErrors?function(){if(d||o)e.block$data(c.nil,u);else for(const t of r)(0, g.checkReportMissingProp)(e,t);}():function(){const n=t.let("missing");if(d||o){const r=t.let("valid",!0);e.block$data(r,()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,()=>{t.assign(o,(0, g.propertyInData)(t,a,r,i.ownProperties)),t.if((0, c.not)(o),()=>{e.error(),t.break();});},c.nil);}(n,r)),e.ok(r);}else t.if((0, g.checkMissingProp)(e,r,n)),(0, g.reportMissingProp)(e,n),t.else();}(),i.strictRequired){const t=e.parentSchema.properties,{definedProperties:s}=e.it;for(const e of r)void 0!==(null==t?void 0:t[e])||s.has(e)||(0, l.checkStrictMode)(n,`required property "${e}" is not defined at "${n.schemaEnv.baseId+n.errSchemaPath}" (strictRequired)`,n.opts.strictRequired);}function u(){t.forOf("prop",s,r=>{e.setParams({missingProperty:r}),t.if((0, g.noPropertyInData)(t,a,r,i.ownProperties),()=>e.error());});}}}},"__esModule",{value:!0}),Q=/*#__PURE__*/Object.defineProperty({default:{keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message:({keyword:e,schemaCode:t})=>c.str`must NOT have ${"maxItems"===e?"more":"fewer"} than ${t} items`,params:({schemaCode:e})=>c._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s}=e;e.fail$data(c._`${r}.length ${"maxItems"===t?c.operators.GT:c.operators.LT} ${s}`);}}},"__esModule",{value:!0});w.code='require("ajv/dist/runtime/equal").default';var Z=/*#__PURE__*/Object.defineProperty({default:w},"__esModule",{value:!0}),Y=/*#__PURE__*/Object.defineProperty({default:[q.default,z.default,G.default,J.default,B.default,W.default,Q.default,Object.defineProperty({default:{keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>c.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>c._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:s,schema:a,parentSchema:o,schemaCode:n,it:i}=e;if(!s&&!a)return;const d=t.let("valid"),u=o.items?(0, y.getSchemaTypes)(o.items):[];function f(s,a){const o=t.name("item"),n=(0, y.checkDataTypes)(u,o,i.opts.strictNumbers,y.DataType.Wrong),l=t.const("indices",c._`{}`);t.for(c._`;${s}--;`,()=>{t.let(o,c._`${r}[${s}]`),t.if(n,c._`continue`),u.length>1&&t.if(c._`typeof ${o} == "string"`,c._`${o} += "_"`),t.if(c._`typeof ${l}[${o}] == "number"`,()=>{t.assign(a,c._`${l}[${o}]`),e.error(),t.assign(d,!1).break();}).code(c._`${l}[${o}] = ${s}`);});}function h(s,a){const o=(0, l.useFunc)(t,Z.default),n=t.name("outer");t.label(n).for(c._`;${s}--;`,()=>t.for(c._`${a} = ${s}; ${a}--;`,()=>t.if(c._`${o}(${r}[${s}], ${r}[${a}])`,()=>{e.error(),t.assign(d,!1).break(n);})));}e.block$data(d,function(){const s=t.let("i",c._`${r}.length`),a=t.let("j");e.setParams({i:s,j:a}),t.assign(d,!0),t.if(c._`${s} > 1`,()=>(u.length>0&&!u.some(e=>"object"===e||"array"===e)?f:h)(s,a));},c._`${n} === false`),e.ok(d);}}},"__esModule",{value:!0}).default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Object.defineProperty({default:{keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>c._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:o}=e;s||o&&"object"==typeof o?e.fail$data(c._`!${(0, l.useFunc)(t,Z.default)}(${r}, ${a})`):e.fail(c._`${o} !== ${r}`);}}},"__esModule",{value:!0}).default,Object.defineProperty({default:{keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>c._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:o,it:n}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");let i;const d=()=>null!=i?i:i=(0, l.useFunc)(t,Z.default);let u;if(a.length>=n.opts.loopEnum||s)u=t.let("valid"),e.block$data(u,function(){t.assign(u,!1),t.forOf("v",o,e=>t.if(c._`${d()}(${r}, ${e})`,()=>t.assign(u,!0).break()));});else {if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",o);u=(0, c.or)(...a.map((t,s)=>function(e,t){const s=a[t];return "object"==typeof s&&null!==s?c._`${d()}(${r}, ${e}[${t}])`:c._`${r} === ${s}`}(e,s)));}e.pass(u);}}},"__esModule",{value:!0}).default]},"__esModule",{value:!0}),X=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>c.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:a}=t;Array.isArray(a)?s(e,a):(0, l.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');}};function s(e,t){const{gen:r,schema:s,data:a,keyword:o,it:n}=e;n.items=!0;const i=r.const("len",c._`${a}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(c._`${i} <= ${t.length}`);else if("object"==typeof s&&!(0, l.alwaysValidSchema)(n,s)){const s=r.var("valid",c._`${i} <= ${t.length}`);r.if((0, c.not)(s),()=>function(s){r.forRange("i",t.length,i,t=>{e.subschema({keyword:o,dataProp:t,dataPropType:l.Type.Num},s),n.allErrors||r.if((0, c.not)(s),()=>r.break());});}(s)),e.ok(s);}}t.validateAdditionalItems=s,t.default=r;}),ee=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,(0, l.alwaysValidSchema)(r,t)||e.ok((0, g.validateArray)(e));}};function s(e,t,r=e.schema){const{gen:s,parentSchema:a,data:o,keyword:n,it:i}=e;!function(e){const{opts:s,errSchemaPath:a}=i,o=r.length;s.strictTuples&&(o!==e.minItems||o!==e.maxItems&&!1!==e[t])&&(0, l.checkStrictMode)(i,`"${n}" is ${o}-tuple, but minItems or maxItems/${t} are not specified or different at path "${a}"`,s.strictTuples);}(a),i.opts.unevaluated&&r.length&&!0!==i.items&&(i.items=l.mergeEvaluated.items(s,r.length,i.items));const d=s.name("valid"),u=s.const("len",c._`${o}.length`);r.forEach((t,r)=>{(0, l.alwaysValidSchema)(i,t)||(s.if(c._`${u} > ${r}`,()=>e.subschema({keyword:n,schemaProp:r,dataProp:r},d)),e.ok(d));});}t.validateTuple=s,t.default=r;}),te=/*#__PURE__*/Object.defineProperty({default:{keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0, ee.validateTuple)(e,"items")}},"__esModule",{value:!0}),re=/*#__PURE__*/Object.defineProperty({default:{keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>c.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>c._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:s}=e,{prefixItems:a}=r;s.items=!0,(0, l.alwaysValidSchema)(s,t)||(a?(0, X.validateAdditionalItems)(e,a):e.ok((0, g.validateArray)(e)));}}},"__esModule",{value:!0}),se=/*#__PURE__*/Object.defineProperty({default:{keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?c.str`must contain at least ${e} valid item(s)`:c.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?c._`{minContains: ${e}}`:c._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:a,it:o}=e;let n,i;const{minContains:d,maxContains:u}=s;o.opts.next?(n=void 0===d?1:d,i=u):n=1;const f=t.const("len",c._`${a}.length`);if(e.setParams({min:n,max:i}),void 0===i&&0===n)return void(0, l.checkStrictMode)(o,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==i&&n>i)return (0, l.checkStrictMode)(o,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0, l.alwaysValidSchema)(o,r)){let t=c._`${f} >= ${n}`;return void 0!==i&&(t=c._`${t} && ${f} <= ${i}`),void e.pass(t)}o.items=!0;const h=t.name("valid");function p(){const e=t.name("_valid"),r=t.let("count",0);m(e,()=>t.if(e,()=>function(e){t.code(c._`${e}++`),void 0===i?t.if(c._`${e} >= ${n}`,()=>t.assign(h,!0).break()):(t.if(c._`${e} > ${i}`,()=>t.assign(h,!1).break()),1===n?t.assign(h,!0):t.if(c._`${e} >= ${n}`,()=>t.assign(h,!0)));}(r)));}function m(r,s){t.forRange("i",0,f,t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:l.Type.Num,compositeRule:!0},r),s();});}void 0===i&&1===n?m(h,()=>t.if(h,()=>t.break())):0===n?(t.let(h,!0),void 0!==i&&t.if(c._`${a}.length > 0`,p)):(t.let(h,!1),p()),e.result(h,()=>e.reset());}}},"__esModule",{value:!0}),ae=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0,t.error={message:({params:{property:e,depsCount:t,deps:r}})=>c.str`must have ${1===t?"property":"properties"} ${r} when property ${e} is present`,params:({params:{property:e,depsCount:t,deps:r,missingProperty:s}})=>c._`{property: ${e},
44275
44458
  missingProperty: ${s},
44276
44459
  depsCount: ${t},
44277
- deps: ${r}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const s in e)"__proto__"!==s&&((Array.isArray(e[s])?t:r)[s]=e[s]);return [t,r]}(e);s(e,t),a(e,r);}};function s(e,t=e.schema){const{gen:r,data:s,it:a}=e;if(0===Object.keys(t).length)return;const o=r.let("missing");for(const n in t){const i=t[n];if(0===i.length)continue;const l=(0, g$1.propertyInData)(r,s,n,a.opts.ownProperties);e.setParams({property:n,depsCount:i.length,deps:i.join(", ")}),a.allErrors?r.if(l,()=>{for(const t of i)(0, g$1.checkReportMissingProp)(e,t);}):(r.if(c$1._`${l} && (${(0, g$1.checkMissingProp)(e,i,o)})`),(0, g$1.reportMissingProp)(e,o),r.else());}}function a(e,t=e.schema){const{gen:r,data:s,keyword:a,it:o}=e,n=r.name("valid");for(const i in t)(0, l$1.alwaysValidSchema)(o,t[i])||(r.if((0, g$1.propertyInData)(r,s,i,o.opts.ownProperties),()=>{const t=e.subschema({keyword:a,schemaProp:i},n);e.mergeValidEvaluated(t,n);},()=>r.var(n,!0)),e.ok(n));}t.validatePropertyDeps=s,t.validateSchemaDeps=a,t.default=r;}),oe$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>c$1._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:a}=e;if((0, l$1.alwaysValidSchema)(a,r))return;const o=t.name("valid");t.forIn("key",s,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},o),t.if((0, c$1.not)(o),()=>{e.error(!0),a.allErrors||t.break();});}),e.ok(o);}}},"__esModule",{value:!0});const ne$1={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>c$1._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:a,errsCount:o,it:n}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:i,opts:d}=n;if(n.props=!0,"all"!==d.removeAdditional&&(0, l$1.alwaysValidSchema)(n,r))return;const f=(0, g$1.allSchemaProperties)(s.properties),h=(0, g$1.allSchemaProperties)(s.patternProperties);function p(e){t.code(c$1._`delete ${a}[${e}]`);}function m(s){if("all"===d.removeAdditional||d.removeAdditional&&!1===r)p(s);else {if(!1===r)return e.setParams({additionalProperty:s}),e.error(),void(i||t.break());if("object"==typeof r&&!(0, l$1.alwaysValidSchema)(n,r)){const r=t.name("valid");"failing"===d.removeAdditional?(y(s,r,!1),t.if((0, c$1.not)(r),()=>{e.reset(),p(s);})):(y(s,r),i||t.if((0, c$1.not)(r),()=>t.break()));}}}function y(t,r,s){const a={keyword:"additionalProperties",dataProp:t,dataPropType:l$1.Type.Str};!1===s&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,r);}t.forIn("key",a,r=>{f.length||h.length?t.if(function(r){let a;if(f.length>8){const e=(0, l$1.schemaRefOrVal)(n,s.properties,"properties");a=(0, g$1.isOwnProperty)(t,e,r);}else a=f.length?(0, c$1.or)(...f.map(e=>c$1._`${r} === ${e}`)):c$1.nil;return h.length&&(a=(0, c$1.or)(a,...h.map(t=>c$1._`${(0, g$1.usePattern)(e,t)}.test(${r})`))),(0, c$1.not)(a)}(r),()=>m(r)):m(r);}),e.ok(c$1._`${o} === ${u$2.default.errors}`);}};var ie=/*#__PURE__*/Object.defineProperty({default:ne$1},"__esModule",{value:!0}),ce=/*#__PURE__*/Object.defineProperty({default:{keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:a,it:o}=e;"all"===o.opts.removeAdditional&&void 0===s.additionalProperties&&ie.default.code(new P$1.KeywordCxt(o,ie.default,"additionalProperties"));const n=(0, g$1.allSchemaProperties)(r);for(const e of n)o.definedProperties.add(e);o.opts.unevaluated&&n.length&&!0!==o.props&&(o.props=l$1.mergeEvaluated.props(t,(0, l$1.toHash)(n),o.props));const i=n.filter(e=>!(0, l$1.alwaysValidSchema)(o,r[e]));if(0===i.length)return;const c=t.name("valid");for(const r of i)d(r)?u(r):(t.if((0, g$1.propertyInData)(t,a,r,o.opts.ownProperties)),u(r),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(c);function d(e){return o.opts.useDefaults&&!o.compositeRule&&void 0!==r[e].default}function u(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},c);}}}},"__esModule",{value:!0});const le$1=l$1;var de$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:a,it:o}=e,{opts:n}=o,i=(0, g$1.allSchemaProperties)(r),d=i.filter(e=>(0, l$1.alwaysValidSchema)(o,r[e]));if(0===i.length||d.length===i.length&&(!o.opts.unevaluated||!0===o.props))return;const u=n.strictSchema&&!n.allowMatchingProperties&&a.properties,f=t.name("valid");!0===o.props||o.props instanceof c$1.Name||(o.props=(0, le$1.evaluatedPropsToName)(t,o.props));const{props:h}=o;function p(e){for(const t in u)new RegExp(e).test(t)&&(0, l$1.checkStrictMode)(o,`property ${t} matches pattern ${e} (use allowMatchingProperties)`);}function m(r){t.forIn("key",s,s=>{t.if(c$1._`${(0, g$1.usePattern)(e,r)}.test(${s})`,()=>{const a=d.includes(r);a||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:le$1.Type.Str},f),o.opts.unevaluated&&!0!==h?t.assign(c$1._`${h}[${s}]`,!0):a||o.allErrors||t.if((0, c$1.not)(f),()=>t.break());});});}!function(){for(const e of i)u&&p(e),o.allErrors?m(e):(t.var(f,!0),m(e),t.if(f));}();}}},"__esModule",{value:!0}),ue$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:s}=e;if((0, l$1.alwaysValidSchema)(s,r))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error());},error:{message:"must NOT be valid"}}},"__esModule",{value:!0}),fe$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"anyOf",schemaType:"array",trackErrors:!0,code:g$1.validateUnion,error:{message:"must match a schema in anyOf"}}},"__esModule",{value:!0}),he$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>c$1._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;const o=r,n=t.let("valid",!1),i=t.let("passing",null),d=t.name("_valid");e.setParams({passing:i}),t.block(function(){o.forEach((r,s)=>{let o;(0, l$1.alwaysValidSchema)(a,r)?t.var(d,!0):o=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if(c$1._`${d} && ${n}`).assign(n,!1).assign(i,c$1._`[${i}, ${s}]`).else(),t.if(d,()=>{t.assign(n,!0),t.assign(i,s),o&&e.mergeEvaluated(o,c$1.Name);});});}),e.result(n,()=>e.reset(),()=>e.error(!0));}}},"__esModule",{value:!0}),pe$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const a=t.name("valid");r.forEach((t,r)=>{if((0, l$1.alwaysValidSchema)(s,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},a);e.ok(a),e.mergeEvaluated(o);});}}},"__esModule",{value:!0});function me(e,t){const r=e.schema[t];return void 0!==r&&!(0, l$1.alwaysValidSchema)(e,r)}var ye$1=/*#__PURE__*/Object.defineProperty({default:{keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>c$1.str`must match "${e.ifClause}" schema`,params:({params:e})=>c$1._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0, l$1.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=me(s,"then"),o=me(s,"else");if(!a&&!o)return;const n=t.let("valid",!0),i=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(t);}(),e.reset(),a&&o){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(i,d("then",r),d("else",r));}else a?t.if(i,d("then")):t.if((0, c$1.not)(i),d("else"));function d(r,s){return ()=>{const a=e.subschema({keyword:r},i);t.assign(n,i),e.mergeValidEvaluated(a,n),s?t.assign(s,c$1._`${r}`):e.setParams({ifClause:r});}}e.pass(n,()=>e.error(!0));}}},"__esModule",{value:!0}),ve$1=/*#__PURE__*/Object.defineProperty({default:{keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0, l$1.checkStrictMode)(r,`"${e}" without "if" is ignored`);}}},"__esModule",{value:!0}),ge$1=/*#__PURE__*/Object.defineProperty({default:function(e=!1){const t=[ue$1.default,fe$1.default,he$1.default,pe$1.default,ye$1.default,ve$1.default,oe$1.default,ie.default,ae.default,ce.default,de$1.default];return e?t.push(te.default,re$1.default):t.push(X$1.default,ee$1.default),t.push(se$1.default),t}},"__esModule",{value:!0}),$e=/*#__PURE__*/Object.defineProperty({default:[Object.defineProperty({default:{keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>c$1.str`must match format "${e}"`,params:({schemaCode:e})=>c$1._`{format: ${e}}`},code(e,t){const{gen:r,data:s,$data:a,schema:o,schemaCode:n,it:i}=e,{opts:l,errSchemaPath:d,schemaEnv:u,self:f}=i;l.validateFormats&&(a?function(){const a=r.scopeValue("formats",{ref:f.formats,code:l.code.formats}),o=r.const("fDef",c$1._`${a}[${n}]`),i=r.let("fType"),d=r.let("format");r.if(c$1._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(i,c$1._`${o}.type || "string"`).assign(d,c$1._`${o}.validate`),()=>r.assign(i,c$1._`"string"`).assign(d,o)),e.fail$data((0, c$1.or)(!1===l.strictSchema?c$1.nil:c$1._`${n} && !${d}`,function(){const e=u.$async?c$1._`(${o}.async ? await ${d}(${s}) : ${d}(${s}))`:c$1._`${d}(${s})`,r=c$1._`(typeof ${d} == "function" ? ${e} : ${d}.test(${s}))`;return c$1._`${d} && ${d} !== true && ${i} === ${t} && !${r}`}()));}():function(){const a=f.formats[o];if(!a)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return `unknown format "${o}" ignored in schema at path "${d}"`}f.logger.warn(e());}();if(!0===a)return;const[n,i,h]=function(e){const t=e instanceof RegExp?(0, c$1.regexpCode)(e):l.code.formats?c$1._`${l.code.formats}${(0, c$1.getProperty)(o)}`:void 0,s=r.scopeValue("formats",{key:o,ref:e,code:t});return "object"!=typeof e||e instanceof RegExp?["string",e,s]:[e.type||"string",e.validate,c$1._`${s}.validate`]}(a);n===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!u.$async)throw new Error("async format in sync schema");return c$1._`await ${h}(${s})`}return "function"==typeof i?c$1._`${h}(${s})`:c$1._`${h}.test(${s})`}());}());}}},"__esModule",{value:!0}).default]},"__esModule",{value:!0}),_e=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];});const we=[A$1.default,Y$1.default,(0, ge$1.default)(),$e.default,_e.metadataVocabulary,_e.contentVocabulary];var be$1=/*#__PURE__*/Object.defineProperty({default:we},"__esModule",{value:!0}),Ee$1=o$1(function(e,t){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping";}),Pe=/*#__PURE__*/Object.defineProperty({default:{keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Ee$1.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>c$1._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:a,it:o}=e,{oneOf:n}=a;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=s.propertyName;if("string"!=typeof i)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!n)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),u=t.const("tag",c$1._`${r}${(0, c$1.getProperty)(i)}`);function f(r){const s=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:r},s);return e.mergeEvaluated(a,c$1.Name),s}t.if(c$1._`typeof ${u} == "string"`,()=>function(){const r=function(){var e;const t={},r=c(a);let s=!0;for(let t=0;t<n.length;t++){let a=n[t];(null==a?void 0:a.$ref)&&!(0, l$1.schemaHasRulesButRef)(a,o.self.RULES)&&(a=C.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,null==a?void 0:a.$ref),a instanceof C.SchemaEnv&&(a=a.schema));const u=null===(e=null==a?void 0:a.properties)||void 0===e?void 0:e[i];if("object"!=typeof u)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);s=s&&(r||c(a)),d(u,t);}if(!s)throw new Error(`discriminator: "${i}" must be required`);return t;function c({required:e}){return Array.isArray(e)&&e.includes(i)}function d(e,t){if(e.const)u(e.const,t);else {if(!e.enum)throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`);for(const r of e.enum)u(r,t);}}function u(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${i}" values must be unique strings`);t[e]=r;}}();t.if(!1);for(const e in r)t.elseIf(c$1._`${u} === ${e}`),t.assign(d,f(r[e]));t.else(),e.error(!1,{discrError:Ee$1.DiscrError.Mapping,tag:u,tagName:i}),t.endIf();}(),()=>e.error(!1,{discrError:Ee$1.DiscrError.Tag,tag:u,tagName:i})),e.ok(d);}}},"__esModule",{value:!0}),Se$1={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},ke=o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=["/properties"],s="http://json-schema.org/draft-07/schema";class a extends R.default{_addVocabularies(){super._addVocabularies(),be$1.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Pe.default);}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(Se$1,r):Se$1;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s;}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a,Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return P$1.KeywordCxt}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c$1._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c$1.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c$1.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c$1.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c$1.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c$1.CodeGen}});}),Ne=/*@__PURE__*/a$1(ke),je=/*@__PURE__*/a$1(o$1(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r="errorMessage",s=new ke.Name("emUsed"),a={required:"missingProperty",dependencies:"property",dependentRequired:"property"},o=/\$\{[^}]+\}/,i=/\$\{([^}]+)\}/g,l=/^""\s*\+\s*|\s*\+\s*""$/g;function d(e){return {keyword:r,schemaType:["string","object"],post:!0,code(t){const{gen:d,data:h,schema:p,schemaValue:m,it:y}=t;if(!1===y.createErrors)return;const v=p,g=c$1.strConcat(u$2.default.instancePath,y.errorPath);function $(e,t){return c$1.and(ke._`${e}.keyword !== ${r}`,ke._`!${e}.${s}`,ke._`${e}.instancePath === ${g}`,ke._`${e}.keyword in ${t}`,ke._`${e}.schemaPath.indexOf(${y.errSchemaPath}) === 0`,ke._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${y.errSchemaPath.length}))`)}function _(e,t){const r=[];for(const s in e){const e=t[s];o.test(e)&&r.push([s,b(e)]);}return d.object(...r)}function w(e){return o.test(e)?new n$2._Code(n$2.safeStringify(e).replace(i,(e,t)=>`" + JSON.stringify(${P$1.getData(t,y)}) + "`).replace(l,"")):ke.stringify(e)}function b(e){return ke._`function(){return ${w(e)}}`}d.if(ke._`${u$2.default.errors} > 0`,()=>{if("object"==typeof v){const[o,n]=function(e){let t,r;for(const s in e){if("properties"===s||"items"===s)continue;const a=e[s];if("object"==typeof a){t||(t={});const e=t[s]={};for(const t in a)e[t]=[];}else r||(r={}),r[s]=[];}return [t,r]}(v);n&&function(r){const a=d.const("emErrors",ke.stringify(r)),o=d.const("templates",_(r,p));d.forOf("err",u$2.default.vErrors,e=>d.if($(e,a),()=>d.code(ke._`${a}[${e}.keyword].push(${e})`).assign(ke._`${e}.${s}`,!0)));const{singleError:n}=e;if(n){const e=d.let("message",ke._`""`),r=d.let("paramsErrors",ke._`[]`);i(t=>{d.if(e,()=>d.code(ke._`${e} += ${"string"==typeof n?n:";"}`)),d.code(ke._`${e} += ${c(t)}`),d.assign(r,ke._`${r}.concat(${a}[${t}])`);}),f$1.reportError(t,{message:e,params:ke._`{errors: ${r}}`});}else i(e=>f$1.reportError(t,{message:c(e),params:ke._`{errors: ${a}[${e}]}`}));function i(e){d.forIn("key",a,t=>d.if(ke._`${a}[${t}].length`,()=>e(t)));}function c(e){return ke._`${e} in ${o} ? ${o}[${e}]() : ${m}[${e}]`}}(n),o&&function(e){const r=d.const("emErrors",ke.stringify(e)),o=[];for(const t in e)o.push([t,_(e[t],p[t])]);const n=d.const("templates",d.object(...o)),i=d.scopeValue("obj",{ref:a,code:ke.stringify(a)}),c=d.let("emPropParams"),l=d.let("emParamsErrors");d.forOf("err",u$2.default.vErrors,e=>d.if($(e,r),()=>{d.assign(c,ke._`${i}[${e}.keyword]`),d.assign(l,ke._`${r}[${e}.keyword][${e}.params[${c}]]`),d.if(l,()=>d.code(ke._`${l}.push(${e})`).assign(ke._`${e}.${s}`,!0));})),d.forIn("key",r,e=>d.forIn("keyProp",ke._`${r}[${e}]`,s=>{d.assign(l,ke._`${r}[${e}][${s}]`),d.if(ke._`${l}.length`,()=>{const r=d.const("tmpl",ke._`${n}[${e}] && ${n}[${e}][${s}]`);f$1.reportError(t,{message:ke._`${r} ? ${r}() : ${m}[${e}][${s}]`,params:ke._`{errors: ${l}}`});});}));}(o),function(e){const{props:a,items:o}=e;if(!a&&!o)return;const n=ke._`typeof ${h} == "object"`,i=ke._`Array.isArray(${h})`,l=d.let("emErrors");let y,v;const $=d.let("templates");function w(e,t){d.assign(l,ke.stringify(e)),d.assign($,_(e,t));}a&&o?(y=d.let("emChildKwd"),d.if(n),d.if(i,()=>{w(o,p.items),d.assign(y,ke.str`items`);},()=>{w(a,p.properties),d.assign(y,ke.str`properties`);}),v=ke._`[${y}]`):o?(d.if(i),w(o,p.items),v=ke._`.items`):a&&(d.if(c$1.and(n,c$1.not(i))),w(a,p.properties),v=ke._`.properties`),d.forOf("err",u$2.default.vErrors,e=>function(e,t,a){d.if(c$1.and(ke._`${e}.keyword !== ${r}`,ke._`!${e}.${s}`,ke._`${e}.instancePath.indexOf(${g}) === 0`),()=>{const r=d.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:ke._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=d.const("emMatches",ke._`${r}.exec(${e}.instancePath.slice(${g}.length))`),o=d.const("emChild",ke._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);d.if(ke._`${o} !== undefined && ${o} in ${t}`,()=>a(o));});}(e,l,t=>d.code(ke._`${l}[${t}].push(${e})`).assign(ke._`${e}.${s}`,!0))),d.forIn("key",l,e=>d.if(ke._`${l}[${e}].length`,()=>{f$1.reportError(t,{message:ke._`${e} in ${$} ? ${$}[${e}]() : ${m}${v}[${e}]`,params:ke._`{errors: ${l}[${e}]}`}),d.assign(ke._`${u$2.default.vErrors}[${u$2.default.errors}-1].instancePath`,ke._`${g} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`);})),d.endIf();}(function({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[];}if(t){r.items={};for(let e=0;e<t.length;e++)r.items[e]=[];}return r}(v));}const o="string"==typeof v?v:v._;o&&function(e){const a=d.const("emErrs",ke._`[]`);d.forOf("err",u$2.default.vErrors,e=>d.if(function(e){return c$1.and(ke._`${e}.keyword !== ${r}`,ke._`!${e}.${s}`,c$1.or(ke._`${e}.instancePath === ${g}`,c$1.and(ke._`${e}.instancePath.indexOf(${g}) === 0`,ke._`${e}.instancePath[${g}.length] === "/"`)),ke._`${e}.schemaPath.indexOf(${y.errSchemaPath}) === 0`,ke._`${e}.schemaPath[${y.errSchemaPath}.length] === "/"`)}(e),()=>d.code(ke._`${a}.push(${e})`).assign(ke._`${e}.${s}`,!0))),d.if(ke._`${a}.length`,()=>f$1.reportError(t,{message:w(e),params:ke._`{errors: ${a}}`}));}(o),e.keepErrors||function(){const e=d.const("emErrs",ke._`[]`);d.forOf("err",u$2.default.vErrors,t=>d.if(ke._`!${t}.${s}`,()=>d.code(ke._`${e}.push(${t})`))),d.assign(u$2.default.vErrors,e).assign(u$2.default.errors,ke._`${e}.length`);}();});},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const h=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(d(t))};t.default=h,e.exports=h,e.exports.default=h;})),Ce=function(e,t){return e.forEach(function(e){"required"===e.keyword&&(e.instancePath="/"+e.params.missingProperty);}),e.reduce(function(e,s){var a=s.instancePath.substring(1).replace(/\//g,".");if(e[a]||(e[a]={message:s.message,type:s.keyword}),t){var o=e[a].types,n=o&&o[s.keyword];e[a]=appendErrors(a,t,e,s.keyword,n?[].concat(n,s.message||""):s.message);}return e},{})},Oe=function(r,a,o){return void 0===o&&(o={}),function(n,i,c){try{var l,d=new Ne(s$1({allErrors:!0,validateSchema:!0},a));je(d);var u=d.compile(Object.assign({$async:"async"===(null==(l=o)?void 0:l.mode)},r));return u(n)?(c.shouldUseNativeValidation&&t$1({},c),Promise.resolve({values:n,errors:{}})):Promise.resolve({values:{},errors:f$2(Ce(u.errors,!c.shouldUseNativeValidation&&"all"===c.criteriaMode),c)})}catch(e){return Promise.reject(e)}}};
44460
+ deps: ${r}}`};const r={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const s in e)"__proto__"!==s&&((Array.isArray(e[s])?t:r)[s]=e[s]);return [t,r]}(e);s(e,t),a(e,r);}};function s(e,t=e.schema){const{gen:r,data:s,it:a}=e;if(0===Object.keys(t).length)return;const o=r.let("missing");for(const n in t){const i=t[n];if(0===i.length)continue;const l=(0, g.propertyInData)(r,s,n,a.opts.ownProperties);e.setParams({property:n,depsCount:i.length,deps:i.join(", ")}),a.allErrors?r.if(l,()=>{for(const t of i)(0, g.checkReportMissingProp)(e,t);}):(r.if(c._`${l} && (${(0, g.checkMissingProp)(e,i,o)})`),(0, g.reportMissingProp)(e,o),r.else());}}function a(e,t=e.schema){const{gen:r,data:s,keyword:a,it:o}=e,n=r.name("valid");for(const i in t)(0, l.alwaysValidSchema)(o,t[i])||(r.if((0, g.propertyInData)(r,s,i,o.opts.ownProperties),()=>{const t=e.subschema({keyword:a,schemaProp:i},n);e.mergeValidEvaluated(t,n);},()=>r.var(n,!0)),e.ok(n));}t.validatePropertyDeps=s,t.validateSchemaDeps=a,t.default=r;}),oe=/*#__PURE__*/Object.defineProperty({default:{keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>c._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:s,it:a}=e;if((0, l.alwaysValidSchema)(a,r))return;const o=t.name("valid");t.forIn("key",s,r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},o),t.if((0, c.not)(o),()=>{e.error(!0),a.allErrors||t.break();});}),e.ok(o);}}},"__esModule",{value:!0});const ne={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>c._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:a,errsCount:o,it:n}=e;if(!o)throw new Error("ajv implementation error");const{allErrors:i,opts:d}=n;if(n.props=!0,"all"!==d.removeAdditional&&(0, l.alwaysValidSchema)(n,r))return;const f=(0, g.allSchemaProperties)(s.properties),h=(0, g.allSchemaProperties)(s.patternProperties);function p(e){t.code(c._`delete ${a}[${e}]`);}function m(s){if("all"===d.removeAdditional||d.removeAdditional&&!1===r)p(s);else {if(!1===r)return e.setParams({additionalProperty:s}),e.error(),void(i||t.break());if("object"==typeof r&&!(0, l.alwaysValidSchema)(n,r)){const r=t.name("valid");"failing"===d.removeAdditional?(y(s,r,!1),t.if((0, c.not)(r),()=>{e.reset(),p(s);})):(y(s,r),i||t.if((0, c.not)(r),()=>t.break()));}}}function y(t,r,s){const a={keyword:"additionalProperties",dataProp:t,dataPropType:l.Type.Str};!1===s&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,r);}t.forIn("key",a,r=>{f.length||h.length?t.if(function(r){let a;if(f.length>8){const e=(0, l.schemaRefOrVal)(n,s.properties,"properties");a=(0, g.isOwnProperty)(t,e,r);}else a=f.length?(0, c.or)(...f.map(e=>c._`${r} === ${e}`)):c.nil;return h.length&&(a=(0, c.or)(a,...h.map(t=>c._`${(0, g.usePattern)(e,t)}.test(${r})`))),(0, c.not)(a)}(r),()=>m(r)):m(r);}),e.ok(c._`${o} === ${u.default.errors}`);}};var ie=/*#__PURE__*/Object.defineProperty({default:ne},"__esModule",{value:!0}),ce=/*#__PURE__*/Object.defineProperty({default:{keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:a,it:o}=e;"all"===o.opts.removeAdditional&&void 0===s.additionalProperties&&ie.default.code(new P.KeywordCxt(o,ie.default,"additionalProperties"));const n=(0, g.allSchemaProperties)(r);for(const e of n)o.definedProperties.add(e);o.opts.unevaluated&&n.length&&!0!==o.props&&(o.props=l.mergeEvaluated.props(t,(0, l.toHash)(n),o.props));const i=n.filter(e=>!(0, l.alwaysValidSchema)(o,r[e]));if(0===i.length)return;const c=t.name("valid");for(const r of i)d(r)?u(r):(t.if((0, g.propertyInData)(t,a,r,o.opts.ownProperties)),u(r),o.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(c);function d(e){return o.opts.useDefaults&&!o.compositeRule&&void 0!==r[e].default}function u(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},c);}}}},"__esModule",{value:!0});const le=l;var de=/*#__PURE__*/Object.defineProperty({default:{keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:a,it:o}=e,{opts:n}=o,i=(0, g.allSchemaProperties)(r),d=i.filter(e=>(0, l.alwaysValidSchema)(o,r[e]));if(0===i.length||d.length===i.length&&(!o.opts.unevaluated||!0===o.props))return;const u=n.strictSchema&&!n.allowMatchingProperties&&a.properties,f=t.name("valid");!0===o.props||o.props instanceof c.Name||(o.props=(0, le.evaluatedPropsToName)(t,o.props));const{props:h}=o;function p(e){for(const t in u)new RegExp(e).test(t)&&(0, l.checkStrictMode)(o,`property ${t} matches pattern ${e} (use allowMatchingProperties)`);}function m(r){t.forIn("key",s,s=>{t.if(c._`${(0, g.usePattern)(e,r)}.test(${s})`,()=>{const a=d.includes(r);a||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:s,dataPropType:le.Type.Str},f),o.opts.unevaluated&&!0!==h?t.assign(c._`${h}[${s}]`,!0):a||o.allErrors||t.if((0, c.not)(f),()=>t.break());});});}!function(){for(const e of i)u&&p(e),o.allErrors?m(e):(t.var(f,!0),m(e),t.if(f));}();}}},"__esModule",{value:!0}),ue=/*#__PURE__*/Object.defineProperty({default:{keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:s}=e;if((0, l.alwaysValidSchema)(s,r))return void e.fail();const a=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),e.failResult(a,()=>e.reset(),()=>e.error());},error:{message:"must NOT be valid"}}},"__esModule",{value:!0}),fe=/*#__PURE__*/Object.defineProperty({default:{keyword:"anyOf",schemaType:"array",trackErrors:!0,code:g.validateUnion,error:{message:"must match a schema in anyOf"}}},"__esModule",{value:!0}),he=/*#__PURE__*/Object.defineProperty({default:{keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>c._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:s,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;const o=r,n=t.let("valid",!1),i=t.let("passing",null),d=t.name("_valid");e.setParams({passing:i}),t.block(function(){o.forEach((r,s)=>{let o;(0, l.alwaysValidSchema)(a,r)?t.var(d,!0):o=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if(c._`${d} && ${n}`).assign(n,!1).assign(i,c._`[${i}, ${s}]`).else(),t.if(d,()=>{t.assign(n,!0),t.assign(i,s),o&&e.mergeEvaluated(o,c.Name);});});}),e.result(n,()=>e.reset(),()=>e.error(!0));}}},"__esModule",{value:!0}),pe=/*#__PURE__*/Object.defineProperty({default:{keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const a=t.name("valid");r.forEach((t,r)=>{if((0, l.alwaysValidSchema)(s,t))return;const o=e.subschema({keyword:"allOf",schemaProp:r},a);e.ok(a),e.mergeEvaluated(o);});}}},"__esModule",{value:!0});function me(e,t){const r=e.schema[t];return void 0!==r&&!(0, l.alwaysValidSchema)(e,r)}var ye=/*#__PURE__*/Object.defineProperty({default:{keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>c.str`must match "${e.ifClause}" schema`,params:({params:e})=>c._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:s}=e;void 0===r.then&&void 0===r.else&&(0, l.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=me(s,"then"),o=me(s,"else");if(!a&&!o)return;const n=t.let("valid",!0),i=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},i);e.mergeEvaluated(t);}(),e.reset(),a&&o){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(i,d("then",r),d("else",r));}else a?t.if(i,d("then")):t.if((0, c.not)(i),d("else"));function d(r,s){return ()=>{const a=e.subschema({keyword:r},i);t.assign(n,i),e.mergeValidEvaluated(a,n),s?t.assign(s,c._`${r}`):e.setParams({ifClause:r});}}e.pass(n,()=>e.error(!0));}}},"__esModule",{value:!0}),ve=/*#__PURE__*/Object.defineProperty({default:{keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0, l.checkStrictMode)(r,`"${e}" without "if" is ignored`);}}},"__esModule",{value:!0}),ge=/*#__PURE__*/Object.defineProperty({default:function(e=!1){const t=[ue.default,fe.default,he.default,pe.default,ye.default,ve.default,oe.default,ie.default,ae.default,ce.default,de.default];return e?t.push(te.default,re.default):t.push(X.default,ee.default),t.push(se.default),t}},"__esModule",{value:!0}),$e=/*#__PURE__*/Object.defineProperty({default:[Object.defineProperty({default:{keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>c.str`must match format "${e}"`,params:({schemaCode:e})=>c._`{format: ${e}}`},code(e,t){const{gen:r,data:s,$data:a,schema:o,schemaCode:n,it:i}=e,{opts:l,errSchemaPath:d,schemaEnv:u,self:f}=i;l.validateFormats&&(a?function(){const a=r.scopeValue("formats",{ref:f.formats,code:l.code.formats}),o=r.const("fDef",c._`${a}[${n}]`),i=r.let("fType"),d=r.let("format");r.if(c._`typeof ${o} == "object" && !(${o} instanceof RegExp)`,()=>r.assign(i,c._`${o}.type || "string"`).assign(d,c._`${o}.validate`),()=>r.assign(i,c._`"string"`).assign(d,o)),e.fail$data((0, c.or)(!1===l.strictSchema?c.nil:c._`${n} && !${d}`,function(){const e=u.$async?c._`(${o}.async ? await ${d}(${s}) : ${d}(${s}))`:c._`${d}(${s})`,r=c._`(typeof ${d} == "function" ? ${e} : ${d}.test(${s}))`;return c._`${d} && ${d} !== true && ${i} === ${t} && !${r}`}()));}():function(){const a=f.formats[o];if(!a)return void function(){if(!1!==l.strictSchema)throw new Error(e());function e(){return `unknown format "${o}" ignored in schema at path "${d}"`}f.logger.warn(e());}();if(!0===a)return;const[n,i,h]=function(e){const t=e instanceof RegExp?(0, c.regexpCode)(e):l.code.formats?c._`${l.code.formats}${(0, c.getProperty)(o)}`:void 0,s=r.scopeValue("formats",{key:o,ref:e,code:t});return "object"!=typeof e||e instanceof RegExp?["string",e,s]:[e.type||"string",e.validate,c._`${s}.validate`]}(a);n===t&&e.pass(function(){if("object"==typeof a&&!(a instanceof RegExp)&&a.async){if(!u.$async)throw new Error("async format in sync schema");return c._`await ${h}(${s})`}return "function"==typeof i?c._`${h}(${s})`:c._`${h}.test(${s})`}());}());}}},"__esModule",{value:!0}).default]},"__esModule",{value:!0}),_e=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];});const we=[A.default,Y.default,(0, ge.default)(),$e.default,_e.metadataVocabulary,_e.contentVocabulary];var be=/*#__PURE__*/Object.defineProperty({default:we},"__esModule",{value:!0}),Ee=o(function(e,t){var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping";}),Pe=/*#__PURE__*/Object.defineProperty({default:{keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===Ee.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>c._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:a,it:o}=e,{oneOf:n}=a;if(!o.opts.discriminator)throw new Error("discriminator: requires discriminator option");const i=s.propertyName;if("string"!=typeof i)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!n)throw new Error("discriminator: requires oneOf keyword");const d=t.let("valid",!1),u=t.const("tag",c._`${r}${(0, c.getProperty)(i)}`);function f(r){const s=t.name("valid"),a=e.subschema({keyword:"oneOf",schemaProp:r},s);return e.mergeEvaluated(a,c.Name),s}t.if(c._`typeof ${u} == "string"`,()=>function(){const r=function(){var e;const t={},r=c(a);let s=!0;for(let t=0;t<n.length;t++){let a=n[t];(null==a?void 0:a.$ref)&&!(0, l.schemaHasRulesButRef)(a,o.self.RULES)&&(a=C.resolveRef.call(o.self,o.schemaEnv.root,o.baseId,null==a?void 0:a.$ref),a instanceof C.SchemaEnv&&(a=a.schema));const u=null===(e=null==a?void 0:a.properties)||void 0===e?void 0:e[i];if("object"!=typeof u)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);s=s&&(r||c(a)),d(u,t);}if(!s)throw new Error(`discriminator: "${i}" must be required`);return t;function c({required:e}){return Array.isArray(e)&&e.includes(i)}function d(e,t){if(e.const)u(e.const,t);else {if(!e.enum)throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`);for(const r of e.enum)u(r,t);}}function u(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${i}" values must be unique strings`);t[e]=r;}}();t.if(!1);for(const e in r)t.elseIf(c._`${u} === ${e}`),t.assign(d,f(r[e]));t.else(),e.error(!1,{discrError:Ee.DiscrError.Mapping,tag:u,tagName:i}),t.endIf();}(),()=>e.error(!1,{discrError:Ee.DiscrError.Tag,tag:u,tagName:i})),e.ok(d);}}},"__esModule",{value:!0}),Se={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0},ke=o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const r=["/properties"],s="http://json-schema.org/draft-07/schema";class a extends R.default{_addVocabularies(){super._addVocabularies(),be.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Pe.default);}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(Se,r):Se;this.addMetaSchema(e,s,!1),this.refs["http://json-schema.org/schema"]=s;}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a,Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return P.KeywordCxt}}),Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});}),Ne=/*@__PURE__*/a(ke),je=/*@__PURE__*/a(o(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r="errorMessage",s=new ke.Name("emUsed"),a={required:"missingProperty",dependencies:"property",dependentRequired:"property"},o=/\$\{[^}]+\}/,i=/\$\{([^}]+)\}/g,l=/^""\s*\+\s*|\s*\+\s*""$/g;function d(e){return {keyword:r,schemaType:["string","object"],post:!0,code(t){const{gen:d,data:h,schema:p,schemaValue:m,it:y}=t;if(!1===y.createErrors)return;const v=p,g=c.strConcat(u.default.instancePath,y.errorPath);function $(e,t){return c.and(ke._`${e}.keyword !== ${r}`,ke._`!${e}.${s}`,ke._`${e}.instancePath === ${g}`,ke._`${e}.keyword in ${t}`,ke._`${e}.schemaPath.indexOf(${y.errSchemaPath}) === 0`,ke._`/^\\/[^\\/]*$/.test(${e}.schemaPath.slice(${y.errSchemaPath.length}))`)}function _(e,t){const r=[];for(const s in e){const e=t[s];o.test(e)&&r.push([s,b(e)]);}return d.object(...r)}function w(e){return o.test(e)?new n._Code(n.safeStringify(e).replace(i,(e,t)=>`" + JSON.stringify(${P.getData(t,y)}) + "`).replace(l,"")):ke.stringify(e)}function b(e){return ke._`function(){return ${w(e)}}`}d.if(ke._`${u.default.errors} > 0`,()=>{if("object"==typeof v){const[o,n]=function(e){let t,r;for(const s in e){if("properties"===s||"items"===s)continue;const a=e[s];if("object"==typeof a){t||(t={});const e=t[s]={};for(const t in a)e[t]=[];}else r||(r={}),r[s]=[];}return [t,r]}(v);n&&function(r){const a=d.const("emErrors",ke.stringify(r)),o=d.const("templates",_(r,p));d.forOf("err",u.default.vErrors,e=>d.if($(e,a),()=>d.code(ke._`${a}[${e}.keyword].push(${e})`).assign(ke._`${e}.${s}`,!0)));const{singleError:n}=e;if(n){const e=d.let("message",ke._`""`),r=d.let("paramsErrors",ke._`[]`);i(t=>{d.if(e,()=>d.code(ke._`${e} += ${"string"==typeof n?n:";"}`)),d.code(ke._`${e} += ${c(t)}`),d.assign(r,ke._`${r}.concat(${a}[${t}])`);}),f.reportError(t,{message:e,params:ke._`{errors: ${r}}`});}else i(e=>f.reportError(t,{message:c(e),params:ke._`{errors: ${a}[${e}]}`}));function i(e){d.forIn("key",a,t=>d.if(ke._`${a}[${t}].length`,()=>e(t)));}function c(e){return ke._`${e} in ${o} ? ${o}[${e}]() : ${m}[${e}]`}}(n),o&&function(e){const r=d.const("emErrors",ke.stringify(e)),o=[];for(const t in e)o.push([t,_(e[t],p[t])]);const n=d.const("templates",d.object(...o)),i=d.scopeValue("obj",{ref:a,code:ke.stringify(a)}),c=d.let("emPropParams"),l=d.let("emParamsErrors");d.forOf("err",u.default.vErrors,e=>d.if($(e,r),()=>{d.assign(c,ke._`${i}[${e}.keyword]`),d.assign(l,ke._`${r}[${e}.keyword][${e}.params[${c}]]`),d.if(l,()=>d.code(ke._`${l}.push(${e})`).assign(ke._`${e}.${s}`,!0));})),d.forIn("key",r,e=>d.forIn("keyProp",ke._`${r}[${e}]`,s=>{d.assign(l,ke._`${r}[${e}][${s}]`),d.if(ke._`${l}.length`,()=>{const r=d.const("tmpl",ke._`${n}[${e}] && ${n}[${e}][${s}]`);f.reportError(t,{message:ke._`${r} ? ${r}() : ${m}[${e}][${s}]`,params:ke._`{errors: ${l}}`});});}));}(o),function(e){const{props:a,items:o}=e;if(!a&&!o)return;const n=ke._`typeof ${h} == "object"`,i=ke._`Array.isArray(${h})`,l=d.let("emErrors");let y,v;const $=d.let("templates");function w(e,t){d.assign(l,ke.stringify(e)),d.assign($,_(e,t));}a&&o?(y=d.let("emChildKwd"),d.if(n),d.if(i,()=>{w(o,p.items),d.assign(y,ke.str`items`);},()=>{w(a,p.properties),d.assign(y,ke.str`properties`);}),v=ke._`[${y}]`):o?(d.if(i),w(o,p.items),v=ke._`.items`):a&&(d.if(c.and(n,c.not(i))),w(a,p.properties),v=ke._`.properties`),d.forOf("err",u.default.vErrors,e=>function(e,t,a){d.if(c.and(ke._`${e}.keyword !== ${r}`,ke._`!${e}.${s}`,ke._`${e}.instancePath.indexOf(${g}) === 0`),()=>{const r=d.scopeValue("pattern",{ref:/^\/([^/]*)(?:\/|$)/,code:ke._`new RegExp("^\\\/([^/]*)(?:\\\/|$)")`}),s=d.const("emMatches",ke._`${r}.exec(${e}.instancePath.slice(${g}.length))`),o=d.const("emChild",ke._`${s} && ${s}[1].replace(/~1/g, "/").replace(/~0/g, "~")`);d.if(ke._`${o} !== undefined && ${o} in ${t}`,()=>a(o));});}(e,l,t=>d.code(ke._`${l}[${t}].push(${e})`).assign(ke._`${e}.${s}`,!0))),d.forIn("key",l,e=>d.if(ke._`${l}[${e}].length`,()=>{f.reportError(t,{message:ke._`${e} in ${$} ? ${$}[${e}]() : ${m}${v}[${e}]`,params:ke._`{errors: ${l}[${e}]}`}),d.assign(ke._`${u.default.vErrors}[${u.default.errors}-1].instancePath`,ke._`${g} + "/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`);})),d.endIf();}(function({properties:e,items:t}){const r={};if(e){r.props={};for(const t in e)r.props[t]=[];}if(t){r.items={};for(let e=0;e<t.length;e++)r.items[e]=[];}return r}(v));}const o="string"==typeof v?v:v._;o&&function(e){const a=d.const("emErrs",ke._`[]`);d.forOf("err",u.default.vErrors,e=>d.if(function(e){return c.and(ke._`${e}.keyword !== ${r}`,ke._`!${e}.${s}`,c.or(ke._`${e}.instancePath === ${g}`,c.and(ke._`${e}.instancePath.indexOf(${g}) === 0`,ke._`${e}.instancePath[${g}.length] === "/"`)),ke._`${e}.schemaPath.indexOf(${y.errSchemaPath}) === 0`,ke._`${e}.schemaPath[${y.errSchemaPath}.length] === "/"`)}(e),()=>d.code(ke._`${a}.push(${e})`).assign(ke._`${e}.${s}`,!0))),d.if(ke._`${a}.length`,()=>f.reportError(t,{message:w(e),params:ke._`{errors: ${a}}`}));}(o),e.keepErrors||function(){const e=d.const("emErrs",ke._`[]`);d.forOf("err",u.default.vErrors,t=>d.if(ke._`!${t}.${s}`,()=>d.code(ke._`${e}.push(${t})`))),d.assign(u.default.vErrors,e).assign(u.default.errors,ke._`${e}.length`);}();});},metaSchema:{anyOf:[{type:"string"},{type:"object",properties:{properties:{$ref:"#/$defs/stringMap"},items:{$ref:"#/$defs/stringList"},required:{$ref:"#/$defs/stringOrMap"},dependencies:{$ref:"#/$defs/stringOrMap"}},additionalProperties:{type:"string"}}],$defs:{stringMap:{type:"object",additionalProperties:{type:"string"}},stringOrMap:{anyOf:[{type:"string"},{$ref:"#/$defs/stringMap"}]},stringList:{type:"array",items:{type:"string"}}}}}}const h=(e,t={})=>{if(!e.opts.allErrors)throw new Error("ajv-errors: Ajv option allErrors must be true");if(e.opts.jsPropertySyntax)throw new Error("ajv-errors: ajv option jsPropertySyntax is not supported");return e.addKeyword(d(t))};t.default=h,e.exports=h,e.exports.default=h;})),Ce=function(e,t){return e.forEach(function(e){"required"===e.keyword&&(e.instancePath="/"+e.params.missingProperty);}),e.reduce(function(e,s){var a=s.instancePath.substring(1).replace(/\//g,".");if(e[a]||(e[a]={message:s.message,type:s.keyword}),t){var o=e[a].types,n=o&&o[s.keyword];e[a]=appendErrors(a,t,e,s.keyword,n?[].concat(n,s.message||""):s.message);}return e},{})},Oe=function(r,a,o){return void 0===o&&(o={}),function(n,i,c){try{var l,d=new Ne(s({allErrors:!0,validateSchema:!0},a));je(d);var u=d.compile(Object.assign({$async:"async"===(null==(l=o)?void 0:l.mode)},r));return u(n)?(c.shouldUseNativeValidation&&t({},c),Promise.resolve({values:n,errors:{}})):Promise.resolve({values:{},errors:f$1(Ce(u.errors,!c.shouldUseNativeValidation&&"all"===c.criteriaMode),c)})}catch(e){return Promise.reject(e)}}};
44278
44461
 
44279
- var css_248z$9 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}";
44280
- styleInject(css_248z$9);
44462
+ var generateSchema = function (inputs) {
44463
+ var required = inputs.reduce(function (p, c) { return c.required ? __spreadArray(__spreadArray([], p, true), [c.name], false) : p; }, []);
44464
+ var properties = inputs.reduce(function (p, c) {
44465
+ var _a, _b, _c;
44466
+ if (!c.required && !c.spec) {
44467
+ return p;
44468
+ }
44469
+ else if (c.required && !c.spec && c.type === 'DAGFileInput') {
44470
+ // required field with no schema
44471
+ return (__assign(__assign({}, p), (_a = {}, _a[c.name] = {
44472
+ 'type': 'object',
44473
+ }, _a)));
44474
+ }
44475
+ else if (c.required && !c.spec) {
44476
+ // required field with no schema
44477
+ return (__assign(__assign({}, p), (_b = {}, _b[c.name] = {}, _b)));
44478
+ }
44479
+ return (__assign(__assign({}, p), (_c = {}, _c[c.name] = __assign({}, c.spec), _c)));
44480
+ }, {});
44481
+ required.push('study-name');
44482
+ properties['study-name'] = { 'type': 'string', minLength: 1 };
44483
+ return ({
44484
+ type: 'object',
44485
+ properties: properties,
44486
+ required: required,
44487
+ additionalProperties: true
44488
+ });
44489
+ };
44281
44490
 
44282
- var css_248z$8 = "";
44491
+ var css_248z$8 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.cards-recipe {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));\n grid-auto-rows: auto;\n grid-gap: 1rem;\n}\n\n.cards-container-recipe {\n border: 1px solid rgba(0, 0, 0, 0.125);\n padding: 10px 0 0 0;\n margin: 10px 0 0 0;\n border-radius: 6px;\n}\n\n.cards-container-title-recipe {\n margin: 0 0 10px 0;\n font-size: 17px !important;\n}";
44283
44492
  styleInject(css_248z$8);
44284
44493
 
44285
- var Action$2;
44286
- (function (Action) {
44287
- Action["add"] = "add";
44288
- Action["delete"] = "delete";
44289
- Action["preview"] = "preview";
44290
- Action["clear"] = "clear";
44291
- Action["subscribePreview"] = "subscribe-preview";
44292
- })(Action$2 || (Action$2 = {}));
44293
-
44294
- var getAction$2 = function (key) {
44295
- switch (key) {
44296
- case 'add':
44297
- return 'AddResults';
44298
- case 'delete':
44299
- return 'DeleteResults';
44300
- case 'preview':
44301
- return 'PreviewResults';
44302
- case 'clear':
44303
- return 'ClearResults';
44304
- case 'subscribe-preview':
44305
- return 'SubscribePreviewResults';
44306
- }
44307
- };
44308
- var SendResults = function (_a) {
44309
- var results = _a.results, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Results' : _b, geometryOptions = _a.geometryOptions, _c = _a.style, style = _c === void 0 ? {} : _c;
44310
- var _d = useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action$2.preview), selOpt = _d[0], setSelOpt = _d[1];
44311
- var _e = useState(defaultKey !== null && defaultKey !== void 0 ? defaultKey : performance.now().toString()), key = _e[0], setKey = _e[1];
44312
- var sendMessage = useSendMessage().sendMessage;
44313
- var disabled = useMemo(function () {
44314
- return !checkPollinationPanel();
44315
- }, []);
44316
- useEffect(function () {
44317
- console.log(disabled);
44318
- }, [disabled]);
44319
- useEffect(function () {
44320
- setSelOpt(defaultAction);
44321
- }, [defaultAction]);
44322
- useEffect(function () {
44323
- setKey(defaultKey);
44324
- }, [defaultKey]);
44325
- useEffect(function () {
44326
- if (disabled || selOpt !== Action$2.subscribePreview)
44494
+ var host = getHost();
44495
+ var InputType;
44496
+ (function (InputType) {
44497
+ InputType["DAGGenericInput"] = "DAGGenericInput";
44498
+ InputType["DAGStringInput"] = "DAGStringInput";
44499
+ InputType["DAGIntegerInput"] = "DAGIntegerInput";
44500
+ InputType["DAGNumberInput"] = "DAGNumberInput";
44501
+ InputType["DAGBooleanInput"] = "DAGBooleanInput";
44502
+ InputType["DAGFolderInput"] = "DAGFolderInput";
44503
+ InputType["DAGFileInput"] = "DAGFileInput";
44504
+ InputType["DAGPathInput"] = "DAGPathInput";
44505
+ InputType["DAGArrayInput"] = "DAGArrayInput";
44506
+ InputType["DAGJSONObjectInput"] = "DAGJSONObjectInput";
44507
+ })(InputType || (InputType = {}));
44508
+ var RecipeForm = function (_a) {
44509
+ var _b, _c;
44510
+ var recipe = _a.recipe, projectName = _a.projectName, projectOwner = _a.projectOwner, client = _a.client, onSubmit = _a.onSubmit, _d = _a.style, style = _d === void 0 ? {} : _d;
44511
+ /**
44512
+ * Input mapping
44513
+ */
44514
+ var inputs = useMemo(function () {
44515
+ if (!recipe)
44327
44516
  return;
44328
- sendMessage('SubscribePreviewResults', {
44329
- data: results,
44330
- uniqueId: key,
44331
- options: geometryOptions,
44517
+ var data = recipe.inputs.map(function (i) {
44518
+ return {
44519
+ type: InputType[i.type],
44520
+ required: i.required,
44521
+ name: i.name,
44522
+ default: i['default'],
44523
+ spec: i.spec,
44524
+ description: i.description,
44525
+ extensions: i.hasOwnProperty('extensions') ?
44526
+ i['extensions'] : []
44527
+ };
44332
44528
  });
44333
- return function () {
44334
- sendMessage('ClearResults', {
44335
- data: results,
44336
- uniqueId: key,
44337
- options: geometryOptions,
44338
- });
44339
- };
44340
- }, [disabled, geometryOptions, key, results, selOpt, sendMessage]);
44341
- return (React__default.createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
44342
- e.stopPropagation();
44343
- if (disabled)
44344
- return;
44345
- sendMessage(getAction$2(selOpt), {
44346
- data: results,
44347
- uniqueId: key,
44348
- options: geometryOptions,
44349
- });
44350
- }, options: [{
44351
- type: 'radio',
44352
- value: selOpt,
44353
- // @ts-ignore
44354
- options: [
44355
- {
44356
- type: 'radio',
44357
- id: Action$2.preview,
44358
- label: 'Preview',
44359
- checked: selOpt === Action$2.preview,
44360
- icon: React__default.createElement(Eyeglasses$1, { size: 16, color: style && style['color'] }),
44361
- disabled: disabled,
44362
- onSelect: function () {
44363
- setSelOpt(function (state) { return (state === Action$2.preview ? undefined : Action$2.preview); });
44364
- },
44365
- },
44366
- {
44367
- type: 'radio',
44368
- id: Action$2.add,
44369
- label: 'Add',
44370
- checked: selOpt === Action$2.add,
44371
- icon: React__default.createElement(Building$1, { size: 16, color: style && style['color'] }),
44372
- disabled: disabled,
44373
- onSelect: function () {
44374
- setSelOpt(function (state) { return (state === Action$2.add ? undefined : Action$2.add); });
44375
- },
44376
- },
44377
- {
44378
- type: 'radio',
44379
- id: Action$2.delete,
44380
- label: 'Delete',
44381
- checked: selOpt === Action$2.delete,
44382
- icon: React__default.createElement(Trash$1, { size: 16, color: style && style['color'] }),
44383
- disabled: disabled,
44384
- onSelect: function () {
44385
- setSelOpt(function (state) { return (state === Action$2.delete ? undefined : Action$2.delete); });
44386
- },
44387
- },
44388
- {
44389
- type: 'radio',
44390
- id: Action$2.clear,
44391
- label: 'Clear',
44392
- checked: selOpt === Action$2.clear,
44393
- icon: React__default.createElement(Recycle$1, { size: 16, color: style && style['color'] }),
44394
- disabled: disabled,
44395
- onSelect: function () {
44396
- setSelOpt(function (state) { return (state === Action$2.clear ? undefined : Action$2.clear); });
44397
- },
44398
- },
44399
- {
44400
- type: 'radio',
44401
- id: Action$2.subscribePreview,
44402
- label: 'Subscribe Preview',
44403
- checked: selOpt === Action$2.subscribePreview,
44404
- icon: React__default.createElement(ArrowRepeat$1, { size: 16, color: style && style['color'] }),
44405
- disabled: disabled,
44406
- onSelect: function () {
44407
- setSelOpt(function (state) { return (state === Action$2.subscribePreview ? undefined : Action$2.subscribePreview); });
44408
- },
44409
- },
44410
- ].filter(function (o) {
44411
- if (!optionsConfig)
44412
- return true;
44413
- return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
44414
- }),
44415
- }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " results.") }));
44416
- };
44417
-
44418
- /*!
44419
-
44420
- JSZip v3.10.1 - A JavaScript class for generating and reading zip files
44421
- <http://stuartk.com/jszip>
44422
-
44423
- (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
44424
- Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
44425
-
44426
- JSZip uses the library pako released under the MIT license :
44427
- https://github.com/nodeca/pako/blob/main/LICENSE
44428
- */
44429
-
44430
- var jszip_min = createCommonjsModule(function (module, exports) {
44431
- !function(e){module.exports=e();}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof commonjsRequire&&commonjsRequire;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h);}return o[r].exports}for(var l="function"==typeof commonjsRequire&&commonjsRequire,e=0;e<h.length;e++)u(h[e]);return u}({1:[function(e,t,r){var d=e("./utils"),c=e("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,n,i,s,a,o,h=[],u=0,l=e.length,f=l,c="string"!==d.getTypeOf(e);u<e.length;)f=l-u,n=c?(t=e[u++],r=u<l?e[u++]:0,u<l?e[u++]:0):(t=e.charCodeAt(u++),r=u<l?e.charCodeAt(u++):0,u<l?e.charCodeAt(u++):0),i=t>>2,s=(3&t)<<4|r>>4,a=1<f?(15&r)<<2|n>>6:64,o=2<f?63&n:64,h.push(p.charAt(i)+p.charAt(s)+p.charAt(a)+p.charAt(o));return h.join("")},r.decode=function(e){var t,r,n,i,s,a,o=0,h=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var l,f=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===p.charAt(64)&&f--,e.charAt(e.length-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=c.uint8array?new Uint8Array(0|f):new Array(0|f);o<e.length;)t=p.indexOf(e.charAt(o++))<<2|(i=p.indexOf(e.charAt(o++)))>>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l};},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i;}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o;},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate");},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e;}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return -1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t.charCodeAt(a))];return -1^e}(0|t,e,e.length,0):0};},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null;},{}],6:[function(e,t,r){var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n};},{lie:37}],7:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={};}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1);},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0);},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null;},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta});};},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})};},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function A(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}));},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=!0;},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=function(e,t,r,n,i){var s=I.transformTo("string",i(n));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+A(e,2)+A(e,2)+A(t,4)+A(r,4)+A(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}});},s.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();},s.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e);}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end();}),e.on("error",function(e){t.error(e);}),this},s.prototype.resume=function(){return !!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},s.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return !1;for(var r=0;r<t.length;r++)try{t[r].error(e);}catch(e){}return !0},s.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock();},t.exports=s;},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var u=e("../compressions"),n=e("./ZipFileWorker");r.generateWorker=function(e,a,t){var o=new n(a.streamFiles,t,a.platform,a.encodeFileName),h=0;try{e.forEach(function(e,t){h++;var r=function(e,t){var r=e||t,n=u[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(t.options.compression,a.compression),n=t.options.compressionOptions||a.compressionOptions||{},i=t.dir,s=t.date;t._compressWorker(r,n).withStreamInfo("file",{name:e,dir:i,date:s,comment:t.comment||"",unixPermissions:t.unixPermissions,dosPermissions:t.dosPermissions}).pipe(o);}),o.entriesCount=h;}catch(e){o.error(e);}return o};},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e};}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return (new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n;},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var u=e("./utils"),i=e("./external"),n=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function f(n){return new i.Promise(function(e,t){var r=n.decompressed.getContentWorker().pipe(new a);r.on("error",function(e){t(e);}).on("end",function(){r.streamInfo.crc32!==n.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):e();}).resume();})}t.exports=function(e,o){var h=this;return o=u.extend(o||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",e,!0,o.optimizedBinaryString,o.base64).then(function(e){var t=new s(o);return t.load(e),t}).then(function(e){var t=[i.Promise.resolve(e)],r=e.files;if(o.checkCRC32)for(var n=0;n<r.length;n++)t.push(f(r[n]));return i.Promise.all(t)}).then(function(e){for(var t=e.shift(),r=t.files,n=0;n<r.length;n++){var i=r[n],s=i.fileNameStr,a=u.resolve(i.fileNameStr);h.file(a,i.decompressed,{binary:!0,optimizedBinaryString:!0,date:i.date,dir:i.dir,comment:i.fileCommentStr.length?i.fileCommentStr:null,unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions,createFolders:o.createFolders}),i.dir||(h.file(a).unsafeOriginalName=s);}return t.zipComment.length&&(h.comment=t.zipComment),h})};},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t);}n.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}});}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e);}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end();});},s.prototype.pause=function(){return !!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return !!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s;},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var i=e("readable-stream").Readable;function n(e,t,r){i.call(this,t),this._helper=e;var n=this;e.on("data",function(e,t){n.push(e)||n._helper.pause(),r&&r(t);}).on("error",function(e){n.emit("error",e);}).on("end",function(){n.push(null);});}e("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume();},t.exports=n;},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}};},{}],15:[function(e,t,r){function s(e,t,r){var n,i=u.getTypeOf(t),s=u.extend(r||{},f);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=g(e)),s.createFolders&&(n=_(e))&&b.call(this,n,!0);var a="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!a),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var o=null;o=t instanceof c||t instanceof l?t:p.isNode&&p.isStream(t)?new m(e,t):u.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var h=new d(e,o,s);this.files[e]=h;}var i=e("./utf8"),u=e("./utils"),l=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),f=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),o=e("./generate"),p=e("./nodejsUtils"),m=e("./nodejs/NodejsStreamInputAdapter"),_=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return "/"!==e.slice(-1)&&(e+="/"),e},b=function(e,t){return t=void 0!==t?t:f.createFolders,e=g(e),this.files[e]||s.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function h(e){return "[object RegExp]"===Object.prototype.toString.call(e)}var n={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n);},filter:function(r){var n=[];return this.forEach(function(e,t){r(e,t)&&n.push(t);}),n},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,s.call(this,e,t,r),this;if(h(e)){var n=e;return this.filter(function(e,t){return !t.dir&&n.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(r){if(!r)return this;if(h(r))return this.filter(function(e,t){return t.dir&&r.test(e)});var e=this.root+r,t=b.call(this,e),n=this.clone();return n.root=t.name,n},remove:function(r){r=this.root+r;var e=this.files[r];if(e||("/"!==r.slice(-1)&&(r+="/"),e=this.files[r]),e&&!e.dir)delete this.files[r];else for(var t=this.filter(function(e,t){return t.name.slice(0,r.length)===r}),n=0;n<t.length;n++)delete this.files[t[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=u.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");u.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=o.generateWorker(this,r,n);}catch(e){(t=new l("error")).error(e);}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return (e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=n;},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream");},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t];}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return -1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return [];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e);},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e;},skip:function(e){this.setIndex(this.index+e);},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i;},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)};},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b";},{}],24:[function(e,t,r){var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e;}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta});},t.exports=s;},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e);},t.exports=s;},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}i.prototype.processChunk.call(this,e);},t.exports=s;},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat();},function(e){t.error(e);});}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null;},s.prototype.resume=function(){return !!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0));},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return !1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t);}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s;},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null;}n.prototype={push:function(e){this.emit("data",e);},end:function(){if(this.isFinished)return !1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(e){this.emit("error",e);}return !0},error:function(e){return !this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t);},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e);}),e.on("end",function(){t.end();}),e.on("error",function(e){t.error(e);}),this},pause:function(){return !this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return !1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e);},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock();},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n;},{}],29:[function(e,t,r){var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter");}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t);}).on("error",function(e){n=[],r(e);}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r<t.length;r++)s+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(s),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(i,n),a);t(e);}catch(e){r(e);}n=[];}).resume();})}function f(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";}try{this._internalType=n,this._outputType=t,this._mimeType=r,h.checkSupport(n),this._worker=e.pipe(new i(n)),e.lock();}catch(e){this._worker=new s("error"),this._worker.error(e);}}f.prototype={accumulate:function(e){return l(this,e)},on:function(e,t){var r=this;return "data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta);}):this._worker.on(e,function(){h.delay(t,arguments,r);}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=f;},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else {var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size;}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size;}catch(e){r.blob=!1;}}}try{r.nodestream=!!e("readable-stream").Readable;}catch(e){r.nodestream=!1;}},{"readable-stream":16}],31:[function(e,t,s){for(var o=e("./utils"),h=e("./support"),r=e("./nodejsUtils"),n=e("./stream/GenericWorker"),u=new Array(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;u[254]=u[254]=1;function a(){n.call(this,"utf-8 decode"),this.leftOver=null;}function l(){n.call(this,"utf-8 encode");}s.utf8encode=function(e){return h.nodebuffer?r.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=h.uint8array?new Uint8Array(o):new Array(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t<s;)if((n=e[t++])<128)a[r++]=n;else if(4<(i=u[n]))a[r++]=65533,t+=i-1;else {for(n&=2===i?31:3===i?15:7;1<i&&t<s;)n=n<<6|63&e[t++],i--;1<i?a[r++]=65533:n<65536?a[r++]=n:(n-=65536,a[r++]=55296|n>>10&1023,a[r++]=56320|1023&n);}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length);}else t=this.leftOver.concat(t);this.leftOver=null;}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta});},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta});},s.Utf8EncodeWorker=l;},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),a.newBlob=function(t,r){a.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var i={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return !1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(e){return !1}}()}};function s(e){var t=65536,r=a.getTypeOf(e),n=!0;if("uint8array"===r?n=i.applyCanBeUsed.uint8array:"nodebuffer"===r&&(n=i.applyCanBeUsed.nodebuffer),n)for(;1<t;)try{return i.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2);}return i.stringifyByChar(e)}function f(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}a.applyFromCharCode=s;var c={};c.string={string:n,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return c.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,r.allocBuffer(e.length))}},c.array={string:s,array:n,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(e)}},c.arraybuffer={string:function(e){return s(new Uint8Array(e))},array:function(e){return f(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:n,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(new Uint8Array(e))}},c.uint8array={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:n,nodebuffer:function(e){return r.newBufferFrom(e)}},c.nodebuffer={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return c.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:n},a.transformTo=function(e,t){if(t=t||"",!e)return t;a.checkSupport(e);var r=a.getTypeOf(t);return c[r][e](t)},a.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i));}return r.join("/")},a.getTypeOf=function(e){return "string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":o.nodebuffer&&r.isBuffer(e)?"nodebuffer":o.uint8array&&e instanceof Uint8Array?"uint8array":o.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(e){if(!o[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},a.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[]);});},a.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r;},a.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},a.prepareContent=function(r,e,n,i,s){return u.Promise.resolve(e).then(function(n){return o.blob&&(n instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(n)))&&"undefined"!=typeof FileReader?new u.Promise(function(t,r){var e=new FileReader;e.onload=function(e){t(e.target.result);},e.onerror=function(e){r(e.target.error);},e.readAsArrayBuffer(n);}):n}).then(function(e){var t=a.getTypeOf(e);return t?("arraybuffer"===t?e=a.transformTo("uint8array",e):"string"===t&&(s?e=h.decode(e):n&&!0!==i&&(e=function(e){return l(e,o.uint8array?new Uint8Array(e.length):new Array(e.length))}(e))),e):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),a=e("./zipEntry"),o=e("./support");function h(e){this.files=[],this.loadOptions=e;}h.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r);},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r};},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes();},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw !this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}},t.exports=h;},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),s=e("./utils"),i=e("./compressedObject"),a=e("./crc32"),o=e("./utf8"),h=e("./compressions"),u=e("./support");function l(e,t){this.options=e,this.loadOptions=t;}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in h)if(Object.prototype.hasOwnProperty.call(h,t)&&h[t].magic===e)return h[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize));},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i);},handleUTF8:function(){var e=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else {var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else {var r=s.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else {var i=s.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i);}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileComment)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null}},t.exports=l;},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};}var s=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),a=e("./utf8"),o=e("./compressedObject"),h=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new a.Utf8DecodeWorker));}catch(e){(t=new h("error")).error(e);}return new s(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new i(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)n.prototype[u[f]]=l;t.exports=n;},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,l,t){(function(t){var r,n,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var i=0,s=new e(u),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2;};}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){u(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null;},t.document.documentElement.appendChild(e);}:function(){setTimeout(u,0);};else {var o=new t.MessageChannel;o.port1.onmessage=u,r=function(){o.port2.postMessage(0);};}var h=[];function u(){var e,t;n=!0;for(var r=h.length;r;){for(t=h,h=[],e=-1;++e<r;)t[e]();r=h.length;}n=!1;}l.exports=function(e){1!==h.push(e)||n||r();};}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],37:[function(e,t,r){var i=e("immediate");function u(){}var l={},s=["REJECTED"],a=["FULFILLED"],n=["PENDING"];function o(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=n,this.queue=[],this.outcome=void 0,e!==u&&d(this,e);}function h(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}function f(t,r,n){i(function(){var e;try{e=r(n);}catch(e){return l.reject(t,e)}e===t?l.reject(t,new TypeError("Cannot resolve promise with itself")):l.resolve(t,e);});}function c(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments);}}function d(t,e){var r=!1;function n(e){r||(r=!0,l.reject(t,e));}function i(e){r||(r=!0,l.resolve(t,e));}var s=p(function(){e(i,n);});"error"===s.status&&n(s.value);}function p(e,t){var r={};try{r.value=e(t),r.status="success";}catch(e){r.status="error",r.value=e;}return r}(t.exports=o).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})})},o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(u);this.state!==n?f(r,this.state===a?e:t,this.outcome):this.queue.push(new h(r,e,t));return r},h.prototype.callFulfilled=function(e){l.resolve(this.promise,e);},h.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e);},h.prototype.callRejected=function(e){l.reject(this.promise,e);},h.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e);},l.resolve=function(e,t){var r=p(c,t);if("error"===r.status)return l.reject(e,r.value);var n=r.value;if(n)d(e,n);else {e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t);}return e},l.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},o.resolve=function(e){if(e instanceof this)return e;return l.resolve(new this(u),e)},o.reject=function(e){var t=new this(u);return l.reject(t,e)},o.all=function(e){var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);var s=new Array(n),a=0,t=-1,o=new this(u);for(;++t<n;)h(e[t],t);return o;function h(e,t){r.resolve(e).then(function(e){s[t]=e,++a!==n||i||(i=!0,l.resolve(o,s));},function(e){i||(i=!0,l.reject(o,e));});}},o.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);var i=-1,s=new this(u);for(;++i<r;)a=e[i],t.resolve(a).then(function(e){n||(n=!0,l.resolve(s,e));},function(e){n||(n=!0,l.reject(s,e));});var a;return s};},{immediate:36}],38:[function(e,t,r){var n={};(0, e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n;},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var a=e("./zlib/deflate"),o=e("./utils/common"),h=e("./utils/strings"),i=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString,l=0,f=-1,c=0,d=8;function p(e){if(!(this instanceof p))return new p(e);this.options=o.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(i[r]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?h.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=a.deflateSetDictionary(this.strm,n))!==l)throw new Error(i[r]);this._dict_set=!0;}}function n(e,t){var r=new p(t);if(r.push(e,!0),r.err)throw r.msg||i[r.err];return r.result}p.prototype.push=function(e,t){var r,n,i=this.strm,s=this.options.chunkSize;if(this.ended)return !1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=h.string2buf(e):"[object ArrayBuffer]"===u.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new o.Buf8(s),i.next_out=0,i.avail_out=s),1!==(r=a.deflate(i,n))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(h.buf2binstring(o.shrinkBuf(i.output,i.next_out))):this.onData(o.shrinkBuf(i.output,i.next_out)));}while((0<i.avail_in||0===i.avail_out)&&1!==r);return 4===n?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==n||(this.onEnd(l),!(i.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e);},p.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;},r.Deflate=p,r.deflate=n,r.deflateRaw=function(e,t){return (t=t||{}).raw=!0,n(e,t)},r.gzip=function(e,t){return (t=t||{}).gzip=!0,n(e,t)};},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var c=e("./zlib/inflate"),d=e("./utils/common"),p=e("./utils/strings"),m=e("./zlib/constants"),n=e("./zlib/messages"),i=e("./zlib/zstream"),s=e("./zlib/gzheader"),_=Object.prototype.toString;function a(e){if(!(this instanceof a))return new a(e);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var r=c.inflateInit2(this.strm,t.windowBits);if(r!==m.Z_OK)throw new Error(n[r]);this.header=new s,c.inflateGetHeader(this.strm,this.header);}function o(e,t){var r=new a(t);if(r.push(e,!0),r.err)throw r.msg||n[r.err];return r.result}a.prototype.push=function(e,t){var r,n,i,s,a,o,h=this.strm,u=this.options.chunkSize,l=this.options.dictionary,f=!1;if(this.ended)return !1;n=t===~~t?t:!0===t?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof e?h.input=p.binstring2buf(e):"[object ArrayBuffer]"===_.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new d.Buf8(u),h.next_out=0,h.avail_out=u),(r=c.inflate(h,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&l&&(o="string"==typeof l?p.string2buf(l):"[object ArrayBuffer]"===_.call(l)?new Uint8Array(l):l,r=c.inflateSetDictionary(this.strm,o)),r===m.Z_BUF_ERROR&&!0===f&&(r=m.Z_OK,f=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==m.Z_STREAM_END&&(0!==h.avail_in||n!==m.Z_FINISH&&n!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(i=p.utf8border(h.output,h.next_out),s=h.next_out-i,a=p.buf2string(h.output,i),h.next_out=s,h.avail_out=u-s,s&&d.arraySet(h.output,h.output,i,s,0),this.onData(a)):this.onData(d.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0);}while((0<h.avail_in||0===h.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(n=m.Z_FINISH),n===m.Z_FINISH?(r=c.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):n!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(h.avail_out=0))},a.prototype.onData=function(e){this.chunks.push(e);},a.prototype.onEnd=function(e){e===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;},r.Inflate=a,r.inflate=o,r.inflateRaw=function(e,t){return (t=t||{}).raw=!0,o(e,t)},r.ungzip=o;},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s];},flattenChunks:function(e){var t,r,n,i,s,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)s=e[t],a.set(s,i),i+=s.length;return a}},s={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s];},flattenChunks:function(e){return [].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s));},r.setTyped(n);},{}],42:[function(e,t,r){var h=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0]);}catch(e){i=!1;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch(e){s=!1;}for(var u=new h.Buf8(256),n=0;n<256;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function l(e,t){if(t<65537&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,h.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}u[254]=u[254]=1,r.string2buf=function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new h.Buf8(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,s,a=t||e.length,o=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)o[n++]=i;else if(4<(s=u[i]))o[n++]=65533,r+=s-1;else {for(i&=2===s?31:3===s?15:7;1<s&&r<a;)i=i<<6|63&e[r++],s--;1<s?o[n++]=65533:i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|1023&i);}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t};},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(i=i+t[n++]|0)|0,--a;);i%=65521,s%=65521;}return i|s<<16|0};},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};},{}],45:[function(e,t,r){var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e;}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return -1^e};},{}],46:[function(e,t,r){var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return (e<<1)-(4<e?9:0)}function D(e){for(var t=e.length;0<=--t;)e[t]=0;}function F(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0));}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm);}function U(e,t){e.pending_buf[e.pending++]=t;}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t;}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<c);if(n=S-(c-s),s=c-S,a<n){if(e.match_start=t,o<=(a=n))break;d=u[s+a-1],p=u[s+a];}}}while((t=f[t&l])>h&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f;}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u<l&&(l=u),r=0===l?0:(a.avail_in-=l,c.arraySet(o,a.input,a.next_in,l,h),1===a.state.wrap?a.adler=d(a.adler,o,l,h):2===a.state.wrap&&(a.adler=p(a.adler,o,l,h)),a.next_in+=l,a.total_in+=l,l),e.lookahead+=r,e.lookahead+e.insert>=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+x-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<x)););}while(e.lookahead<z&&0!==e.strm.avail_in)}function Z(e,t){for(var r,n;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r)),e.match_length>=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++;}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function W(e,t){for(var r,n,i;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=x-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===x&&4096<e.strstart-e.match_start)&&(e.match_length=x-1)),e.prev_length>=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=x-1,e.strstart++,n&&(N(e,!1),0===e.strm.avail_out))return A}else if(e.match_available){if((n=u._tr_tally(e,0,e.window[e.strstart-1]))&&N(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return A}else e.match_available=1,e.strstart++,e.lookahead--;}return e.match_available&&(n=u._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function M(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i;}function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*w),this.dyn_dtree=new c.Buf16(2*(2*a+1)),this.bl_tree=new c.Buf16(2*(2*o+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(k+1),this.heap=new c.Buf16(2*s+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*s+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0;}function G(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=i,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?C:E,e.adler=2===t.wrap?0:1,t.last_flush=l,u._tr_init(t),m):R(e,_)}function K(e){var t=G(e);return t===m&&function(e){e.window_size=2*e.w_size,D(e.head),e.max_lazy_match=h[e.level].max_lazy,e.good_match=h[e.level].good_length,e.nice_match=h[e.level].nice_length,e.max_chain_length=h[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0;}(e.state),t}function Y(e,t,r,n,i,s){if(!e)return _;var a=1;if(t===g&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||y<i||r!==v||n<8||15<n||t<0||9<t||s<0||b<s)return R(e,_);8===n&&(n=9);var o=new H;return (e.state=o).strm=e,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new c.Buf8(2*o.w_size),o.head=new c.Buf16(o.hash_size),o.prev=new c.Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new c.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=s,o.method=r,K(e)}h=[new M(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5<t||t<0)return e?R(e,_):_;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&t!==f)return R(e,0===e.avail_out?-5:_);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===C)if(2===n.wrap)e.adler=0,U(n,31),U(n,139),U(n,8),n.gzhead?(U(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),U(n,255&n.gzhead.time),U(n,n.gzhead.time>>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else {var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1;}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73);}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,U(n,s);}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91);}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,U(n,s);}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103);}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+S;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=S-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead);}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?m:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==E&&666!==t?R(e,_):(e.state=null,t===E?R(e,-3):m):_},r.deflateSetDictionary=function(e,t){var r,n,i,s,a,o,h,u,l=t.length;if(!e||!e.state)return _;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==C||r.lookahead)return _;for(1===s&&(e.adler=d(e.adler,t,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+x-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=x-1,j(r);}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,e.next_in=o,e.input=h,e.avail_in=a,r.wrap=s,m},r.deflateInfo="pako deflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1;};},{}],48:[function(e,t,r){t.exports=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C;r=e.state,n=e.next_in,z=e.input,i=n+(e.avail_in-5),s=e.next_out,C=e.output,a=s-(t-e.avail_out),o=s+(e.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,c=r.window,d=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=m[d&g];t:for(;;){if(d>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else {if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<<y)-1)];continue t}if(32&y){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&v,(y&=15)&&(p<y&&(d+=z[n++]<<p,p+=8),w+=d&(1<<y)-1,d>>>=y,p-=y),p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=_[d&b];r:for(;;){if(d>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<<y)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&v,p<(y&=15)&&(d+=z[n++]<<p,(p+=8)<y&&(d+=z[n++]<<p,p+=8)),h<(k+=d&(1<<y)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=c,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C;}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=c[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=c[x++],--y;);x=s-k,S=C;}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C;}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]));}else {for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]));}break}}break}}while(n<i&&s<o);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<o?o-s+257:257-(s-o),r.hold=d,r.bits=p;};},{}],49:[function(e,t,r){var I=e("../utils/common"),O=e("./adler32"),B=e("./crc32"),R=e("./inffast"),T=e("./inftrees"),D=1,F=2,N=0,U=-2,P=1,n=852,i=592;function L(e){return (e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?U:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,o(e))):U}function u(e,t){var r,n;return e?(n=new s,(e.state=n).window=null,(r=h(e,t))!==N&&(e.state=null),r):U}var l,f,c=!0;function j(e){if(c){var t;for(l=new I.Buf32(512),f=new I.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(T(D,e.lens,0,288,l,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;T(F,e.lens,0,32,f,0,e.work,{bits:5}),c=!1;}e.lencode=l,e.lenbits=9,e.distcode=f,e.distbits=5;}function Z(e,t,r,n){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new I.Buf8(s.wsize)),n>=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=o,r.inflateReset2=h,r.inflateResetKeep=a,r.inflateInit=function(e){return u(e,15)},r.inflateInit2=u,r.inflate=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C=0,E=new I.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return U;12===(r=e.state).mode&&(r.mode=13),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,f=o,c=h,x=N;e:for(;;)switch(r.mode){case P:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=512&u?10:12,l=u=0;break;case 2:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(r.flags=u,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0;}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(u!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}l=u=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}e.adler=r.check=L(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){u>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}switch(r.last=1&u,l-=1,3&(u>>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30;}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o<d&&(d=o),h<d&&(d=h),0===d)break e;I.arraySet(i,n,s,d,a),o-=d,s+=d,h-=d,a+=d,r.length-=d;break}r.mode=12;break;case 17:for(;l<14;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.lens[A[r.have++]]=7&u,u>>>=3,l-=3;}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(b<16)u>>>=_,l-=_,r.lens[r.have++]=b;else {if(16===b){for(z=_+2;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(u>>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2;}else if(17===b){for(z=_+3;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}l-=_,k=0,d=3+(7&(u>>>=_)),u>>>=3,l-=3;}else {for(z=_+7;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}l-=_,k=0,d=11+(127&(u>>>=_)),u>>>=7,l-=7;}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k;}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(g&&0==(240&g)){for(v=_,y=g,w=b;g=(C=r.lencode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<<r.distbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(0==(240&g)){for(v=_,y=g,w=b;g=(C=r.distcode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window;}else m=i,p=a-r.offset,d=r.length;for(h<d&&(d=h),h-=d,r.length-=d;i[a++]=m[p++],--d;);0===r.length&&(r.mode=21);break;case 26:if(0===h)break e;i[a++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===o)break e;o--,u|=n[s++]<<l,l+=8;}if(c-=h,e.total_out+=c,r.total+=c,c&&(e.adler=r.check=r.flags?B(r.check,i,c,a-c):O(r.check,i,c,a-c)),c=h,(r.flags?u:L(u))!==r.check){e.msg="incorrect data check",r.mode=30;break}l=u=0;}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(u!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}l=u=0;}r.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return -4;case 32:default:return U}return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,(r.wsize||c!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&Z(e,e.output,e.next_out,c-e.avail_out)?(r.mode=31,-4):(f-=e.avail_in,c-=e.avail_out,e.total_in+=f,e.total_out+=c,r.total+=c,r.wrap&&c&&(e.adler=r.check=r.flags?B(r.check,i,c,e.next_out-c):O(r.check,i,c,e.next_out-c)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==f&&0===c||4===t)&&x===N&&(x=-5),x)},r.inflateEnd=function(e){if(!e||!e.state)return U;var t=e.state;return t.window&&(t.window=null),e.state=null,N},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?U:((r.head=t).done=!1,N):U},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?U:11===r.mode&&O(1,t,n,0)!==r.check?-3:Z(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,N):U},r.inflateInfo="pako inflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var D=e("../utils/common"),F=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],U=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],P=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,n,i,s,a,o){var h,u,l,f,c,d,p,m,_,g=o.bits,b=0,v=0,y=0,w=0,k=0,x=0,S=0,z=0,C=0,E=0,A=null,I=0,O=new D.Buf16(16),B=new D.Buf16(16),R=null,T=0;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<n;v++)O[t[r+v]]++;for(k=g,w=15;1<=w&&0===O[w];w--);if(w<k&&(k=w),0===w)return i[s++]=20971520,i[s++]=20971520,o.bits=1,0;for(y=1;y<w&&0===O[y];y++);for(k<y&&(k=y),b=z=1;b<=15;b++)if(z<<=1,(z-=O[b])<0)return -1;if(0<z&&(0===e||1!==w))return -1;for(B[1]=0,b=1;b<15;b++)B[b+1]=B[b]+O[b];for(v=0;v<n;v++)0!==t[r+v]&&(a[B[t[r+v]]++]=v);if(d=0===e?(A=R=a,19):1===e?(A=F,I-=257,R=N,T-=257,256):(A=U,R=P,-1),b=y,c=s,S=v=E=0,l=-1,f=(C=1<<(x=k))-1,1===e&&852<C||2===e&&592<C)return 1;for(;;){for(p=b-S,_=a[v]<d?(m=0,a[v]):a[v]>d?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<<b-S,y=u=1<<x;i[c+(E>>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<<b-1;E&h;)h>>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]];}if(k<b&&(E&f)!==l){for(0===S&&(S=k),c+=y,z=1<<(x=b-S);x+S<w&&!((z-=O[x+S])<=0);)x++,z<<=1;if(C+=1<<x,1===e&&852<C||2===e&&592<C)return 1;i[l=E&f]=k<<24|x<<16|c-s|0;}}return 0!==E&&(i[c+E]=b-S<<24|64<<16|0),o.bits=k,0};},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};},{}],52:[function(e,t,r){var i=e("../utils/common"),o=0,h=1;function n(e){for(var t=e.length;0<=--t;)e[t]=0;}var s=0,a=29,u=256,l=u+1+a,f=30,c=19,_=2*l+1,g=15,d=16,p=7,m=256,b=16,v=17,y=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=new Array(2*(l+2));n(z);var C=new Array(2*f);n(C);var E=new Array(512);n(E);var A=new Array(256);n(A);var I=new Array(a);n(I);var O,B,R,T=new Array(f);function D(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length;}function F(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function N(e){return e<256?E[e]:E[256+(e>>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255;}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<<e.bi_valid&65535,U(e,e.bi_buf),e.bi_buf=t>>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function L(e,t,r){P(e,r[2*t],r[2*t+1]);}function j(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o));}}function W(e){var t;for(t=0;t<l;t++)e.dyn_ltree[2*t]=0;for(t=0;t<f;t++)e.dyn_dtree[2*t]=0;for(t=0;t<c;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*m]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function M(e){8<e.bi_valid?U(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0;}function H(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function G(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&H(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!H(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n;}function K(e,t,r){var n,i,s,a,o=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],i=e.pending_buf[e.l_buf+o],o++,0===n?L(e,i,t):(L(e,(s=A[i])+u+1,t),0!==(a=w[s])&&P(e,i-=I[s],a),L(e,s=N(--n),r),0!==(a=k[s])&&P(e,n-=T[s],a)),o<e.last_lit;);L(e,m,t);}function Y(e,t){var r,n,i,s=t.dyn_tree,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,h=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=_,r=0;r<h;r++)0!==s[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u<n||(e.bl_count[s]++,a=0,d<=n&&(a=c[n-d]),o=h[2*n],e.opt_len+=o*(s+a),f&&(e.static_len+=o*(l[2*n+1]+a)));if(0!==m){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,m-=2;}while(0<m);for(s=p;0!==s;s--)for(n=e.bl_count[s];0!==n;)u<(i=e.heap[--r])||(h[2*i+1]!==s&&(e.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--);}}(e,t),Z(s,u,e.bl_count);}function X(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<h&&i===a||(o<u?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*b]++):o<=10?e.bl_tree[2*v]++:e.bl_tree[2*y]++,s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4));}function V(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<h&&i===a)){if(o<u)for(;L(e,i,e.bl_tree),0!=--o;);else 0!==i?(i!==s&&(L(e,i,e.bl_tree),o--),L(e,b,e.bl_tree),P(e,o-3,2)):o<=10?(L(e,v,e.bl_tree),P(e,o-3,3)):(L(e,y,e.bl_tree),P(e,o-11,7));s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4);}}n(T);var q=!1;function J(e,t,r,n){P(e,(s<<1)+(n?1:0),3),function(e,t,r,n){M(e),n&&(U(e,r),U(e,~r)),i.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}(e,t,r,!0);}r._tr_init=function(e){q||(function(){var e,t,r,n,i,s=new Array(g+1);for(n=r=0;n<a-1;n++)for(I[n]=r,e=0;e<1<<w[n];e++)A[r++]=n;for(A[r-1]=n,n=i=0;n<16;n++)for(T[n]=i,e=0;e<1<<k[n];e++)E[i++]=n;for(i>>=7;n<f;n++)for(T[n]=i<<7,e=0;e<1<<k[n]-7;e++)E[256+i++]=n;for(t=0;t<=g;t++)s[t]=0;for(e=0;e<=143;)z[2*e+1]=8,e++,s[8]++;for(;e<=255;)z[2*e+1]=9,e++,s[9]++;for(;e<=279;)z[2*e+1]=7,e++,s[7]++;for(;e<=287;)z[2*e+1]=8,e++,s[8]++;for(Z(z,l+1,s),e=0;e<f;e++)C[2*e+1]=5,C[2*e]=j(e,5);O=new D(z,w,u+1,l,g),B=new D(C,k,0,f,g),R=new D(new Array(0),x,0,c,p);}(),q=!0),e.l_desc=new F(e.dyn_ltree,O),e.d_desc=new F(e.dyn_dtree,B),e.bl_desc=new F(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,W(e);},r._tr_stored_block=J,r._tr_flush_block=function(e,t,r,n){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t<u;t++)if(0!==e.dyn_ltree[2*t])return h;return o}(e)),Y(e,e.l_desc),Y(e,e.d_desc),a=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),Y(e,e.bl_desc),t=c-1;3<=t&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i<n;i++)P(e,e.bl_tree[2*S[i]+1],3);V(e,e.dyn_ltree,t-1),V(e,e.dyn_dtree,r-1);}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),K(e,e.dyn_ltree,e.dyn_dtree)),W(e),n&&M(e);},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8);}(e);};},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0;};},{}],54:[function(e,t,r){(function(e){!function(r,n){if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e);});}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1;},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*");}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data);},function(e){t.port2.postMessage(e);}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null;},s.appendChild(t);}):function(e){setTimeout(c,0,e);},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var n={callback:e,args:t};return h[o]=n,i(o),o++},e.clearImmediate=f;}function f(e){delete h[e];}function c(e){if(u)setTimeout(c,0,e);else {var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r);}}(t);}finally{f(e),u=!1;}}}}function d(e){e.source===r&&"string"==typeof e.data&&0===e.data.indexOf(a)&&c(+e.data.slice(a.length));}}("undefined"==typeof self?void 0===e?this:e:self);}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}]},{},[10])(10)});
44432
- });
44433
-
44434
- var shortDebounce = useDebounce(200);
44435
- var ICON_SIZE = 18;
44436
- var FilePreview = function (_a) {
44437
- var projectOwner = _a.projectOwner, projectName = _a.projectName, jobId = _a.jobId, value = _a.value, // cloud controller
44438
- client = _a.client, inputProps = _a.inputProps, onPreviewChange = _a.onPreviewChange, // Use it for streamlit setComponentValue
44439
- enableFilePicker = _a.enableFilePicker, localPath = _a.localPath // local controller
44440
- ;
44441
- var fromFileToBase64 = usePollinationPanel().fromFileToBase64;
44442
- var getExtension = function (fileName) {
44443
- if (!fileName)
44444
- return;
44445
- var arr = fileName.split(".");
44446
- if (arr) {
44447
- return arr.at(arr.length - 1);
44448
- }
44449
- };
44450
- var host = getHost();
44451
- var _b = useState(value), selArtifact = _b[0], setSelArtifact = _b[1];
44452
- var _c = useState(localPath), selFilePath = _c[0], setSelFilePath = _c[1];
44453
- var downloadArtifact = useArtifacts(projectOwner, projectName, client).downloadArtifact;
44454
- var _d = useState(), preview = _d[0], setPreview = _d[1];
44455
- var _e = useState(), currBlob = _e[0], setCurrBlob = _e[1];
44456
- var _f = useState(getExtension((value === null || value === void 0 ? void 0 : value.file_name) || getExtension(localPath))), currFileExtension = _f[0], setCurrFileExtension = _f[1];
44457
- var allowedFileTypes = ['application/zip', 'text/plain'];
44458
- var parser = {
44459
- 'text/plain': function (blob) {
44460
- var reader = new FileReader();
44461
- reader.onload = function () {
44462
- setPreview(reader.result);
44463
- };
44464
- reader.readAsText(blob);
44465
- },
44466
- 'application/zip': function (blob) {
44467
- // TODO: use Nodes to add many buttons components for vsf or hbjson or others
44468
- var archive = new jszip_min();
44469
- archive.loadAsync(blob)
44470
- .then(function (zip) { return __awaiter$1(void 0, void 0, void 0, function () {
44471
- var entries, listOfPromises, promiseOfList;
44472
- return __generator$1(this, function (_a) {
44473
- entries = Object.keys(zip.files).map(function (name) { return zip.files[name]; });
44474
- listOfPromises = entries.map(function (entry) {
44475
- return entry
44476
- .async("blob")
44477
- .then(function (blob) { return [entry.name, blob]; });
44478
- });
44479
- promiseOfList = Promise.all(listOfPromises);
44480
- promiseOfList.then(function (list) {
44481
- list.forEach(function (items) {
44482
- var ext = getExtension(items[0]);
44483
- if (ext === 'vsf') {
44484
- var reader = new FileReader();
44485
- reader.onload = function () {
44486
- setPreview(reader.result);
44487
- };
44488
- reader.readAsText(items[1]);
44489
- }
44490
- });
44491
- });
44492
- return [2 /*return*/];
44493
- });
44494
- }); });
44495
- }
44496
- };
44497
- // Internal onChange cloud
44498
- var onChange = useCallback(function (selArtifact) {
44499
- setSelArtifact(selArtifact);
44500
- !selArtifact && setPreview(undefined);
44501
- !selArtifact && setCurrFileExtension(undefined);
44502
- }, []);
44503
- // Internal onChange local
44504
- var onChangeLocal = useCallback(function (path) {
44505
- setSelFilePath(path);
44506
- !selFilePath && setPreview(undefined);
44507
- !selFilePath && setCurrFileExtension(undefined);
44508
- }, []);
44509
- var base64AndFetch = function (path) {
44510
- if (!path)
44511
- return;
44512
- var data = fromFileToBase64(path);
44513
- var base64Data = data === null || data === void 0 ? void 0 : data.data;
44514
- if (!base64Data)
44515
- return;
44516
- // bas64 mapping
44517
- var t;
44518
- switch (getExtension(path)) {
44519
- case 'zip':
44520
- t = 'application/zip';
44521
- break;
44522
- case 'vsf':
44523
- t = 'text/plain';
44524
- }
44525
- fetchAndSet("data:".concat(t, ";base64,").concat(base64Data), path);
44526
- };
44527
- var fetchAndSet = function (url, path) {
44528
- if (path === void 0) { path = undefined; }
44529
- fetch(url)
44530
- .then(function (response) { return response.blob()
44531
- .then(function (blob) {
44532
- var t = blob.type;
44533
- if (!allowedFileTypes.includes(t)) {
44534
- console.error("Cloud Artifact ".concat(t, " not supported."));
44535
- setPreview(undefined);
44536
- setCurrBlob(undefined);
44537
- setCurrFileExtension(undefined);
44538
- return;
44539
- }
44540
- switch (t) {
44541
- case 'application/zip':
44542
- parser['application/zip'](blob);
44543
- break;
44544
- case 'text/plain':
44545
- parser['text/plain'](blob);
44546
- break;
44547
- default:
44548
- setPreview(undefined);
44549
- setCurrBlob(undefined);
44550
- setCurrFileExtension(undefined);
44551
- break;
44552
- }
44553
- setCurrBlob(blob);
44554
- if (path) {
44555
- setSelFilePath(path);
44556
- }
44557
- var ext = getExtension((selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.file_name) || path);
44558
- setCurrFileExtension(ext);
44559
- }); })
44560
- .catch(function () { });
44561
- };
44562
- var download = function (blob, fileName) {
44563
- var file = new File([blob], fileName);
44564
- var a = document.createElement('a');
44565
- document.body.appendChild(a);
44566
- a.style.display = 'none';
44567
- a.id = 'download';
44568
- var url = window.URL.createObjectURL(file);
44569
- a.href = url;
44570
- a.download = fileName;
44571
- a.click();
44572
- };
44573
- useEffect(function () {
44574
- if (enableFilePicker) {
44575
- selFilePath && base64AndFetch(selFilePath);
44576
- return;
44577
- }
44578
- (selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.key) && downloadArtifact(selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.key, jobId)
44579
- .then(fetchAndSet)
44580
- .catch(function () { });
44581
- }, [selArtifact, selFilePath, projectOwner, projectName]);
44582
- shortDebounce(function () {
44583
- onPreviewChange && onPreviewChange(preview);
44584
- }, [onPreviewChange, preview]);
44585
- return (React__default.createElement(React__default.Fragment, null,
44586
- !value && !enableFilePicker && React__default.createElement(SelectCloudArtifacts, { projectOwner: projectOwner, projectName: projectName, value: selArtifact, hidden: false, client: client, jobId: jobId, fileNameMatch: typeof inputProps.accept === 'string'
44587
- ? ".*(".concat(inputProps.accept.replace(/\./g, '').split(', ').join('$|'), "$)")
44588
- : undefined, onChange: onChange }),
44589
- !localPath && enableFilePicker && React__default.createElement(SelectLocalArtifactNative, { onChange: onChangeLocal, value: selFilePath, buttonLabel: "Select ".concat(inputProps.accept.split(',').length > 1 ?
44590
- 'any of' : 'an', " ").concat(inputProps.accept, " ").concat(inputProps.accept.split(',').length > 1 ? 'file types' : 'file', "."), fileMatchPattern: "File types ".concat(inputProps.accept, "|*").concat(inputProps.accept.split(', ').join(';*')) }),
44591
- (selArtifact || selFilePath) && //
44592
- React__default.createElement(React__default.Fragment, null,
44593
- (value || localPath) ? undefined : React__default.createElement("br", null),
44594
- (host !== 'web' && currFileExtension === 'vsf'
44595
- && typeof preview === 'string') &&
44596
- React__default.createElement(SendResults, { results: JSON.parse(preview), defaultKey: (selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.file_name) || (selFilePath === null || selFilePath === void 0 ? void 0 : selFilePath.replace(/^.*[\\\/]/, '')), buttonLabel: 'Result Preview' }),
44597
- (host !== 'web' && currFileExtension === 'zip') &&
44598
- preview && typeof preview === 'string' &&
44599
- React__default.createElement(SendResults, { results: JSON.parse(preview), defaultKey: (selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.file_name) || (selFilePath === null || selFilePath === void 0 ? void 0 : selFilePath.replace(/^.*[\\\/]/, '')), buttonLabel: 'Result Preview' }),
44600
- (host === 'web') &&
44601
- React__default.createElement(Button, { type: 'button', onClick: function () { return download(currBlob, selArtifact.file_name); }, disabled: !currBlob, style: {
44602
- width: 'fit-content',
44603
- }, loading: !currBlob },
44604
- React__default.createElement(Download$1, { size: ICON_SIZE }),
44605
- "Download"))));
44606
- };
44607
-
44608
- var generateSchema = function (inputs) {
44609
- var required = inputs.reduce(function (p, c) { return c.required ? __spreadArray(__spreadArray([], p, true), [c.name], false) : p; }, []);
44610
- var properties = inputs.reduce(function (p, c) {
44611
- var _a, _b, _c;
44612
- if (!c.required && !c.spec) {
44613
- return p;
44614
- }
44615
- else if (c.required && !c.spec && c.type === 'DAGFileInput') {
44616
- // required field with no schema
44617
- return (__assign(__assign({}, p), (_a = {}, _a[c.name] = {
44618
- 'type': 'object',
44619
- }, _a)));
44620
- }
44621
- else if (c.required && !c.spec) {
44622
- // required field with no schema
44623
- return (__assign(__assign({}, p), (_b = {}, _b[c.name] = {}, _b)));
44624
- }
44625
- return (__assign(__assign({}, p), (_c = {}, _c[c.name] = __assign({}, c.spec), _c)));
44626
- }, {});
44627
- required.push('study-name');
44628
- properties['study-name'] = { 'type': 'string', minLength: 1 };
44629
- return ({
44630
- type: 'object',
44631
- properties: properties,
44632
- required: required,
44633
- additionalProperties: true
44634
- });
44635
- };
44636
- var RecipeInputsForm = function (_a) {
44637
- var _b, _c;
44638
- var recipe = _a.recipe, controlledValues = _a.controlledValues, onSubmit = _a.onSubmit, projectName = _a.projectName, projectOwner = _a.projectOwner, client = _a.client;
44639
- var _d = useState(false), loading = _d[0], setLoading = _d[1];
44640
- var _e = useState(__assign(__assign({}, _defaultConfig), { cloudProjectName: projectName, cloudProjectOwner: projectOwner })), localConfig = _e[0], setLocalConfig = _e[1];
44641
- var schema = generateSchema(recipe.inputs);
44642
- var host = getHost();
44643
- var _f = useForm({
44644
- resolver: Oe(schema),
44645
- mode: 'all',
44646
- }), control = _f.control, register = _f.register, handleSubmit = _f.handleSubmit, reset = _f.reset, resetField = _f.resetField, formState = _f.formState, _g = _f.formState, errors = _g.errors, isValid = _g.isValid, isSubmitSuccessful = _g.isSubmitSuccessful;
44647
- var _onSubmit = function (_data) {
44648
- var data = __assign({}, _data);
44649
- // strip study name
44650
- var studyName = data['study-name'];
44651
- delete data['study-name'];
44652
- // strip default or null values
44653
- // @ts-ignore
44654
- var inputDefaults = new Map(recipe.inputs.map(function (i) { return [i.name, i.default]; }));
44655
- Object.entries(data).forEach(function (_a) {
44656
- var key = _a[0], val = _a[1];
44657
- if (val === inputDefaults.get(key)) {
44658
- delete data[key];
44659
- }
44660
- if (!inputDefaults.get(key) && !data[key] && data[key] !== 0) {
44661
- delete data[key];
44662
- }
44663
- });
44664
- if (typeof onSubmit !== 'undefined') {
44665
- setLoading(true);
44666
- onSubmit(studyName, data, 'description', localConfig)
44667
- .finally(function () {
44668
- setLoading(false);
44669
- });
44670
- }
44671
- };
44672
- useEffect(function () {
44673
- reset({
44674
- 'study-name': ''
44675
- }, { keepValues: false });
44676
- }, [recipe]);
44677
- useEffect(function () {
44678
- if (formState.isSubmitSuccessful) {
44679
- reset({
44680
- 'study-name': ''
44681
- }, { keepValues: false });
44682
- }
44683
- }, [formState, reset]);
44684
- var groups = recipe.inputs.reduce(function (p, c) {
44685
- if (c.required) {
44686
- p[0].push(c);
44687
- }
44688
- else {
44689
- p[1].push(c);
44690
- }
44691
- return p;
44692
- }, [[], []]);
44693
- return (React__default.createElement("div", { style: {
44694
- display: 'flex',
44695
- flexDirection: 'column',
44696
- gap: 20
44697
- } },
44698
- React__default.createElement(FormInput, { name: 'study-name', description: 'Study name is a required field.', errorMessage: errors['study-name'] ? (_b = errors['study-name']) === null || _b === void 0 ? void 0 : _b.message : undefined },
44699
- React__default.createElement(TextInput, { inputProps: __assign({ form: recipe.metadata.name }, register('study-name')) })),
44700
- host !== 'web' &&
44701
- React__default.createElement(ConfigureLocalRun, { onChange: function (localConfig) { return setLocalConfig(localConfig); }, defaultVal: localConfig }),
44702
- React__default.createElement(Tabs, { forceRenderTabPanel: true },
44703
- React__default.createElement(TabList, { style: {
44704
- flex: 1
44705
- } },
44706
- React__default.createElement(Tab, { key: 'required-tab' }, "Required"),
44707
- React__default.createElement(Tab, { key: 'optional-tab' }, "Optional"),
44708
- host !== 'web' && localConfig.isLocalJob && React__default.createElement(Tab, { key: 'local-results' }, "Results")),
44709
- React__default.createElement("form", { id: recipe.metadata.name, onSubmit: handleSubmit(_onSubmit), style: {
44710
- display: 'flex',
44711
- flexDirection: 'column',
44712
- width: '100%',
44713
- justifyContent: 'center'
44714
- } },
44715
- groups.map(function (g, i) {
44716
- return React__default.createElement(TabPanel, { key: "".concat(i === 0 ? 'required' : 'optional', "-tab"), style: {
44717
- padding: '8px 8px'
44718
- } },
44719
- React__default.createElement("div", { style: {
44720
- display: 'flex',
44721
- flexDirection: 'column',
44722
- gap: 8
44723
- } }, g.map(function (input, i) {
44724
- var _a;
44725
- var defaultValue = controlledValues && controlledValues[input.name] ? controlledValues[input.name].value : input.default;
44726
- var hidden = controlledValues && controlledValues[input.name] ? controlledValues[input.name].hidden : false;
44727
- var inputProps = __assign({}, register(input.name, {
44728
- valueAsNumber: ['DAGIntegerInput', 'DAGNumberInput'].includes(input.type)
44729
- }));
44730
- var handleReset = function () {
44731
- resetField(input.name, {
44732
- defaultValue: defaultValue
44733
- });
44734
- };
44735
- return (React__default.createElement(FormInput, { key: "".concat(input.name, "-").concat(i), name: input.name, description: input.description, hidden: hidden, errorMessage: !input.required && errors[input.name] ? (_a = errors[input.name]) === null || _a === void 0 ? void 0 : _a.message : undefined }, (function () {
44736
- var _a;
44737
- switch (input.type) {
44738
- case 'DAGFileInput':
44739
- return React__default.createElement(Controller, { name: input.name, control: control, defaultValue: defaultValue, render: function (_a) {
44740
- var _b = _a.field, value = _b.value, onChange = _b.onChange, field = __rest(_b, ["value", "onChange"]);
44741
- return (loading ? React__default.createElement(LoadingIcon, null) :
44742
- React__default.createElement(ComboFileSelector, { projectOwner: projectOwner, projectName: projectName, defaultOption: input.extensions &&
44743
- input.extensions.includes('hbjson') &&
44744
- host !== 'web' ? 'get_model' : 'get_cloud', optionsConfig: {
44745
- get_model: input.extensions.includes('hbjson') && host !== 'web',
44746
- get_local: host !== 'web',
44747
- get_file: host === 'web'
44748
- }, value: value, onChange: onChange, inputProps: __assign(__assign({}, field), { accept: input.extensions.map(function (e) { return ".".concat(e); }).join(', ') }), hidden: hidden, client: client }));
44749
- } });
44750
- case 'DAGStringInput':
44751
- return typeof ((_a = input.spec) === null || _a === void 0 ? void 0 : _a.enum) !== 'undefined' ?
44752
- React__default.createElement(Controller, { name: input.name, control: control, defaultValue: defaultValue, render: function (_a) {
44753
- var _b = _a.field, onChange = _b.onChange, value = _b.value; __rest(_b, ["onChange", "value"]);
44754
- return (React__default.createElement(RadioList, { items: input.spec.enum, name: input.name, onChange: onChange, value: value }));
44755
- } }) :
44756
- React__default.createElement(TextInput, { inputProps: __assign(__assign({}, inputProps), { defaultValue: defaultValue }), hidden: hidden, reset: handleReset });
44757
- case 'DAGNumberInput':
44758
- return (React__default.createElement(NumberInput, { inputProps: __assign(__assign({}, inputProps), { defaultValue: defaultValue, min: input.spec && input.spec.minimum, max: input.spec && input.spec.maximum, step: 0.1 }), hidden: hidden, reset: handleReset }));
44759
- case 'DAGIntegerInput':
44760
- return React__default.createElement(NumberInput, { inputProps: __assign(__assign({}, inputProps), { defaultValue: defaultValue, min: input.spec && input.spec.minimum, max: input.spec && input.spec.maximum }), hidden: hidden, reset: handleReset });
44761
- default:
44762
- return React__default.createElement(TextInput, { inputProps: __assign(__assign({}, inputProps), { defaultValue: defaultValue }), hidden: hidden, reset: handleReset });
44763
- }
44764
- })()));
44765
- })));
44766
- }),
44767
- host !== 'web' && localConfig.isLocalJob && React__default.createElement(TabPanel, { key: 'local-results' },
44768
- React__default.createElement(FilePreview, { projectOwner: projectOwner, projectName: projectName, enableFilePicker: true, client: client, inputProps: {
44769
- accept: '.zip, .vsf'
44770
- } }))),
44771
- React__default.createElement("div", { style: {
44772
- display: 'flex',
44773
- width: '100%',
44774
- padding: '16px 0px 0px 8px'
44775
- } },
44776
- React__default.createElement(InputDescription, { helpText: isValid ? 'Study is ready to go!' : ((_c = Object.values(errors)) === null || _c === void 0 ? void 0 : _c.length) > 0 ?
44777
- React__default.createElement("div", null,
44778
- React__default.createElement("ul", { style: { padding: 0 } }, Object.entries(errors).map(function (_a) {
44779
- var key = _a[0], val = _a[1];
44780
- return (
44781
- // @ts-ignore
44782
- val.type !== 'required'
44783
- ? React__default.createElement("li", { key: key, style: { color: 'red', fontSize: '0.8rem', listStyle: 'none' } }, "".concat(key, " ").concat(val.message, "."))
44784
- : React__default.createElement("li", { key: key, style: { color: 'red', fontSize: '0.8rem', listStyle: 'none' } }, "".concat(key, " is missing.")));
44785
- }))) :
44786
- isSubmitSuccessful ? 'Study has been successfully submitted.' : null },
44787
- React__default.createElement(Button, { type: 'submit', form: recipe.metadata.name, disabled: !isValid || loading, style: {
44788
- width: 'fit-content',
44789
- }, loading: loading }, "Create Study"))))));
44790
- };
44791
-
44792
- var css_248z$7 = ".react-tabs {\n -webkit-tap-highlight-color: transparent;\n}\n\n.react-tabs__tab-list {\n border-bottom: 1px solid #aaa;\n margin: 0 0 10px;\n padding: 0;\n}\n\n.react-tabs__tab {\n display: inline-block;\n border: 1px solid transparent;\n border-bottom: none;\n bottom: -1px;\n position: relative;\n list-style: none;\n padding: 6px 12px;\n cursor: pointer;\n}\n\n.react-tabs__tab--selected {\n background: #fff;\n border-color: #aaa;\n color: black;\n border-radius: 5px 5px 0 0;\n}\n\n.react-tabs__tab--disabled {\n color: GrayText;\n cursor: default;\n}\n\n.react-tabs__tab:focus {\n outline: none;\n}\n\n.react-tabs__tab:focus:after {\n content: '';\n position: absolute;\n height: 5px;\n left: -4px;\n right: -4px;\n bottom: -5px;\n background: #fff;\n}\n\n.react-tabs__tab-panel {\n display: none;\n}\n\n.react-tabs__tab-panel--selected {\n display: block;\n}\n";
44793
- styleInject(css_248z$7);
44794
-
44795
- let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n$1=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n$1," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n$1," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u$1(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g;u$1.bind({g:1});let h$1=u$1.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l;}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=u$1.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}
44796
-
44797
- var W=e=>typeof e=="function",T=(e,t)=>W(e)?e(t):e;var U=(()=>{let e=0;return ()=>(++e).toString()})(),b=(()=>{let e;return ()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches;}return e}})();var Q=20;var S=new Map,X=1e3,$=e=>{if(S.has(e))return;let t=setTimeout(()=>{S.delete(e),u({type:4,toastId:e});},X);S.set(e,t);},J=e=>{let t=S.get(e);t&&clearTimeout(t);},v=(e,t)=>{switch(t.type){case 0:return {...e,toasts:[t.toast,...e.toasts].slice(0,Q)};case 1:return t.toast.id&&J(t.toast.id),{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case 2:let{toast:o}=t;return e.toasts.find(r=>r.id===o.id)?v(e,{type:1,toast:o}):v(e,{type:0,toast:o});case 3:let{toastId:s}=t;return s?$(s):e.toasts.forEach(r=>{$(r.id);}),{...e,toasts:e.toasts.map(r=>r.id===s||s===void 0?{...r,visible:!1}:r)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};case 5:return {...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return {...e,pausedAt:void 0,toasts:e.toasts.map(r=>({...r,pauseDuration:r.pauseDuration+a}))}}},A=[],P={toasts:[],pausedAt:void 0},u=e=>{P=v(P,e),A.forEach(t=>{t(P);});},Y={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},I=(e={})=>{let[t,o]=useState(P);useEffect(()=>(A.push(o),()=>{let a=A.indexOf(o);a>-1&&A.splice(a,1);}),[t]);let s=t.toasts.map(a=>{var r,c;return {...e,...e[a.type],...a,duration:a.duration||((r=e[a.type])==null?void 0:r.duration)||(e==null?void 0:e.duration)||Y[a.type],style:{...e.style,...(c=e[a.type])==null?void 0:c.style,...a.style}}});return {...t,toasts:s}};var G=(e,t="blank",o)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...o,id:(o==null?void 0:o.id)||U()}),h=e=>(t,o)=>{let s=G(t,e,o);return u({type:2,toast:s}),s.id},n=(e,t)=>h("blank")(e,t);n.error=h("error");n.success=h("success");n.loading=h("loading");n.custom=h("custom");n.dismiss=e=>{u({type:3,toastId:e});};n.remove=e=>u({type:4,toastId:e});n.promise=(e,t,o)=>{let s=n.loading(t.loading,{...o,...o==null?void 0:o.loading});return e.then(a=>(n.success(T(t.success,a),{id:s,...o,...o==null?void 0:o.success}),a)).catch(a=>{n.error(T(t.error,a),{id:s,...o,...o==null?void 0:o.error});}),e};var Z=(e,t)=>{u({type:1,toast:{id:e,height:t}});},ee=()=>{u({type:5,time:Date.now()});},D=e=>{let{toasts:t,pausedAt:o}=I(e);useEffect(()=>{if(o)return;let r=Date.now(),c=t.map(i=>{if(i.duration===1/0)return;let d=(i.duration||0)+i.pauseDuration-(r-i.createdAt);if(d<0){i.visible&&n.dismiss(i.id);return}return setTimeout(()=>n.dismiss(i.id),d)});return ()=>{c.forEach(i=>i&&clearTimeout(i));}},[t,o]);let s=useCallback(()=>{o&&u({type:6,time:Date.now()});},[o]),a=useCallback((r,c)=>{let{reverseOrder:i=!1,gutter:d=8,defaultPosition:p}=c||{},g=t.filter(m=>(m.position||p)===(r.position||p)&&m.height),E=g.findIndex(m=>m.id===r.id),x=g.filter((m,R)=>R<E&&m.visible).length;return g.filter(m=>m.visible).slice(...i?[x+1]:[0,x]).reduce((m,R)=>m+(R.height||0)+d,0)},[t]);return {toasts:t,handlers:{updateHeight:Z,startPause:ee,endPause:s,calculateOffset:a}}};var oe=h$1`
44798
- from {
44799
- transform: scale(0) rotate(45deg);
44800
- opacity: 0;
44801
- }
44802
- to {
44803
- transform: scale(1) rotate(45deg);
44804
- opacity: 1;
44805
- }`,re=h$1`
44806
- from {
44807
- transform: scale(0);
44808
- opacity: 0;
44809
- }
44810
- to {
44811
- transform: scale(1);
44812
- opacity: 1;
44813
- }`,se=h$1`
44814
- from {
44815
- transform: scale(0) rotate(90deg);
44816
- opacity: 0;
44817
- }
44818
- to {
44819
- transform: scale(1) rotate(90deg);
44820
- opacity: 1;
44821
- }`,_=j("div")`
44822
- width: 20px;
44823
- opacity: 0;
44824
- height: 20px;
44825
- border-radius: 10px;
44826
- background: ${e=>e.primary||"#ff4b4b"};
44827
- position: relative;
44828
- transform: rotate(45deg);
44829
-
44830
- animation: ${oe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
44831
- forwards;
44832
- animation-delay: 100ms;
44833
-
44834
- &:after,
44835
- &:before {
44836
- content: '';
44837
- animation: ${re} 0.15s ease-out forwards;
44838
- animation-delay: 150ms;
44839
- position: absolute;
44840
- border-radius: 3px;
44841
- opacity: 0;
44842
- background: ${e=>e.secondary||"#fff"};
44843
- bottom: 9px;
44844
- left: 4px;
44845
- height: 2px;
44846
- width: 12px;
44847
- }
44848
-
44849
- &:before {
44850
- animation: ${se} 0.15s ease-out forwards;
44851
- animation-delay: 180ms;
44852
- transform: rotate(90deg);
44853
- }
44854
- `;var ne=h$1`
44855
- from {
44856
- transform: rotate(0deg);
44857
- }
44858
- to {
44859
- transform: rotate(360deg);
44860
- }
44861
- `,V=j("div")`
44862
- width: 12px;
44863
- height: 12px;
44864
- box-sizing: border-box;
44865
- border: 2px solid;
44866
- border-radius: 100%;
44867
- border-color: ${e=>e.secondary||"#e0e0e0"};
44868
- border-right-color: ${e=>e.primary||"#616161"};
44869
- animation: ${ne} 1s linear infinite;
44870
- `;var pe=h$1`
44871
- from {
44872
- transform: scale(0) rotate(45deg);
44873
- opacity: 0;
44874
- }
44875
- to {
44876
- transform: scale(1) rotate(45deg);
44877
- opacity: 1;
44878
- }`,de=h$1`
44879
- 0% {
44880
- height: 0;
44881
- width: 0;
44882
- opacity: 0;
44883
- }
44884
- 40% {
44885
- height: 0;
44886
- width: 6px;
44887
- opacity: 1;
44888
- }
44889
- 100% {
44890
- opacity: 1;
44891
- height: 10px;
44892
- }`,w=j("div")`
44893
- width: 20px;
44894
- opacity: 0;
44895
- height: 20px;
44896
- border-radius: 10px;
44897
- background: ${e=>e.primary||"#61d345"};
44898
- position: relative;
44899
- transform: rotate(45deg);
44900
-
44901
- animation: ${pe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
44902
- forwards;
44903
- animation-delay: 100ms;
44904
- &:after {
44905
- content: '';
44906
- box-sizing: border-box;
44907
- animation: ${de} 0.2s ease-out forwards;
44908
- opacity: 0;
44909
- animation-delay: 200ms;
44910
- position: absolute;
44911
- border-right: 2px solid;
44912
- border-bottom: 2px solid;
44913
- border-color: ${e=>e.secondary||"#fff"};
44914
- bottom: 6px;
44915
- left: 6px;
44916
- height: 10px;
44917
- width: 6px;
44918
- }
44919
- `;var ue=j("div")`
44920
- position: absolute;
44921
- `,le=j("div")`
44922
- position: relative;
44923
- display: flex;
44924
- justify-content: center;
44925
- align-items: center;
44926
- min-width: 20px;
44927
- min-height: 20px;
44928
- `,Te=h$1`
44929
- from {
44930
- transform: scale(0.6);
44931
- opacity: 0.4;
44932
- }
44933
- to {
44934
- transform: scale(1);
44935
- opacity: 1;
44936
- }`,fe=j("div")`
44937
- position: relative;
44938
- transform: scale(0.6);
44939
- opacity: 0.4;
44940
- min-width: 20px;
44941
- animation: ${Te} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
44942
- forwards;
44943
- `,M=({toast:e})=>{let{icon:t,type:o,iconTheme:s}=e;return t!==void 0?typeof t=="string"?React.createElement(fe,null,t):t:o==="blank"?null:React.createElement(le,null,React.createElement(V,{...s}),o!=="loading"&&React.createElement(ue,null,o==="error"?React.createElement(_,{...s}):React.createElement(w,{...s})))};var ye=e=>`
44944
- 0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}
44945
- 100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
44946
- `,ge=e=>`
44947
- 0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
44948
- 100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}
44949
- `,he="0%{opacity:0;} 100%{opacity:1;}",xe="0%{opacity:1;} 100%{opacity:0;}",be=j("div")`
44950
- display: flex;
44951
- align-items: center;
44952
- background: #fff;
44953
- color: #363636;
44954
- line-height: 1.3;
44955
- will-change: transform;
44956
- box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
44957
- max-width: 350px;
44958
- pointer-events: auto;
44959
- padding: 8px 10px;
44960
- border-radius: 8px;
44961
- `,Se=j("div")`
44962
- display: flex;
44963
- justify-content: center;
44964
- margin: 4px 10px;
44965
- color: inherit;
44966
- flex: 1 1 auto;
44967
- white-space: pre-line;
44968
- `,Ae=(e,t)=>{let s=e.includes("top")?1:-1,[a,r]=b()?[he,xe]:[ye(s),ge(s)];return {animation:t?`${h$1(a)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${h$1(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},F=React.memo(({toast:e,position:t,style:o,children:s})=>{let a=e.height?Ae(e.position||t||"top-center",e.visible):{opacity:0},r=React.createElement(M,{toast:e}),c=React.createElement(Se,{...e.ariaProps},T(e.message,e));return React.createElement(be,{className:e.className,style:{...a,...o,...e.style}},typeof s=="function"?s({icon:r,message:c}):React.createElement(React.Fragment,null,r,c))});m(React.createElement);var Ee=({id:e,className:t,style:o,onHeightUpdate:s,children:a})=>{let r=React.useCallback(c=>{if(c){let i=()=>{let d=c.getBoundingClientRect().height;s(e,d);};i(),new MutationObserver(i).observe(c,{subtree:!0,childList:!0,characterData:!0});}},[e,s]);return React.createElement("div",{ref:r,className:t,style:o},a)},Re=(e,t)=>{let o=e.includes("top"),s=o?{top:0}:{bottom:0},a=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return {left:0,right:0,display:"flex",position:"absolute",transition:b()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(o?1:-1)}px)`,...s,...a}},ve=u$1`
44969
- z-index: 9999;
44970
- > * {
44971
- pointer-events: auto;
44972
- }
44973
- `,O=16,Ie=({reverseOrder:e,position:t="top-center",toastOptions:o,gutter:s,children:a,containerStyle:r,containerClassName:c})=>{let{toasts:i,handlers:d}=D(o);return React.createElement("div",{style:{position:"fixed",zIndex:9999,top:O,left:O,right:O,bottom:O,pointerEvents:"none",...r},className:c,onMouseEnter:d.startPause,onMouseLeave:d.endPause},i.map(p=>{let g=p.position||t,E=d.calculateOffset(p,{reverseOrder:e,gutter:s,defaultPosition:t}),x=Re(g,E);return React.createElement(Ee,{id:p.id,key:p.id,onHeightUpdate:d.updateHeight,className:p.visible?ve:"",style:x},p.type==="custom"?T(p.message,p):a?a(p):React.createElement(F,{toast:p,position:g}))}))};var _t=n;
44529
+ return data;
44530
+ }, [recipe]);
44531
+ var schema = generateSchema(inputs);
44532
+ /**
44533
+ * Hooks
44534
+ */
44535
+ var _e = useForm({
44536
+ resolver: Oe(schema),
44537
+ mode: 'onChange'
44538
+ }), control = _e.control, register = _e.register, handleSubmit = _e.handleSubmit, resetField = _e.resetField, _f = _e.formState, errors = _f.errors, isValid = _f.isValid;
44539
+ /**
44540
+ * Form actions
44541
+ * @param data Output data
44542
+ */
44543
+ var _onSubmit = function (data) {
44544
+ console.log(data);
44545
+ // Get study name and description
44546
+ // Remove them from inputs
44547
+ var studyName = data['study-name'];
44548
+ delete data['study-name'];
44549
+ var studyDescription = data['study-description'];
44550
+ delete data['study-description'];
44551
+ onSubmit(studyName, data, studyDescription, localConfig);
44552
+ };
44553
+ var onErrors = function (err) {
44554
+ console.log(err);
44555
+ console.log(errors);
44556
+ };
44557
+ // console.log(isValid)
44558
+ var handleReset = function (i) {
44559
+ resetField(i.name, {
44560
+ defaultValue: i.default
44561
+ });
44562
+ };
44563
+ /**
44564
+ * From JSON info to UI parts
44565
+ * @param i IIinputMapping object
44566
+ * @returns ReactNode
44567
+ */
44568
+ var formComponents = function (i) {
44569
+ var _a, _b, _c, _d, _e;
44570
+ switch (i.type) {
44571
+ case InputType.DAGNumberInput:
44572
+ return React__default.createElement(NumberInput, { inputProps: __assign(__assign({}, register(i.name, { valueAsNumber: true })), { required: i.required, defaultValue: i.default, min: (_a = i.spec) === null || _a === void 0 ? void 0 : _a.minimum, max: (_b = i.spec) === null || _b === void 0 ? void 0 : _b.maximum, step: 0.1 }), key: i.name, reset: function () { return handleReset(i); } });
44573
+ case InputType.DAGIntegerInput:
44574
+ return React__default.createElement(NumberInput, { key: i.name, icon: i.name.startsWith('cpu')
44575
+ ? React__default.createElement(Cpu$1, null)
44576
+ : undefined, inputProps: __assign(__assign({}, register(i.name, { valueAsNumber: true })), { required: i.required, defaultValue: i.default, min: (_c = i.spec) === null || _c === void 0 ? void 0 : _c.minimum, max: (_d = i.spec) === null || _d === void 0 ? void 0 : _d.maximum, step: 1 }), reset: function () { return handleReset(i); } });
44577
+ case InputType.DAGStringInput:
44578
+ return ((_e = i.spec) === null || _e === void 0 ? void 0 : _e.enum)
44579
+ ? React__default.createElement(Controller, { name: i.name, control: control, defaultValue: i.default, render: function (_a) {
44580
+ var _b = _a.field, onChange = _b.onChange, value = _b.value; __rest(_b, ["onChange", "value"]);
44581
+ return React__default.createElement(RadioList, { items: i.spec.enum, name: i.name, onChange: onChange, value: value });
44582
+ } })
44583
+ : React__default.createElement(TextInput, { key: i.name, inputProps: __assign(__assign({}, register(i.name)), { defaultValue: i.default }), reset: function () { return handleReset(i); } });
44584
+ case InputType.DAGFileInput:
44585
+ return React__default.createElement(Controller, { name: i.name, control: control, defaultValue: i.default, render: function (_a) {
44586
+ var _b = _a.field, value = _b.value, onChange = _b.onChange, field = __rest(_b, ["value", "onChange"]);
44587
+ return React__default.createElement(ComboFileSelector, { projectOwner: projectOwner, projectName: projectName, defaultOption: i.extensions &&
44588
+ i.extensions.includes('hbjson') &&
44589
+ host !== 'web' ? 'get_model' : 'get_cloud', optionsConfig: {
44590
+ get_model: i.extensions.includes('hbjson') && host !== 'web',
44591
+ get_local: host !== 'web',
44592
+ get_file: host === 'web'
44593
+ }, value: value, onChange: onChange, inputProps: __assign(__assign({}, field), { accept: i.extensions.map(function (e) { return ".".concat(e); }).join(', ') }), client: client });
44594
+ } });
44595
+ // Others...
44596
+ default:
44597
+ return React__default.createElement(TextInput, { key: i.name, inputProps: __assign(__assign({}, register(i.name)), { defaultValue: i.default }), reset: function () { return handleReset(i); } });
44598
+ }
44599
+ };
44600
+ /**
44601
+ * Local study
44602
+ */
44603
+ var _g = useState(__assign(__assign({}, _defaultConfig), { cloudProjectName: projectName, cloudProjectOwner: projectOwner })), localConfig = _g[0], setLocalConfig = _g[1];
44604
+ return React__default.createElement("form", { id: recipe.metadata.name, onSubmit: handleSubmit(_onSubmit, onErrors) },
44605
+ React__default.createElement("div", { style: { margin: '0 0 20px 0' } },
44606
+ React__default.createElement("span", { style: { marginRight: '0.75rem' } },
44607
+ React__default.createElement(Avatar, { src: recipe ? recipe.metadata.icon : '', size: 32 })),
44608
+ React__default.createElement("h3", { style: { display: 'inline' } },
44609
+ " ",
44610
+ recipe.metadata.name,
44611
+ " study")),
44612
+ React__default.createElement("div", { className: 'cards-container-recipe', style: __assign(__assign({}, style), { padding: '20px' }) },
44613
+ React__default.createElement("h5", { className: 'cards-container-title-recipe' }, "Generic inputs"),
44614
+ React__default.createElement("div", { className: 'cards-recipe' },
44615
+ React__default.createElement(FormInput, { name: 'study-name', description: 'Study name is a required field.', errorMessage: errors['study-name'] ? (_b = errors['study-name']) === null || _b === void 0 ? void 0 : _b.message : undefined },
44616
+ React__default.createElement(TextInput, { inputProps: __assign(__assign({}, register('study-name')), { defaultValue: "".concat(recipe.metadata.name, " study") }), reset: function () { return handleReset({ name: 'study-name',
44617
+ default: "".concat(recipe.metadata.name, " study") }); } })),
44618
+ React__default.createElement(FormInput, { name: 'study-description', description: 'Study description is a optional field.', errorMessage: errors['studydescription'] ? (_c = errors['study-description']) === null || _c === void 0 ? void 0 : _c.message : undefined },
44619
+ React__default.createElement(TextInput, { inputProps: __assign(__assign({}, register('study-description')), { defaultValue: 'Description here...' }), reset: function () { return handleReset({ name: 'study-description',
44620
+ default: 'Description here...' }); } })))),
44621
+ React__default.createElement(Tabs, { forceRenderTabPanel: true },
44622
+ React__default.createElement(TabList, { style: {
44623
+ flex: 1,
44624
+ margin: '10px 0 0 0',
44625
+ } },
44626
+ React__default.createElement(Tab, { key: 'required-tab' }, "Required inputs"),
44627
+ React__default.createElement(Tab, { key: 'optional-tab' }, "Optional inputs")),
44628
+ React__default.createElement(TabPanel, { key: 'required-tab' },
44629
+ React__default.createElement("div", { className: 'cards-container-recipe', style: __assign(__assign({}, style), { padding: '20px' }) },
44630
+ React__default.createElement("div", { className: 'cards-recipe' }, inputs && client && inputs.filter(function (i) { return i.required; }).map(function (i) {
44631
+ var _a;
44632
+ return (React__default.createElement("div", { key: "div-".concat(i.name) },
44633
+ React__default.createElement(FormInput, { key: "".concat(i.name, "-").concat(i), name: i.name, description: i.description, errorMessage: errors[i.name] ? (_a = errors[i.name]) === null || _a === void 0 ? void 0 : _a.message : undefined }, formComponents(i))));
44634
+ })))),
44635
+ React__default.createElement(TabPanel, { key: 'optional-tab' },
44636
+ React__default.createElement("div", { className: 'cards-container-recipe', style: __assign(__assign({}, style), { padding: '20px' }) },
44637
+ React__default.createElement("div", { className: 'cards-recipe' }, inputs && client && inputs.filter(function (i) { return !i.required; }).map(function (i) {
44638
+ var _a;
44639
+ return (React__default.createElement("div", { key: "div-".concat(i.name) },
44640
+ React__default.createElement(FormInput, { key: "".concat(i.name, "-").concat(i), name: i.name, description: i.description, errorMessage: errors[i.name] ? (_a = errors[i.name]) === null || _a === void 0 ? void 0 : _a.message : undefined }, formComponents(i))));
44641
+ }))))),
44642
+ React__default.createElement("div", { style: { margin: '10px 0 0 0' } },
44643
+ host !== 'web' &&
44644
+ React__default.createElement(ConfigureLocalRun, { onChange: function (localConfig) { return setLocalConfig(localConfig); }, defaultVal: localConfig }),
44645
+ React__default.createElement(Button, { type: 'submit', style: { width: '100%',
44646
+ margin: '10px 0 0 0',
44647
+ justifyContent: 'center' }, disabled: isValid !== true, form: recipe.metadata.name }, "Create Study")));
44648
+ };
44974
44649
 
44975
44650
  var defaultStyle = {
44976
44651
  display: 'flex',
@@ -44979,7 +44654,7 @@ var defaultStyle = {
44979
44654
  };
44980
44655
  var CreateStudy = function (_a) {
44981
44656
  var _b;
44982
- var style = _a.style, controlledRecipeInputs = _a.controlledRecipeInputs, defaultAccount = _a.defaultAccount, defaultProject = _a.defaultProject, defaultRecipe = _a.defaultRecipe, createStudySuccess = _a.createStudySuccess, authUser = _a.authUser, client = _a.client;
44657
+ var style = _a.style, defaultAccount = _a.defaultAccount, defaultProject = _a.defaultProject, defaultRecipe = _a.defaultRecipe, createStudySuccess = _a.createStudySuccess, authUser = _a.authUser, client = _a.client;
44983
44658
  var _c = useState(0), activeTabIndex = _c[0], setActiveTabIndex = _c[1];
44984
44659
  var _d = useState(defaultAccount), selAccount = _d[0], setSelAccount = _d[1];
44985
44660
  var _e = useState(defaultProject), selProject = _e[0], setSelProject = _e[1];
@@ -45096,14 +44771,7 @@ var CreateStudy = function (_a) {
45096
44771
  flexDirection: 'column',
45097
44772
  gap: 24
45098
44773
  } },
45099
- selRecipe &&
45100
- React__default.createElement("h5", { style: {
45101
- marginBottom: 0
45102
- } }, selRecipe.metadata.name
45103
- .split('-')
45104
- .map(function (v) { return v.charAt(0).toUpperCase() + v.slice(1); })
45105
- .join(' ')),
45106
- React__default.createElement(RecipeInputsForm, { client: client, projectOwner: projectOwner, projectName: projectSlug, recipe: selRecipe, onSubmit: handleCreateStudy, controlledValues: controlledRecipeInputs }),
44774
+ React__default.createElement(RecipeForm, { client: client, projectOwner: projectOwner, projectName: projectSlug, recipe: selRecipe, onSubmit: handleCreateStudy, style: style }),
45107
44775
  React__default.createElement(Ie, null)))))));
45108
44776
  };
45109
44777
 
@@ -46268,8 +45936,8 @@ var useSWRHandler = function (_key, fetcher, config) {
46268
45936
  };
46269
45937
  var useSWR = withArgs(useSWRHandler);
46270
45938
 
46271
- var css_248z$6 = "";
46272
- styleInject(css_248z$6);
45939
+ var css_248z$7 = "";
45940
+ styleInject(css_248z$7);
46273
45941
 
46274
45942
  var getFileIcon$1 = function (type) {
46275
45943
  var size = 12;
@@ -46788,16 +46456,16 @@ var SelectStudy = function (_a) {
46788
46456
  } }, "Showing ".concat((_c = studies === null || studies === void 0 ? void 0 : studies.length) !== null && _c !== void 0 ? _c : 0, " of ").concat(total, " runs"))), onScrollReachEnd: onScrollReachEnd }));
46789
46457
  };
46790
46458
 
46791
- var Action$1;
46459
+ var Action$2;
46792
46460
  (function (Action) {
46793
46461
  Action["add"] = "add";
46794
46462
  Action["delete"] = "delete";
46795
46463
  Action["preview"] = "preview";
46796
46464
  Action["clear"] = "clear";
46797
46465
  Action["subscribePreview"] = "subscribe-preview";
46798
- })(Action$1 || (Action$1 = {}));
46466
+ })(Action$2 || (Action$2 = {}));
46799
46467
 
46800
- var getAction$1 = function (key) {
46468
+ var getAction$2 = function (key) {
46801
46469
  switch (key) {
46802
46470
  case 'add':
46803
46471
  return 'AddGeometry';
@@ -46813,8 +46481,9 @@ var getAction$1 = function (key) {
46813
46481
  };
46814
46482
  var SendGeometry = function (_a) {
46815
46483
  var geometry = _a.geometry, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Geometry' : _b, geometryOptions = _a.geometryOptions, style = _a.style;
46816
- var _c = useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action$1.preview), selOpt = _c[0], setSelOpt = _c[1];
46484
+ var _c = useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action$2.preview), selOpt = _c[0], setSelOpt = _c[1];
46817
46485
  var _d = useState(defaultKey !== null && defaultKey !== void 0 ? defaultKey : performance.now().toString()), key = _d[0], setKey = _d[1];
46486
+ var host = getHost();
46818
46487
  var sendMessage = useSendMessage().sendMessage;
46819
46488
  var disabled = useMemo(function () {
46820
46489
  return !checkPollinationPanel();
@@ -46845,7 +46514,7 @@ var SendGeometry = function (_a) {
46845
46514
  e.stopPropagation();
46846
46515
  if (disabled)
46847
46516
  return;
46848
- sendMessage(getAction$1(selOpt), {
46517
+ sendMessage(getAction$2(selOpt), {
46849
46518
  data: geometry,
46850
46519
  uniqueId: key,
46851
46520
  options: geometryOptions
@@ -46857,35 +46526,162 @@ var SendGeometry = function (_a) {
46857
46526
  options: [
46858
46527
  {
46859
46528
  type: 'radio',
46860
- id: Action$1.preview,
46529
+ id: Action$2.preview,
46861
46530
  label: 'Preview',
46862
- checked: selOpt === Action$1.preview,
46531
+ checked: selOpt === Action$2.preview,
46863
46532
  icon: React__default.createElement(Eyeglasses$1, { size: 16, color: style && style['color'] }),
46864
46533
  disabled: disabled,
46865
46534
  onSelect: function () {
46866
- setSelOpt(function (state) { return (state === Action$1.preview ? undefined : Action$1.preview); });
46535
+ setSelOpt(function (state) { return (state === Action$2.preview ? undefined : Action$2.preview); });
46867
46536
  },
46868
46537
  },
46869
46538
  {
46870
46539
  type: 'radio',
46871
- id: Action$1.add,
46540
+ id: Action$2.add,
46872
46541
  label: 'Add',
46873
- checked: selOpt === Action$1.add,
46542
+ checked: selOpt === Action$2.add,
46874
46543
  icon: React__default.createElement(Building$1, { size: 16, color: style && style['color'] }),
46875
46544
  disabled: disabled,
46876
46545
  onSelect: function () {
46877
- setSelOpt(function (state) { return (state === Action$1.add ? undefined : Action$1.add); });
46546
+ setSelOpt(function (state) { return (state === Action$2.add ? undefined : Action$2.add); });
46547
+ },
46548
+ },
46549
+ {
46550
+ type: 'radio',
46551
+ id: Action$2.delete,
46552
+ label: 'Delete',
46553
+ checked: selOpt === Action$2.delete,
46554
+ icon: React__default.createElement(Trash$1, { size: 16, color: style && style['color'] }),
46555
+ disabled: disabled,
46556
+ onSelect: function () {
46557
+ setSelOpt(function (state) { return (state === Action$2.delete ? undefined : Action$2.delete); });
46558
+ },
46559
+ },
46560
+ {
46561
+ type: 'radio',
46562
+ id: Action$2.clear,
46563
+ label: 'Clear',
46564
+ checked: selOpt === Action$2.clear,
46565
+ icon: React__default.createElement(Recycle$1, { size: 16, color: style && style['color'] }),
46566
+ disabled: disabled,
46567
+ onSelect: function () {
46568
+ setSelOpt(function (state) { return (state === Action$2.clear ? undefined : Action$2.clear); });
46569
+ },
46570
+ },
46571
+ {
46572
+ type: 'radio',
46573
+ id: Action$2.subscribePreview,
46574
+ label: 'Subscribe Preview',
46575
+ checked: selOpt === Action$2.subscribePreview,
46576
+ icon: React__default.createElement(ArrowRepeat$1, { size: 16, color: style && style['color'] }),
46577
+ disabled: disabled,
46578
+ onSelect: function () {
46579
+ setSelOpt(function (state) { return (state === Action$2.subscribePreview ? undefined : Action$2.subscribePreview); });
46580
+ },
46581
+ },
46582
+ ].filter(function (o) {
46583
+ if (!optionsConfig)
46584
+ return true;
46585
+ return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
46586
+ }),
46587
+ }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " geometry to ").concat(host, " scene") }));
46588
+ };
46589
+
46590
+ var Action$1;
46591
+ (function (Action) {
46592
+ Action["add"] = "add";
46593
+ Action["delete"] = "delete";
46594
+ Action["preview"] = "preview";
46595
+ Action["clear"] = "clear";
46596
+ Action["subscribePreview"] = "subscribe-preview";
46597
+ })(Action$1 || (Action$1 = {}));
46598
+
46599
+ var getAction$1 = function (key) {
46600
+ switch (key) {
46601
+ case 'add':
46602
+ return 'AddHBJSON';
46603
+ case 'preview':
46604
+ return 'PreviewHBJSON';
46605
+ case 'clear':
46606
+ return 'ClearHBJSON';
46607
+ case 'subscribe-preview':
46608
+ return 'SubscribePreviewHBJSON';
46609
+ }
46610
+ };
46611
+ var SendModel = function (_a) {
46612
+ var hbjson = _a.hbjson, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Model' : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
46613
+ var _d = useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action$1.preview), selOpt = _d[0], setSelOpt = _d[1];
46614
+ var _e = useState(defaultKey !== null && defaultKey !== void 0 ? defaultKey : performance.now().toString()), key = _e[0], setKey = _e[1];
46615
+ var host = getHost();
46616
+ var sendHbjson = useSendHbjson().sendHbjson;
46617
+ var disabled = useMemo(function () {
46618
+ return !checkPollinationPanel();
46619
+ }, []);
46620
+ useEffect(function () {
46621
+ setSelOpt(defaultAction);
46622
+ }, [defaultAction]);
46623
+ useEffect(function () {
46624
+ setKey(defaultKey);
46625
+ }, [defaultKey]);
46626
+ useEffect(function () {
46627
+ if (disabled || selOpt !== Action$1.subscribePreview)
46628
+ return;
46629
+ sendHbjson('SubscribePreviewHBJSON', {
46630
+ data: hbjson,
46631
+ uniqueId: key,
46632
+ options: {
46633
+ layer: 'StreamlitLayer',
46634
+ units: 'Meters',
46635
+ },
46636
+ });
46637
+ return function () {
46638
+ sendHbjson('ClearHBJSON', {
46639
+ data: hbjson,
46640
+ uniqueId: key,
46641
+ options: {
46642
+ layer: 'StreamlitLayer',
46643
+ units: 'Meters',
46644
+ },
46645
+ });
46646
+ };
46647
+ }, [disabled, hbjson, key, selOpt, sendHbjson]);
46648
+ return (React__default.createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
46649
+ e.stopPropagation();
46650
+ if (disabled)
46651
+ return;
46652
+ sendHbjson(getAction$1(selOpt), {
46653
+ data: hbjson,
46654
+ uniqueId: key,
46655
+ options: {
46656
+ layer: 'StreamlitLayer',
46657
+ units: 'Meters',
46658
+ },
46659
+ });
46660
+ }, options: [{
46661
+ type: 'radio',
46662
+ value: selOpt,
46663
+ // @ts-ignore
46664
+ options: [
46665
+ {
46666
+ type: 'radio',
46667
+ id: Action$1.preview,
46668
+ label: 'Preview',
46669
+ checked: selOpt === Action$1.preview,
46670
+ icon: React__default.createElement(Eyeglasses$1, { size: 16, color: style && style['color'] }),
46671
+ disabled: disabled,
46672
+ onSelect: function () {
46673
+ setSelOpt(function (state) { return (state === Action$1.preview ? undefined : Action$1.preview); });
46878
46674
  },
46879
46675
  },
46880
46676
  {
46881
46677
  type: 'radio',
46882
- id: Action$1.delete,
46883
- label: 'Delete',
46884
- checked: selOpt === Action$1.delete,
46885
- icon: React__default.createElement(Trash$1, { size: 16, color: style && style['color'] }),
46678
+ id: Action$1.add,
46679
+ label: 'Add',
46680
+ checked: selOpt === Action$1.add,
46681
+ icon: React__default.createElement(Building$1, { size: 16, color: style && style['color'] }),
46886
46682
  disabled: disabled,
46887
46683
  onSelect: function () {
46888
- setSelOpt(function (state) { return (state === Action$1.delete ? undefined : Action$1.delete); });
46684
+ setSelOpt(function (state) { return (state === Action$1.add ? undefined : Action$1.add); });
46889
46685
  },
46890
46686
  },
46891
46687
  {
@@ -46915,7 +46711,7 @@ var SendGeometry = function (_a) {
46915
46711
  return true;
46916
46712
  return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
46917
46713
  }),
46918
- }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " geometry.") }));
46714
+ }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " model to ").concat(host, " scene") }));
46919
46715
  };
46920
46716
 
46921
46717
  var Action;
@@ -46930,23 +46726,29 @@ var Action;
46930
46726
  var getAction = function (key) {
46931
46727
  switch (key) {
46932
46728
  case 'add':
46933
- return 'AddHBJSON';
46729
+ return 'AddResults';
46730
+ case 'delete':
46731
+ return 'DeleteResults';
46934
46732
  case 'preview':
46935
- return 'PreviewHBJSON';
46733
+ return 'PreviewResults';
46936
46734
  case 'clear':
46937
- return 'ClearHBJSON';
46735
+ return 'ClearResults';
46938
46736
  case 'subscribe-preview':
46939
- return 'SubscribePreviewHBJSON';
46737
+ return 'SubscribePreviewResults';
46940
46738
  }
46941
46739
  };
46942
- var SendModel = function (_a) {
46943
- var hbjson = _a.hbjson, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Model' : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
46740
+ var SendResults = function (_a) {
46741
+ var results = _a.results, defaultAction = _a.defaultAction, defaultKey = _a.defaultKey, optionsConfig = _a.optionsConfig, _b = _a.buttonLabel, buttonLabel = _b === void 0 ? 'Send Results' : _b, geometryOptions = _a.geometryOptions, _c = _a.style, style = _c === void 0 ? {} : _c;
46944
46742
  var _d = useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : Action.preview), selOpt = _d[0], setSelOpt = _d[1];
46945
46743
  var _e = useState(defaultKey !== null && defaultKey !== void 0 ? defaultKey : performance.now().toString()), key = _e[0], setKey = _e[1];
46946
- var sendHbjson = useSendHbjson().sendHbjson;
46744
+ var host = getHost();
46745
+ var sendMessage = useSendMessage().sendMessage;
46947
46746
  var disabled = useMemo(function () {
46948
46747
  return !checkPollinationPanel();
46949
46748
  }, []);
46749
+ useEffect(function () {
46750
+ console.log(disabled);
46751
+ }, [disabled]);
46950
46752
  useEffect(function () {
46951
46753
  setSelOpt(defaultAction);
46952
46754
  }, [defaultAction]);
@@ -46956,36 +46758,27 @@ var SendModel = function (_a) {
46956
46758
  useEffect(function () {
46957
46759
  if (disabled || selOpt !== Action.subscribePreview)
46958
46760
  return;
46959
- sendHbjson('SubscribePreviewHBJSON', {
46960
- data: hbjson,
46761
+ sendMessage('SubscribePreviewResults', {
46762
+ data: results,
46961
46763
  uniqueId: key,
46962
- options: {
46963
- layer: 'StreamlitLayer',
46964
- units: 'Meters',
46965
- },
46764
+ options: geometryOptions,
46966
46765
  });
46967
46766
  return function () {
46968
- sendHbjson('ClearHBJSON', {
46969
- data: hbjson,
46767
+ sendMessage('ClearResults', {
46768
+ data: results,
46970
46769
  uniqueId: key,
46971
- options: {
46972
- layer: 'StreamlitLayer',
46973
- units: 'Meters',
46974
- },
46770
+ options: geometryOptions,
46975
46771
  });
46976
46772
  };
46977
- }, [disabled, hbjson, key, selOpt, sendHbjson]);
46773
+ }, [disabled, geometryOptions, key, results, selOpt, sendMessage]);
46978
46774
  return (React__default.createElement(SettingsButton, { style: style, disabled: disabled, onClick: function (e) {
46979
46775
  e.stopPropagation();
46980
46776
  if (disabled)
46981
46777
  return;
46982
- sendHbjson(getAction(selOpt), {
46983
- data: hbjson,
46778
+ sendMessage(getAction(selOpt), {
46779
+ data: results,
46984
46780
  uniqueId: key,
46985
- options: {
46986
- layer: 'StreamlitLayer',
46987
- units: 'Meters',
46988
- },
46781
+ options: geometryOptions,
46989
46782
  });
46990
46783
  }, options: [{
46991
46784
  type: 'radio',
@@ -47014,6 +46807,17 @@ var SendModel = function (_a) {
47014
46807
  setSelOpt(function (state) { return (state === Action.add ? undefined : Action.add); });
47015
46808
  },
47016
46809
  },
46810
+ {
46811
+ type: 'radio',
46812
+ id: Action.delete,
46813
+ label: 'Delete',
46814
+ checked: selOpt === Action.delete,
46815
+ icon: React__default.createElement(Trash$1, { size: 16, color: style && style['color'] }),
46816
+ disabled: disabled,
46817
+ onSelect: function () {
46818
+ setSelOpt(function (state) { return (state === Action.delete ? undefined : Action.delete); });
46819
+ },
46820
+ },
47017
46821
  {
47018
46822
  type: 'radio',
47019
46823
  id: Action.clear,
@@ -47041,7 +46845,7 @@ var SendModel = function (_a) {
47041
46845
  return true;
47042
46846
  return typeof optionsConfig[o.id] === 'undefined' ? true : optionsConfig[o.id];
47043
46847
  }),
47044
- }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " model.") }));
46848
+ }], asButtons: true, label: buttonLabel, helpText: "".concat(selOpt ? selOpt.charAt(0).toUpperCase() + selOpt.replace('-', ' ').slice(1) : 'Send', " results to ").concat(host, " scene") }));
47045
46849
  };
47046
46850
 
47047
46851
  var JobTabs;
@@ -47050,8 +46854,8 @@ var JobTabs;
47050
46854
  JobTabs["workspace"] = "workspace";
47051
46855
  })(JobTabs || (JobTabs = {}));
47052
46856
 
47053
- var css_248z$5 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.item1 {\n grid-area: accountprj;\n font-size: 1rem;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item2 {\n grid-area: runworkspacedebug;\n text-align: right !important;\n font-size: 1.25rem;\n white-space: nowrap;\n}\n\n.item3 {\n grid-area: studyrun;\n font-size: 1.25rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item4 {\n grid-area: date;\n color: var(--slate10);\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: right !important;\n}\n\n.item5 {\n grid-area: author;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item6 {\n grid-area: recipe;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item7 {\n grid-area: description;\n white-space: wrap;\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.item8 {\n grid-area: status;\n font-size: 0.9rem;\n}\n\n.status-label {\n font-weight: 500;\n}\n\n.item9 {\n grid-area: time;\n text-align: right !important;\n white-space: wrap;\n}\n\n.item10 {\n grid-area: cpu;\n text-align: right !important;\n white-space: wrap;\n}\n\n.link {\n text-decoration: none;\n color: var(--primary3);\n}\n\n.link:hover {\n color: var(--primary3);\n}\n\n.light-text {\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj runworkspacedebug runworkspacedebug\" \"studyrun studyrun studyrun studyrun date date\" \"author recipe recipe recipe recipe recipe\" \"status status status status cpu time\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.35rem;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n grid-template-rows: 52px 38px 46px 46px auto;\n border-radius: 6px;\n line-height: 1.5;\n}\n\n.grid-container:hover {\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 2px -2px, rgba(0, 0, 0, 0.12) 0px 3px 6px 0px, rgba(0, 0, 0, 0.09) 0px 5px 12px 4px;\n cursor: pointer;\n}\n\n.disable-click {\n box-shadow: none !important;\n cursor: default !important;\n}\n\n.grid-container > div {\n text-align: left;\n padding: 1rem;\n vertical-align: middle;\n}\n\n.description-expander {\n all: unset;\n}\n\n.description-expander:focus {\n outline: 0 !important;\n}\n\n@media (max-width: 600px) {\n .grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj runworkspacedebug runworkspacedebug\" \"studyrun studyrun studyrun studyrun studyrun studyrun\" \"date date date date date date\" \"author author author recipe recipe recipe\" \"status status status status status status\" \"time time time cpu cpu cpu\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.15rem;\n transition: box-shadow 0.3s;\n grid-template-rows: 52px 52px 32px 32px 32px 32px auto;\n }\n .item1 {\n text-align: left !important;\n }\n .item2 {\n text-align: right !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item3, .item4 {\n text-align: center !important;\n }\n .item5 {\n font-size: 0.8rem;\n }\n .item6 {\n white-space: nowrap;\n font-size: 0.8rem;\n }\n .item7 {\n font-size: 0.8rem;\n text-align: center !important;\n }\n .item8 {\n font-size: 1rem;\n text-align: center !important;\n }\n .item9 {\n text-align: left !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item10 {\n text-align: right !important;\n }\n .grid-container > div {\n text-align: left;\n vertical-align: middle;\n }\n}\n.blink-effect {\n animation: blinker 5s linear infinite;\n}\n\n@keyframes blinker {\n 50% {\n border: 0.1rem solid white;\n }\n}";
47054
- styleInject(css_248z$5);
46857
+ var css_248z$6 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.item1 {\n grid-area: accountprj;\n font-size: 1rem;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item2 {\n grid-area: runworkspacedebug;\n text-align: right !important;\n font-size: 1.25rem;\n white-space: nowrap;\n}\n\n.item3 {\n grid-area: studyrun;\n font-size: 1.25rem;\n font-weight: 500;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item4 {\n grid-area: date;\n color: var(--slate10);\n font-size: 0.9rem;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n text-align: right !important;\n}\n\n.item5 {\n grid-area: author;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item6 {\n grid-area: recipe;\n white-space: wrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.item7 {\n grid-area: description;\n white-space: wrap;\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.item8 {\n grid-area: status;\n font-size: 0.9rem;\n}\n\n.status-label {\n font-weight: 500;\n}\n\n.item9 {\n grid-area: time;\n text-align: right !important;\n white-space: wrap;\n}\n\n.item10 {\n grid-area: cpu;\n text-align: right !important;\n white-space: wrap;\n}\n\n.link {\n text-decoration: none;\n color: var(--primary3);\n}\n\n.link:hover {\n color: var(--primary3);\n}\n\n.light-text {\n color: var(--slate10);\n font-size: 0.9rem;\n}\n\n.grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj runworkspacedebug runworkspacedebug\" \"studyrun studyrun studyrun studyrun date date\" \"author recipe recipe recipe recipe recipe\" \"status status status status cpu time\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.35rem;\n transition: box-shadow 0.3s ease 0s, border-color 0.3s ease 0s;\n grid-template-rows: 52px 38px 46px 46px auto;\n border-radius: 6px;\n line-height: 1.5;\n}\n\n.grid-container:hover {\n box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 2px -2px, rgba(0, 0, 0, 0.12) 0px 3px 6px 0px, rgba(0, 0, 0, 0.09) 0px 5px 12px 4px;\n cursor: pointer;\n}\n\n.disable-click {\n box-shadow: none !important;\n cursor: default !important;\n}\n\n.grid-container > div {\n text-align: left;\n padding: 1rem;\n vertical-align: middle;\n}\n\n.description-expander {\n all: unset;\n}\n\n.description-expander:focus {\n outline: 0 !important;\n}\n\n@media (max-width: 600px) {\n .grid-container {\n display: grid;\n grid-template-areas: \"accountprj accountprj accountprj accountprj runworkspacedebug runworkspacedebug\" \"studyrun studyrun studyrun studyrun studyrun studyrun\" \"date date date date date date\" \"author author author recipe recipe recipe\" \"status status status status status status\" \"time time time cpu cpu cpu\" \"description description description description description description\";\n gap: 0.35rem;\n border: 0.1rem solid;\n align-items: center;\n padding: 0.15rem;\n transition: box-shadow 0.3s;\n grid-template-rows: 52px 52px 32px 32px 32px 32px auto;\n }\n .item1 {\n text-align: left !important;\n }\n .item2 {\n text-align: right !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item3, .item4 {\n text-align: center !important;\n }\n .item5 {\n font-size: 0.8rem;\n }\n .item6 {\n white-space: nowrap;\n font-size: 0.8rem;\n }\n .item7 {\n font-size: 0.8rem;\n text-align: center !important;\n }\n .item8 {\n font-size: 1rem;\n text-align: center !important;\n }\n .item9 {\n text-align: left !important;\n font-size: 1rem;\n white-space: nowrap;\n }\n .item10 {\n text-align: right !important;\n }\n .grid-container > div {\n text-align: left;\n vertical-align: middle;\n }\n}\n.blink-effect {\n animation: blinker 5s linear infinite;\n}\n\n@keyframes blinker {\n 50% {\n border: 0.1rem solid white;\n }\n}";
46858
+ styleInject(css_248z$6);
47055
46859
 
47056
46860
  var IconContext = /*#__PURE__*/createContext({});
47057
46861
  var Context = IconContext;
@@ -49078,6 +48882,199 @@ var RunCard = function (_a) {
49078
48882
  " Cancel")))));
49079
48883
  };
49080
48884
 
48885
+ var css_248z$5 = "";
48886
+ styleInject(css_248z$5);
48887
+
48888
+ /*!
48889
+
48890
+ JSZip v3.10.1 - A JavaScript class for generating and reading zip files
48891
+ <http://stuartk.com/jszip>
48892
+
48893
+ (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
48894
+ Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
48895
+
48896
+ JSZip uses the library pako released under the MIT license :
48897
+ https://github.com/nodeca/pako/blob/main/LICENSE
48898
+ */
48899
+
48900
+ var jszip_min = createCommonjsModule(function (module, exports) {
48901
+ !function(e){module.exports=e();}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof commonjsRequire&&commonjsRequire;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h);}return o[r].exports}for(var l="function"==typeof commonjsRequire&&commonjsRequire,e=0;e<h.length;e++)u(h[e]);return u}({1:[function(e,t,r){var d=e("./utils"),c=e("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,n,i,s,a,o,h=[],u=0,l=e.length,f=l,c="string"!==d.getTypeOf(e);u<e.length;)f=l-u,n=c?(t=e[u++],r=u<l?e[u++]:0,u<l?e[u++]:0):(t=e.charCodeAt(u++),r=u<l?e.charCodeAt(u++):0,u<l?e.charCodeAt(u++):0),i=t>>2,s=(3&t)<<4|r>>4,a=1<f?(15&r)<<2|n>>6:64,o=2<f?63&n:64,h.push(p.charAt(i)+p.charAt(s)+p.charAt(a)+p.charAt(o));return h.join("")},r.decode=function(e){var t,r,n,i,s,a,o=0,h=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var l,f=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===p.charAt(64)&&f--,e.charAt(e.length-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=c.uint8array?new Uint8Array(0|f):new Array(0|f);o<e.length;)t=p.indexOf(e.charAt(o++))<<2|(i=p.indexOf(e.charAt(o++)))>>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l};},{"./support":30,"./utils":32}],2:[function(e,t,r){var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i;}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o;},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate");},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e;}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return -1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t.charCodeAt(a))];return -1^e}(0|t,e,e.length,0):0};},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null;},{}],6:[function(e,t,r){var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n};},{lie:37}],7:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={};}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1);},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0);},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null;},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta});};},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})};},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function A(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[];}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}));},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}});}else this.accumulate=!0;},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null;},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=function(e,t,r,n,i){var s=I.transformTo("string",i(n));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+A(e,2)+A(e,2)+A(t,4)+A(r,4)+A(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}});},s.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume();},s.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e);}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end();}),e.on("error",function(e){t.error(e);}),this},s.prototype.resume=function(){return !!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},s.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return !1;for(var r=0;r<t.length;r++)try{t[r].error(e);}catch(e){}return !0},s.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock();},t.exports=s;},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var u=e("../compressions"),n=e("./ZipFileWorker");r.generateWorker=function(e,a,t){var o=new n(a.streamFiles,t,a.platform,a.encodeFileName),h=0;try{e.forEach(function(e,t){h++;var r=function(e,t){var r=e||t,n=u[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(t.options.compression,a.compression),n=t.options.compressionOptions||a.compressionOptions||{},i=t.dir,s=t.date;t._compressWorker(r,n).withStreamInfo("file",{name:e,dir:i,date:s,comment:t.comment||"",unixPermissions:t.unixPermissions,dosPermissions:t.dosPermissions}).pipe(o);}),o.entriesCount=h;}catch(e){o.error(e);}return o};},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e};}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.1",n.loadAsync=function(e,t){return (new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n;},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var u=e("./utils"),i=e("./external"),n=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function f(n){return new i.Promise(function(e,t){var r=n.decompressed.getContentWorker().pipe(new a);r.on("error",function(e){t(e);}).on("end",function(){r.streamInfo.crc32!==n.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):e();}).resume();})}t.exports=function(e,o){var h=this;return o=u.extend(o||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",e,!0,o.optimizedBinaryString,o.base64).then(function(e){var t=new s(o);return t.load(e),t}).then(function(e){var t=[i.Promise.resolve(e)],r=e.files;if(o.checkCRC32)for(var n=0;n<r.length;n++)t.push(f(r[n]));return i.Promise.all(t)}).then(function(e){for(var t=e.shift(),r=t.files,n=0;n<r.length;n++){var i=r[n],s=i.fileNameStr,a=u.resolve(i.fileNameStr);h.file(a,i.decompressed,{binary:!0,optimizedBinaryString:!0,date:i.date,dir:i.dir,comment:i.fileCommentStr.length?i.fileCommentStr:null,unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions,createFolders:o.createFolders}),i.dir||(h.file(a).unsafeOriginalName=s);}return t.zipComment.length&&(h.comment=t.zipComment),h})};},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var n=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t);}n.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}});}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e);}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end();});},s.prototype.pause=function(){return !!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return !!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s;},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var i=e("readable-stream").Readable;function n(e,t,r){i.call(this,t),this._helper=e;var n=this;e.on("data",function(e,t){n.push(e)||n._helper.pause(),r&&r(t);}).on("error",function(e){n.emit("error",e);}).on("end",function(){n.push(null);});}e("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume();},t.exports=n;},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}};},{}],15:[function(e,t,r){function s(e,t,r){var n,i=u.getTypeOf(t),s=u.extend(r||{},f);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=g(e)),s.createFolders&&(n=_(e))&&b.call(this,n,!0);var a="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!a),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var o=null;o=t instanceof c||t instanceof l?t:p.isNode&&p.isStream(t)?new m(e,t):u.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var h=new d(e,o,s);this.files[e]=h;}var i=e("./utf8"),u=e("./utils"),l=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),f=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),o=e("./generate"),p=e("./nodejsUtils"),m=e("./nodejs/NodejsStreamInputAdapter"),_=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return "/"!==e.slice(-1)&&(e+="/"),e},b=function(e,t){return t=void 0!==t?t:f.createFolders,e=g(e),this.files[e]||s.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function h(e){return "[object RegExp]"===Object.prototype.toString.call(e)}var n={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n);},filter:function(r){var n=[];return this.forEach(function(e,t){r(e,t)&&n.push(t);}),n},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,s.call(this,e,t,r),this;if(h(e)){var n=e;return this.filter(function(e,t){return !t.dir&&n.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(r){if(!r)return this;if(h(r))return this.filter(function(e,t){return t.dir&&r.test(e)});var e=this.root+r,t=b.call(this,e),n=this.clone();return n.root=t.name,n},remove:function(r){r=this.root+r;var e=this.files[r];if(e||("/"!==r.slice(-1)&&(r+="/"),e=this.files[r]),e&&!e.dir)delete this.files[r];else for(var t=this.filter(function(e,t){return t.name.slice(0,r.length)===r}),n=0;n<t.length;n++)delete this.files[t[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=u.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");u.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=o.generateWorker(this,r,n);}catch(e){(t=new l("error")).error(e);}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return (e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=n;},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream");},{stream:void 0}],17:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t];}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return -1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return [];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0;}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e);},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e;},skip:function(e){this.setIndex(this.index+e);},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i;},{"../utils":32}],19:[function(e,t,r){var n=e("./Uint8ArrayReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var n=e("./DataReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var n=e("./ArrayReader");function i(e){n.call(this,e);}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i;},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)};},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b";},{}],24:[function(e,t,r){var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e;}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta});},t.exports=s;},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0);}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e);},t.exports=s;},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0);}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length;}i.prototype.processChunk.call(this,e);},t.exports=s;},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat();},function(e){t.error(e);});}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null;},s.prototype.resume=function(){return !!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0));},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return !1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t);}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s;},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null;}n.prototype={push:function(e){this.emit("data",e);},end:function(){if(this.isFinished)return !1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0;}catch(e){this.emit("error",e);}return !0},error:function(e){return !this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[];},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t);},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e);}),e.on("end",function(){t.end();}),e.on("error",function(e){t.error(e);}),this},pause:function(){return !this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return !1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e);},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e]);},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock();},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n;},{}],29:[function(e,t,r){var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter");}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t);}).on("error",function(e){n=[],r(e);}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r<t.length;r++)s+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(s),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(i,n),a);t(e);}catch(e){r(e);}n=[];}).resume();})}function f(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";}try{this._internalType=n,this._outputType=t,this._mimeType=r,h.checkSupport(n),this._worker=e.pipe(new i(n)),e.lock();}catch(e){this._worker=new s("error"),this._worker.error(e);}}f.prototype={accumulate:function(e){return l(this,e)},on:function(e,t){var r=this;return "data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta);}):this._worker.on(e,function(){h.delay(t,arguments,r);}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=f;},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else {var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size;}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size;}catch(e){r.blob=!1;}}}try{r.nodestream=!!e("readable-stream").Readable;}catch(e){r.nodestream=!1;}},{"readable-stream":16}],31:[function(e,t,s){for(var o=e("./utils"),h=e("./support"),r=e("./nodejsUtils"),n=e("./stream/GenericWorker"),u=new Array(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;u[254]=u[254]=1;function a(){n.call(this,"utf-8 decode"),this.leftOver=null;}function l(){n.call(this,"utf-8 encode");}s.utf8encode=function(e){return h.nodebuffer?r.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=h.uint8array?new Uint8Array(o):new Array(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t<s;)if((n=e[t++])<128)a[r++]=n;else if(4<(i=u[n]))a[r++]=65533,t+=i-1;else {for(n&=2===i?31:3===i?15:7;1<i&&t<s;)n=n<<6|63&e[t++],i--;1<i?a[r++]=65533:n<65536?a[r++]=n:(n-=65536,a[r++]=55296|n>>10&1023,a[r++]=56320|1023&n);}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length);}else t=this.leftOver.concat(t);this.leftOver=null;}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta});},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null);},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta});},s.Utf8EncodeWorker=l;},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),a.newBlob=function(t,r){a.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var i={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return !1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(e){return !1}}()}};function s(e){var t=65536,r=a.getTypeOf(e),n=!0;if("uint8array"===r?n=i.applyCanBeUsed.uint8array:"nodebuffer"===r&&(n=i.applyCanBeUsed.nodebuffer),n)for(;1<t;)try{return i.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2);}return i.stringifyByChar(e)}function f(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}a.applyFromCharCode=s;var c={};c.string={string:n,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return c.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,r.allocBuffer(e.length))}},c.array={string:s,array:n,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(e)}},c.arraybuffer={string:function(e){return s(new Uint8Array(e))},array:function(e){return f(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:n,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(new Uint8Array(e))}},c.uint8array={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:n,nodebuffer:function(e){return r.newBufferFrom(e)}},c.nodebuffer={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return c.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:n},a.transformTo=function(e,t){if(t=t||"",!e)return t;a.checkSupport(e);var r=a.getTypeOf(t);return c[r][e](t)},a.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i));}return r.join("/")},a.getTypeOf=function(e){return "string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":o.nodebuffer&&r.isBuffer(e)?"nodebuffer":o.uint8array&&e instanceof Uint8Array?"uint8array":o.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(e){if(!o[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},a.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[]);});},a.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r;},a.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},a.prepareContent=function(r,e,n,i,s){return u.Promise.resolve(e).then(function(n){return o.blob&&(n instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(n)))&&"undefined"!=typeof FileReader?new u.Promise(function(t,r){var e=new FileReader;e.onload=function(e){t(e.target.result);},e.onerror=function(e){r(e.target.error);},e.readAsArrayBuffer(n);}):n}).then(function(e){var t=a.getTypeOf(e);return t?("arraybuffer"===t?e=a.transformTo("uint8array",e):"string"===t&&(s?e=h.decode(e):n&&!0!==i&&(e=function(e){return l(e,o.uint8array?new Uint8Array(e.length):new Array(e.length))}(e))),e):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})};},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var n=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),a=e("./zipEntry"),o=e("./support");function h(e){this.files=[],this.loadOptions=e;}h.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r);},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r};},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes();},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw !this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral();}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e);},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles();}},t.exports=h;},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var n=e("./reader/readerFor"),s=e("./utils"),i=e("./compressedObject"),a=e("./crc32"),o=e("./utf8"),h=e("./compressions"),u=e("./support");function l(e,t){this.options=e,this.loadOptions=t;}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in h)if(Object.prototype.hasOwnProperty.call(h,t)&&h[t].magic===e)return h[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize));},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength);},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0);},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4));}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i);},handleUTF8:function(){var e=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else {var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else {var r=s.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r);}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else {var i=s.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i);}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileComment)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null}},t.exports=l;},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions};}var s=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),a=e("./utf8"),o=e("./compressedObject"),h=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new a.Utf8DecodeWorker));}catch(e){(t=new h("error")).error(e);}return new s(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new i(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)n.prototype[u[f]]=l;t.exports=n;},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,l,t){(function(t){var r,n,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var i=0,s=new e(u),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2;};}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){u(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null;},t.document.documentElement.appendChild(e);}:function(){setTimeout(u,0);};else {var o=new t.MessageChannel;o.port1.onmessage=u,r=function(){o.port2.postMessage(0);};}var h=[];function u(){var e,t;n=!0;for(var r=h.length;r;){for(t=h,h=[],e=-1;++e<r;)t[e]();r=h.length;}n=!1;}l.exports=function(e){1!==h.push(e)||n||r();};}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}],37:[function(e,t,r){var i=e("immediate");function u(){}var l={},s=["REJECTED"],a=["FULFILLED"],n=["PENDING"];function o(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=n,this.queue=[],this.outcome=void 0,e!==u&&d(this,e);}function h(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected);}function f(t,r,n){i(function(){var e;try{e=r(n);}catch(e){return l.reject(t,e)}e===t?l.reject(t,new TypeError("Cannot resolve promise with itself")):l.resolve(t,e);});}function c(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments);}}function d(t,e){var r=!1;function n(e){r||(r=!0,l.reject(t,e));}function i(e){r||(r=!0,l.resolve(t,e));}var s=p(function(){e(i,n);});"error"===s.status&&n(s.value);}function p(e,t){var r={};try{r.value=e(t),r.status="success";}catch(e){r.status="error",r.value=e;}return r}(t.exports=o).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})})},o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(u);this.state!==n?f(r,this.state===a?e:t,this.outcome):this.queue.push(new h(r,e,t));return r},h.prototype.callFulfilled=function(e){l.resolve(this.promise,e);},h.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e);},h.prototype.callRejected=function(e){l.reject(this.promise,e);},h.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e);},l.resolve=function(e,t){var r=p(c,t);if("error"===r.status)return l.reject(e,r.value);var n=r.value;if(n)d(e,n);else {e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t);}return e},l.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},o.resolve=function(e){if(e instanceof this)return e;return l.resolve(new this(u),e)},o.reject=function(e){var t=new this(u);return l.reject(t,e)},o.all=function(e){var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);var s=new Array(n),a=0,t=-1,o=new this(u);for(;++t<n;)h(e[t],t);return o;function h(e,t){r.resolve(e).then(function(e){s[t]=e,++a!==n||i||(i=!0,l.resolve(o,s));},function(e){i||(i=!0,l.reject(o,e));});}},o.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);var i=-1,s=new this(u);for(;++i<r;)a=e[i],t.resolve(a).then(function(e){n||(n=!0,l.resolve(s,e));},function(e){n||(n=!0,l.reject(s,e));});var a;return s};},{immediate:36}],38:[function(e,t,r){var n={};(0, e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n;},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var a=e("./zlib/deflate"),o=e("./utils/common"),h=e("./utils/strings"),i=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString,l=0,f=-1,c=0,d=8;function p(e){if(!(this instanceof p))return new p(e);this.options=o.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(i[r]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?h.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=a.deflateSetDictionary(this.strm,n))!==l)throw new Error(i[r]);this._dict_set=!0;}}function n(e,t){var r=new p(t);if(r.push(e,!0),r.err)throw r.msg||i[r.err];return r.result}p.prototype.push=function(e,t){var r,n,i=this.strm,s=this.options.chunkSize;if(this.ended)return !1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=h.string2buf(e):"[object ArrayBuffer]"===u.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new o.Buf8(s),i.next_out=0,i.avail_out=s),1!==(r=a.deflate(i,n))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(h.buf2binstring(o.shrinkBuf(i.output,i.next_out))):this.onData(o.shrinkBuf(i.output,i.next_out)));}while((0<i.avail_in||0===i.avail_out)&&1!==r);return 4===n?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==n||(this.onEnd(l),!(i.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e);},p.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;},r.Deflate=p,r.deflate=n,r.deflateRaw=function(e,t){return (t=t||{}).raw=!0,n(e,t)},r.gzip=function(e,t){return (t=t||{}).gzip=!0,n(e,t)};},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){var c=e("./zlib/inflate"),d=e("./utils/common"),p=e("./utils/strings"),m=e("./zlib/constants"),n=e("./zlib/messages"),i=e("./zlib/zstream"),s=e("./zlib/gzheader"),_=Object.prototype.toString;function a(e){if(!(this instanceof a))return new a(e);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var r=c.inflateInit2(this.strm,t.windowBits);if(r!==m.Z_OK)throw new Error(n[r]);this.header=new s,c.inflateGetHeader(this.strm,this.header);}function o(e,t){var r=new a(t);if(r.push(e,!0),r.err)throw r.msg||n[r.err];return r.result}a.prototype.push=function(e,t){var r,n,i,s,a,o,h=this.strm,u=this.options.chunkSize,l=this.options.dictionary,f=!1;if(this.ended)return !1;n=t===~~t?t:!0===t?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof e?h.input=p.binstring2buf(e):"[object ArrayBuffer]"===_.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new d.Buf8(u),h.next_out=0,h.avail_out=u),(r=c.inflate(h,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&l&&(o="string"==typeof l?p.string2buf(l):"[object ArrayBuffer]"===_.call(l)?new Uint8Array(l):l,r=c.inflateSetDictionary(this.strm,o)),r===m.Z_BUF_ERROR&&!0===f&&(r=m.Z_OK,f=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==m.Z_STREAM_END&&(0!==h.avail_in||n!==m.Z_FINISH&&n!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(i=p.utf8border(h.output,h.next_out),s=h.next_out-i,a=p.buf2string(h.output,i),h.next_out=s,h.avail_out=u-s,s&&d.arraySet(h.output,h.output,i,s,0),this.onData(a)):this.onData(d.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0);}while((0<h.avail_in||0===h.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(n=m.Z_FINISH),n===m.Z_FINISH?(r=c.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):n!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(h.avail_out=0))},a.prototype.onData=function(e){this.chunks.push(e);},a.prototype.onEnd=function(e){e===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg;},r.Inflate=a,r.inflate=o,r.inflateRaw=function(e,t){return (t=t||{}).raw=!0,o(e,t)},r.ungzip=o;},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n]);}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s];},flattenChunks:function(e){var t,r,n,i,s,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)s=e[t],a.set(s,i),i+=s.length;return a}},s={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s];},flattenChunks:function(e){return [].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s));},r.setTyped(n);},{}],42:[function(e,t,r){var h=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0]);}catch(e){i=!1;}try{String.fromCharCode.apply(null,new Uint8Array(1));}catch(e){s=!1;}for(var u=new h.Buf8(256),n=0;n<256;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function l(e,t){if(t<65537&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,h.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}u[254]=u[254]=1,r.string2buf=function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new h.Buf8(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,s,a=t||e.length,o=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)o[n++]=i;else if(4<(s=u[i]))o[n++]=65533,r+=s-1;else {for(i&=2===s?31:3===s?15:7;1<s&&r<a;)i=i<<6|63&e[r++],s--;1<s?o[n++]=65533:i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|1023&i);}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t};},{"./common":41}],43:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(i=i+t[n++]|0)|0,--a;);i%=65521,s%=65521;}return i|s<<16|0};},{}],44:[function(e,t,r){t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};},{}],45:[function(e,t,r){var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e;}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return -1^e};},{}],46:[function(e,t,r){var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return (e<<1)-(4<e?9:0)}function D(e){for(var t=e.length;0<=--t;)e[t]=0;}function F(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0));}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm);}function U(e,t){e.pending_buf[e.pending++]=t;}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t;}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<c);if(n=S-(c-s),s=c-S,a<n){if(e.match_start=t,o<=(a=n))break;d=u[s+a-1],p=u[s+a];}}}while((t=f[t&l])>h&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f;}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u<l&&(l=u),r=0===l?0:(a.avail_in-=l,c.arraySet(o,a.input,a.next_in,l,h),1===a.state.wrap?a.adler=d(a.adler,o,l,h):2===a.state.wrap&&(a.adler=p(a.adler,o,l,h)),a.next_in+=l,a.total_in+=l,l),e.lookahead+=r,e.lookahead+e.insert>=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+x-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<x)););}while(e.lookahead<z&&0!==e.strm.avail_in)}function Z(e,t){for(var r,n;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r)),e.match_length>=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++;}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function W(e,t){for(var r,n,i;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=x-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===x&&4096<e.strstart-e.match_start)&&(e.match_length=x-1)),e.prev_length>=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=x-1,e.strstart++,n&&(N(e,!1),0===e.strm.avail_out))return A}else if(e.match_available){if((n=u._tr_tally(e,0,e.window[e.strstart-1]))&&N(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return A}else e.match_available=1,e.strstart++,e.lookahead--;}return e.match_available&&(n=u._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function M(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i;}function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*w),this.dyn_dtree=new c.Buf16(2*(2*a+1)),this.bl_tree=new c.Buf16(2*(2*o+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(k+1),this.heap=new c.Buf16(2*s+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*s+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0;}function G(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=i,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?C:E,e.adler=2===t.wrap?0:1,t.last_flush=l,u._tr_init(t),m):R(e,_)}function K(e){var t=G(e);return t===m&&function(e){e.window_size=2*e.w_size,D(e.head),e.max_lazy_match=h[e.level].max_lazy,e.good_match=h[e.level].good_length,e.nice_match=h[e.level].nice_length,e.max_chain_length=h[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0;}(e.state),t}function Y(e,t,r,n,i,s){if(!e)return _;var a=1;if(t===g&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||y<i||r!==v||n<8||15<n||t<0||9<t||s<0||b<s)return R(e,_);8===n&&(n=9);var o=new H;return (e.state=o).strm=e,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new c.Buf8(2*o.w_size),o.head=new c.Buf16(o.hash_size),o.prev=new c.Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new c.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=s,o.method=r,K(e)}h=[new M(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5<t||t<0)return e?R(e,_):_;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&t!==f)return R(e,0===e.avail_out?-5:_);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===C)if(2===n.wrap)e.adler=0,U(n,31),U(n,139),U(n,8),n.gzhead?(U(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),U(n,255&n.gzhead.time),U(n,n.gzhead.time>>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else {var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1;}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73);}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,U(n,s);}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91);}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,U(n,s);}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103);}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+S;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=S-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead);}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?m:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==E&&666!==t?R(e,_):(e.state=null,t===E?R(e,-3):m):_},r.deflateSetDictionary=function(e,t){var r,n,i,s,a,o,h,u,l=t.length;if(!e||!e.state)return _;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==C||r.lookahead)return _;for(1===s&&(e.adler=d(e.adler,t,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+x-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=x-1,j(r);}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,e.next_in=o,e.input=h,e.avail_in=a,r.wrap=s,m},r.deflateInfo="pako deflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1;};},{}],48:[function(e,t,r){t.exports=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C;r=e.state,n=e.next_in,z=e.input,i=n+(e.avail_in-5),s=e.next_out,C=e.output,a=s-(t-e.avail_out),o=s+(e.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,c=r.window,d=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=m[d&g];t:for(;;){if(d>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else {if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<<y)-1)];continue t}if(32&y){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&v,(y&=15)&&(p<y&&(d+=z[n++]<<p,p+=8),w+=d&(1<<y)-1,d>>>=y,p-=y),p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=_[d&b];r:for(;;){if(d>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<<y)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&v,p<(y&=15)&&(d+=z[n++]<<p,(p+=8)<y&&(d+=z[n++]<<p,p+=8)),h<(k+=d&(1<<y)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=c,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C;}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=c[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=c[x++],--y;);x=s-k,S=C;}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C;}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]));}else {for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]));}break}}break}}while(n<i&&s<o);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<o?o-s+257:257-(s-o),r.hold=d,r.bits=p;};},{}],49:[function(e,t,r){var I=e("../utils/common"),O=e("./adler32"),B=e("./crc32"),R=e("./inffast"),T=e("./inftrees"),D=1,F=2,N=0,U=-2,P=1,n=852,i=592;function L(e){return (e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?U:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,o(e))):U}function u(e,t){var r,n;return e?(n=new s,(e.state=n).window=null,(r=h(e,t))!==N&&(e.state=null),r):U}var l,f,c=!0;function j(e){if(c){var t;for(l=new I.Buf32(512),f=new I.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(T(D,e.lens,0,288,l,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;T(F,e.lens,0,32,f,0,e.work,{bits:5}),c=!1;}e.lencode=l,e.lenbits=9,e.distcode=f,e.distbits=5;}function Z(e,t,r,n){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new I.Buf8(s.wsize)),n>=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=o,r.inflateReset2=h,r.inflateResetKeep=a,r.inflateInit=function(e){return u(e,15)},r.inflateInit2=u,r.inflate=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C=0,E=new I.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return U;12===(r=e.state).mode&&(r.mode=13),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,f=o,c=h,x=N;e:for(;;)switch(r.mode){case P:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=512&u?10:12,l=u=0;break;case 2:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(r.flags=u,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0;}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(u!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}l=u=0;}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}e.adler=r.check=L(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){u>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}switch(r.last=1&u,l-=1,3&(u>>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30;}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o<d&&(d=o),h<d&&(d=h),0===d)break e;I.arraySet(i,n,s,d,a),o-=d,s+=d,h-=d,a+=d,r.length-=d;break}r.mode=12;break;case 17:for(;l<14;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.lens[A[r.have++]]=7&u,u>>>=3,l-=3;}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(b<16)u>>>=_,l-=_,r.lens[r.have++]=b;else {if(16===b){for(z=_+2;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(u>>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2;}else if(17===b){for(z=_+3;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}l-=_,k=0,d=3+(7&(u>>>=_)),u>>>=3,l-=3;}else {for(z=_+7;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}l-=_,k=0,d=11+(127&(u>>>=_)),u>>>=7,l-=7;}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k;}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(g&&0==(240&g)){for(v=_,y=g,w=b;g=(C=r.lencode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<<r.distbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(0==(240&g)){for(v=_,y=g,w=b;g=(C=r.distcode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}u>>>=v,l-=v,r.back+=v;}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra;}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window;}else m=i,p=a-r.offset,d=r.length;for(h<d&&(d=h),h-=d,r.length-=d;i[a++]=m[p++],--d;);0===r.length&&(r.mode=21);break;case 26:if(0===h)break e;i[a++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===o)break e;o--,u|=n[s++]<<l,l+=8;}if(c-=h,e.total_out+=c,r.total+=c,c&&(e.adler=r.check=r.flags?B(r.check,i,c,a-c):O(r.check,i,c,a-c)),c=h,(r.flags?u:L(u))!==r.check){e.msg="incorrect data check",r.mode=30;break}l=u=0;}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8;}if(u!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}l=u=0;}r.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return -4;case 32:default:return U}return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,(r.wsize||c!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&Z(e,e.output,e.next_out,c-e.avail_out)?(r.mode=31,-4):(f-=e.avail_in,c-=e.avail_out,e.total_in+=f,e.total_out+=c,r.total+=c,r.wrap&&c&&(e.adler=r.check=r.flags?B(r.check,i,c,e.next_out-c):O(r.check,i,c,e.next_out-c)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==f&&0===c||4===t)&&x===N&&(x=-5),x)},r.inflateEnd=function(e){if(!e||!e.state)return U;var t=e.state;return t.window&&(t.window=null),e.state=null,N},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?U:((r.head=t).done=!1,N):U},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?U:11===r.mode&&O(1,t,n,0)!==r.check?-3:Z(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,N):U},r.inflateInfo="pako inflate (from Nodeca project)";},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){var D=e("../utils/common"),F=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],U=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],P=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,n,i,s,a,o){var h,u,l,f,c,d,p,m,_,g=o.bits,b=0,v=0,y=0,w=0,k=0,x=0,S=0,z=0,C=0,E=0,A=null,I=0,O=new D.Buf16(16),B=new D.Buf16(16),R=null,T=0;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<n;v++)O[t[r+v]]++;for(k=g,w=15;1<=w&&0===O[w];w--);if(w<k&&(k=w),0===w)return i[s++]=20971520,i[s++]=20971520,o.bits=1,0;for(y=1;y<w&&0===O[y];y++);for(k<y&&(k=y),b=z=1;b<=15;b++)if(z<<=1,(z-=O[b])<0)return -1;if(0<z&&(0===e||1!==w))return -1;for(B[1]=0,b=1;b<15;b++)B[b+1]=B[b]+O[b];for(v=0;v<n;v++)0!==t[r+v]&&(a[B[t[r+v]]++]=v);if(d=0===e?(A=R=a,19):1===e?(A=F,I-=257,R=N,T-=257,256):(A=U,R=P,-1),b=y,c=s,S=v=E=0,l=-1,f=(C=1<<(x=k))-1,1===e&&852<C||2===e&&592<C)return 1;for(;;){for(p=b-S,_=a[v]<d?(m=0,a[v]):a[v]>d?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<<b-S,y=u=1<<x;i[c+(E>>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<<b-1;E&h;)h>>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]];}if(k<b&&(E&f)!==l){for(0===S&&(S=k),c+=y,z=1<<(x=b-S);x+S<w&&!((z-=O[x+S])<=0);)x++,z<<=1;if(C+=1<<x,1===e&&852<C||2===e&&592<C)return 1;i[l=E&f]=k<<24|x<<16|c-s|0;}}return 0!==E&&(i[c+E]=b-S<<24|64<<16|0),o.bits=k,0};},{"../utils/common":41}],51:[function(e,t,r){t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};},{}],52:[function(e,t,r){var i=e("../utils/common"),o=0,h=1;function n(e){for(var t=e.length;0<=--t;)e[t]=0;}var s=0,a=29,u=256,l=u+1+a,f=30,c=19,_=2*l+1,g=15,d=16,p=7,m=256,b=16,v=17,y=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=new Array(2*(l+2));n(z);var C=new Array(2*f);n(C);var E=new Array(512);n(E);var A=new Array(256);n(A);var I=new Array(a);n(I);var O,B,R,T=new Array(f);function D(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length;}function F(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t;}function N(e){return e<256?E[e]:E[256+(e>>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255;}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<<e.bi_valid&65535,U(e,e.bi_buf),e.bi_buf=t>>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r);}function L(e,t,r){P(e,r[2*t],r[2*t+1]);}function j(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o));}}function W(e){var t;for(t=0;t<l;t++)e.dyn_ltree[2*t]=0;for(t=0;t<f;t++)e.dyn_dtree[2*t]=0;for(t=0;t<c;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*m]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0;}function M(e){8<e.bi_valid?U(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0;}function H(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function G(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&H(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!H(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n;}function K(e,t,r){var n,i,s,a,o=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],i=e.pending_buf[e.l_buf+o],o++,0===n?L(e,i,t):(L(e,(s=A[i])+u+1,t),0!==(a=w[s])&&P(e,i-=I[s],a),L(e,s=N(--n),r),0!==(a=k[s])&&P(e,n-=T[s],a)),o<e.last_lit;);L(e,m,t);}function Y(e,t){var r,n,i,s=t.dyn_tree,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,h=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=_,r=0;r<h;r++)0!==s[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u<n||(e.bl_count[s]++,a=0,d<=n&&(a=c[n-d]),o=h[2*n],e.opt_len+=o*(s+a),f&&(e.static_len+=o*(l[2*n+1]+a)));if(0!==m){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,m-=2;}while(0<m);for(s=p;0!==s;s--)for(n=e.bl_count[s];0!==n;)u<(i=e.heap[--r])||(h[2*i+1]!==s&&(e.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--);}}(e,t),Z(s,u,e.bl_count);}function X(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<h&&i===a||(o<u?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*b]++):o<=10?e.bl_tree[2*v]++:e.bl_tree[2*y]++,s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4));}function V(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<h&&i===a)){if(o<u)for(;L(e,i,e.bl_tree),0!=--o;);else 0!==i?(i!==s&&(L(e,i,e.bl_tree),o--),L(e,b,e.bl_tree),P(e,o-3,2)):o<=10?(L(e,v,e.bl_tree),P(e,o-3,3)):(L(e,y,e.bl_tree),P(e,o-11,7));s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4);}}n(T);var q=!1;function J(e,t,r,n){P(e,(s<<1)+(n?1:0),3),function(e,t,r,n){M(e),n&&(U(e,r),U(e,~r)),i.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r;}(e,t,r,!0);}r._tr_init=function(e){q||(function(){var e,t,r,n,i,s=new Array(g+1);for(n=r=0;n<a-1;n++)for(I[n]=r,e=0;e<1<<w[n];e++)A[r++]=n;for(A[r-1]=n,n=i=0;n<16;n++)for(T[n]=i,e=0;e<1<<k[n];e++)E[i++]=n;for(i>>=7;n<f;n++)for(T[n]=i<<7,e=0;e<1<<k[n]-7;e++)E[256+i++]=n;for(t=0;t<=g;t++)s[t]=0;for(e=0;e<=143;)z[2*e+1]=8,e++,s[8]++;for(;e<=255;)z[2*e+1]=9,e++,s[9]++;for(;e<=279;)z[2*e+1]=7,e++,s[7]++;for(;e<=287;)z[2*e+1]=8,e++,s[8]++;for(Z(z,l+1,s),e=0;e<f;e++)C[2*e+1]=5,C[2*e]=j(e,5);O=new D(z,w,u+1,l,g),B=new D(C,k,0,f,g),R=new D(new Array(0),x,0,c,p);}(),q=!0),e.l_desc=new F(e.dyn_ltree,O),e.d_desc=new F(e.dyn_dtree,B),e.bl_desc=new F(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,W(e);},r._tr_stored_block=J,r._tr_flush_block=function(e,t,r,n){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t<u;t++)if(0!==e.dyn_ltree[2*t])return h;return o}(e)),Y(e,e.l_desc),Y(e,e.d_desc),a=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),Y(e,e.bl_desc),t=c-1;3<=t&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i<n;i++)P(e,e.bl_tree[2*S[i]+1],3);V(e,e.dyn_ltree,t-1),V(e,e.dyn_dtree,r-1);}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),K(e,e.dyn_ltree,e.dyn_dtree)),W(e),n&&M(e);},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8);}(e);};},{"../utils/common":41}],53:[function(e,t,r){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0;};},{}],54:[function(e,t,r){(function(e){!function(r,n){if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e);});}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1;},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*");}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data);},function(e){t.port2.postMessage(e);}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null;},s.appendChild(t);}):function(e){setTimeout(c,0,e);},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var n={callback:e,args:t};return h[o]=n,i(o),o++},e.clearImmediate=f;}function f(e){delete h[e];}function c(e){if(u)setTimeout(c,0,e);else {var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r);}}(t);}finally{f(e),u=!1;}}}}function d(e){e.source===r&&"string"==typeof e.data&&0===e.data.indexOf(a)&&c(+e.data.slice(a.length));}}("undefined"==typeof self?void 0===e?this:e:self);}).call(this,"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{});},{}]},{},[10])(10)});
48902
+ });
48903
+
48904
+ var shortDebounce = useDebounce(200);
48905
+ var ICON_SIZE = 18;
48906
+ var FilePreview = function (_a) {
48907
+ var projectOwner = _a.projectOwner, projectName = _a.projectName, jobId = _a.jobId, value = _a.value, // cloud controller
48908
+ client = _a.client, inputProps = _a.inputProps, onPreviewChange = _a.onPreviewChange, // Use it for streamlit setComponentValue
48909
+ enableFilePicker = _a.enableFilePicker, localPath = _a.localPath // local controller
48910
+ ;
48911
+ var fromFileToBase64 = usePollinationPanel().fromFileToBase64;
48912
+ var getExtension = function (fileName) {
48913
+ if (!fileName)
48914
+ return;
48915
+ var arr = fileName.split(".");
48916
+ if (arr) {
48917
+ return arr.at(arr.length - 1);
48918
+ }
48919
+ };
48920
+ var host = getHost();
48921
+ var _b = useState(value), selArtifact = _b[0], setSelArtifact = _b[1];
48922
+ var _c = useState(localPath), selFilePath = _c[0], setSelFilePath = _c[1];
48923
+ var downloadArtifact = useArtifacts(projectOwner, projectName, client).downloadArtifact;
48924
+ var _d = useState(), preview = _d[0], setPreview = _d[1];
48925
+ var _e = useState(), currBlob = _e[0], setCurrBlob = _e[1];
48926
+ var _f = useState(getExtension((value === null || value === void 0 ? void 0 : value.file_name) || getExtension(localPath))), currFileExtension = _f[0], setCurrFileExtension = _f[1];
48927
+ var allowedFileTypes = ['application/zip', 'text/plain'];
48928
+ var parser = {
48929
+ 'text/plain': function (blob) {
48930
+ var reader = new FileReader();
48931
+ reader.onload = function () {
48932
+ setPreview(reader.result);
48933
+ };
48934
+ reader.readAsText(blob);
48935
+ },
48936
+ 'application/zip': function (blob) {
48937
+ // TODO: use Nodes to add many buttons components for vsf or hbjson or others
48938
+ var archive = new jszip_min();
48939
+ archive.loadAsync(blob)
48940
+ .then(function (zip) { return __awaiter$1(void 0, void 0, void 0, function () {
48941
+ var entries, listOfPromises, promiseOfList;
48942
+ return __generator$1(this, function (_a) {
48943
+ entries = Object.keys(zip.files).map(function (name) { return zip.files[name]; });
48944
+ listOfPromises = entries.map(function (entry) {
48945
+ return entry
48946
+ .async("blob")
48947
+ .then(function (blob) { return [entry.name, blob]; });
48948
+ });
48949
+ promiseOfList = Promise.all(listOfPromises);
48950
+ promiseOfList.then(function (list) {
48951
+ list.forEach(function (items) {
48952
+ var ext = getExtension(items[0]);
48953
+ if (ext === 'vsf') {
48954
+ var reader = new FileReader();
48955
+ reader.onload = function () {
48956
+ setPreview(reader.result);
48957
+ };
48958
+ reader.readAsText(items[1]);
48959
+ }
48960
+ });
48961
+ });
48962
+ return [2 /*return*/];
48963
+ });
48964
+ }); });
48965
+ }
48966
+ };
48967
+ // Internal onChange cloud
48968
+ var onChange = useCallback(function (selArtifact) {
48969
+ setSelArtifact(selArtifact);
48970
+ !selArtifact && setPreview(undefined);
48971
+ !selArtifact && setCurrFileExtension(undefined);
48972
+ }, []);
48973
+ // Internal onChange local
48974
+ var onChangeLocal = useCallback(function (path) {
48975
+ setSelFilePath(path);
48976
+ !selFilePath && setPreview(undefined);
48977
+ !selFilePath && setCurrFileExtension(undefined);
48978
+ }, []);
48979
+ var base64AndFetch = function (path) {
48980
+ if (!path)
48981
+ return;
48982
+ var data = fromFileToBase64(path);
48983
+ var base64Data = data === null || data === void 0 ? void 0 : data.data;
48984
+ if (!base64Data)
48985
+ return;
48986
+ // bas64 mapping
48987
+ var t;
48988
+ switch (getExtension(path)) {
48989
+ case 'zip':
48990
+ t = 'application/zip';
48991
+ break;
48992
+ case 'vsf':
48993
+ t = 'text/plain';
48994
+ }
48995
+ fetchAndSet("data:".concat(t, ";base64,").concat(base64Data), path);
48996
+ };
48997
+ var fetchAndSet = function (url, path) {
48998
+ if (path === void 0) { path = undefined; }
48999
+ fetch(url)
49000
+ .then(function (response) { return response.blob()
49001
+ .then(function (blob) {
49002
+ var t = blob.type;
49003
+ if (!allowedFileTypes.includes(t)) {
49004
+ console.error("Cloud Artifact ".concat(t, " not supported."));
49005
+ setPreview(undefined);
49006
+ setCurrBlob(undefined);
49007
+ setCurrFileExtension(undefined);
49008
+ return;
49009
+ }
49010
+ switch (t) {
49011
+ case 'application/zip':
49012
+ parser['application/zip'](blob);
49013
+ break;
49014
+ case 'text/plain':
49015
+ parser['text/plain'](blob);
49016
+ break;
49017
+ default:
49018
+ setPreview(undefined);
49019
+ setCurrBlob(undefined);
49020
+ setCurrFileExtension(undefined);
49021
+ break;
49022
+ }
49023
+ setCurrBlob(blob);
49024
+ if (path) {
49025
+ setSelFilePath(path);
49026
+ }
49027
+ var ext = getExtension((selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.file_name) || path);
49028
+ setCurrFileExtension(ext);
49029
+ }); })
49030
+ .catch(function () { });
49031
+ };
49032
+ var download = function (blob, fileName) {
49033
+ var file = new File([blob], fileName);
49034
+ var a = document.createElement('a');
49035
+ document.body.appendChild(a);
49036
+ a.style.display = 'none';
49037
+ a.id = 'download';
49038
+ var url = window.URL.createObjectURL(file);
49039
+ a.href = url;
49040
+ a.download = fileName;
49041
+ a.click();
49042
+ };
49043
+ useEffect(function () {
49044
+ if (enableFilePicker) {
49045
+ selFilePath && base64AndFetch(selFilePath);
49046
+ return;
49047
+ }
49048
+ (selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.key) && downloadArtifact(selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.key, jobId)
49049
+ .then(fetchAndSet)
49050
+ .catch(function () { });
49051
+ }, [selArtifact, selFilePath, projectOwner, projectName]);
49052
+ shortDebounce(function () {
49053
+ onPreviewChange && onPreviewChange(preview);
49054
+ }, [onPreviewChange, preview]);
49055
+ return (React__default.createElement(React__default.Fragment, null,
49056
+ !value && !enableFilePicker && React__default.createElement(SelectCloudArtifacts, { projectOwner: projectOwner, projectName: projectName, value: selArtifact, hidden: false, client: client, jobId: jobId, fileNameMatch: typeof inputProps.accept === 'string'
49057
+ ? ".*(".concat(inputProps.accept.replace(/\./g, '').split(', ').join('$|'), "$)")
49058
+ : undefined, onChange: onChange }),
49059
+ !localPath && enableFilePicker && React__default.createElement(SelectLocalArtifactNative, { onChange: onChangeLocal, value: selFilePath, buttonLabel: "Select ".concat(inputProps.accept.split(',').length > 1 ?
49060
+ 'any of' : 'an', " ").concat(inputProps.accept, " ").concat(inputProps.accept.split(',').length > 1 ? 'file types' : 'file', "."), fileMatchPattern: "File types ".concat(inputProps.accept, "|*").concat(inputProps.accept.split(', ').join(';*')) }),
49061
+ (selArtifact || selFilePath) && //
49062
+ React__default.createElement(React__default.Fragment, null,
49063
+ (value || localPath) ? undefined : React__default.createElement("br", null),
49064
+ (host !== 'web' && currFileExtension === 'vsf'
49065
+ && typeof preview === 'string') &&
49066
+ React__default.createElement(SendResults, { results: JSON.parse(preview), defaultKey: (selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.file_name) || (selFilePath === null || selFilePath === void 0 ? void 0 : selFilePath.replace(/^.*[\\\/]/, '')), buttonLabel: 'Result Preview' }),
49067
+ (host !== 'web' && currFileExtension === 'zip') &&
49068
+ preview && typeof preview === 'string' &&
49069
+ React__default.createElement(SendResults, { results: JSON.parse(preview), defaultKey: (selArtifact === null || selArtifact === void 0 ? void 0 : selArtifact.file_name) || (selFilePath === null || selFilePath === void 0 ? void 0 : selFilePath.replace(/^.*[\\\/]/, '')), buttonLabel: 'Result Preview' }),
49070
+ (host === 'web') &&
49071
+ React__default.createElement(Button, { type: 'button', onClick: function () { return download(currBlob, selArtifact.file_name); }, disabled: !currBlob, style: {
49072
+ width: 'fit-content',
49073
+ }, loading: !currBlob },
49074
+ React__default.createElement(Download$1, { size: ICON_SIZE }),
49075
+ "Download"))));
49076
+ };
49077
+
49081
49078
  var css_248z$4 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary1: #cceefe;\n --primary0: #e6f7ff;\n --secondary: #fff566;\n --primary3: #000;\n --success: #46A758;\n --warning: #F76809;\n --danger: #FF4616;\n /* radix-ui/colors */\n --slate1: hsl(206, 30.0%, 98.8%);\n --slate2: hsl(210, 16.7%, 97.6%);\n --slate3: hsl(209, 13.3%, 95.3%);\n --slate4: hsl(209, 12.2%, 93.2%);\n --slate5: hsl(208, 11.7%, 91.1%);\n --slate6: hsl(208, 11.3%, 88.9%);\n --slate7: hsl(207, 11.1%, 85.9%);\n --slate8: hsl(205, 10.7%, 78.0%);\n --slate9: hsl(206, 6.0%, 56.1%);\n --slate10: hsl(206, 5.8%, 52.3%);\n --slate11: hsl(206, 6.0%, 43.5%);\n --slate12: hsl(206, 24.0%, 9.0%);\n}\n\n@keyframes spin {\n from {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n.spin {\n animation: spin 1s linear 0s infinite;\n}\n\n@keyframes Animation {\n 0% {\n background-position: 200%;\n }\n 50% {\n background-position: 100%;\n }\n 100% {\n background-position: 0%;\n }\n}\n.loading {\n background: linear-gradient(45deg, transparent, var(--primary), 12%, transparent);\n background-size: 200%;\n animation: Animation 3s ease infinite;\n}\n\n@keyframes open {\n from {\n height: 0;\n }\n to {\n height: var(--radix-collapsible-content-height);\n }\n}\n@keyframes close {\n from {\n height: var(--radix-collapsible-content-height);\n }\n to {\n height: 0;\n }\n}\n.collapse-content {\n overflow: hidden;\n font-size: inherit;\n color: inherit;\n}\n\n.collapse-content[data-state=open] {\n animation: open 300ms ease-out;\n}\n\n.collapse-content[data-state=closed] {\n animation: close 300ms ease-out;\n}\n\n.card-group {\n border: 0.05rem solid var(--slate9);\n padding: 10px;\n margin: 0 0 10px 0;\n border-radius: 6px;\n background-color: \"#fff\" !important;\n}\n\n.expander {\n border: 0.05rem solid var(--slate9);\n padding: 10px;\n cursor: pointer;\n margin: 0 0 10px 0;\n transition: opacity 0.5s;\n border-radius: 6px;\n background-color: \"#fff\" !important;\n}\n\n.expander:hover {\n opacity: 0.7;\n}\n\n.expander > p {\n color: var(--primary3);\n display: inline;\n margin: 0 10px 0 0;\n text-align: left;\n}\n\n.arrow {\n float: right;\n padding: 0 10px 0 0;\n}";
49082
49079
  styleInject(css_248z$4);
49083
49080
 
@@ -49273,7 +49270,7 @@ var FileCard = function (_a) {
49273
49270
  onClicked({ label: label, path: path, file: currFile, description: description });
49274
49271
  } },
49275
49272
  React__default.createElement("div", { className: 'title-param' },
49276
- React__default.createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default.createElement("div", null,
49273
+ React__default.createElement("div", { style: { float: 'left', margin: '0 8px 0 0' } }, !isLoading ? React__default.createElement("div", { title: 'Open the viewer' },
49277
49274
  React__default.createElement("span", { style: { margin: '0 8px 0 0' } }, getFileIcon(18, ((_c = (_b = path.split('/')
49278
49275
  .reverse()[0]) === null || _b === void 0 ? void 0 : _b.split('.')) === null || _c === void 0 ? void 0 : _c.pop()) || '')),
49279
49276
  label)
@@ -49292,7 +49289,7 @@ var FileCard = function (_a) {
49292
49289
  border: '1px solid var(--slate9)',
49293
49290
  // @ts-ignore
49294
49291
  highlight: 'var(--slate7)'
49295
- }, hbjson: CADdata.data, buttonLabel: 'Model', defaultAction: Action.add, optionsConfig: {
49292
+ }, hbjson: CADdata.data, buttonLabel: label, defaultAction: Action$1.add, optionsConfig: {
49296
49293
  add: true,
49297
49294
  delete: false,
49298
49295
  'subscribe-preview': false,
@@ -49305,7 +49302,7 @@ var FileCard = function (_a) {
49305
49302
  border: '1px solid var(--slate9)',
49306
49303
  // @ts-ignore
49307
49304
  highlight: 'var(--slate7)'
49308
- }, results: CADdata.data, buttonLabel: 'Results', defaultAction: Action.add, optionsConfig: {
49305
+ }, results: CADdata.data, buttonLabel: label, defaultAction: Action$1.add, optionsConfig: {
49309
49306
  add: true,
49310
49307
  delete: false,
49311
49308
  'subscribe-preview': false,
@@ -50302,5 +50299,5 @@ var RunTable = function (_a) {
50302
50299
  React__default.createElement(ChevronRight$1, null)))))));
50303
50300
  };
50304
50301
 
50305
- export { APIClient, AuthUser, Avatar, Button, ComboBox, ComboFileSelector, ConditionalWrapper, ConfigureLocalRun, CreateStudy, Dropdown, FileInput, FilePreview, FormInput, GetGeometry, GetModel, InputDescription, Label, Logo, NumberInput, RadioList, RecipeInputsForm, RunCard, RunDetails, RunRow, RunTable, SelectAccount, SelectCloudArtifacts, SelectLocalArtifacts, SelectProject, SelectRecipe, SelectRun, SelectStudy, SendGeometry, SendModel, SendResults, SettingsButton, StudyCard, TextInput, Tooltip, _defaultConfig, checkDotNet, checkPollinationPanel, checkRuby, formatBytes, getHost, recipeLinkFromSource, sendMessageDotNet, sendMessageRuby, useAPIClient, useArtifacts, useCreateStudy, useGetGeometry, useGetHbjson, useHbjsontoVTK, useJobs, useManageSettings, useRunCommand, useRuns, useSendHbjson, useSendMessage, useWindowDimensions };
50302
+ export { APIClient, AuthUser, Avatar, Button, ComboBox, ComboFileSelector, ConditionalWrapper, ConfigureLocalRun, CreateStudy, Dropdown, FileInput, FilePreview, FormInput, GetGeometry, GetModel, InputDescription, Label, Logo, NumberInput, RadioList, RecipeForm, RunCard, RunDetails, RunRow, RunTable, SelectAccount, SelectCloudArtifacts, SelectLocalArtifacts, SelectProject, SelectRecipe, SelectRun, SelectStudy, SendGeometry, SendModel, SendResults, SettingsButton, StudyCard, TextInput, Tooltip, _defaultConfig, checkDotNet, checkPollinationPanel, checkRuby, formatBytes, getHost, recipeLinkFromSource, sendMessageDotNet, sendMessageRuby, useAPIClient, useArtifacts, useCreateStudy, useGetGeometry, useGetHbjson, useHbjsontoVTK, useJobs, useManageSettings, useRunCommand, useRuns, useSendHbjson, useSendMessage, useWindowDimensions };
50306
50303
  //# sourceMappingURL=index.esm.js.map