@spiffcommerce/core 40.3.19 → 40.3.20

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.
@@ -52,7 +52,7 @@ spurious results.`)}}return!1};class R2{constructor(e,t="GraphQL request",n={lin
52
52
  `)),`
53
53
  }`)}function tr(r,e,t=""){return e!=null&&e!==""?r+e+t:""}function Up(r){return tr(" ",r.replace(/\n/g,`
54
54
  `))}function t0(r){var e;return(e=r?.some(t=>t.includes(`
55
- `)))!==null&&e!==void 0?e:!1}function nw(r){return r.kind===et.FIELD||r.kind===et.FRAGMENT_SPREAD||r.kind===et.INLINE_FRAGMENT}function Ud(r,e){var t=r.directives;return!t||!t.length?!0:$P(t).every(function(n){var i=n.directive,a=n.ifArgument,s=!1;return a.value.kind==="Variable"?(s=e&&e[a.value.name.value],Mr(s!==void 0,105,i.name.value)):s=a.value.value,i.name.value==="skip"?!s:s})}function pd(r,e,t){var n=new Set(r),i=n.size;return Ra(e,{Directive:function(a){if(n.delete(a.name.value)&&(!t||!n.size))return SA}}),t?!n.size:n.size<i}function jP(r){return r&&pd(["client","export"],r,!0)}function GP(r){var e=r.name.value;return e==="skip"||e==="include"}function $P(r){var e=[];return r&&r.length&&r.forEach(function(t){if(GP(t)){var n=t.arguments,i=t.name.value;Mr(n&&n.length===1,106,i);var a=n[0];Mr(a.name&&a.name.value==="if",107,i);var s=a.value;Mr(s&&(s.kind==="Variable"||s.kind==="BooleanValue"),108,i),e.push({directive:t,ifArgument:a})}}),e}function qP(r){var e,t,n=(e=r.directives)===null||e===void 0?void 0:e.find(function(a){var s=a.name;return s.value==="unmask"});if(!n)return"mask";var i=(t=n.arguments)===null||t===void 0?void 0:t.find(function(a){var s=a.name;return s.value==="mode"});return i&&"value"in i.value&&i.value.value==="migrate"?"migrate":"unmask"}const WP=()=>Object.create(null),{forEach:QP,slice:iw}=Array.prototype,{hasOwnProperty:YP}=Object.prototype;class Vs{constructor(e=!0,t=WP){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return QP.call(e,n=>t=t.getChildTrie(n)),YP.call(t,"data")?t.data:t.data=this.makeData(iw.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,i=e.length;t&&n<i;++n){const a=t.mapFor(e[n],!1);t=a&&a.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],i=this.mapFor(n,!1),a=i&&i.get(n);a&&(t=a.removeArray(iw.call(e,1)),!a.data&&!a.weak&&!(a.strong&&a.strong.size)&&i.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(e){const t=this.mapFor(e,!0);let n=t.get(e);return n||t.set(e,n=new Vs(this.weakness,this.makeData)),n}mapFor(e,t){return this.weakness&&XP(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}function XP(r){switch(typeof r){case"object":if(r===null)break;case"function":return!0}return!1}var JP=Ia(function(){return navigator.product})=="ReactNative",Dl=typeof WeakMap=="function"&&!(JP&&!global.HermesInternal),EA=typeof WeakSet=="function",B2=typeof Symbol=="function"&&typeof Symbol.for=="function",Dg=B2&&Symbol.asyncIterator;Ia(function(){return window.document.createElement});Ia(function(){return navigator.userAgent.indexOf("jsdom")>=0});function fi(r){return r!==null&&typeof r=="object"}function M2(r){return r!==null&&typeof r=="object"&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}function KP(r,e){var t=e,n=[];r.definitions.forEach(function(a){if(a.kind==="OperationDefinition")throw qi(112,a.operation,a.name?" named '".concat(a.name.value,"'"):"");a.kind==="FragmentDefinition"&&n.push(a)}),typeof t>"u"&&(Mr(n.length===1,113,n.length),t=n[0].name.value);var i=me(me({},r),{definitions:na([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}}],r.definitions,!0)});return i}function gc(r){r===void 0&&(r=[]);var e={};return r.forEach(function(t){e[t.name.value]=t}),e}function Pg(r,e){switch(r.kind){case"InlineFragment":return r;case"FragmentSpread":{var t=r.name.value;if(typeof e=="function")return e(t);var n=e&&e[t];return Mr(n,114,t),n||null}default:return null}}function ZP(){}class oy{constructor(e=1/0,t=ZP){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:n,newer:i}=t;i&&(i.older=n),n&&(n.newer=i),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=i)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return t?(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0):!1}}function ly(){}const eR=ly,tR=typeof WeakRef<"u"?WeakRef:function(r){return{deref:()=>r}},rR=typeof WeakMap<"u"?WeakMap:Map,nR=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:ly,unregister:ly}},iR=10024;class gd{constructor(e=1/0,t=eR){this.max=e,this.dispose=t,this.map=new rR,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let i=0;i<iR;i++){const a=n.next().value;if(!a)break;this.unfinalizedNodes.delete(a);const s=a.key;delete a.key,a.keyRef=new tR(s),this.registry.register(s,a,a)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new nR(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:n,newer:i}=t;i&&(i.older=n),n&&(n.newer=i),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=i)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return t?(this.deleteNode(t),!0):!1}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var r0=new WeakSet;function _2(r){r.size<=(r.max||-1)||r0.has(r)||(r0.add(r),setTimeout(function(){r.clean(),r0.delete(r)},100))}var N2=function(r,e){var t=new gd(r,e);return t.set=function(n,i){var a=gd.prototype.set.call(this,n,i);return _2(this),a},t},aR=function(r,e){var t=new oy(r,e);return t.set=function(n,i){var a=oy.prototype.set.call(this,n,i);return _2(this),a},t},sR=Symbol.for("apollo.cacheSize"),Us=me({},ig[sR]),mo=Object.assign(function(e){return JSON.stringify(e,oR)},{reset:function(){Uf=new aR(Us.canonicalStringify||1e3)}}),Uf;mo.reset();function oR(r,e){if(e&&typeof e=="object"){var t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null){var n=Object.keys(e);if(n.every(lR))return e;var i=JSON.stringify(n),a=Uf.get(i);if(!a){n.sort();var s=JSON.stringify(n);a=Uf.get(s)||n,Uf.set(i,a),Uf.set(s,a)}var o=Object.create(t);return a.forEach(function(l){o[l]=e[l]}),o}}return e}function lR(r,e,t){return e===0||t[e-1]<=r}function Hu(r){return{__ref:String(r)}}function kn(r){return!!(r&&typeof r=="object"&&typeof r.__ref=="string")}function uR(r){return fi(r)&&r.kind==="Document"&&Array.isArray(r.definitions)}function cR(r){return r.kind==="StringValue"}function fR(r){return r.kind==="BooleanValue"}function dR(r){return r.kind==="IntValue"}function hR(r){return r.kind==="FloatValue"}function pR(r){return r.kind==="Variable"}function gR(r){return r.kind==="ObjectValue"}function mR(r){return r.kind==="ListValue"}function vR(r){return r.kind==="EnumValue"}function yR(r){return r.kind==="NullValue"}function Xu(r,e,t,n){if(dR(t)||hR(t))r[e.value]=Number(t.value);else if(fR(t)||cR(t))r[e.value]=t.value;else if(gR(t)){var i={};t.fields.map(function(s){return Xu(i,s.name,s.value,n)}),r[e.value]=i}else if(pR(t)){var a=(n||{})[t.name.value];r[e.value]=a}else if(mR(t))r[e.value]=t.values.map(function(s){var o={};return Xu(o,e,s,n),o[e.value]});else if(vR(t))r[e.value]=t.value;else if(yR(t))r[e.value]=null;else throw qi(123,e.value,t.kind)}function AR(r,e){var t=null;r.directives&&(t={},r.directives.forEach(function(i){t[i.name.value]={},i.arguments&&i.arguments.forEach(function(a){var s=a.name,o=a.value;return Xu(t[i.name.value],s,o,e)})}));var n=null;return r.arguments&&r.arguments.length&&(n={},r.arguments.forEach(function(i){var a=i.name,s=i.value;return Xu(n,a,s,e)})),L2(r.name.value,n,t)}var bR=["connection","include","skip","client","rest","export","nonreactive"],uf=mo,L2=Object.assign(function(r,e,t){if(e&&t&&t.connection&&t.connection.key)if(t.connection.filter&&t.connection.filter.length>0){var n=t.connection.filter?t.connection.filter:[];n.sort();var i={};return n.forEach(function(o){i[o]=e[o]}),"".concat(t.connection.key,"(").concat(uf(i),")")}else return t.connection.key;var a=r;if(e){var s=uf(e);a+="(".concat(s,")")}return t&&Object.keys(t).forEach(function(o){bR.indexOf(o)===-1&&(t[o]&&Object.keys(t[o]).length?a+="@".concat(o,"(").concat(uf(t[o]),")"):a+="@".concat(o))}),a},{setStringify:function(r){var e=uf;return uf=r,e}});function Rg(r,e){if(r.arguments&&r.arguments.length){var t={};return r.arguments.forEach(function(n){var i=n.name,a=n.value;return Xu(t,i,a,e)}),t}return null}function bo(r){return r.alias?r.alias.value:r.name.value}function uy(r,e,t){for(var n,i=0,a=e.selections;i<a.length;i++){var s=a[i];if(wo(s)){if(s.name.value==="__typename")return r[bo(s)]}else n?n.push(s):n=[s]}if(typeof r.__typename=="string")return r.__typename;if(n)for(var o=0,l=n;o<l.length;o++){var s=l[o],u=uy(r,Pg(s,t).selectionSet,t);if(typeof u=="string")return u}}function wo(r){return r.kind==="Field"}function wR(r){return r.kind==="InlineFragment"}function mc(r){Mr(r&&r.kind==="Document",115);var e=r.definitions.filter(function(t){return t.kind!=="FragmentDefinition"}).map(function(t){if(t.kind!=="OperationDefinition")throw qi(116,t.kind);return t});return Mr(e.length<=1,117,e.length),r}function vc(r){return mc(r),r.definitions.filter(function(e){return e.kind==="OperationDefinition"})[0]}function Vp(r){return r.definitions.filter(function(e){return e.kind==="OperationDefinition"&&!!e.name}).map(function(e){return e.name.value})[0]||null}function yc(r){return r.definitions.filter(function(e){return e.kind==="FragmentDefinition"})}function CR(r){var e=vc(r);return Mr(e&&e.operation==="query",118),e}function xR(r){Mr(r.kind==="Document",119),Mr(r.definitions.length<=1,120);var e=r.definitions[0];return Mr(e.kind==="FragmentDefinition",121),e}function Vd(r){mc(r);for(var e,t=0,n=r.definitions;t<n.length;t++){var i=n[t];if(i.kind==="OperationDefinition"){var a=i.operation;if(a==="query"||a==="mutation"||a==="subscription")return i}i.kind==="FragmentDefinition"&&!e&&(e=i)}if(e)return e;throw qi(122)}function kA(r){var e=Object.create(null),t=r&&r.variableDefinitions;return t&&t.length&&t.forEach(function(n){n.defaultValue&&Xu(e,n.variable.name,n.defaultValue)}),e}let Si=null;const aw={};let SR=1;const ER=()=>class{constructor(){this.id=["slot",SR++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=Si;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===aw)break;return e!==Si&&(Si.slots[this.id]=t),!0}return Si&&(Si.slots[this.id]=aw),!1}getValue(){if(this.hasValue())return Si.slots[this.id]}withValue(e,t,n,i){const a={__proto__:null,[this.id]:e},s=Si;Si={parent:s,slots:a};try{return t.apply(i,n)}finally{Si=s}}static bind(e){const t=Si;return function(){const n=Si;try{return Si=t,e.apply(this,arguments)}finally{Si=n}}}static noContext(e,t,n){if(Si){const i=Si;try{return Si=null,e.apply(n,t)}finally{Si=i}}else return e.apply(n,t)}};function sw(r){try{return r()}catch{}}const n0="@wry/context:Slot",kR=sw(()=>globalThis)||sw(()=>global)||Object.create(null),ow=kR,Ac=ow[n0]||Array[n0]||(function(r){try{Object.defineProperty(ow,n0,{value:r,enumerable:!1,writable:!1,configurable:!0})}finally{return r}})(ER()),{bind:aY,noContext:sY}=Ac,Og=new Ac,{hasOwnProperty:FR}=Object.prototype,FA=Array.from||function(r){const e=[];return r.forEach(t=>e.push(t)),e};function TA(r){const{unsubscribe:e}=r;typeof e=="function"&&(r.unsubscribe=void 0,e())}const md=[],TR=100;function Ju(r,e){if(!r)throw new Error(e||"assertion failure")}function U2(r,e){const t=r.length;return t>0&&t===e.length&&r[t-1]===e[t-1]}function V2(r){switch(r.length){case 0:throw new Error("unknown value");case 1:return r[0];case 2:throw r[1]}}function z2(r){return r.slice(0)}class Bg{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Bg.count}peek(){if(this.value.length===1&&!Co(this))return lw(this),this.value[0]}recompute(e){return Ju(!this.recomputing,"already recomputing"),lw(this),Co(this)?IR(this,e):V2(this.value)}setDirty(){this.dirty||(this.dirty=!0,H2(this),TA(this))}dispose(){this.setDirty(),W2(this),IA(this,(e,t)=>{e.setDirty(),Q2(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=md.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(FA(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),md.push(this.deps),this.deps=null)}}Bg.count=0;function lw(r){const e=Og.getValue();if(e)return r.parents.add(e),e.childValues.has(r)||e.childValues.set(r,[]),Co(r)?G2(e,r):$2(e,r),e}function IR(r,e){return W2(r),Og.withValue(r,DR,[r,e]),RR(r,e)&&PR(r),V2(r.value)}function DR(r,e){r.recomputing=!0;const{normalizeResult:t}=r;let n;t&&r.value.length===1&&(n=z2(r.value)),r.value.length=0;try{if(r.value[0]=r.fn.apply(null,e),t&&n&&!U2(n,r.value))try{r.value[0]=t(r.value[0],n[0])}catch{}}catch(i){r.value[1]=i}r.recomputing=!1}function Co(r){return r.dirty||!!(r.dirtyChildren&&r.dirtyChildren.size)}function PR(r){r.dirty=!1,!Co(r)&&j2(r)}function H2(r){IA(r,G2)}function j2(r){IA(r,$2)}function IA(r,e){const t=r.parents.size;if(t){const n=FA(r.parents);for(let i=0;i<t;++i)e(n[i],r)}}function G2(r,e){Ju(r.childValues.has(e)),Ju(Co(e));const t=!Co(r);if(!r.dirtyChildren)r.dirtyChildren=md.pop()||new Set;else if(r.dirtyChildren.has(e))return;r.dirtyChildren.add(e),t&&H2(r)}function $2(r,e){Ju(r.childValues.has(e)),Ju(!Co(e));const t=r.childValues.get(e);t.length===0?r.childValues.set(e,z2(e.value)):U2(t,e.value)||r.setDirty(),q2(r,e),!Co(r)&&j2(r)}function q2(r,e){const t=r.dirtyChildren;t&&(t.delete(e),t.size===0&&(md.length<TR&&md.push(t),r.dirtyChildren=null))}function W2(r){r.childValues.size>0&&r.childValues.forEach((e,t)=>{Q2(r,t)}),r.forgetDeps(),Ju(r.dirtyChildren===null)}function Q2(r,e){e.parents.delete(r),r.childValues.delete(e),q2(r,e)}function RR(r,e){if(typeof r.subscribe=="function")try{TA(r),r.unsubscribe=r.subscribe.apply(null,e)}catch{return r.setDirty(),!1}return!0}const OR={setDirty:!0,dispose:!0,forget:!0};function Y2(r){const e=new Map;function t(n){const i=Og.getValue();if(i){let a=e.get(n);a||e.set(n,a=new Set),i.dependOn(a)}}return t.dirty=function(i,a){const s=e.get(i);if(s){const o=a&&FR.call(OR,a)?a:"setDirty";FA(s).forEach(l=>l[o]()),e.delete(i),TA(s)}},t}let uw;function BR(...r){return(uw||(uw=new Vs(typeof WeakMap=="function"))).lookupArray(r)}const i0=new Set;function Ku(r,{max:e=Math.pow(2,16),keyArgs:t,makeCacheKey:n=BR,normalizeResult:i,subscribe:a,cache:s=oy}=Object.create(null)){const o=typeof s=="function"?new s(e,f=>f.dispose()):s,l=function(){const f=n.apply(null,t?t.apply(null,arguments):arguments);if(f===void 0)return r.apply(null,arguments);let d=o.get(f);d||(o.set(f,d=new Bg(r)),d.normalizeResult=i,d.subscribe=a,d.forget=()=>o.delete(f));const g=d.recompute(Array.prototype.slice.call(arguments));return o.set(f,d),i0.add(o),Og.hasValue()||(i0.forEach(v=>v.clean()),i0.clear()),g};Object.defineProperty(l,"size",{get:()=>o.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:e,keyArgs:t,makeCacheKey:n,normalizeResult:i,subscribe:a,cache:o});function u(f){const d=f&&o.get(f);d&&d.setDirty()}l.dirtyKey=u,l.dirty=function(){u(n.apply(null,arguments))};function c(f){const d=f&&o.get(f);if(d)return d.peek()}l.peekKey=c,l.peek=function(){return c(n.apply(null,arguments))};function h(f){return f?o.delete(f):!1}return l.forgetKey=h,l.forget=function(){return h(n.apply(null,arguments))},l.makeCacheKey=n,l.getKey=t?function(){return n.apply(null,t.apply(null,arguments))}:n,Object.freeze(l)}function MR(r){return r}var X2=(function(){function r(e,t){t===void 0&&(t=Object.create(null)),this.resultCache=EA?new WeakSet:new Set,this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=t.cache!==!1,this.resetCache()}return r.prototype.getCacheKey=function(e){return[e]},r.identity=function(){return new r(MR,{cache:!1})},r.split=function(e,t,n){return n===void 0&&(n=r.identity()),Object.assign(new r(function(i){var a=e(i)?t:n;return a.transformDocument(i)},{cache:!1}),{left:t,right:n})},r.prototype.resetCache=function(){var e=this;if(this.cached){var t=new Vs(Dl);this.performWork=Ku(r.prototype.performWork.bind(this),{makeCacheKey:function(n){var i=e.getCacheKey(n);if(i)return Mr(Array.isArray(i),104),t.lookupArray(i)},max:Us["documentTransform.cache"],cache:gd})}},r.prototype.performWork=function(e){return mc(e),this.transform(e)},r.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var t=this.performWork(e);return this.resultCache.add(t),t},r.prototype.concat=function(e){var t=this;return Object.assign(new r(function(n){return e.transformDocument(t.transformDocument(n))},{cache:!1}),{left:this,right:e})},r})(),a0,bl=Object.assign(function(r){var e=a0.get(r);return e||(e=VP(r),a0.set(r,e)),e},{reset:function(){a0=new N2(Us.print||2e3)}});bl.reset();var ii=Array.isArray;function as(r){return Array.isArray(r)&&r.length>0}var cw={kind:et.FIELD,name:{kind:et.NAME,value:"__typename"}};function J2(r,e){return!r||r.selectionSet.selections.every(function(t){return t.kind===et.FRAGMENT_SPREAD&&J2(e[t.name.value],e)})}function _R(r){return J2(vc(r)||xR(r),gc(yc(r)))?null:r}function NR(r){var e=new Map,t=new Map;return r.forEach(function(n){n&&(n.name?e.set(n.name,n):n.test&&t.set(n.test,n))}),function(n){var i=e.get(n.name.value);return!i&&t.size&&t.forEach(function(a,s){s(n)&&(i=a)}),i}}function fw(r){var e=new Map;return function(n){n===void 0&&(n=r);var i=e.get(n);return i||e.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function K2(r,e){mc(e);for(var t=fw(""),n=fw(""),i=function(A){for(var C=0,k=void 0;C<A.length&&(k=A[C]);++C)if(!ii(k)){if(k.kind===et.OPERATION_DEFINITION)return t(k.name&&k.name.value);if(k.kind===et.FRAGMENT_DEFINITION)return n(k.name.value)}return null},a=0,s=e.definitions.length-1;s>=0;--s)e.definitions[s].kind===et.OPERATION_DEFINITION&&++a;var o=NR(r),l=function(A){return as(A)&&A.map(o).some(function(C){return C&&C.remove})},u=new Map,c=!1,h={enter:function(A){if(l(A.directives))return c=!0,null}},f=Ra(e,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(A,C,k,T,S){var R=i(S);R&&R.variables.add(A.name.value)}},FragmentSpread:{enter:function(A,C,k,T,S){if(l(A.directives))return c=!0,null;var R=i(S);R&&R.fragmentSpreads.add(A.name.value)}},FragmentDefinition:{enter:function(A,C,k,T){u.set(JSON.stringify(T),A)},leave:function(A,C,k,T){var S=u.get(JSON.stringify(T));if(A===S)return A;if(a>0&&A.selectionSet.selections.every(function(R){return R.kind===et.FIELD&&R.name.value==="__typename"}))return n(A.name.value).removed=!0,c=!0,null}},Directive:{leave:function(A){if(o(A))return c=!0,null}}});if(!c)return e;var d=function(A){return A.transitiveVars||(A.transitiveVars=new Set(A.variables),A.removed||A.fragmentSpreads.forEach(function(C){d(n(C)).transitiveVars.forEach(function(k){A.transitiveVars.add(k)})})),A},g=new Set;f.definitions.forEach(function(A){A.kind===et.OPERATION_DEFINITION?d(t(A.name&&A.name.value)).fragmentSpreads.forEach(function(C){g.add(C)}):A.kind===et.FRAGMENT_DEFINITION&&a===0&&!n(A.name.value).removed&&g.add(A.name.value)}),g.forEach(function(A){d(n(A)).fragmentSpreads.forEach(function(C){g.add(C)})});var v=function(A){return!!(!g.has(A)||n(A).removed)},y={enter:function(A){if(v(A.name.value))return null}};return _R(Ra(f,{FragmentSpread:y,FragmentDefinition:y,OperationDefinition:{leave:function(A){if(A.variableDefinitions){var C=d(t(A.name&&A.name.value)).transitiveVars;if(C.size<A.variableDefinitions.length)return me(me({},A),{variableDefinitions:A.variableDefinitions.filter(function(k){return C.has(k.variable.name.value)})})}}}}))}var Z2=Object.assign(function(r){return Ra(r,{SelectionSet:{enter:function(e,t,n){if(!(n&&n.kind===et.OPERATION_DEFINITION)){var i=e.selections;if(i){var a=i.some(function(o){return wo(o)&&(o.name.value==="__typename"||o.name.value.lastIndexOf("__",0)===0)});if(!a){var s=n;if(!(wo(s)&&s.directives&&s.directives.some(function(o){return o.name.value==="export"})))return me(me({},e),{selections:na(na([],i,!0),[cw],!1)})}}}}}})},{added:function(r){return r===cw}});function LR(r){var e=Vd(r),t=e.operation;if(t==="query")return r;var n=Ra(r,{OperationDefinition:{enter:function(i){return me(me({},i),{operation:"query"})}}});return n}function ek(r){mc(r);var e=K2([{test:function(t){return t.name.value==="client"},remove:!0}],r);return e}function UR(r){return mc(r),Ra(r,{FragmentSpread:function(e){var t;if(!(!((t=e.directives)===null||t===void 0)&&t.some(function(n){return n.name.value==="unmask"})))return me(me({},e),{directives:na(na([],e.directives||[],!0),[{kind:et.DIRECTIVE,name:{kind:et.NAME,value:"nonreactive"}}],!1)})}})}var VR=Object.prototype.hasOwnProperty;function dw(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Mg(r)}function Mg(r){var e=r[0]||{},t=r.length;if(t>1)for(var n=new xo,i=1;i<t;++i)e=n.merge(e,r[i]);return e}var zR=function(r,e,t){return this.merge(r[t],e[t])},xo=(function(){function r(e){e===void 0&&(e=zR),this.reconciler=e,this.isObject=fi,this.pastCopies=new Set}return r.prototype.merge=function(e,t){for(var n=this,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];return fi(t)&&fi(e)?(Object.keys(t).forEach(function(s){if(VR.call(e,s)){var o=e[s];if(t[s]!==o){var l=n.reconciler.apply(n,na([e,t,s],i,!1));l!==o&&(e=n.shallowCopyForMerge(e),e[s]=l)}}else e=n.shallowCopyForMerge(e),e[s]=t[s]}),e):t},r.prototype.shallowCopyForMerge=function(e){return fi(e)&&(this.pastCopies.has(e)||(Array.isArray(e)?e=e.slice(0):e=me({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},r})();function HR(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=jR(r))||e){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
55
+ `)))!==null&&e!==void 0?e:!1}function nw(r){return r.kind===et.FIELD||r.kind===et.FRAGMENT_SPREAD||r.kind===et.INLINE_FRAGMENT}function Ud(r,e){var t=r.directives;return!t||!t.length?!0:$P(t).every(function(n){var i=n.directive,a=n.ifArgument,s=!1;return a.value.kind==="Variable"?(s=e&&e[a.value.name.value],Mr(s!==void 0,105,i.name.value)):s=a.value.value,i.name.value==="skip"?!s:s})}function pd(r,e,t){var n=new Set(r),i=n.size;return Ra(e,{Directive:function(a){if(n.delete(a.name.value)&&(!t||!n.size))return SA}}),t?!n.size:n.size<i}function jP(r){return r&&pd(["client","export"],r,!0)}function GP(r){var e=r.name.value;return e==="skip"||e==="include"}function $P(r){var e=[];return r&&r.length&&r.forEach(function(t){if(GP(t)){var n=t.arguments,i=t.name.value;Mr(n&&n.length===1,106,i);var a=n[0];Mr(a.name&&a.name.value==="if",107,i);var s=a.value;Mr(s&&(s.kind==="Variable"||s.kind==="BooleanValue"),108,i),e.push({directive:t,ifArgument:a})}}),e}function qP(r){var e,t,n=(e=r.directives)===null||e===void 0?void 0:e.find(function(a){var s=a.name;return s.value==="unmask"});if(!n)return"mask";var i=(t=n.arguments)===null||t===void 0?void 0:t.find(function(a){var s=a.name;return s.value==="mode"});return i&&"value"in i.value&&i.value.value==="migrate"?"migrate":"unmask"}const WP=()=>Object.create(null),{forEach:QP,slice:iw}=Array.prototype,{hasOwnProperty:YP}=Object.prototype;class Vs{constructor(e=!0,t=WP){this.weakness=e,this.makeData=t}lookup(){return this.lookupArray(arguments)}lookupArray(e){let t=this;return QP.call(e,n=>t=t.getChildTrie(n)),YP.call(t,"data")?t.data:t.data=this.makeData(iw.call(e))}peek(){return this.peekArray(arguments)}peekArray(e){let t=this;for(let n=0,i=e.length;t&&n<i;++n){const a=t.mapFor(e[n],!1);t=a&&a.get(e[n])}return t&&t.data}remove(){return this.removeArray(arguments)}removeArray(e){let t;if(e.length){const n=e[0],i=this.mapFor(n,!1),a=i&&i.get(n);a&&(t=a.removeArray(iw.call(e,1)),!a.data&&!a.weak&&!(a.strong&&a.strong.size)&&i.delete(n))}else t=this.data,delete this.data;return t}getChildTrie(e){const t=this.mapFor(e,!0);let n=t.get(e);return n||t.set(e,n=new Vs(this.weakness,this.makeData)),n}mapFor(e,t){return this.weakness&&XP(e)?this.weak||(t?this.weak=new WeakMap:void 0):this.strong||(t?this.strong=new Map:void 0)}}function XP(r){switch(typeof r){case"object":if(r===null)break;case"function":return!0}return!1}var JP=Ia(function(){return navigator.product})=="ReactNative",Dl=typeof WeakMap=="function"&&!(JP&&!global.HermesInternal),EA=typeof WeakSet=="function",B2=typeof Symbol=="function"&&typeof Symbol.for=="function",Dg=B2&&Symbol.asyncIterator;Ia(function(){return window.document.createElement});Ia(function(){return navigator.userAgent.indexOf("jsdom")>=0});function fi(r){return r!==null&&typeof r=="object"}function M2(r){return r!==null&&typeof r=="object"&&(Object.getPrototypeOf(r)===Object.prototype||Object.getPrototypeOf(r)===null)}function KP(r,e){var t=e,n=[];r.definitions.forEach(function(a){if(a.kind==="OperationDefinition")throw qi(112,a.operation,a.name?" named '".concat(a.name.value,"'"):"");a.kind==="FragmentDefinition"&&n.push(a)}),typeof t>"u"&&(Mr(n.length===1,113,n.length),t=n[0].name.value);var i=me(me({},r),{definitions:na([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}}],r.definitions,!0)});return i}function gc(r){r===void 0&&(r=[]);var e={};return r.forEach(function(t){e[t.name.value]=t}),e}function Pg(r,e){switch(r.kind){case"InlineFragment":return r;case"FragmentSpread":{var t=r.name.value;if(typeof e=="function")return e(t);var n=e&&e[t];return Mr(n,114,t),n||null}default:return null}}function ZP(){}class oy{constructor(e=1/0,t=ZP){this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}get size(){return this.map.size}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:n,newer:i}=t;i&&(i.older=n),n&&(n.newer=i),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=i)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const t=this.map.get(e);return t?(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0):!1}}function ly(){}const eR=ly,tR=typeof WeakRef<"u"?WeakRef:function(r){return{deref:()=>r}},rR=typeof WeakMap<"u"?WeakMap:Map,nR=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:ly,unregister:ly}},iR=10024;class gd{constructor(e=1/0,t=eR){this.max=e,this.dispose=t,this.map=new rR,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let i=0;i<iR;i++){const a=n.next().value;if(!a)break;this.unfinalizedNodes.delete(a);const s=a.key;delete a.key,a.keyRef=new tR(s),this.registry.register(s,a,a)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new nR(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const t=this.getNode(e);return t&&t.value}getNode(e){const t=this.map.get(e);if(t&&t!==this.newest){const{older:n,newer:i}=t;i&&(i.older=n),n&&(n.newer=i),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=i)}return t}set(e,t){let n=this.getNode(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const t=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,t),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),t&&this.map.delete(t)}delete(e){const t=this.map.get(e);return t?(this.deleteNode(t),!0):!1}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var r0=new WeakSet;function _2(r){r.size<=(r.max||-1)||r0.has(r)||(r0.add(r),setTimeout(function(){r.clean(),r0.delete(r)},100))}var N2=function(r,e){var t=new gd(r,e);return t.set=function(n,i){var a=gd.prototype.set.call(this,n,i);return _2(this),a},t},aR=function(r,e){var t=new oy(r,e);return t.set=function(n,i){var a=oy.prototype.set.call(this,n,i);return _2(this),a},t},sR=Symbol.for("apollo.cacheSize"),Us=me({},ig[sR]),mo=Object.assign(function(e){return JSON.stringify(e,oR)},{reset:function(){Uf=new aR(Us.canonicalStringify||1e3)}}),Uf;mo.reset();function oR(r,e){if(e&&typeof e=="object"){var t=Object.getPrototypeOf(e);if(t===Object.prototype||t===null){var n=Object.keys(e);if(n.every(lR))return e;var i=JSON.stringify(n),a=Uf.get(i);if(!a){n.sort();var s=JSON.stringify(n);a=Uf.get(s)||n,Uf.set(i,a),Uf.set(s,a)}var o=Object.create(t);return a.forEach(function(l){o[l]=e[l]}),o}}return e}function lR(r,e,t){return e===0||t[e-1]<=r}function Hu(r){return{__ref:String(r)}}function kn(r){return!!(r&&typeof r=="object"&&typeof r.__ref=="string")}function uR(r){return fi(r)&&r.kind==="Document"&&Array.isArray(r.definitions)}function cR(r){return r.kind==="StringValue"}function fR(r){return r.kind==="BooleanValue"}function dR(r){return r.kind==="IntValue"}function hR(r){return r.kind==="FloatValue"}function pR(r){return r.kind==="Variable"}function gR(r){return r.kind==="ObjectValue"}function mR(r){return r.kind==="ListValue"}function vR(r){return r.kind==="EnumValue"}function yR(r){return r.kind==="NullValue"}function Xu(r,e,t,n){if(dR(t)||hR(t))r[e.value]=Number(t.value);else if(fR(t)||cR(t))r[e.value]=t.value;else if(gR(t)){var i={};t.fields.map(function(s){return Xu(i,s.name,s.value,n)}),r[e.value]=i}else if(pR(t)){var a=(n||{})[t.name.value];r[e.value]=a}else if(mR(t))r[e.value]=t.values.map(function(s){var o={};return Xu(o,e,s,n),o[e.value]});else if(vR(t))r[e.value]=t.value;else if(yR(t))r[e.value]=null;else throw qi(123,e.value,t.kind)}function AR(r,e){var t=null;r.directives&&(t={},r.directives.forEach(function(i){t[i.name.value]={},i.arguments&&i.arguments.forEach(function(a){var s=a.name,o=a.value;return Xu(t[i.name.value],s,o,e)})}));var n=null;return r.arguments&&r.arguments.length&&(n={},r.arguments.forEach(function(i){var a=i.name,s=i.value;return Xu(n,a,s,e)})),L2(r.name.value,n,t)}var bR=["connection","include","skip","client","rest","export","nonreactive"],uf=mo,L2=Object.assign(function(r,e,t){if(e&&t&&t.connection&&t.connection.key)if(t.connection.filter&&t.connection.filter.length>0){var n=t.connection.filter?t.connection.filter:[];n.sort();var i={};return n.forEach(function(o){i[o]=e[o]}),"".concat(t.connection.key,"(").concat(uf(i),")")}else return t.connection.key;var a=r;if(e){var s=uf(e);a+="(".concat(s,")")}return t&&Object.keys(t).forEach(function(o){bR.indexOf(o)===-1&&(t[o]&&Object.keys(t[o]).length?a+="@".concat(o,"(").concat(uf(t[o]),")"):a+="@".concat(o))}),a},{setStringify:function(r){var e=uf;return uf=r,e}});function Rg(r,e){if(r.arguments&&r.arguments.length){var t={};return r.arguments.forEach(function(n){var i=n.name,a=n.value;return Xu(t,i,a,e)}),t}return null}function bo(r){return r.alias?r.alias.value:r.name.value}function uy(r,e,t){for(var n,i=0,a=e.selections;i<a.length;i++){var s=a[i];if(wo(s)){if(s.name.value==="__typename")return r[bo(s)]}else n?n.push(s):n=[s]}if(typeof r.__typename=="string")return r.__typename;if(n)for(var o=0,l=n;o<l.length;o++){var s=l[o],u=uy(r,Pg(s,t).selectionSet,t);if(typeof u=="string")return u}}function wo(r){return r.kind==="Field"}function wR(r){return r.kind==="InlineFragment"}function mc(r){Mr(r&&r.kind==="Document",115);var e=r.definitions.filter(function(t){return t.kind!=="FragmentDefinition"}).map(function(t){if(t.kind!=="OperationDefinition")throw qi(116,t.kind);return t});return Mr(e.length<=1,117,e.length),r}function vc(r){return mc(r),r.definitions.filter(function(e){return e.kind==="OperationDefinition"})[0]}function Vp(r){return r.definitions.filter(function(e){return e.kind==="OperationDefinition"&&!!e.name}).map(function(e){return e.name.value})[0]||null}function yc(r){return r.definitions.filter(function(e){return e.kind==="FragmentDefinition"})}function CR(r){var e=vc(r);return Mr(e&&e.operation==="query",118),e}function xR(r){Mr(r.kind==="Document",119),Mr(r.definitions.length<=1,120);var e=r.definitions[0];return Mr(e.kind==="FragmentDefinition",121),e}function Vd(r){mc(r);for(var e,t=0,n=r.definitions;t<n.length;t++){var i=n[t];if(i.kind==="OperationDefinition"){var a=i.operation;if(a==="query"||a==="mutation"||a==="subscription")return i}i.kind==="FragmentDefinition"&&!e&&(e=i)}if(e)return e;throw qi(122)}function kA(r){var e=Object.create(null),t=r&&r.variableDefinitions;return t&&t.length&&t.forEach(function(n){n.defaultValue&&Xu(e,n.variable.name,n.defaultValue)}),e}let Si=null;const aw={};let SR=1;const ER=()=>class{constructor(){this.id=["slot",SR++,Date.now(),Math.random().toString(36).slice(2)].join(":")}hasValue(){for(let e=Si;e;e=e.parent)if(this.id in e.slots){const t=e.slots[this.id];if(t===aw)break;return e!==Si&&(Si.slots[this.id]=t),!0}return Si&&(Si.slots[this.id]=aw),!1}getValue(){if(this.hasValue())return Si.slots[this.id]}withValue(e,t,n,i){const a={__proto__:null,[this.id]:e},s=Si;Si={parent:s,slots:a};try{return t.apply(i,n)}finally{Si=s}}static bind(e){const t=Si;return function(){const n=Si;try{return Si=t,e.apply(this,arguments)}finally{Si=n}}}static noContext(e,t,n){if(Si){const i=Si;try{return Si=null,e.apply(n,t)}finally{Si=i}}else return e.apply(n,t)}};function sw(r){try{return r()}catch{}}const n0="@wry/context:Slot",kR=sw(()=>globalThis)||sw(()=>global)||Object.create(null),ow=kR,Ac=ow[n0]||Array[n0]||(function(r){try{Object.defineProperty(ow,n0,{value:r,enumerable:!1,writable:!1,configurable:!0})}finally{return r}})(ER()),{bind:sY,noContext:oY}=Ac,Og=new Ac,{hasOwnProperty:FR}=Object.prototype,FA=Array.from||function(r){const e=[];return r.forEach(t=>e.push(t)),e};function TA(r){const{unsubscribe:e}=r;typeof e=="function"&&(r.unsubscribe=void 0,e())}const md=[],TR=100;function Ju(r,e){if(!r)throw new Error(e||"assertion failure")}function U2(r,e){const t=r.length;return t>0&&t===e.length&&r[t-1]===e[t-1]}function V2(r){switch(r.length){case 0:throw new Error("unknown value");case 1:return r[0];case 2:throw r[1]}}function z2(r){return r.slice(0)}class Bg{constructor(e){this.fn=e,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++Bg.count}peek(){if(this.value.length===1&&!Co(this))return lw(this),this.value[0]}recompute(e){return Ju(!this.recomputing,"already recomputing"),lw(this),Co(this)?IR(this,e):V2(this.value)}setDirty(){this.dirty||(this.dirty=!0,H2(this),TA(this))}dispose(){this.setDirty(),W2(this),IA(this,(e,t)=>{e.setDirty(),Q2(e,this)})}forget(){this.dispose()}dependOn(e){e.add(this),this.deps||(this.deps=md.pop()||new Set),this.deps.add(e)}forgetDeps(){this.deps&&(FA(this.deps).forEach(e=>e.delete(this)),this.deps.clear(),md.push(this.deps),this.deps=null)}}Bg.count=0;function lw(r){const e=Og.getValue();if(e)return r.parents.add(e),e.childValues.has(r)||e.childValues.set(r,[]),Co(r)?G2(e,r):$2(e,r),e}function IR(r,e){return W2(r),Og.withValue(r,DR,[r,e]),RR(r,e)&&PR(r),V2(r.value)}function DR(r,e){r.recomputing=!0;const{normalizeResult:t}=r;let n;t&&r.value.length===1&&(n=z2(r.value)),r.value.length=0;try{if(r.value[0]=r.fn.apply(null,e),t&&n&&!U2(n,r.value))try{r.value[0]=t(r.value[0],n[0])}catch{}}catch(i){r.value[1]=i}r.recomputing=!1}function Co(r){return r.dirty||!!(r.dirtyChildren&&r.dirtyChildren.size)}function PR(r){r.dirty=!1,!Co(r)&&j2(r)}function H2(r){IA(r,G2)}function j2(r){IA(r,$2)}function IA(r,e){const t=r.parents.size;if(t){const n=FA(r.parents);for(let i=0;i<t;++i)e(n[i],r)}}function G2(r,e){Ju(r.childValues.has(e)),Ju(Co(e));const t=!Co(r);if(!r.dirtyChildren)r.dirtyChildren=md.pop()||new Set;else if(r.dirtyChildren.has(e))return;r.dirtyChildren.add(e),t&&H2(r)}function $2(r,e){Ju(r.childValues.has(e)),Ju(!Co(e));const t=r.childValues.get(e);t.length===0?r.childValues.set(e,z2(e.value)):U2(t,e.value)||r.setDirty(),q2(r,e),!Co(r)&&j2(r)}function q2(r,e){const t=r.dirtyChildren;t&&(t.delete(e),t.size===0&&(md.length<TR&&md.push(t),r.dirtyChildren=null))}function W2(r){r.childValues.size>0&&r.childValues.forEach((e,t)=>{Q2(r,t)}),r.forgetDeps(),Ju(r.dirtyChildren===null)}function Q2(r,e){e.parents.delete(r),r.childValues.delete(e),q2(r,e)}function RR(r,e){if(typeof r.subscribe=="function")try{TA(r),r.unsubscribe=r.subscribe.apply(null,e)}catch{return r.setDirty(),!1}return!0}const OR={setDirty:!0,dispose:!0,forget:!0};function Y2(r){const e=new Map;function t(n){const i=Og.getValue();if(i){let a=e.get(n);a||e.set(n,a=new Set),i.dependOn(a)}}return t.dirty=function(i,a){const s=e.get(i);if(s){const o=a&&FR.call(OR,a)?a:"setDirty";FA(s).forEach(l=>l[o]()),e.delete(i),TA(s)}},t}let uw;function BR(...r){return(uw||(uw=new Vs(typeof WeakMap=="function"))).lookupArray(r)}const i0=new Set;function Ku(r,{max:e=Math.pow(2,16),keyArgs:t,makeCacheKey:n=BR,normalizeResult:i,subscribe:a,cache:s=oy}=Object.create(null)){const o=typeof s=="function"?new s(e,f=>f.dispose()):s,l=function(){const f=n.apply(null,t?t.apply(null,arguments):arguments);if(f===void 0)return r.apply(null,arguments);let d=o.get(f);d||(o.set(f,d=new Bg(r)),d.normalizeResult=i,d.subscribe=a,d.forget=()=>o.delete(f));const g=d.recompute(Array.prototype.slice.call(arguments));return o.set(f,d),i0.add(o),Og.hasValue()||(i0.forEach(v=>v.clean()),i0.clear()),g};Object.defineProperty(l,"size",{get:()=>o.size,configurable:!1,enumerable:!1}),Object.freeze(l.options={max:e,keyArgs:t,makeCacheKey:n,normalizeResult:i,subscribe:a,cache:o});function u(f){const d=f&&o.get(f);d&&d.setDirty()}l.dirtyKey=u,l.dirty=function(){u(n.apply(null,arguments))};function c(f){const d=f&&o.get(f);if(d)return d.peek()}l.peekKey=c,l.peek=function(){return c(n.apply(null,arguments))};function h(f){return f?o.delete(f):!1}return l.forgetKey=h,l.forget=function(){return h(n.apply(null,arguments))},l.makeCacheKey=n,l.getKey=t?function(){return n.apply(null,t.apply(null,arguments))}:n,Object.freeze(l)}function MR(r){return r}var X2=(function(){function r(e,t){t===void 0&&(t=Object.create(null)),this.resultCache=EA?new WeakSet:new Set,this.transform=e,t.getCacheKey&&(this.getCacheKey=t.getCacheKey),this.cached=t.cache!==!1,this.resetCache()}return r.prototype.getCacheKey=function(e){return[e]},r.identity=function(){return new r(MR,{cache:!1})},r.split=function(e,t,n){return n===void 0&&(n=r.identity()),Object.assign(new r(function(i){var a=e(i)?t:n;return a.transformDocument(i)},{cache:!1}),{left:t,right:n})},r.prototype.resetCache=function(){var e=this;if(this.cached){var t=new Vs(Dl);this.performWork=Ku(r.prototype.performWork.bind(this),{makeCacheKey:function(n){var i=e.getCacheKey(n);if(i)return Mr(Array.isArray(i),104),t.lookupArray(i)},max:Us["documentTransform.cache"],cache:gd})}},r.prototype.performWork=function(e){return mc(e),this.transform(e)},r.prototype.transformDocument=function(e){if(this.resultCache.has(e))return e;var t=this.performWork(e);return this.resultCache.add(t),t},r.prototype.concat=function(e){var t=this;return Object.assign(new r(function(n){return e.transformDocument(t.transformDocument(n))},{cache:!1}),{left:this,right:e})},r})(),a0,bl=Object.assign(function(r){var e=a0.get(r);return e||(e=VP(r),a0.set(r,e)),e},{reset:function(){a0=new N2(Us.print||2e3)}});bl.reset();var ii=Array.isArray;function as(r){return Array.isArray(r)&&r.length>0}var cw={kind:et.FIELD,name:{kind:et.NAME,value:"__typename"}};function J2(r,e){return!r||r.selectionSet.selections.every(function(t){return t.kind===et.FRAGMENT_SPREAD&&J2(e[t.name.value],e)})}function _R(r){return J2(vc(r)||xR(r),gc(yc(r)))?null:r}function NR(r){var e=new Map,t=new Map;return r.forEach(function(n){n&&(n.name?e.set(n.name,n):n.test&&t.set(n.test,n))}),function(n){var i=e.get(n.name.value);return!i&&t.size&&t.forEach(function(a,s){s(n)&&(i=a)}),i}}function fw(r){var e=new Map;return function(n){n===void 0&&(n=r);var i=e.get(n);return i||e.set(n,i={variables:new Set,fragmentSpreads:new Set}),i}}function K2(r,e){mc(e);for(var t=fw(""),n=fw(""),i=function(A){for(var C=0,k=void 0;C<A.length&&(k=A[C]);++C)if(!ii(k)){if(k.kind===et.OPERATION_DEFINITION)return t(k.name&&k.name.value);if(k.kind===et.FRAGMENT_DEFINITION)return n(k.name.value)}return null},a=0,s=e.definitions.length-1;s>=0;--s)e.definitions[s].kind===et.OPERATION_DEFINITION&&++a;var o=NR(r),l=function(A){return as(A)&&A.map(o).some(function(C){return C&&C.remove})},u=new Map,c=!1,h={enter:function(A){if(l(A.directives))return c=!0,null}},f=Ra(e,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(A,C,k,T,S){var R=i(S);R&&R.variables.add(A.name.value)}},FragmentSpread:{enter:function(A,C,k,T,S){if(l(A.directives))return c=!0,null;var R=i(S);R&&R.fragmentSpreads.add(A.name.value)}},FragmentDefinition:{enter:function(A,C,k,T){u.set(JSON.stringify(T),A)},leave:function(A,C,k,T){var S=u.get(JSON.stringify(T));if(A===S)return A;if(a>0&&A.selectionSet.selections.every(function(R){return R.kind===et.FIELD&&R.name.value==="__typename"}))return n(A.name.value).removed=!0,c=!0,null}},Directive:{leave:function(A){if(o(A))return c=!0,null}}});if(!c)return e;var d=function(A){return A.transitiveVars||(A.transitiveVars=new Set(A.variables),A.removed||A.fragmentSpreads.forEach(function(C){d(n(C)).transitiveVars.forEach(function(k){A.transitiveVars.add(k)})})),A},g=new Set;f.definitions.forEach(function(A){A.kind===et.OPERATION_DEFINITION?d(t(A.name&&A.name.value)).fragmentSpreads.forEach(function(C){g.add(C)}):A.kind===et.FRAGMENT_DEFINITION&&a===0&&!n(A.name.value).removed&&g.add(A.name.value)}),g.forEach(function(A){d(n(A)).fragmentSpreads.forEach(function(C){g.add(C)})});var v=function(A){return!!(!g.has(A)||n(A).removed)},y={enter:function(A){if(v(A.name.value))return null}};return _R(Ra(f,{FragmentSpread:y,FragmentDefinition:y,OperationDefinition:{leave:function(A){if(A.variableDefinitions){var C=d(t(A.name&&A.name.value)).transitiveVars;if(C.size<A.variableDefinitions.length)return me(me({},A),{variableDefinitions:A.variableDefinitions.filter(function(k){return C.has(k.variable.name.value)})})}}}}))}var Z2=Object.assign(function(r){return Ra(r,{SelectionSet:{enter:function(e,t,n){if(!(n&&n.kind===et.OPERATION_DEFINITION)){var i=e.selections;if(i){var a=i.some(function(o){return wo(o)&&(o.name.value==="__typename"||o.name.value.lastIndexOf("__",0)===0)});if(!a){var s=n;if(!(wo(s)&&s.directives&&s.directives.some(function(o){return o.name.value==="export"})))return me(me({},e),{selections:na(na([],i,!0),[cw],!1)})}}}}}})},{added:function(r){return r===cw}});function LR(r){var e=Vd(r),t=e.operation;if(t==="query")return r;var n=Ra(r,{OperationDefinition:{enter:function(i){return me(me({},i),{operation:"query"})}}});return n}function ek(r){mc(r);var e=K2([{test:function(t){return t.name.value==="client"},remove:!0}],r);return e}function UR(r){return mc(r),Ra(r,{FragmentSpread:function(e){var t;if(!(!((t=e.directives)===null||t===void 0)&&t.some(function(n){return n.name.value==="unmask"})))return me(me({},e),{directives:na(na([],e.directives||[],!0),[{kind:et.DIRECTIVE,name:{kind:et.NAME,value:"nonreactive"}}],!1)})}})}var VR=Object.prototype.hasOwnProperty;function dw(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Mg(r)}function Mg(r){var e=r[0]||{},t=r.length;if(t>1)for(var n=new xo,i=1;i<t;++i)e=n.merge(e,r[i]);return e}var zR=function(r,e,t){return this.merge(r[t],e[t])},xo=(function(){function r(e){e===void 0&&(e=zR),this.reconciler=e,this.isObject=fi,this.pastCopies=new Set}return r.prototype.merge=function(e,t){for(var n=this,i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];return fi(t)&&fi(e)?(Object.keys(t).forEach(function(s){if(VR.call(e,s)){var o=e[s];if(t[s]!==o){var l=n.reconciler.apply(n,na([e,t,s],i,!1));l!==o&&(e=n.shallowCopyForMerge(e),e[s]=l)}}else e=n.shallowCopyForMerge(e),e[s]=t[s]}),e):t},r.prototype.shallowCopyForMerge=function(e){return fi(e)&&(this.pastCopies.has(e)||(Array.isArray(e)?e=e.slice(0):e=me({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},r})();function HR(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=jR(r))||e){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
56
56
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jR(r,e){if(r){if(typeof r=="string")return hw(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return hw(r,e)}}function hw(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function pw(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function DA(r,e,t){return e&&pw(r.prototype,e),t&&pw(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}var PA=function(){return typeof Symbol=="function"},RA=function(r){return PA()&&!!Symbol[r]},OA=function(r){return RA(r)?Symbol[r]:"@@"+r};PA()&&!RA("observable")&&(Symbol.observable=Symbol("observable"));var GR=OA("iterator"),cy=OA("observable"),tk=OA("species");function ag(r,e){var t=r[e];if(t!=null){if(typeof t!="function")throw new TypeError(t+" is not a function");return t}}function cf(r){var e=r.constructor;return e!==void 0&&(e=e[tk],e===null&&(e=void 0)),e!==void 0?e:un}function $R(r){return r instanceof un}function Zu(r){Zu.log?Zu.log(r):setTimeout(function(){throw r})}function zp(r){Promise.resolve().then(function(){try{r()}catch(e){Zu(e)}})}function rk(r){var e=r._cleanup;if(e!==void 0&&(r._cleanup=void 0,!!e))try{if(typeof e=="function")e();else{var t=ag(e,"unsubscribe");t&&t.call(e)}}catch(n){Zu(n)}}function fy(r){r._observer=void 0,r._queue=void 0,r._state="closed"}function qR(r){var e=r._queue;if(e){r._queue=void 0,r._state="ready";for(var t=0;t<e.length&&(nk(r,e[t].type,e[t].value),r._state!=="closed");++t);}}function nk(r,e,t){r._state="running";var n=r._observer;try{var i=ag(n,e);switch(e){case"next":i&&i.call(n,t);break;case"error":if(fy(r),i)i.call(n,t);else throw t;break;case"complete":fy(r),i&&i.call(n);break}}catch(a){Zu(a)}r._state==="closed"?rk(r):r._state==="running"&&(r._state="ready")}function s0(r,e,t){if(r._state!=="closed"){if(r._state==="buffering"){r._queue.push({type:e,value:t});return}if(r._state!=="ready"){r._state="buffering",r._queue=[{type:e,value:t}],zp(function(){return qR(r)});return}nk(r,e,t)}}var WR=(function(){function r(t,n){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new QR(this);try{this._cleanup=n.call(void 0,i)}catch(a){i.error(a)}this._state==="initializing"&&(this._state="ready")}var e=r.prototype;return e.unsubscribe=function(){this._state!=="closed"&&(fy(this),rk(this))},DA(r,[{key:"closed",get:function(){return this._state==="closed"}}]),r})(),QR=(function(){function r(t){this._subscription=t}var e=r.prototype;return e.next=function(n){s0(this._subscription,"next",n)},e.error=function(n){s0(this._subscription,"error",n)},e.complete=function(){s0(this._subscription,"complete")},DA(r,[{key:"closed",get:function(){return this._subscription._state==="closed"}}]),r})(),un=(function(){function r(t){if(!(this instanceof r))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}var e=r.prototype;return e.subscribe=function(n){return(typeof n!="object"||n===null)&&(n={next:n,error:arguments[1],complete:arguments[2]}),new WR(n,this._subscriber)},e.forEach=function(n){var i=this;return new Promise(function(a,s){if(typeof n!="function"){s(new TypeError(n+" is not a function"));return}function o(){l.unsubscribe(),a()}var l=i.subscribe({next:function(u){try{n(u,o)}catch(c){s(c),l.unsubscribe()}},error:s,complete:a})})},e.map=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=cf(this);return new a(function(s){return i.subscribe({next:function(o){try{o=n(o)}catch(l){return s.error(l)}s.next(o)},error:function(o){s.error(o)},complete:function(){s.complete()}})})},e.filter=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=cf(this);return new a(function(s){return i.subscribe({next:function(o){try{if(!n(o))return}catch(l){return s.error(l)}s.next(o)},error:function(o){s.error(o)},complete:function(){s.complete()}})})},e.reduce=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=cf(this),s=arguments.length>1,o=!1,l=arguments[1],u=l;return new a(function(c){return i.subscribe({next:function(h){var f=!o;if(o=!0,!f||s)try{u=n(u,h)}catch(d){return c.error(d)}else u=h},error:function(h){c.error(h)},complete:function(){if(!o&&!s)return c.error(new TypeError("Cannot reduce an empty sequence"));c.next(u),c.complete()}})})},e.concat=function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=cf(this);return new o(function(l){var u,c=0;function h(f){u=f.subscribe({next:function(d){l.next(d)},error:function(d){l.error(d)},complete:function(){c===a.length?(u=void 0,l.complete()):h(o.from(a[c++]))}})}return h(n),function(){u&&(u.unsubscribe(),u=void 0)}})},e.flatMap=function(n){var i=this;if(typeof n!="function")throw new TypeError(n+" is not a function");var a=cf(this);return new a(function(s){var o=[],l=i.subscribe({next:function(c){if(n)try{c=n(c)}catch(f){return s.error(f)}var h=a.from(c).subscribe({next:function(f){s.next(f)},error:function(f){s.error(f)},complete:function(){var f=o.indexOf(h);f>=0&&o.splice(f,1),u()}});o.push(h)},error:function(c){s.error(c)},complete:function(){u()}});function u(){l.closed&&o.length===0&&s.complete()}return function(){o.forEach(function(c){return c.unsubscribe()}),l.unsubscribe()}})},e[cy]=function(){return this},r.from=function(n){var i=typeof this=="function"?this:r;if(n==null)throw new TypeError(n+" is not an object");var a=ag(n,cy);if(a){var s=a.call(n);if(Object(s)!==s)throw new TypeError(s+" is not an object");return $R(s)&&s.constructor===i?s:new i(function(o){return s.subscribe(o)})}if(RA("iterator")&&(a=ag(n,GR),a))return new i(function(o){zp(function(){if(!o.closed){for(var l=HR(a.call(n)),u;!(u=l()).done;){var c=u.value;if(o.next(c),o.closed)return}o.complete()}})});if(Array.isArray(n))return new i(function(o){zp(function(){if(!o.closed){for(var l=0;l<n.length;++l)if(o.next(n[l]),o.closed)return;o.complete()}})});throw new TypeError(n+" is not observable")},r.of=function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];var s=typeof this=="function"?this:r;return new s(function(o){zp(function(){if(!o.closed){for(var l=0;l<i.length;++l)if(o.next(i[l]),o.closed)return;o.complete()}})})},DA(r,null,[{key:tk,get:function(){return this}}]),r})();PA()&&Object.defineProperty(un,Symbol("extensions"),{value:{symbol:cy,hostReportError:Zu},configurable:!0});function YR(r){var e,t=r.Symbol;if(typeof t=="function")if(t.observable)e=t.observable;else{typeof t.for=="function"?e=t.for("https://github.com/benlesh/symbol-observable"):e=t("https://github.com/benlesh/symbol-observable");try{t.observable=e}catch{}}else e="@@observable";return e}var Pu;typeof self<"u"?Pu=self:typeof window<"u"?Pu=window:typeof global<"u"?Pu=global:typeof module<"u"?Pu=module:Pu=Function("return this")();YR(Pu);var gw=un.prototype,mw="@@observable";gw[mw]||(gw[mw]=function(){return this});function XR(r){return r.catch(function(){}),r}var JR=Object.prototype.toString;function KR(r){return dy(r)}function dy(r,e){switch(JR.call(r)){case"[object Array]":{if(e=e||new Map,e.has(r))return e.get(r);var t=r.slice(0);return e.set(r,t),t.forEach(function(i,a){t[a]=dy(i,e)}),t}case"[object Object]":{if(e=e||new Map,e.has(r))return e.get(r);var n=Object.create(Object.getPrototypeOf(r));return e.set(r,n),Object.keys(r).forEach(function(i){n[i]=dy(r[i],e)}),n}default:return r}}function Kf(r,e,t){var n=[];r.forEach(function(i){return i[e]&&n.push(i)}),n.forEach(function(i){return i[e](t)})}function o0(r,e,t){return new un(function(n){var i={then:function(l){return new Promise(function(u){return u(l())})}};function a(l,u){return function(c){if(l){var h=function(){return n.closed?0:l(c)};i=i.then(h,h).then(function(f){return n.next(f)},function(f){return n.error(f)})}else n[u](c)}}var s={next:a(e,"next"),error:a(t,"error"),complete:function(){i.then(function(){return n.complete()})}},o=r.subscribe(s);return function(){return o.unsubscribe()}})}function ik(r){function e(t){Object.defineProperty(r,t,{value:un})}return B2&&Symbol.species&&e(Symbol.species),e("@@species"),r}function vw(r){return r&&typeof r.then=="function"}var Ru=(function(r){Na(e,r);function e(t){var n=r.call(this,function(i){return n.addObserver(i),function(){return n.removeObserver(i)}})||this;return n.observers=new Set,n.promise=new Promise(function(i,a){n.resolve=i,n.reject=a}),n.handlers={next:function(i){n.sub!==null&&(n.latest=["next",i],n.notify("next",i),Kf(n.observers,"next",i))},error:function(i){var a=n.sub;a!==null&&(a&&setTimeout(function(){return a.unsubscribe()}),n.sub=null,n.latest=["error",i],n.reject(i),n.notify("error",i),Kf(n.observers,"error",i))},complete:function(){var i=n,a=i.sub,s=i.sources,o=s===void 0?[]:s;if(a!==null){var l=o.shift();l?vw(l)?l.then(function(u){return n.sub=u.subscribe(n.handlers)},n.handlers.error):n.sub=l.subscribe(n.handlers):(a&&setTimeout(function(){return a.unsubscribe()}),n.sub=null,n.latest&&n.latest[0]==="next"?n.resolve(n.latest[1]):n.resolve(),n.notify("complete"),Kf(n.observers,"complete"))}}},n.nextResultListeners=new Set,n.cancel=function(i){n.reject(i),n.sources=[],n.handlers.error(i)},n.promise.catch(function(i){}),typeof t=="function"&&(t=[new un(t)]),vw(t)?t.then(function(i){return n.start(i)},n.handlers.error):n.start(t),n}return e.prototype.start=function(t){this.sub===void 0&&(this.sources=Array.from(t),this.handlers.complete())},e.prototype.deliverLastMessage=function(t){if(this.latest){var n=this.latest[0],i=t[n];i&&i.call(t,this.latest[1]),this.sub===null&&n==="next"&&t.complete&&t.complete()}},e.prototype.addObserver=function(t){this.observers.has(t)||(this.deliverLastMessage(t),this.observers.add(t))},e.prototype.removeObserver=function(t){this.observers.delete(t)&&this.observers.size<1&&this.handlers.complete()},e.prototype.notify=function(t,n){var i=this.nextResultListeners;i.size&&(this.nextResultListeners=new Set,i.forEach(function(a){return a(t,n)}))},e.prototype.beforeNext=function(t){var n=!1;this.nextResultListeners.add(function(i,a){n||(n=!0,t(i,a))})},e})(un);ik(Ru);function ju(r){return"incremental"in r}function ZR(r){return"hasNext"in r&&"data"in r}function e4(r){return ju(r)||ZR(r)}function t4(r){return fi(r)&&"payload"in r}function ak(r,e){var t=r,n=new xo;return ju(e)&&as(e.incremental)&&e.incremental.forEach(function(i){for(var a=i.data,s=i.path,o=s.length-1;o>=0;--o){var l=s[o],u=!isNaN(+l),c=u?[]:{};c[l]=a,a=c}t=n.merge(t,a)}),t}function Hp(r){var e=hy(r);return as(e)}function hy(r){var e=as(r.errors)?r.errors.slice(0):[];return ju(r)&&as(r.incremental)&&r.incremental.forEach(function(t){t.errors&&e.push.apply(e,t.errors)}),e}function ec(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Object.create(null);return r.forEach(function(n){n&&Object.keys(n).forEach(function(i){var a=n[i];a!==void 0&&(t[i]=a)})}),t}function l0(r,e){return ec(r,e,e.variables&&{variables:ec(me(me({},r&&r.variables),e.variables))})}function r4(r,e){return py(r,e)}function py(r,e,t){if(t===void 0&&(t=new Map),t.has(r))return t.get(r);var n=!1;if(Array.isArray(r)){var i=[];if(t.set(r,i),r.forEach(function(s,o){var l=py(s,e,t);n||(n=l!==s),i[o]=l}),n)return i}else if(M2(r)){var a=Object.create(Object.getPrototypeOf(r));if(t.set(r,a),Object.keys(r).forEach(function(s){if(s===e){n=!0;return}var o=py(r[s],e,t);n||(n=o!==r[s]),a[s]=o}),n)return a}return r}function BA(r){return r4(r,"__typename")}var u0,yw=Symbol.for("apollo.deprecations.slot"),Aw=ig,bw=(u0=Aw[yw])!==null&&u0!==void 0?u0:Aw[yw]=new Ac;function Pi(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return bw.withValue.apply(bw,na([Array.isArray(r)?r:[r]],e,!1))}function c0(r){return new un(function(e){e.error(r)})}var sk=function(r,e,t){var n=new Error(t);throw n.name="ServerError",n.response=r,n.statusCode=r.status,n.result=e,n};function n4(r){for(var e=["query","operationName","variables","extensions","context"],t=0,n=Object.keys(r);t<n.length;t++){var i=n[t];if(e.indexOf(i)<0)throw qi(58,i)}return r}function i4(r,e){var t=me({},r),n=function(a){typeof a=="function"?t=me(me({},t),a(t)):t=me(me({},t),a)},i=function(){return me({},t)};return Object.defineProperty(e,"setContext",{enumerable:!1,value:n}),Object.defineProperty(e,"getContext",{enumerable:!1,value:i}),e}function a4(r){var e={variables:r.variables||{},extensions:r.extensions||{},operationName:r.operationName,query:r.query};return e.operationName||(e.operationName=typeof e.query!="string"?Vp(e.query)||void 0:""),e}function s4(r,e){var t=me({},r),n=new Set(Object.keys(r));return Ra(e,{Variable:function(i,a,s){s&&s.kind!=="VariableDefinition"&&n.delete(i.name.value)}}),n.forEach(function(i){delete t[i]}),t}function ww(r,e){return e?e(r):un.of()}function ff(r){return typeof r=="function"?new ss(r):r}function Wh(r){return r.request.length<=1}var ss=(function(){function r(e){e&&(this.request=e)}return r.empty=function(){return new r(function(){return un.of()})},r.from=function(e){return e.length===0?r.empty():e.map(ff).reduce(function(t,n){return t.concat(n)})},r.split=function(e,t,n){var i=ff(t),a=ff(n||new r(ww)),s;return Wh(i)&&Wh(a)?s=new r(function(o){return e(o)?i.request(o)||un.of():a.request(o)||un.of()}):s=new r(function(o,l){return e(o)?i.request(o,l)||un.of():a.request(o,l)||un.of()}),Object.assign(s,{left:i,right:a})},r.execute=function(e,t){return e.request(i4(t.context,a4(n4(t))))||un.of()},r.concat=function(e,t){var n=ff(e);if(Wh(n))return n;var i=ff(t),a;return Wh(i)?a=new r(function(s){return n.request(s,function(o){return i.request(o)||un.of()})||un.of()}):a=new r(function(s,o){return n.request(s,function(l){return i.request(l,o)||un.of()})||un.of()}),Object.assign(a,{left:n,right:i})},r.prototype.split=function(e,t,n){return this.concat(r.split(e,t,n||new r(ww)))},r.prototype.concat=function(e){return r.concat(this,e)},r.prototype.request=function(e,t){throw qi(48)},r.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},r.prototype.setOnError=function(e){return this.onError=e,this},r})(),o4=ss.from,gy=ss.execute;function l4(r){var e,t=r[Symbol.asyncIterator]();return e={next:function(){return t.next()}},e[Symbol.asyncIterator]=function(){return this},e}function u4(r){var e=null,t=null,n=!1,i=[],a=[];function s(h){if(!t){if(a.length){var f=a.shift();if(Array.isArray(f)&&f[0])return f[0]({value:h,done:!1})}i.push(h)}}function o(h){t=h;var f=a.slice();f.forEach(function(d){d[1](h)}),!e||e()}function l(){n=!0;var h=a.slice();h.forEach(function(f){f[0]({value:void 0,done:!0})}),!e||e()}e=function(){e=null,r.removeListener("data",s),r.removeListener("error",o),r.removeListener("end",l),r.removeListener("finish",l),r.removeListener("close",l)},r.on("data",s),r.on("error",o),r.on("end",l),r.on("finish",l),r.on("close",l);function u(){return new Promise(function(h,f){if(t)return f(t);if(i.length)return h({value:i.shift(),done:!1});if(n)return h({value:void 0,done:!0});a.push([h,f])})}var c={next:function(){return u()}};return Dg&&(c[Symbol.asyncIterator]=function(){return this}),c}function c4(r){var e=!1,t={next:function(){return e?Promise.resolve({value:void 0,done:!0}):(e=!0,new Promise(function(n,i){r.then(function(a){n({value:a,done:!1})}).catch(i)}))}};return Dg&&(t[Symbol.asyncIterator]=function(){return this}),t}function Cw(r){var e={next:function(){return r.read()}};return Dg&&(e[Symbol.asyncIterator]=function(){return this}),e}function f4(r){return!!r.body}function d4(r){return!!r.getReader}function h4(r){return!!(Dg&&r[Symbol.asyncIterator])}function p4(r){return!!r.stream}function g4(r){return!!r.arrayBuffer}function m4(r){return!!r.pipe}function v4(r){var e=r;if(f4(r)&&(e=r.body),h4(e))return l4(e);if(d4(e))return Cw(e.getReader());if(p4(e))return Cw(e.stream().getReader());if(g4(e))return c4(e.arrayBuffer());if(m4(e))return u4(e);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}var _g=Symbol();function ok(r){return r.extensions?Array.isArray(r.extensions[_g]):!1}function lk(r){return r.hasOwnProperty("graphQLErrors")}var y4=function(r){var e=na(na(na([],r.graphQLErrors,!0),r.clientErrors,!0),r.protocolErrors,!0);return r.networkError&&e.push(r.networkError),e.map(function(t){return fi(t)&&t.message||"Error message not found."}).join(`
57
57
  `)},pl=(function(r){Na(e,r);function e(t){var n=t.graphQLErrors,i=t.protocolErrors,a=t.clientErrors,s=t.networkError,o=t.errorMessage,l=t.extraInfo,u=r.call(this,o)||this;return u.name="ApolloError",u.graphQLErrors=n||[],u.protocolErrors=i||[],u.clientErrors=a||[],u.networkError=s||null,u.message=o||y4(u),u.extraInfo=l,u.cause=na(na(na([s],n||[],!0),i||[],!0),a||[],!0).find(function(c){return!!c})||null,u.__proto__=e.prototype,u}return e})(Error),xw=Object.prototype.hasOwnProperty;function A4(r,e){return Rs(this,void 0,void 0,function(){var t,n,i,a,s,o,l,u,c,h,f,d,g,v,y,A,C,k,T,S,R,B,G,$;return Os(this,function(Y){switch(Y.label){case 0:if(TextDecoder===void 0)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");t=new TextDecoder("utf-8"),n=($=r.headers)===null||$===void 0?void 0:$.get("content-type"),i="boundary=",a=n?.includes(i)?n?.substring(n?.indexOf(i)+i.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",s=`\r
58
58
  --`.concat(a),o="",l=v4(r),u=!0,Y.label=1;case 1:return u?[4,l.next()]:[3,3];case 2:for(c=Y.sent(),h=c.value,f=c.done,d=typeof h=="string"?h:t.decode(h),g=o.length-s.length+1,u=!f,o+=d,v=o.indexOf(s,g);v>-1;){if(y=void 0,B=[o.slice(0,v),o.slice(v+s.length)],y=B[0],o=B[1],A=y.indexOf(`\r
@@ -60,7 +60,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
60
60
  `),C=b4(y.slice(0,A)),k=C["content-type"],k&&k.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(T=y.slice(A),T){if(S=uk(r,T),Object.keys(S).length>1||"data"in S||"incremental"in S||"errors"in S||"payload"in S)if(t4(S)){if(R={},"payload"in S){if(Object.keys(S).length===1&&S.payload===null)return[2];R=me({},S.payload)}"errors"in S&&(R=me(me({},R),{extensions:me(me({},"extensions"in R?R.extensions:null),(G={},G[_g]=S.errors,G))})),e(R)}else e(S);else if(Object.keys(S).length===1&&"hasNext"in S&&!S.hasNext)return[2]}v=o.indexOf(s)}return[3,1];case 3:return[2]}})})}function b4(r){var e={};return r.split(`
61
61
  `).forEach(function(t){var n=t.indexOf(":");if(n>-1){var i=t.slice(0,n).trim().toLowerCase(),a=t.slice(n+1).trim();e[i]=a}}),e}function uk(r,e){if(r.status>=300){var t=function(){try{return JSON.parse(e)}catch{return e}};sk(r,t(),"Response not successful: Received status code ".concat(r.status))}try{return JSON.parse(e)}catch(i){var n=i;throw n.name="ServerParseError",n.response=r,n.statusCode=r.status,n.bodyText=e,n}}function w4(r,e){r.result&&r.result.errors&&r.result.data&&e.next(r.result),e.error(r)}function C4(r){return function(e){return e.text().then(function(t){return uk(e,t)}).then(function(t){return!Array.isArray(t)&&!xw.call(t,"data")&&!xw.call(t,"errors")&&sk(e,t,"Server response was missing for query '".concat(Array.isArray(r)?r.map(function(n){return n.operationName}):r.operationName,"'.")),t})}}var my=function(r,e){var t;try{t=JSON.stringify(r)}catch(i){var n=qi(54,e,i.message);throw n.parseError=i,n}return t},x4={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},S4={accept:"*/*","content-type":"application/json"},E4={method:"POST"},k4={http:x4,headers:S4,options:E4},F4=function(r,e){return e(r)};function T4(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i={},a={};t.forEach(function(h){i=me(me(me({},i),h.options),{headers:me(me({},i.headers),h.headers)}),h.credentials&&(i.credentials=h.credentials),a=me(me({},a),h.http)}),i.headers&&(i.headers=I4(i.headers,a.preserveHeaderCase));var s=r.operationName,o=r.extensions,l=r.variables,u=r.query,c={operationName:s,variables:l};return a.includeExtensions&&(c.extensions=o),a.includeQuery&&(c.query=e(u,bl)),{options:i,body:c}}function I4(r,e){if(!e){var t={};return Object.keys(Object(r)).forEach(function(a){t[a.toLowerCase()]=r[a]}),t}var n={};Object.keys(Object(r)).forEach(function(a){n[a.toLowerCase()]={originalName:a,value:r[a]}});var i={};return Object.keys(n).forEach(function(a){i[n[a].originalName]=n[a].value}),i}var D4=function(r,e){var t=r.getContext(),n=t.uri;return n||(typeof e=="function"?e(r):e||"/graphql")};function P4(r,e){var t=[],n=function(h,f){t.push("".concat(h,"=").concat(encodeURIComponent(f)))};if("query"in e&&n("query",e.query),e.operationName&&n("operationName",e.operationName),e.variables){var i=void 0;try{i=my(e.variables,"Variables map")}catch(h){return{parseError:h}}n("variables",i)}if(e.extensions){var a=void 0;try{a=my(e.extensions,"Extensions map")}catch(h){return{parseError:h}}n("extensions",a)}var s="",o=r,l=r.indexOf("#");l!==-1&&(s=r.substr(l),o=r.substr(0,l));var u=o.indexOf("?")===-1?"?":"&",c=o+u+t.join("&")+s;return{newURI:c}}var R4=Ia(function(){return fetch}),ck=function(r){r===void 0&&(r={});var e=r.uri,t=e===void 0?"/graphql":e,n=r.fetch,i=r.print,a=i===void 0?F4:i,s=r.includeExtensions,o=r.preserveHeaderCase,l=r.useGETForQueries,u=r.includeUnusedVariables,c=u===void 0?!1:u,h=rs(r,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]),f={http:{includeExtensions:s,preserveHeaderCase:o},options:h.fetchOptions,credentials:h.credentials,headers:h.headers};return new ss(function(d){var g=D4(d,t),v=d.getContext(),y={};if(v.clientAwareness){var A=v.clientAwareness,C=A.name,k=A.version;C&&(y["apollographql-client-name"]=C),k&&(y["apollographql-client-version"]=k)}var T=me(me({},y),v.headers),S={http:v.http,options:v.fetchOptions,credentials:v.credentials,headers:T};if(pd(["client"],d.query)){var R=ek(d.query);if(!R)return c0(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));d.query=R}var B=T4(d,a,k4,f,S),G=B.options,$=B.body;$.variables&&!c&&($.variables=s4($.variables,d.query));var Y;!G.signal&&typeof AbortController<"u"&&(Y=new AbortController,G.signal=Y.signal);var X=function(Oe){return Oe.kind==="OperationDefinition"&&Oe.operation==="mutation"},J=function(Oe){return Oe.kind==="OperationDefinition"&&Oe.operation==="subscription"},Q=J(Vd(d.query)),oe=pd(["defer"],d.query);if(l&&!d.query.definitions.some(X)&&(G.method="GET"),oe||Q){G.headers=G.headers||{};var se="multipart/mixed;";Q?se+="boundary=graphql;subscriptionSpec=1.0,application/json":oe&&(se+="deferSpec=20220824,application/json"),G.headers.accept=se}if(G.method==="GET"){var he=P4(g,$),ye=he.newURI,Ue=he.parseError;if(Ue)return c0(Ue);g=ye}else try{G.body=my($,"Payload")}catch(Oe){return c0(Oe)}return new un(function(Oe){var Te=n||Ia(function(){return fetch})||R4,K=Oe.next.bind(Oe);return Te(g,G).then(function(ie){var de;d.setContext({response:ie});var Be=(de=ie.headers)===null||de===void 0?void 0:de.get("content-type");return Be!==null&&/^multipart\/mixed/i.test(Be)?A4(ie,K):C4(d)(ie).then(K)}).then(function(){Y=void 0,Oe.complete()}).catch(function(ie){Y=void 0,w4(ie,Oe)}),function(){Y&&Y.abort()}})})},O4=(function(r){Na(e,r);function e(t){t===void 0&&(t={});var n=r.call(this,ck(t).request)||this;return n.options=t,n}return e})(ss);const{toString:Sw,hasOwnProperty:B4}=Object.prototype,Ew=Function.prototype.toString,vy=new Map;function Dn(r,e){try{return yy(r,e)}finally{vy.clear()}}function yy(r,e){if(r===e)return!0;const t=Sw.call(r),n=Sw.call(e);if(t!==n)return!1;switch(t){case"[object Array]":if(r.length!==e.length)return!1;case"[object Object]":{if(Fw(r,e))return!0;const i=kw(r),a=kw(e),s=i.length;if(s!==a.length)return!1;for(let o=0;o<s;++o)if(!B4.call(e,i[o]))return!1;for(let o=0;o<s;++o){const l=i[o];if(!yy(r[l],e[l]))return!1}return!0}case"[object Error]":return r.name===e.name&&r.message===e.message;case"[object Number]":if(r!==r)return e!==e;case"[object Boolean]":case"[object Date]":return+r==+e;case"[object RegExp]":case"[object String]":return r==`${e}`;case"[object Map]":case"[object Set]":{if(r.size!==e.size)return!1;if(Fw(r,e))return!0;const i=r.entries(),a=t==="[object Map]";for(;;){const s=i.next();if(s.done)break;const[o,l]=s.value;if(!e.has(o)||a&&!yy(l,e.get(o)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":r=new Uint8Array(r),e=new Uint8Array(e);case"[object DataView]":{let i=r.byteLength;if(i===e.byteLength)for(;i--&&r[i]===e[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=Ew.call(r);return i!==Ew.call(e)?!1:!N4(i,_4)}}return!1}function kw(r){return Object.keys(r).filter(M4,r)}function M4(r){return this[r]!==void 0}const _4="{ [native code] }";function N4(r,e){const t=r.length-e.length;return t>=0&&r.indexOf(e,t)===t}function Fw(r,e){let t=vy.get(r);if(t){if(t.has(e))return!0}else vy.set(r,t=new Set);return t.add(e),!1}function fk(r,e,t,n){var i=e.data,a=rs(e,["data"]),s=t.data,o=rs(t,["data"]);return Dn(a,o)&&jp(Vd(r).selectionSet,i,s,{fragmentMap:gc(yc(r)),variables:n})}function jp(r,e,t,n){if(e===t)return!0;var i=new Set;return r.selections.every(function(a){if(i.has(a)||(i.add(a),!Ud(a,n.variables))||Tw(a))return!0;if(wo(a)){var s=bo(a),o=e&&e[s],l=t&&t[s],u=a.selectionSet;if(!u)return Dn(o,l);var c=Array.isArray(o),h=Array.isArray(l);if(c!==h)return!1;if(c&&h){var f=o.length;if(l.length!==f)return!1;for(var d=0;d<f;++d)if(!jp(u,o[d],l[d],n))return!1;return!0}return jp(u,o,l,n)}else{var g=Pg(a,n.fragmentMap);if(g)return Tw(g)?!0:jp(g.selectionSet,e,t,n)}})}function Tw(r){return!!r.directives&&r.directives.some(L4)}function L4(r){return r.name.value==="nonreactive"}var dk=Dl?WeakMap:Map,hk=EA?WeakSet:Set,pk=new Ac;function gk(r,e,t){return pk.withValue(!0,function(){var n=Vf(r,e,t,!1);return n})}function U4(r,e){if(e.has(r))return e.get(r);var t=Array.isArray(r)?[]:Object.create(null);return e.set(r,t),t}function Vf(r,e,t,n,i){var a=t.knownChanged,s=U4(r,t.mutableTargets);if(Array.isArray(r)){for(var o=0,l=Array.from(r.entries());o<l.length;o++){var u=l[o],c=u[0],h=u[1];if(h===null){s[c]=null;continue}var f=Vf(h,e,t,n);a.has(f)&&a.add(s),s[c]=f}return a.has(s)?s:r}for(var d=0,g=e.selections;d<g.length;d++){var v=g[d],y=void 0;if(n&&a.add(s),v.kind===et.FIELD){var A=bo(v),C=v.selectionSet;if(y=s[A]||r[A],y===void 0)continue;if(C&&y!==null){var f=Vf(r[A],C,t,n);a.has(f)&&(y=f)}s[A]=y}if(v.kind===et.INLINE_FRAGMENT&&(!v.typeCondition||t.cache.fragmentMatches(v,r.__typename))&&(y=Vf(r,v.selectionSet,t,n)),v.kind===et.FRAGMENT_SPREAD){var k=v.name.value,T=t.fragmentMap[k]||(t.fragmentMap[k]=t.cache.lookupFragment(k));Mr(T,59,k);var S=qP(v);S!=="mask"&&(y=Vf(r,T.selectionSet,t,S==="migrate"))}a.has(y)&&a.add(s)}return"__typename"in r&&!("__typename"in s)&&(s.__typename=r.__typename),Object.keys(s).length!==Object.keys(r).length&&a.add(s),a.has(s)?s:r}function mk(r,e,t,n){if(!t.fragmentMatches)return r;var i=e.definitions.filter(function(s){return s.kind===et.FRAGMENT_DEFINITION});typeof n>"u"&&(Mr(i.length===1,61,i.length),n=i[0].name.value);var a=i.find(function(s){return s.name.value===n});return Mr(!!a,62,n),r==null||Dn(r,{})?r:gk(r,a.selectionSet,{operationName:a.name.value,fragmentMap:gc(yc(e)),cache:t,mutableTargets:new dk,knownChanged:new hk})}function V4(r,e,t){var n;if(!t.fragmentMatches)return r;var i=vc(e);return Mr(i,63),r==null?r:gk(r,i.selectionSet,{operationType:i.operation,operationName:(n=i.name)===null||n===void 0?void 0:n.value,fragmentMap:gc(yc(e)),cache:t,mutableTargets:new dk,knownChanged:new hk})}var z4=(function(){function r(){this.assumeImmutableResults=!1,this.getFragmentDoc=Ku(KP,{max:Us["cache.fragmentQueryDocuments"]||1e3,cache:gd})}return r.prototype.lookupFragment=function(e){return null},r.prototype.batch=function(e){var t=this,n=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=e.update(t)},n),i},r.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},r.prototype.transformDocument=function(e){return e},r.prototype.transformForLink=function(e){return e},r.prototype.identify=function(e){},r.prototype.gc=function(){return[]},r.prototype.modify=function(e){return!1},r.prototype.readQuery=function(e,t){var n=this;return t===void 0&&(t=!!e.optimistic),Pi("canonizeResults",function(){return n.read(me(me({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))})},r.prototype.watchFragment=function(e){var t=this,n=e.fragment,i=e.fragmentName,a=e.from,s=e.optimistic,o=s===void 0?!0:s,l=rs(e,["fragment","fragmentName","from","optimistic"]),u=this.getFragmentDoc(n,i),c=typeof a>"u"||typeof a=="string"?a:this.identify(a),h=!!e[Symbol.for("apollo.dataMasking")],f=me(me({},l),{returnPartialData:!0,id:c,query:u,optimistic:o}),d;return new un(function(g){return t.watch(me(me({},f),{immediate:!0,callback:function(v){var y=h?mk(v.result,n,t,i):v.result;if(!(d&&fk(u,{data:d.result},{data:y},e.variables))){var A={data:y,complete:!!v.complete};v.missing&&(A.missing=Mg(v.missing.map(function(C){return C.missing}))),d=me(me({},v),{result:y}),g.next(A)}}}))})},r.prototype.readFragment=function(e,t){var n=this;return t===void 0&&(t=!!e.optimistic),Pi("canonizeResults",function(){return n.read(me(me({},e),{query:n.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))})},r.prototype.writeQuery=function(e){var t=e.id,n=e.data,i=rs(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:n}))},r.prototype.writeFragment=function(e){var t=e.id,n=e.data,i=e.fragment,a=e.fragmentName,s=rs(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,a),dataId:t,result:n}))},r.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var i=Pi("canonizeResults",function(){return n.readQuery(e)}),a=t(i);return a==null?i:(n.writeQuery(me(me({},e),{data:a})),a)}})},r.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var i=Pi("canonizeResults",function(){return n.readFragment(e)}),a=t(i);return a==null?i:(n.writeFragment(me(me({},e),{data:a})),a)}})},r})(),vk=(function(r){Na(e,r);function e(t,n,i,a){var s,o=r.call(this,t)||this;if(o.message=t,o.path=n,o.query=i,o.variables=a,Array.isArray(o.path)){o.missing=o.message;for(var l=o.path.length-1;l>=0;--l)o.missing=(s={},s[o.path[l]]=o.missing,s)}else o.missing=o.path;return o.__proto__=e.prototype,o}return e})(Error),mi=Object.prototype.hasOwnProperty;function df(r){return r==null}function yk(r,e){var t=r.__typename,n=r.id,i=r._id;if(typeof t=="string"&&(e&&(e.keyObject=df(n)?df(i)?void 0:{_id:i}:{id:n}),df(n)&&!df(i)&&(n=i),!df(n)))return"".concat(t,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var Ak={dataIdFromObject:yk,addTypename:!0,resultCaching:!0,canonizeResults:!1};function H4(r){return ec(Ak,r)}function bk(r){var e=r.canonizeResults;return e===void 0?Ak.canonizeResults:e}var wk=/^[_a-z][_0-9a-z]*/i;function tc(r){var e=r.match(wk);return e?e[0]:r}function Ay(r,e,t){return fi(e)?ii(e)?e.every(function(n){return Ay(r,n,t)}):r.selections.every(function(n){if(wo(n)&&Ud(n,t)){var i=bo(n);return mi.call(e,i)&&(!n.selectionSet||Ay(n.selectionSet,e[i],t))}return!0}):!1}function Mu(r){return fi(r)&&!kn(r)&&!ii(r)}function j4(){return new xo}function Ck(r,e){var t=gc(yc(r));return{fragmentMap:t,lookupFragment:function(n){var i=t[n];return!i&&e&&(i=e.lookup(n)),i||null}}}var Gp=Object.create(null),f0=function(){return Gp},Iw=Object.create(null),vd=(function(){function r(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,a){return kn(i)?n.get(i.__ref,a):i&&i[a]},this.canRead=function(i){return kn(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,a){if(typeof i=="string")return Hu(i);if(kn(i))return i;var s=n.policies.identify(i)[0];if(s){var o=Hu(s);return a&&n.merge(s,i),o}}}return r.prototype.toObject=function(){return me({},this.data)},r.prototype.has=function(e){return this.lookup(e,!0)!==void 0},r.prototype.get=function(e,t){if(this.group.depend(e,t),mi.call(this.data,e)){var n=this.data[e];if(n&&mi.call(n,t))return n[t]}if(t==="__typename"&&mi.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof ao)return this.parent.get(e,t)},r.prototype.lookup=function(e,t){if(t&&this.group.depend(e,"__exists"),mi.call(this.data,e))return this.data[e];if(this instanceof ao)return this.parent.lookup(e,t);if(this.policies.rootTypenamesById[e])return Object.create(null)},r.prototype.merge=function(e,t){var n=this,i;kn(e)&&(e=e.__ref),kn(t)&&(t=t.__ref);var a=typeof e=="string"?this.lookup(i=e):e,s=typeof t=="string"?this.lookup(i=t):t;if(s){Mr(typeof i=="string",2);var o=new xo($4).merge(a,s);if(this.data[i]=o,o!==a&&(delete this.refs[i],this.group.caching)){var l=Object.create(null);a||(l.__exists=1),Object.keys(s).forEach(function(u){if(!a||a[u]!==o[u]){l[u]=1;var c=tc(u);c!==u&&!n.policies.hasKeyArgs(o.__typename,c)&&(l[c]=1),o[u]===void 0&&!(n instanceof ao)&&delete o[u]}}),l.__typename&&!(a&&a.__typename)&&this.policies.rootTypenamesById[i]===o.__typename&&delete l.__typename,Object.keys(l).forEach(function(u){return n.group.dirty(i,u)})}}},r.prototype.modify=function(e,t){var n=this,i=this.lookup(e);if(i){var a=Object.create(null),s=!1,o=!0,l={DELETE:Gp,INVALIDATE:Iw,isReference:kn,toReference:this.toReference,canRead:this.canRead,readField:function(u,c){return n.policies.readField(typeof u=="string"?{fieldName:u,from:c||Hu(e)}:u,{store:n})}};if(Object.keys(i).forEach(function(u){var c=tc(u),h=i[u];if(h!==void 0){var f=typeof t=="function"?t:t[u]||t[c];if(f){var d=f===f0?Gp:f(h,me(me({},l),{fieldName:c,storeFieldName:u,storage:n.getStorage(e,u)}));d===Iw?n.group.dirty(e,u):(d===Gp&&(d=void 0),d!==h&&(a[u]=d,s=!0,h=d))}h!==void 0&&(o=!1)}}),s)return this.merge(e,a),o&&(this instanceof ao?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},r.prototype.delete=function(e,t,n){var i,a=this.lookup(e);if(a){var s=this.getFieldValue(a,"__typename"),o=t&&n?this.policies.getStoreFieldName({typename:s,fieldName:t,args:n}):t;return this.modify(e,o?(i={},i[o]=f0,i):f0)}return!1},r.prototype.evict=function(e,t){var n=!1;return e.id&&(mi.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof ao&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},r.prototype.clear=function(){this.replace(null)},r.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){mi.call(e.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},r.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(a){e&&mi.call(e,a)||t.delete(a)}),e){var n=e.__META,i=rs(e,["__META"]);Object.keys(i).forEach(function(a){t.merge(a,i[a])}),n&&n.extraRootIds.forEach(this.retain,this)}},r.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},r.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},r.prototype.getRootIdSet=function(e){return e===void 0&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof ao?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},r.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(s){mi.call(n,s)&&(Object.keys(e.findChildRefIds(s)).forEach(t.add,t),delete n[s])});var i=Object.keys(n);if(i.length){for(var a=this;a instanceof ao;)a=a.parent;i.forEach(function(s){return a.delete(s)})}return i},r.prototype.findChildRefIds=function(e){if(!mi.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var i=new Set([n]);i.forEach(function(a){kn(a)&&(t[a.__ref]=!0),fi(a)&&Object.keys(a).forEach(function(s){var o=a[s];fi(o)&&i.add(o)})})}return this.refs[e]},r.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},r})(),xk=(function(){function r(e,t){t===void 0&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return r.prototype.resetCaching=function(){this.d=this.caching?Y2():null,this.keyMaker=new Vs(Dl)},r.prototype.depend=function(e,t){if(this.d){this.d(d0(e,t));var n=tc(t);n!==t&&this.d(d0(e,n)),this.parent&&this.parent.depend(e,t)}},r.prototype.dirty=function(e,t){this.d&&this.d.dirty(d0(e,t),t==="__exists"?"forget":"setDirty")},r})();function d0(r,e){return e+"#"+r}function Dw(r,e){Zf(r)&&r.group.depend(e,"__exists")}(function(r){var e=(function(t){Na(n,t);function n(i){var a=i.policies,s=i.resultCaching,o=s===void 0?!0:s,l=i.seed,u=t.call(this,a,new xk(o))||this;return u.stump=new G4(u),u.storageTrie=new Vs(Dl),l&&u.replace(l),u}return n.prototype.addLayer=function(i,a){return this.stump.addLayer(i,a)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n})(r);r.Root=e})(vd||(vd={}));var ao=(function(r){Na(e,r);function e(t,n,i,a){var s=r.call(this,n.policies,a)||this;return s.id=t,s.parent=n,s.replay=i,s.group=a,i(s),s}return e.prototype.addLayer=function(t,n){return new e(t,this,n,this.group)},e.prototype.removeLayer=function(t){var n=this,i=this.parent.removeLayer(t);return t===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(a){var s=n.data[a],o=i.lookup(a);o?s?s!==o&&Object.keys(s).forEach(function(l){Dn(s[l],o[l])||n.group.dirty(a,l)}):(n.group.dirty(a,"__exists"),Object.keys(o).forEach(function(l){n.group.dirty(a,l)})):n.delete(a)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},e.prototype.toObject=function(){return me(me({},this.parent.toObject()),this.data)},e.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return mi.call(this.data,t)?me(me({},n),r.prototype.findChildRefIds.call(this,t)):n},e.prototype.getStorage=function(){for(var t=this.parent;t.parent;)t=t.parent;return t.getStorage.apply(t,arguments)},e})(vd),G4=(function(r){Na(e,r);function e(t){return r.call(this,"EntityStore.Stump",t,function(){},new xk(t.group.caching,t.group))||this}return e.prototype.removeLayer=function(){return this},e.prototype.merge=function(t,n){return this.parent.merge(t,n)},e})(ao);function $4(r,e,t){var n=r[t],i=e[t];return Dn(n,i)?n:i}function Zf(r){return!!(r instanceof vd&&r.group.caching)}var di=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zs(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function q4(r){return fi(r)?ii(r)?r.slice(0):me({__proto__:Object.getPrototypeOf(r)},r):r}var Pw=(function(){function r(){this.known=new(EA?WeakSet:Set),this.pool=new Vs(Dl),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return r.prototype.isKnown=function(e){return fi(e)&&this.known.has(e)},r.prototype.pass=function(e){if(fi(e)){var t=q4(e);return this.passes.set(t,e),t}return e},r.prototype.admit=function(e){var t=this;if(fi(e)){var n=this.passes.get(e);if(n)return n;var i=Object.getPrototypeOf(e);switch(i){case Array.prototype:{if(this.known.has(e))return e;var a=e.map(this.admit,this),s=this.pool.lookupArray(a);return s.array||this.known.add(s.array=a),s.array}case null:case Object.prototype:{if(this.known.has(e))return e;var o=Object.getPrototypeOf(e),l=[o],u=this.sortedKeys(e);l.push(u.json);var c=l.length;u.sorted.forEach(function(d){l.push(t.admit(e[d]))});var s=this.pool.lookupArray(l);if(!s.object){var h=s.object=Object.create(o);this.known.add(h),u.sorted.forEach(function(d,g){h[d]=l[c+g]})}return s.object}}}return e},r.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var i=JSON.stringify(t);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:t,json:i})}return n.keys},r})();function Rw(r){return[r.selectionSet,r.objectOrReference,r.context,r.context.canonizeResults]}var W4=(function(){function r(e){var t=this;this.knownResults=new(Dl?WeakMap:Map),this.config=ec(e,{addTypename:e.addTypename!==!1,canonizeResults:bk(e)}),this.canon=e.canon||new Pw,this.executeSelectionSet=Ku(function(n){var i,a=n.context.canonizeResults,s=Rw(n);s[3]=!a;var o=(i=t.executeSelectionSet).peek.apply(i,s);return o?a?me(me({},o),{result:t.canon.admit(o.result)}):o:(Dw(n.context.store,n.enclosingRef.__ref),t.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize||Us["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:Rw,makeCacheKey:function(n,i,a,s){if(Zf(a.store))return a.store.makeCacheKey(n,kn(i)?i.__ref:i,a.varString,s)}}),this.executeSubSelectedArray=Ku(function(n){return Dw(n.context.store,n.enclosingRef.__ref),t.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize||Us["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(n){var i=n.field,a=n.array,s=n.context;if(Zf(s.store))return s.store.makeCacheKey(i,a,s.varString)}})}return r.prototype.resetCanon=function(){this.canon=new Pw},r.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,i=e.rootId,a=i===void 0?"ROOT_QUERY":i,s=e.variables,o=e.returnPartialData,l=o===void 0?!0:o,u=e.canonizeResults,c=u===void 0?this.config.canonizeResults:u,h=this.config.cache.policies;s=me(me({},kA(CR(n))),s);var f=Hu(a),d=this.executeSelectionSet({selectionSet:Vd(n).selectionSet,objectOrReference:f,enclosingRef:f,context:me({store:t,query:n,policies:h,variables:s,varString:mo(s),canonizeResults:c},Ck(n,this.config.fragments))}),g;if(d.missing&&(g=[new vk(Q4(d.missing),d.missing,n,s)],!l))throw g[0];return{result:d.result,complete:!g,missing:g}},r.prototype.isFresh=function(e,t,n,i){if(Zf(i.store)&&this.knownResults.get(e)===n){var a=this.executeSelectionSet.peek(n,t,i,this.canon.isKnown(e));if(a&&e===a.result)return!0}return!1},r.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,s=e.context;if(kn(i)&&!s.policies.rootTypenamesById[i.__ref]&&!s.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var o=s.variables,l=s.policies,u=s.store,c=u.getFieldValue(i,"__typename"),h=[],f,d=new xo;this.config.addTypename&&typeof c=="string"&&!l.rootIdsByTypename[c]&&h.push({__typename:c});function g(k,T){var S;return k.missing&&(f=d.merge(f,(S={},S[T]=k.missing,S))),k.result}var v=new Set(n.selections);v.forEach(function(k){var T,S;if(Ud(k,o))if(wo(k)){var R=l.readField({fieldName:k.name.value,field:k,variables:s.variables,from:i},s),B=bo(k);R===void 0?Z2.added(k)||(f=d.merge(f,(T={},T[B]="Can't find field '".concat(k.name.value,"' on ").concat(kn(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),T))):ii(R)?R.length>0&&(R=g(t.executeSubSelectedArray({field:k,array:R,enclosingRef:a,context:s}),B)):k.selectionSet?R!=null&&(R=g(t.executeSelectionSet({selectionSet:k.selectionSet,objectOrReference:R,enclosingRef:kn(R)?R:a,context:s}),B)):s.canonizeResults&&(R=t.canon.pass(R)),R!==void 0&&h.push((S={},S[B]=R,S))}else{var G=Pg(k,s.lookupFragment);if(!G&&k.kind===et.FRAGMENT_SPREAD)throw qi(10,k.name.value);G&&l.fragmentMatches(G,c)&&G.selectionSet.selections.forEach(v.add,v)}});var y=Mg(h),A={result:y,missing:f},C=s.canonizeResults?this.canon.admit(A):A;return C.result&&this.knownResults.set(C.result,n),C},r.prototype.execSubSelectedArrayImpl=function(e){var t=this,n=e.field,i=e.array,a=e.enclosingRef,s=e.context,o,l=new xo;function u(c,h){var f;return c.missing&&(o=l.merge(o,(f={},f[h]=c.missing,f))),c.result}return n.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map(function(c,h){return c===null?null:ii(c)?u(t.executeSubSelectedArray({field:n,array:c,enclosingRef:a,context:s}),h):n.selectionSet?u(t.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:c,enclosingRef:kn(c)?c:a,context:s}),h):c}),{result:s.canonizeResults?this.canon.admit(i):i,missing:o}},r})();function Q4(r){try{JSON.stringify(r,function(e,t){if(typeof t=="string")throw t;return t})}catch(e){return e}}var MA=new Ac,Ow=new WeakMap;function ed(r){var e=Ow.get(r);return e||Ow.set(r,e={vars:new Set,dep:Y2()}),e}function Bw(r){ed(r).vars.forEach(function(e){return e.forgetCache(r)})}function Y4(r){ed(r).vars.forEach(function(e){return e.attachCache(r)})}function X4(r){var e=new Set,t=new Set,n=function(a){if(arguments.length>0){if(r!==a){r=a,e.forEach(function(l){ed(l).dep.dirty(n),J4(l)});var s=Array.from(t);t.clear(),s.forEach(function(l){return l(r)})}}else{var o=MA.getValue();o&&(i(o),ed(o).dep(n))}return r};n.onNextChange=function(a){return t.add(a),function(){t.delete(a)}};var i=n.attachCache=function(a){return e.add(a),ed(a).vars.add(n),n};return n.forgetCache=function(a){return e.delete(a)},n}function J4(r){r.broadcastWatches&&r.broadcastWatches()}var Mw=Object.create(null);function _A(r){var e=JSON.stringify(r);return Mw[e]||(Mw[e]=Object.create(null))}function _w(r){var e=_A(r);return e.keyFieldsFn||(e.keyFieldsFn=function(t,n){var i=function(s,o){return n.readField(o,s)},a=n.keyObject=NA(r,function(s){var o=Gu(n.storeObject,s,i);return o===void 0&&t!==n.storeObject&&mi.call(t,s[0])&&(o=Gu(t,s,Ek)),Mr(o!==void 0,5,s.join("."),t),o});return"".concat(n.typename,":").concat(JSON.stringify(a))})}function Nw(r){var e=_A(r);return e.keyArgsFn||(e.keyArgsFn=function(t,n){var i=n.field,a=n.variables,s=n.fieldName,o=NA(r,function(u){var c=u[0],h=c.charAt(0);if(h==="@"){if(i&&as(i.directives)){var f=c.slice(1),d=i.directives.find(function(A){return A.name.value===f}),g=d&&Rg(d,a);return g&&Gu(g,u.slice(1))}return}if(h==="$"){var v=c.slice(1);if(a&&mi.call(a,v)){var y=u.slice(0);return y[0]=v,Gu(a,y)}return}if(t)return Gu(t,u)}),l=JSON.stringify(o);return(t||l!=="{}")&&(s+=":"+l),s})}function NA(r,e){var t=new xo;return Sk(r).reduce(function(n,i){var a,s=e(i);if(s!==void 0){for(var o=i.length-1;o>=0;--o)s=(a={},a[i[o]]=s,a);n=t.merge(n,s)}return n},Object.create(null))}function Sk(r){var e=_A(r);if(!e.paths){var t=e.paths=[],n=[];r.forEach(function(i,a){ii(i)?(Sk(i).forEach(function(s){return t.push(n.concat(s))}),n.length=0):(n.push(i),ii(r[a+1])||(t.push(n.slice(0)),n.length=0))})}return e.paths}function Ek(r,e){return r[e]}function Gu(r,e,t){return t=t||Ek,kk(e.reduce(function n(i,a){return ii(i)?i.map(function(s){return n(s,a)}):i&&t(i,a)},r))}function kk(r){return fi(r)?ii(r)?r.map(kk):NA(Object.keys(r).sort(),function(e){return Gu(r,e)}):r}function by(r){return r.args!==void 0?r.args:r.field?Rg(r.field,r.variables):null}var K4=function(){},Lw=function(r,e){return e.fieldName},Uw=function(r,e,t){var n=t.mergeObjects;return n(r,e)},Vw=function(r,e){return e},Z4=(function(){function r(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=me({dataIdFromObject:yk},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return r.prototype.identify=function(e,t){var n,i=this,a=t&&(t.typename||((n=t.storeObject)===null||n===void 0?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];var s=t&&t.storeObject||e,o=me(me({},t),{typename:a,storeObject:s,readField:t&&t.readField||function(){var h=LA(arguments,s);return i.readField(h,{store:i.cache.data,variables:h.variables})}}),l,u=a&&this.getTypePolicy(a),c=u&&u.keyFn||this.config.dataIdFromObject;return pk.withValue(!0,function(){for(;c;){var h=c(me(me({},e),s),o);if(ii(h))c=_w(h);else{l=h;break}}}),l=l?String(l):void 0,o.keyObject?[l,o.keyObject]:[l]},r.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var i=e[n],a=i.queryType,s=i.mutationType,o=i.subscriptionType,l=rs(i,["queryType","mutationType","subscriptionType"]);a&&t.setRootTypename("Query",n),s&&t.setRootTypename("Mutation",n),o&&t.setRootTypename("Subscription",n),mi.call(t.toBeAdded,n)?t.toBeAdded[n].push(l):t.toBeAdded[n]=[l]})},r.prototype.updateTypePolicy=function(e,t,n){var i=this.getTypePolicy(e),a=t.keyFields,s=t.fields;function o(l,u){l.merge=typeof u=="function"?u:u===!0?Uw:u===!1?Vw:l.merge}o(i,t.merge),i.keyFn=a===!1?K4:ii(a)?_w(a):typeof a=="function"?a:i.keyFn,s&&Object.keys(s).forEach(function(l){var u=n[l];(!u||u?.typename!==e)&&(u=n[l]={typename:e});var c=s[l];if(typeof c=="function")u.read=c;else{var h=c.keyArgs,f=c.read,d=c.merge;u.keyFn=h===!1?Lw:ii(h)?Nw(h):typeof h=="function"?h:u.keyFn,typeof f=="function"&&(u.read=f),o(u,d)}u.read&&u.merge&&(u.keyFn=u.keyFn||Lw)})},r.prototype.setRootTypename=function(e,t){t===void 0&&(t=e);var n="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[n];t!==i&&(Mr(!i||i===e,6,e),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},r.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(i){t.getSupertypeSet(i,!0).add(n);var a=i.match(wk);(!a||a[0]!==i)&&t.fuzzySubtypes.set(i,new RegExp(i))})})},r.prototype.getTypePolicy=function(e){var t=this;if(!mi.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(s,o){if(s.test(e)){var l=t.supertypeMap.get(o);l&&l.forEach(function(u){return i.add(u)})}})),i&&i.size&&i.forEach(function(s){var o=t.getTypePolicy(s),l=o.fields,u=rs(o,["fields"]);Object.assign(n,u),Object.assign(n.fields,l)})}var a=this.toBeAdded[e];return a&&a.length&&a.splice(0).forEach(function(s){t.updateTypePolicy(e,s,t.typePolicies[e].fields)}),this.typePolicies[e]},r.prototype.getFieldPolicy=function(e,t){if(e)return this.getTypePolicy(e).fields[t]},r.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},r.prototype.fragmentMatches=function(e,t,n,i){var a=this;if(!e.typeCondition)return!0;if(!t)return!1;var s=e.typeCondition.name.value;if(t===s)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(s))for(var o=this.getSupertypeSet(t,!0),l=[o],u=function(d){var g=a.getSupertypeSet(d,!1);g&&g.size&&l.indexOf(g)<0&&l.push(g)},c=!!(n&&this.fuzzySubtypes.size),h=0;h<l.length;++h){var f=l[h];if(f.has(s))return o.has(s)||o.add(s),!0;f.forEach(u),c&&h===l.length-1&&Ay(e.selectionSet,n,i)&&(c=!1,this.fuzzySubtypes.forEach(function(d,g){var v=t.match(d);v&&v[0]===t&&u(g)}))}return!1},r.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t);return!!(n&&n.keyFn)},r.prototype.getStoreFieldName=function(e){var t=e.typename,n=e.fieldName,i=this.getFieldPolicy(t,n),a,s=i&&i.keyFn;if(s&&t)for(var o={typename:t,fieldName:n,field:e.field||null,variables:e.variables},l=by(e);s;){var u=s(l,o);if(ii(u))s=Nw(u);else{a=u||n;break}}return a===void 0&&(a=e.field?AR(e.field,e.variables):L2(n,by(e))),a===!1?n:n===tc(a)?a:n+":"+a},r.prototype.readField=function(e,t){var n=e.from;if(n){var i=e.field||e.fieldName;if(i){if(e.typename===void 0){var a=t.store.getFieldValue(n,"__typename");a&&(e.typename=a)}var s=this.getStoreFieldName(e),o=tc(s),l=t.store.getFieldValue(n,s),u=this.getFieldPolicy(e.typename,o),c=u&&u.read;if(c){var h=zw(this,n,e,t,t.store.getStorage(kn(n)?n.__ref:n,s));return MA.withValue(this.cache,c,[l,h])}return l}}},r.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t);return n&&n.read},r.prototype.getMergeFunction=function(e,t,n){var i=this.getFieldPolicy(e,t),a=i&&i.merge;return!a&&n&&(i=this.getTypePolicy(n),a=i&&i.merge),a},r.prototype.runMergeFunction=function(e,t,n,i,a){var s=n.field,o=n.typename,l=n.merge;return l===Uw?Fk(i.store)(e,t):l===Vw?t:(i.overwrite&&(e=void 0),l(e,t,zw(this,void 0,{typename:o,fieldName:s.name.value,field:s,variables:i.variables},i,a||Object.create(null))))},r})();function zw(r,e,t,n,i){var a=r.getStoreFieldName(t),s=tc(a),o=t.variables||n.variables,l=n.store,u=l.toReference,c=l.canRead;return{args:by(t),field:t.field||null,fieldName:s,storeFieldName:a,variables:o,isReference:kn,toReference:u,storage:i,cache:r.cache,canRead:c,readField:function(){return r.readField(LA(arguments,e,o),n)},mergeObjects:Fk(n.store)}}function LA(r,e,t){var n=r[0],i=r[1],a=r.length,s;return typeof n=="string"?s={fieldName:n,from:a>1?i:e}:(s=me({},n),mi.call(s,"from")||(s.from=e)),s.variables===void 0&&(s.variables=t),s}function Fk(r){return function(t,n){if(ii(t)||ii(n))throw qi(9);if(fi(t)&&fi(n)){var i=r.getFieldValue(t,"__typename"),a=r.getFieldValue(n,"__typename"),s=i&&a&&i!==a;if(s)return n;if(kn(t)&&Mu(n))return r.merge(t.__ref,n),t;if(Mu(t)&&kn(n))return r.merge(t,n.__ref),n;if(Mu(t)&&Mu(n))return me(me({},t),n)}return n}}function h0(r,e,t){var n="".concat(e).concat(t),i=r.flavors.get(n);return i||r.flavors.set(n,i=r.clientOnly===e&&r.deferred===t?r:me(me({},r),{clientOnly:e,deferred:t})),i}var eO=(function(){function r(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return r.prototype.writeToStore=function(e,t){var n=this,i=t.query,a=t.result,s=t.dataId,o=t.variables,l=t.overwrite,u=vc(i),c=j4();o=me(me({},kA(u)),o);var h=me(me({store:e,written:Object.create(null),merge:function(d,g){return c.merge(d,g)},variables:o,varString:mo(o)},Ck(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),f=this.processSelectionSet({result:a||Object.create(null),dataId:s,selectionSet:u.selectionSet,mergeTree:{map:new Map},context:h});if(!kn(f))throw qi(12,a);return h.incomingById.forEach(function(d,g){var v=d.storeObject,y=d.mergeTree;d.fieldNodeSet;var A=Hu(g);if(y&&y.map.size){var C=n.applyMerges(y,A,v,h);if(kn(C))return;v=C}e.merge(g,v)}),e.retain(f.__ref),f},r.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,i=e.result,a=e.selectionSet,s=e.context,o=e.mergeTree,l=this.cache.policies,u=Object.create(null),c=n&&l.rootTypenamesById[n]||uy(i,a,s.fragmentMap)||n&&s.store.get(n,"__typename");typeof c=="string"&&(u.__typename=c);var h=function(){var k=LA(arguments,u,s.variables);if(kn(k.from)){var T=s.incomingById.get(k.from.__ref);if(T){var S=l.readField(me(me({},k),{from:T.storeObject}),s);if(S!==void 0)return S}}return l.readField(k,s)},f=new Set;this.flattenFields(a,i,s,c).forEach(function(k,T){var S,R=bo(T),B=i[R];if(f.add(T),B!==void 0){var G=l.getStoreFieldName({typename:c,fieldName:T.name.value,field:T,variables:k.variables}),$=Hw(o,G),Y=t.processFieldValue(B,T,T.selectionSet?h0(k,!1,!1):k,$),X=void 0;T.selectionSet&&(kn(Y)||Mu(Y))&&(X=h("__typename",Y));var J=l.getMergeFunction(c,T.name.value,X);J?$.info={field:T,typename:c,merge:J}:jw(o,G),u=k.merge(u,(S={},S[G]=Y,S))}});try{var d=l.identify(i,{typename:c,selectionSet:a,fragmentMap:s.fragmentMap,storeObject:u,readField:h}),g=d[0],v=d[1];n=n||g,v&&(u=s.merge(u,v))}catch(k){if(!n)throw k}if(typeof n=="string"){var y=Hu(n),A=s.written[n]||(s.written[n]=[]);if(A.indexOf(a)>=0||(A.push(a),this.reader&&this.reader.isFresh(i,y,a,s)))return y;var C=s.incomingById.get(n);return C?(C.storeObject=s.merge(C.storeObject,u),C.mergeTree=wy(C.mergeTree,o),f.forEach(function(k){return C.fieldNodeSet.add(k)})):s.incomingById.set(n,{storeObject:u,mergeTree:sg(o)?void 0:o,fieldNodeSet:f}),y}return u},r.prototype.processFieldValue=function(e,t,n,i){var a=this;return!t.selectionSet||e===null?e:ii(e)?e.map(function(s,o){var l=a.processFieldValue(s,t,n,Hw(i,o));return jw(i,o),l}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:i})},r.prototype.flattenFields=function(e,t,n,i){i===void 0&&(i=uy(t,e,n.fragmentMap));var a=new Map,s=this.cache.policies,o=new Vs(!1);return(function l(u,c){var h=o.lookup(u,c.clientOnly,c.deferred);h.visited||(h.visited=!0,u.selections.forEach(function(f){if(Ud(f,n.variables)){var d=c.clientOnly,g=c.deferred;if(!(d&&g)&&as(f.directives)&&f.directives.forEach(function(A){var C=A.name.value;if(C==="client"&&(d=!0),C==="defer"){var k=Rg(A,n.variables);(!k||k.if!==!1)&&(g=!0)}}),wo(f)){var v=a.get(f);v&&(d=d&&v.clientOnly,g=g&&v.deferred),a.set(f,h0(n,d,g))}else{var y=Pg(f,n.lookupFragment);if(!y&&f.kind===et.FRAGMENT_SPREAD)throw qi(14,f.name.value);y&&s.fragmentMatches(y,i,t,n.variables)&&l(y.selectionSet,h0(n,d,g))}}}))})(e,n),a},r.prototype.applyMerges=function(e,t,n,i,a){var s,o=this;if(e.map.size&&!kn(n)){var l=!ii(n)&&(kn(t)||Mu(t))?t:void 0,u=n;l&&!a&&(a=[kn(l)?l.__ref:l]);var c,h=function(f,d){return ii(f)?typeof d=="number"?f[d]:void 0:i.store.getFieldValue(f,String(d))};e.map.forEach(function(f,d){var g=h(l,d),v=h(u,d);if(v!==void 0){a&&a.push(d);var y=o.applyMerges(f,g,v,i,a);y!==v&&(c=c||new Map,c.set(d,y)),a&&Mr(a.pop()===d)}}),c&&(n=ii(u)?u.slice(0):me({},u),c.forEach(function(f,d){n[d]=f}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,a&&(s=i.store).getStorage.apply(s,a)):n},r})(),Tk=[];function Hw(r,e){var t=r.map;return t.has(e)||t.set(e,Tk.pop()||{map:new Map}),t.get(e)}function wy(r,e){if(r===e||!e||sg(e))return r;if(!r||sg(r))return e;var t=r.info&&e.info?me(me({},r.info),e.info):r.info||e.info,n=r.map.size&&e.map.size,i=n?new Map:r.map.size?r.map:e.map,a={info:t,map:i};if(n){var s=new Set(e.map.keys());r.map.forEach(function(o,l){a.map.set(l,wy(o,e.map.get(l))),s.delete(l)}),s.forEach(function(o){a.map.set(o,wy(e.map.get(o),r.map.get(o)))})}return a}function sg(r){return!r||!(r.info||r.map.size)}function jw(r,e){var t=r.map,n=t.get(e);n&&sg(n)&&(Tk.push(n),t.delete(e))}var tO=(function(r){Na(e,r);function e(t){t===void 0&&(t={});var n=r.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new X2(Z2),n.assumeImmutableResults=!0,n.makeVar=X4,n.txCount=0,n.config=H4(t),n.addTypename=!!n.config.addTypename,n.policies=new Z4({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return e.prototype.init=function(){var t=this.data=new vd.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=t.stump,this.resetResultCache()},e.prototype.resetResultCache=function(t){var n=this,i=this.storeReader,a=this.config.fragments;this.addTypenameTransform.resetCache(),a?.resetCaches(),this.storeWriter=new eO(this,this.storeReader=new W4({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:bk(this.config),canon:t?void 0:i&&i.canon,fragments:a}),a),this.maybeBroadcastWatch=Ku(function(s,o){return n.broadcastWatch(s,o)},{max:this.config.resultCacheMaxSize||Us["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(s){var o=s.optimistic?n.optimisticData:n.data;if(Zf(o)){var l=s.optimistic,u=s.id,c=s.variables;return o.makeCacheKey(s.query,s.callback,mo({optimistic:l,id:u,variables:c}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(s){return s.resetCaching()})},e.prototype.restore=function(t){return this.init(),t&&this.data.replace(t),this},e.prototype.extract=function(t){return t===void 0&&(t=!1),(t?this.optimisticData:this.data).extract()},e.prototype.read=function(t){var n=t.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(me(me({},t),{store:t.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(a){if(a instanceof vk)return null;throw a}},e.prototype.write=function(t){try{return++this.txCount,this.storeWriter.writeToStore(this.data,t)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.modify=function(t){if(mi.call(t,"id")&&!t.id)return!1;var n=t.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(t.id||"ROOT_QUERY",t.fields)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.diff=function(t){return this.storeReader.diffQueryAgainstStore(me(me({},t),{store:t.optimistic?this.optimisticData:this.data,rootId:t.id||"ROOT_QUERY",config:this.config}))},e.prototype.watch=function(t){var n=this;return this.watches.size||Y4(this),this.watches.add(t),t.immediate&&this.maybeBroadcastWatch(t),function(){n.watches.delete(t)&&!n.watches.size&&Bw(n),n.maybeBroadcastWatch.forget(t)}},e.prototype.gc=function(t){mo.reset(),bl.reset();var n=this.optimisticData.gc();return t&&!this.txCount&&(t.resetResultCache?this.resetResultCache(t.resetResultIdentities):t.resetResultIdentities&&this.storeReader.resetCanon()),n},e.prototype.retain=function(t,n){return(n?this.optimisticData:this.data).retain(t)},e.prototype.release=function(t,n){return(n?this.optimisticData:this.data).release(t)},e.prototype.identify=function(t){if(kn(t))return t.__ref;try{return this.policies.identify(t)[0]}catch{}},e.prototype.evict=function(t){if(!t.id){if(mi.call(t,"id"))return!1;t=me(me({},t),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(t,this.data)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.reset=function(t){var n=this;return this.init(),mo.reset(),t&&t.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),Bw(this)):this.broadcastWatches(),Promise.resolve()},e.prototype.removeOptimistic=function(t){var n=this.optimisticData.removeLayer(t);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},e.prototype.batch=function(t){var n=this,i=t.update,a=t.optimistic,s=a===void 0?!0:a,o=t.removeOptimistic,l=t.onWatchUpdated,u,c=function(f){var d=n,g=d.data,v=d.optimisticData;++n.txCount,f&&(n.data=n.optimisticData=f);try{return u=i(n)}finally{--n.txCount,n.data=g,n.optimisticData=v}},h=new Set;return l&&!this.txCount&&this.broadcastWatches(me(me({},t),{onWatchUpdated:function(f){return h.add(f),!1}})),typeof s=="string"?this.optimisticData=this.optimisticData.addLayer(s,c):s===!1?c(this.data):c(),typeof o=="string"&&(this.optimisticData=this.optimisticData.removeLayer(o)),l&&h.size?(this.broadcastWatches(me(me({},t),{onWatchUpdated:function(f,d){var g=l.call(this,f,d);return g!==!1&&h.delete(f),g}})),h.size&&h.forEach(function(f){return n.maybeBroadcastWatch.dirty(f)})):this.broadcastWatches(t),u},e.prototype.performTransaction=function(t,n){return this.batch({update:t,optimistic:n||n!==null})},e.prototype.transformDocument=function(t){return this.addTypenameToDocument(this.addFragmentsToDocument(t))},e.prototype.fragmentMatches=function(t,n){return this.policies.fragmentMatches(t,n)},e.prototype.lookupFragment=function(t){var n;return((n=this.config.fragments)===null||n===void 0?void 0:n.lookup(t))||null},e.prototype.broadcastWatches=function(t){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,t)})},e.prototype.addFragmentsToDocument=function(t){var n=this.config.fragments;return n?n.transform(t):t},e.prototype.addTypenameToDocument=function(t){return this.addTypename?this.addTypenameTransform.transformDocument(t):t},e.prototype.broadcastWatch=function(t,n){var i=this,a=t.lastDiff,s=Pi("canonizeResults",function(){return i.diff(t)});n&&(t.optimistic&&typeof n.optimistic=="string"&&(s.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,t,s,a)===!1)||(!a||!Dn(a.result,s.result))&&t.callback(t.lastDiff=s,a)},e})(z4),Jr;(function(r){r[r.loading=1]="loading",r[r.setVariables=2]="setVariables",r[r.fetchMore=3]="fetchMore",r[r.refetch=4]="refetch",r[r.poll=6]="poll",r[r.ready=7]="ready",r[r.error=8]="error"})(Jr||(Jr={}));function _u(r){return r?r<7:!1}var Gw=Object.assign,$p=(function(r){Na(e,r);function e(t){var n=t.queryManager,i=t.queryInfo,a=t.options,s=this,o=e.inactiveOnCreation.getValue();s=r.call(this,function(A){s._getOrCreateQuery();try{var C=A._subscription._observer;C&&!C.error&&(C.error=rO)}catch{}var k=!s.observers.size;s.observers.add(A);var T=s.last;return T&&T.error?A.error&&A.error(T.error):T&&T.result&&A.next&&A.next(s.maskResult(T.result)),k&&s.reobserve().catch(function(){}),function(){s.observers.delete(A)&&!s.observers.size&&s.tearDownQuery()}})||this,s.observers=new Set,s.subscriptions=new Set,s.dirty=!1,s._getOrCreateQuery=function(){return o&&(n.queries.set(s.queryId,i),o=!1),s.queryManager.getOrCreateQuery(s.queryId)},s.queryInfo=i,s.queryManager=n,s.waitForOwnResult=p0(a.fetchPolicy),s.isTornDown=!1,s.subscribeToMore=s.subscribeToMore.bind(s),s.maskResult=s.maskResult.bind(s);var l=n.defaultOptions.watchQuery,u=l===void 0?{}:l,c=u.fetchPolicy,h=c===void 0?"cache-first":c,f=a.fetchPolicy,d=f===void 0?h:f,g=a.initialFetchPolicy,v=g===void 0?d==="standby"?h:d:g;s.options=me(me({},a),{initialFetchPolicy:v,fetchPolicy:d}),s.queryId=i.queryId||n.generateQueryId();var y=vc(s.query);return s.queryName=y&&y.name&&y.name.value,s}return Object.defineProperty(e.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),e.prototype.result=function(){var t=this;return new Promise(function(n,i){var a={next:function(o){n(o),t.observers.delete(a),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout(function(){s.unsubscribe()},0)},error:i},s=t.subscribe(a)})},e.prototype.resetDiff=function(){this.queryInfo.resetDiff()},e.prototype.getCurrentFullResult=function(t){var n=this;t===void 0&&(t=!0);var i=Pi("getLastResult",function(){return n.getLastResult(!0)}),a=this.queryInfo.networkStatus||i&&i.networkStatus||Jr.ready,s=me(me({},i),{loading:_u(a),networkStatus:a}),o=this.options.fetchPolicy,l=o===void 0?"cache-first":o;if(!(p0(l)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var u=this.queryInfo.getDiff();(u.complete||this.options.returnPartialData)&&(s.data=u.result),Dn(s.data,{})&&(s.data=void 0),u.complete?(delete s.partial,u.complete&&s.networkStatus===Jr.loading&&(l==="cache-first"||l==="cache-only")&&(s.networkStatus=Jr.ready,s.loading=!1)):s.partial=!0,s.networkStatus===Jr.ready&&(s.error||s.errors)&&(s.networkStatus=Jr.error)}return t&&this.updateLastResult(s),s},e.prototype.getCurrentResult=function(t){return t===void 0&&(t=!0),this.maskResult(this.getCurrentFullResult(t))},e.prototype.isDifferentFromLastResult=function(t,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query),a=this.queryManager.dataMasking,s=a?i.nonReactiveQuery:this.query,o=a||i.hasNonreactiveDirective?!fk(s,this.last.result,t,this.variables):!Dn(this.last.result,t);return o||n&&!Dn(this.last.variables,n)},e.prototype.getLast=function(t,n){var i=this.last;if(i&&i[t]&&(!n||Dn(i.variables,this.variables)))return i[t]},e.prototype.getLastResult=function(t){return this.getLast("result",t)},e.prototype.getLastError=function(t){return this.getLast("error",t)},e.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},e.prototype.refetch=function(t){var n={pollInterval:0},i=this.options.fetchPolicy;return i==="no-cache"?n.fetchPolicy="no-cache":n.fetchPolicy="network-only",t&&!Dn(this.options.variables,t)&&(n.variables=this.options.variables=me(me({},this.options.variables),t)),this.queryInfo.resetLastWrite(),this.reobserve(n,Jr.refetch)},e.prototype.fetchMore=function(t){var n=this,i=me(me({},t.query?t:me(me(me(me({},this.options),{query:this.options.query}),t),{variables:me(me({},this.options.variables),t.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var a=this.queryManager.generateQueryId();this.lastQuery=t.query?this.transformDocument(this.options.query):i.query;var s=this.queryInfo,o=s.networkStatus;s.networkStatus=Jr.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var l=new Set,u=t?.updateQuery,c=this.options.fetchPolicy!=="no-cache";return c||Mr(u,29),this.queryManager.fetchQuery(a,i,Jr.fetchMore).then(function(h){if(n.queryManager.removeQuery(a),s.networkStatus===Jr.fetchMore&&(s.networkStatus=o),c)n.queryManager.cache.batch({update:function(g){var v=t.updateQuery;v?g.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(y){return v(y,{fetchMoreResult:h.data,variables:i.variables})}):g.writeQuery({query:i.query,variables:i.variables,data:h.data})},onWatchUpdated:function(g){l.add(g.query)}});else{var f=n.getLast("result"),d=u(f.data,{fetchMoreResult:h.data,variables:i.variables});n.reportResult(me(me({},f),{networkStatus:o,loading:_u(o),data:d}),n.variables)}return n.maskResult(h)}).finally(function(){c&&!l.has(n.query)&&n.reobserveCacheFirst()})},e.prototype.subscribeToMore=function(t){var n=this,i=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables,context:t.context}).subscribe({next:function(a){var s=t.updateQuery;s&&n.updateQuery(function(o,l){return s(o,me({subscriptionData:a},l))})},error:function(a){if(t.onError){t.onError(a);return}}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},e.prototype.setOptions=function(t){return this.reobserve(t)},e.prototype.silentSetOptions=function(t){var n=ec(this.options,t||{});Gw(this.options,n)},e.prototype.setVariables=function(t){var n=this;return Dn(this.variables,t)?this.observers.size?Pi("observableQuery.result",function(){return n.result()}):Promise.resolve():(this.options.variables=t,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:t},Jr.setVariables):Promise.resolve())},e.prototype.updateQuery=function(t){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}),a=i.result,s=i.complete,o=t(a,{variables:this.variables,complete:!!s,previousData:a});o&&(n.cache.writeQuery({query:this.options.query,data:o,variables:this.variables}),n.broadcastQueries())},e.prototype.startPolling=function(t){this.options.pollInterval=t,this.updatePolling()},e.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},e.prototype.applyNextFetchPolicy=function(t,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,a=i===void 0?"cache-first":i,s=n.initialFetchPolicy,o=s===void 0?a:s;a==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(a,{reason:t,options:n,observable:this,initialFetchPolicy:o}):t==="variables-changed"?n.fetchPolicy=o:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},e.prototype.fetch=function(t,n,i){var a=this._getOrCreateQuery();return a.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(a,t,n,i)},e.prototype.updatePolling=function(){var t=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,a=n.options.pollInterval;if(!a||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===a)){Mr(a,32);var s=i||(this.pollingInfo={});s.interval=a;var o=function(){var u,c;t.pollingInfo&&(!_u(t.queryInfo.networkStatus)&&!(!((c=(u=t.options).skipPollAttempt)===null||c===void 0)&&c.call(u))?t.reobserve({fetchPolicy:t.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},Jr.poll).then(l,l):l())},l=function(){var u=t.pollingInfo;u&&(clearTimeout(u.timeout),u.timeout=setTimeout(o,u.interval))};l()}}},e.prototype.updateLastResult=function(t,n){var i=this;n===void 0&&(n=this.variables);var a=Pi("getLastError",function(){return i.getLastError()});return a&&this.last&&!Dn(n,this.last.variables)&&(a=void 0),this.last=me({result:this.queryManager.assumeImmutableResults?t:KR(t),variables:n},a?{error:a}:null)},e.prototype.reobserveAsConcast=function(t,n){var i=this;this.isTornDown=!1;var a=n===Jr.refetch||n===Jr.fetchMore||n===Jr.poll,s=this.options.variables,o=this.options.fetchPolicy,l=ec(this.options,t||{}),u=a?l:Gw(this.options,l),c=this.transformDocument(u.query);this.lastQuery=c,a||(this.updatePolling(),t&&t.variables&&!Dn(t.variables,s)&&u.fetchPolicy!=="standby"&&(u.fetchPolicy===o||typeof u.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",u),n===void 0&&(n=Jr.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=p0(u.fetchPolicy));var h=function(){i.concast===g&&(i.waitForOwnResult=!1)},f=u.variables&&me({},u.variables),d=this.fetch(u,n,c),g=d.concast,v=d.fromLink,y={next:function(A){Dn(i.variables,f)&&(h(),i.reportResult(A,f))},error:function(A){Dn(i.variables,f)&&(lk(A)||(A=new pl({networkError:A})),h(),i.reportError(A,f))}};return!a&&(v||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=g,this.observer=y),g.addObserver(y),g},e.prototype.reobserve=function(t,n){return XR(this.reobserveAsConcast(t,n).promise.then(this.maskResult))},e.prototype.resubscribeAfterError=function(){for(var t=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=this.last;Pi("resetLastResults",function(){return t.resetLastResults()});var s=this.subscribe.apply(this,n);return this.last=a,s},e.prototype.observe=function(){this.reportResult(this.getCurrentFullResult(!1),this.variables)},e.prototype.reportResult=function(t,n){var i=this,a=Pi("getLastError",function(){return i.getLastError()}),s=this.isDifferentFromLastResult(t,n);(a||!t.partial||this.options.returnPartialData)&&this.updateLastResult(t,n),(a||s)&&Kf(this.observers,"next",this.maskResult(t))},e.prototype.reportError=function(t,n){var i=this,a=me(me({},Pi("getLastResult",function(){return i.getLastResult()})),{error:t,errors:t.graphQLErrors,networkStatus:Jr.error,loading:!1});this.updateLastResult(a,n),Kf(this.observers,"error",this.last.error=t)},e.prototype.hasObservers=function(){return this.observers.size>0},e.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},e.prototype.transformDocument=function(t){return this.queryManager.transform(t)},e.prototype.maskResult=function(t){return t&&"data"in t?me(me({},t),{data:this.queryManager.maskOperation({document:this.query,data:t.data,fetchPolicy:this.options.fetchPolicy,id:this.queryId})}):t},e.prototype.resetNotifications=function(){this.cancelNotifyTimeout(),this.dirty=!1},e.prototype.cancelNotifyTimeout=function(){this.notifyTimeout&&(clearTimeout(this.notifyTimeout),this.notifyTimeout=void 0)},e.prototype.scheduleNotify=function(){var t=this;this.dirty||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0)))},e.prototype.notify=function(){if(this.cancelNotifyTimeout(),this.dirty&&(this.options.fetchPolicy=="cache-only"||this.options.fetchPolicy=="cache-and-network"||!_u(this.queryInfo.networkStatus))){var t=this.queryInfo.getDiff();t.fromOptimisticTransaction?this.observe():this.reobserveCacheFirst()}this.dirty=!1},e.prototype.reobserveCacheFirst=function(){var t=this.options,n=t.fetchPolicy,i=t.nextFetchPolicy;return n==="cache-and-network"||n==="network-only"?this.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(a,s){return this.nextFetchPolicy=i,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(a,s):n}}):this.reobserve()},e.inactiveOnCreation=new Ac,e})(un);ik($p);function rO(r){}function p0(r){return r==="network-only"||r==="no-cache"||r==="standby"}var Nu=new(Dl?WeakMap:Map);function g0(r,e){var t=r[e];typeof t=="function"&&(r[e]=function(){return Nu.set(r,(Nu.get(r)+1)%1e15),t.apply(this,arguments)})}var m0=(function(){function r(e,t){t===void 0&&(t=e.generateQueryId()),this.queryId=t,this.document=null,this.lastRequestId=1,this.stopped=!1,this.observableQuery=null;var n=this.cache=e.cache;Nu.has(n)||(Nu.set(n,0),g0(n,"evict"),g0(n,"modify"),g0(n,"reset"))}return r.prototype.init=function(e){var t=e.networkStatus||Jr.loading;return this.variables&&this.networkStatus!==Jr.loading&&!Dn(this.variables,e.variables)&&(t=Jr.setVariables),Dn(e.variables,this.variables)||(this.lastDiff=void 0,this.cancel()),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},r.prototype.resetDiff=function(){this.lastDiff=void 0},r.prototype.getDiff=function(){var e=this,t=this.getDiffOptions();if(this.lastDiff&&Dn(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var n=this.observableQuery;if(n&&n.options.fetchPolicy==="no-cache")return{complete:!1};var i=Pi("canonizeResults",function(){return e.cache.diff(t)});return this.updateLastDiff(i,t),i},r.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},r.prototype.getDiffOptions=function(e){var t;return e===void 0&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:(t=this.observableQuery)===null||t===void 0?void 0:t.options.canonizeResults}},r.prototype.setDiff=function(e){var t=this,n,i=this.lastDiff&&this.lastDiff.diff;e&&!e.complete&&Pi("getLastError",function(){var a;return(a=t.observableQuery)===null||a===void 0?void 0:a.getLastError()})||(this.updateLastDiff(e),Dn(i&&i.result,e&&e.result)||(n=this.observableQuery)===null||n===void 0||n.scheduleNotify())},r.prototype.setObservableQuery=function(e){e!==this.observableQuery&&(this.observableQuery=e,e&&(e.queryInfo=this))},r.prototype.stop=function(){var e;if(!this.stopped){this.stopped=!0,(e=this.observableQuery)===null||e===void 0||e.resetNotifications(),this.cancel();var t=this.observableQuery;t&&t.stopPolling()}},r.prototype.cancel=function(){var e;(e=this.cancelWatch)===null||e===void 0||e.call(this),this.cancelWatch=void 0},r.prototype.updateWatch=function(e){var t=this;e===void 0&&(e=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=me(me({},this.getDiffOptions(e)),{watcher:this,callback:function(a){return t.setDiff(a)}});(!this.lastWatch||!Dn(i,this.lastWatch))&&(this.cancel(),this.cancelWatch=this.cache.watch(this.lastWatch=i))}},r.prototype.resetLastWrite=function(){this.lastWrite=void 0},r.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Nu.get(this.cache)&&Dn(t,n.variables)&&Dn(e.data,n.result.data))},r.prototype.markResult=function(e,t,n,i){var a=this,s,o=new xo,l=as(e.errors)?e.errors.slice(0):[];if((s=this.observableQuery)===null||s===void 0||s.resetNotifications(),"incremental"in e&&as(e.incremental)){var u=ak(this.getDiff().result,e);e.data=u}else if("hasNext"in e&&e.hasNext){var c=this.getDiff();e.data=o.merge(c.result,e.data)}this.graphQLErrors=l,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(Cy(e,n.errorPolicy)?this.cache.performTransaction(function(h){if(a.shouldWrite(e,n.variables))h.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:i===1}),a.lastWrite={result:e,variables:n.variables,dmCount:Nu.get(a.cache)};else if(a.lastDiff&&a.lastDiff.diff.complete){e.data=a.lastDiff.diff.result;return}var f=a.getDiffOptions(n.variables),d=Pi("canonizeResults",function(){return h.diff(f)});!a.stopped&&Dn(a.variables,n.variables)&&a.updateWatch(n.variables),a.updateLastDiff(d,f),d.complete&&(e.data=d.result)}):this.lastWrite=void 0)},r.prototype.markReady=function(){return this.networkError=null,this.networkStatus=Jr.ready},r.prototype.markError=function(e){var t;return this.networkStatus=Jr.error,this.lastWrite=void 0,(t=this.observableQuery)===null||t===void 0||t.resetNotifications(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},r})();function Cy(r,e){e===void 0&&(e="none");var t=e==="ignore"||e==="all",n=!Hp(r);return!n&&t&&r.data&&(n=!0),n}var nO=Object.prototype.hasOwnProperty,$w=Object.create(null),iO=(function(){function r(e){var t=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new N2(Us["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Vs(!1),this.noCacheWarningsByQueryId=new Set;var n=new X2(function(a){return t.cache.transformDocument(a)},{cache:!1});this.cache=e.cache,this.link=e.link,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientAwareness=e.clientAwareness,this.localState=e.localState,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults,this.dataMasking=e.dataMasking;var i=e.documentTransform;this.documentTransform=i?n.concat(i).concat(n):n,this.defaultContext=e.defaultContext||Object.create(null),(this.onBroadcast=e.onBroadcast)&&(this.mutationStore=Object.create(null))}return r.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(qi(35))},r.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},r.prototype.mutate=function(e){return Rs(this,arguments,void 0,function(t){var n,i,a,s,o,l,u,c=t.mutation,h=t.variables,f=t.optimisticResponse,d=t.updateQueries,g=t.refetchQueries,v=g===void 0?[]:g,y=t.awaitRefetchQueries,A=y===void 0?!1:y,C=t.update,k=t.onQueryUpdated,T=t.fetchPolicy,S=T===void 0?((l=this.defaultOptions.mutate)===null||l===void 0?void 0:l.fetchPolicy)||"network-only":T,R=t.errorPolicy,B=R===void 0?((u=this.defaultOptions.mutate)===null||u===void 0?void 0:u.errorPolicy)||"none":R,G=t.keepRootFields,$=t.context;return Os(this,function(Y){switch(Y.label){case 0:return Mr(c,36),Mr(S==="network-only"||S==="no-cache",37),n=this.generateMutationId(),c=this.cache.transformForLink(this.transform(c)),i=this.getDocumentInfo(c).hasClientExports,h=this.getVariables(c,h),i?[4,this.localState.addExportedVariables(c,h,$)]:[3,2];case 1:h=Y.sent(),Y.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[n]={mutation:c,variables:h,loading:!0,error:null}),s=f&&this.markMutationOptimistic(f,{mutationId:n,document:c,variables:h,fetchPolicy:S,errorPolicy:B,context:$,updateQueries:d,update:C,keepRootFields:G}),this.broadcastQueries(),o=this,[2,new Promise(function(X,J){return o0(o.getObservableFromLink(c,me(me({},$),{optimisticResponse:s?f:void 0}),h,{},!1),function(Q){if(Hp(Q)&&B==="none")throw new pl({graphQLErrors:hy(Q)});a&&(a.loading=!1,a.error=null);var oe=me({},Q);return typeof v=="function"&&(v=v(oe)),B==="ignore"&&Hp(oe)&&delete oe.errors,o.markMutationResult({mutationId:n,result:oe,document:c,variables:h,fetchPolicy:S,errorPolicy:B,context:$,update:C,updateQueries:d,awaitRefetchQueries:A,refetchQueries:v,removeOptimistic:s?n:void 0,onQueryUpdated:k,keepRootFields:G})}).subscribe({next:function(Q){o.broadcastQueries(),(!("hasNext"in Q)||Q.hasNext===!1)&&X(me(me({},Q),{data:o.maskOperation({document:c,data:Q.data,fetchPolicy:S,id:n})}))},error:function(Q){a&&(a.loading=!1,a.error=Q),s&&o.cache.removeOptimistic(n),o.broadcastQueries(),J(Q instanceof pl?Q:new pl({networkError:Q}))}})})]}})})},r.prototype.markMutationResult=function(e,t){var n=this;t===void 0&&(t=this.cache);var i=e.result,a=[],s=e.fetchPolicy==="no-cache";if(!s&&Cy(i,e.errorPolicy)){if(ju(i)||a.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),ju(i)&&as(i.incremental)){var o=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),l=void 0;o.result&&(l=ak(o.result,i)),typeof l<"u"&&(i.data=l,a.push({result:l,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var u=e.updateQueries;u&&this.queries.forEach(function(h,f){var d=h.observableQuery,g=d&&d.queryName;if(!(!g||!nO.call(u,g))){var v=u[g],y=n.queries.get(f),A=y.document,C=y.variables,k=t.diff({query:A,variables:C,returnPartialData:!0,optimistic:!1}),T=k.result,S=k.complete;if(S&&T){var R=v(T,{mutationResult:i,queryName:A&&Vp(A)||void 0,queryVariables:C});R&&a.push({result:R,dataId:"ROOT_QUERY",query:A,variables:C})}}})}if(a.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var c=[];if(this.refetchQueries({updateCache:function(h){s||a.forEach(function(v){return h.write(v)});var f=e.update,d=!e4(i)||ju(i)&&!i.hasNext;if(f){if(!s){var g=h.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});g.complete&&(i=me(me({},i),{data:g.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}d&&f(h,i,{context:e.context,variables:e.variables})}!s&&!e.keepRootFields&&d&&h.modify({id:"ROOT_MUTATION",fields:function(v,y){var A=y.fieldName,C=y.DELETE;return A==="__typename"?v:C}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(h){return c.push(h)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(c).then(function(){return i})}return Promise.resolve(i)},r.prototype.markMutationOptimistic=function(e,t){var n=this,i=typeof e=="function"?e(t.variables,{IGNORE:$w}):e;return i===$w?!1:(this.cache.recordOptimisticTransaction(function(a){try{n.markMutationResult(me(me({},t),{result:{data:i}}),a)}catch{}},t.mutationId),!0)},r.prototype.fetchQuery=function(e,t,n){return this.fetchConcastWithInfo(this.getOrCreateQuery(e),t,n).concast.promise},r.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},r.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},r.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},r.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var n={hasClientExports:jP(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:pd(["nonreactive"],e),nonReactiveQuery:UR(e),clientQuery:this.localState.clientQuery(e),serverQuery:K2([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"},{name:"unmask"}],e),defaultVars:kA(vc(e)),asQuery:me(me({},e),{definitions:e.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?me(me({},i),{operation:"query"}):i})})};t.set(e,n)}return t.get(e)},r.prototype.getVariables=function(e,t){return me(me({},this.getDocumentInfo(e).defaultVars),t)},r.prototype.watchQuery=function(e){var t=this.transform(e.query);e=me(me({},e),{variables:this.getVariables(t,e.variables)}),typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!1);var n=new m0(this),i=new $p({queryManager:this,queryInfo:n,options:e});return i.lastQuery=t,$p.inactiveOnCreation.getValue()||this.queries.set(i.queryId,n),n.init({document:t,observableQuery:i,variables:i.variables}),i},r.prototype.query=function(e,t){var n=this;t===void 0&&(t=this.generateQueryId()),Mr(e.query,38),Mr(e.query.kind==="Document",39),Mr(!e.returnPartialData,40),Mr(!e.pollInterval,41);var i=this.transform(e.query);return this.fetchQuery(t,me(me({},e),{query:i})).then(function(a){return a&&me(me({},a),{data:n.maskOperation({document:i,data:a.data,fetchPolicy:e.fetchPolicy,id:t})})}).finally(function(){return n.stopQuery(t)})},r.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},r.prototype.generateRequestId=function(){return this.requestIdCounter++},r.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},r.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},r.prototype.clearStore=function(e){return e===void 0&&(e={discardWatches:!0}),this.cancelPendingFetches(qi(42)),this.queries.forEach(function(t){t.observableQuery?t.networkStatus=Jr.loading:t.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},r.prototype.getObservableQueries=function(e){var t=this;e===void 0&&(e="active");var n=new Map,i=new Map,a=new Map,s=new Set;return Array.isArray(e)&&e.forEach(function(o){if(typeof o=="string")i.set(o,o),a.set(o,!1);else if(uR(o)){var l=bl(t.transform(o));i.set(l,Vp(o)),a.set(l,!1)}else fi(o)&&o.query&&s.add(o)}),this.queries.forEach(function(o,l){var u=o.observableQuery,c=o.document;if(u){if(e==="all"){n.set(l,u);return}var h=u.queryName,f=u.options.fetchPolicy;if(f==="standby"||e==="active"&&!u.hasObservers())return;(e==="active"||h&&a.has(h)||c&&a.has(bl(c)))&&(n.set(l,u),h&&a.set(h,!0),c&&a.set(bl(c),!0))}}),s.size&&s.forEach(function(o){var l=ny("legacyOneTimeQuery"),u=t.getOrCreateQuery(l).init({document:o.query,variables:o.variables}),c=new $p({queryManager:t,queryInfo:u,options:me(me({},o),{fetchPolicy:"network-only"})});Mr(c.queryId===l),u.setObservableQuery(c),n.set(l,c)}),n},r.prototype.reFetchObservableQueries=function(e){var t=this;e===void 0&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(i,a){var s=i.options.fetchPolicy;Pi("resetLastResults",function(){return i.resetLastResults()}),(e||s!=="standby"&&s!=="cache-only")&&n.push(i.refetch()),(t.queries.get(a)||i.queryInfo).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},r.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,i=e.variables,a=e.fetchPolicy,s=e.errorPolicy,o=s===void 0?"none":s,l=e.context,u=l===void 0?{}:l,c=e.extensions,h=c===void 0?{}:c;n=this.transform(n),i=this.getVariables(n,i);var f=function(g){return t.getObservableFromLink(n,u,g,h).map(function(v){a!=="no-cache"&&(Cy(v,o)&&t.cache.write({query:n,result:v.data,dataId:"ROOT_SUBSCRIPTION",variables:g}),t.broadcastQueries());var y=Hp(v),A=ok(v);if(y||A){var C={};if(y&&(C.graphQLErrors=v.errors),A&&(C.protocolErrors=v.extensions[_g]),o==="none"||A)throw new pl(C)}return o==="ignore"&&delete v.errors,v})};if(this.getDocumentInfo(n).hasClientExports){var d=this.localState.addExportedVariables(n,i,u).then(f);return new un(function(g){var v=null;return d.then(function(y){return v=y.subscribe(g)},g.error),function(){return v&&v.unsubscribe()}})}return f(i)},r.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},r.prototype.removeQuery=function(e){var t;this.fetchCancelFns.delete(e),this.queries.has(e)&&((t=this.queries.get(e))===null||t===void 0||t.stop(),this.queries.delete(e))},r.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){var t;return(t=e.observableQuery)===null||t===void 0?void 0:t.notify()})},r.prototype.getLocalState=function(){return this.localState},r.prototype.getObservableFromLink=function(e,t,n,i,a){var s=this,o;a===void 0&&(a=(o=t?.queryDeduplication)!==null&&o!==void 0?o:this.queryDeduplication);var l,u=this.getDocumentInfo(e),c=u.serverQuery,h=u.clientQuery;if(c){var f=this,d=f.inFlightLinkObservables,g=f.link,v={query:c,variables:n,operationName:Vp(c)||void 0,context:this.prepareContext(me(me({},t),{forceFetch:!a})),extensions:i};if(t=v.context,a){var y=bl(c),A=mo(n),C=d.lookup(y,A);if(l=C.observable,!l){var k=new Ru([gy(g,v)]);l=C.observable=k,k.beforeNext(function T(S,R){S==="next"&&"hasNext"in R&&R.hasNext?k.beforeNext(T):d.remove(y,A)})}}else l=new Ru([gy(g,v)])}else l=new Ru([un.of({data:{}})]),t=this.prepareContext(t);return h&&(l=o0(l,function(T){return s.localState.runResolvers({document:h,remoteResult:T,context:t,variables:n})})),l},r.prototype.getResultsFromLink=function(e,t,n){var i=e.lastRequestId=this.generateRequestId(),a=this.cache.transformForLink(n.query);return o0(this.getObservableFromLink(a,n.context,n.variables),function(s){var o=hy(s),l=o.length>0,u=n.errorPolicy;if(i>=e.lastRequestId){if(l&&u==="none")throw e.markError(new pl({graphQLErrors:o}));e.markResult(s,a,n,t),e.markReady()}var c={data:s.data,loading:!1,networkStatus:Jr.ready};return l&&u==="none"&&(c.data=void 0),l&&u!=="ignore"&&(c.errors=o,c.networkStatus=Jr.error),c},function(s){var o=lk(s)?s:new pl({networkError:s});throw i>=e.lastRequestId&&e.markError(o),o})},r.prototype.fetchConcastWithInfo=function(e,t,n,i){var a=this;n===void 0&&(n=Jr.loading),i===void 0&&(i=t.query);var s=this.getVariables(i,t.variables),o=this.defaultOptions.watchQuery,l=t.fetchPolicy,u=l===void 0?o&&o.fetchPolicy||"cache-first":l,c=t.errorPolicy,h=c===void 0?o&&o.errorPolicy||"none":c,f=t.returnPartialData,d=f===void 0?!1:f,g=t.notifyOnNetworkStatusChange,v=g===void 0?!1:g,y=t.context,A=y===void 0?{}:y,C=Object.assign({},t,{query:i,variables:s,fetchPolicy:u,errorPolicy:h,returnPartialData:d,notifyOnNetworkStatusChange:v,context:A}),k=function(G){C.variables=G;var $=a.fetchQueryByPolicy(e,C,n);return C.fetchPolicy!=="standby"&&$.sources.length>0&&e.observableQuery&&e.observableQuery.applyNextFetchPolicy("after-fetch",t),$},T=function(){return a.fetchCancelFns.delete(e.queryId)};this.fetchCancelFns.set(e.queryId,function(G){T(),setTimeout(function(){return S.cancel(G)})});var S,R;if(this.getDocumentInfo(C.query).hasClientExports)S=new Ru(this.localState.addExportedVariables(C.query,C.variables,C.context).then(k).then(function(G){return G.sources})),R=!0;else{var B=k(C.variables);R=B.fromLink,S=new Ru(B.sources)}return S.promise.then(T,T),{concast:S,fromLink:R}},r.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,i=e.include,a=e.optimistic,s=a===void 0?!1:a,o=e.removeOptimistic,l=o===void 0?s?ny("refetchQueries"):void 0:o,u=e.onQueryUpdated,c=new Map;i&&this.getObservableQueries(i).forEach(function(f,d){c.set(d,{oq:f,lastDiff:(t.queries.get(d)||f.queryInfo).getDiff()})});var h=new Map;return n&&this.cache.batch({update:n,optimistic:s&&l||!1,removeOptimistic:l,onWatchUpdated:function(f,d,g){var v=f.watcher instanceof m0&&f.watcher.observableQuery;if(v){if(u){c.delete(v.queryId);var y=u(v,d,g);return y===!0&&(y=v.refetch()),y!==!1&&h.set(v,y),y}u!==null&&c.set(v.queryId,{oq:v,lastDiff:g,diff:d})}}}),c.size&&c.forEach(function(f,d){var g=f.oq,v=f.lastDiff,y=f.diff,A;u&&(y||(y=Pi("canonizeResults",function(){return t.cache.diff(g.queryInfo.getDiffOptions())})),A=u(g,y,v)),(!u||A===!0)&&(A=g.refetch()),A!==!1&&h.set(g,A),d.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(d)}),l&&this.cache.removeOptimistic(l),h},r.prototype.maskOperation=function(e){var t=e.document,n=e.data;return this.dataMasking?V4(n,t,this.cache):n},r.prototype.maskFragment=function(e){var t=e.data,n=e.fragment,i=e.fragmentName;return this.dataMasking?mk(t,n,this.cache,i):t},r.prototype.fetchQueryByPolicy=function(e,t,n){var i=this,a=t.query,s=t.variables,o=t.fetchPolicy,l=t.refetchWritePolicy,u=t.errorPolicy,c=t.returnPartialData,h=t.context,f=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:a,variables:s,networkStatus:n});var g=function(){return e.getDiff()},v=function(T,S){S===void 0&&(S=e.networkStatus||Jr.loading);var R=T.result,B=function(G){return un.of(me({data:G,loading:_u(S),networkStatus:S},T.complete?null:{partial:!0}))};return R&&i.getDocumentInfo(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:R},context:h,variables:s,onlyRunForcedResolvers:!0}).then(function(G){return B(G.data||void 0)}):u==="none"&&S===Jr.refetch&&Array.isArray(T.missing)?B(void 0):B(R)},y=o==="no-cache"?0:n===Jr.refetch&&l!=="merge"?1:2,A=function(){return i.getResultsFromLink(e,y,{query:a,variables:s,context:h,fetchPolicy:o,errorPolicy:u})},C=f&&typeof d=="number"&&d!==n&&_u(n);switch(o){default:case"cache-first":{var k=g();return k.complete?{fromLink:!1,sources:[v(k,e.markReady())]}:c||C?{fromLink:!0,sources:[v(k),A()]}:{fromLink:!0,sources:[A()]}}case"cache-and-network":{var k=g();return k.complete||c||C?{fromLink:!0,sources:[v(k),A()]}:{fromLink:!0,sources:[A()]}}case"cache-only":return{fromLink:!1,sources:[v(g(),e.markReady())]};case"network-only":return C?{fromLink:!0,sources:[v(g()),A()]}:{fromLink:!0,sources:[A()]};case"no-cache":return C?{fromLink:!0,sources:[v(e.getDiff()),A()]}:{fromLink:!0,sources:[A()]};case"standby":return{fromLink:!1,sources:[]}}},r.prototype.getOrCreateQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new m0(this,e)),this.queries.get(e)},r.prototype.prepareContext=function(e){e===void 0&&(e={});var t=this.localState.prepareContext(e);return me(me(me({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},r})(),aO=(function(){function r(e){var t=e.cache,n=e.client,i=e.resolvers,a=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),i&&this.addResolvers(i),a&&this.setFragmentMatcher(a)}return r.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(n){t.resolvers=dw(t.resolvers,n)}):this.resolvers=dw(this.resolvers,e)},r.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},r.prototype.getResolvers=function(){return this.resolvers||{}},r.prototype.runResolvers=function(e){return Rs(this,arguments,void 0,function(t){var n=t.document,i=t.remoteResult,a=t.context,s=t.variables,o=t.onlyRunForcedResolvers,l=o===void 0?!1:o;return Os(this,function(u){return n?[2,this.resolveDocument(n,i.data,a,s,this.fragmentMatcher,l).then(function(c){return me(me({},i),{data:c.result})})]:[2,i]})})},r.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},r.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},r.prototype.clientQuery=function(e){return pd(["client"],e)&&this.resolvers?e:null},r.prototype.serverQuery=function(e){return ek(e)},r.prototype.prepareContext=function(e){var t=this.cache;return me(me({},e),{cache:t,getCacheKey:function(n){return t.identify(n)}})},r.prototype.addExportedVariables=function(e){return Rs(this,arguments,void 0,function(t,n,i){return n===void 0&&(n={}),i===void 0&&(i={}),Os(this,function(a){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,n)||{},this.prepareContext(i),n).then(function(s){return me(me({},n),s.exportedVariables)})]:[2,me({},n)]})})},r.prototype.shouldForceResolvers=function(e){var t=!1;return Ra(e,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(t=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),t))return SA}}}),t},r.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:LR(e),variables:t,returnPartialData:!0,optimistic:!1}).result},r.prototype.resolveDocument=function(e,t){return Rs(this,arguments,void 0,function(n,i,a,s,o,l){var u,c,h,f,d,g,v,y,A,C,k;return a===void 0&&(a={}),s===void 0&&(s={}),o===void 0&&(o=function(){return!0}),l===void 0&&(l=!1),Os(this,function(T){return u=Vd(n),c=yc(n),h=gc(c),f=this.collectSelectionsToResolve(u,h),d=u.operation,g=d?d.charAt(0).toUpperCase()+d.slice(1):"Query",v=this,y=v.cache,A=v.client,C={fragmentMap:h,context:me(me({},a),{cache:y,client:A}),variables:s,fragmentMatcher:o,defaultOperationType:g,exportedVariables:{},selectionsToResolve:f,onlyRunForcedResolvers:l},k=!1,[2,this.resolveSelectionSet(u.selectionSet,k,i,C).then(function(S){return{result:S,exportedVariables:C.exportedVariables}})]})})},r.prototype.resolveSelectionSet=function(e,t,n,i){return Rs(this,void 0,void 0,function(){var a,s,o,l,u,c=this;return Os(this,function(h){return a=i.fragmentMap,s=i.context,o=i.variables,l=[n],u=function(f){return Rs(c,void 0,void 0,function(){var d,g;return Os(this,function(v){return!t&&!i.selectionsToResolve.has(f)?[2]:Ud(f,o)?wo(f)?[2,this.resolveField(f,t,n,i).then(function(y){var A;typeof y<"u"&&l.push((A={},A[bo(f)]=y,A))})]:(wR(f)?d=f:(d=a[f.name.value],Mr(d,21,f.name.value)),d&&d.typeCondition&&(g=d.typeCondition.name.value,i.fragmentMatcher(n,g,s))?[2,this.resolveSelectionSet(d.selectionSet,t,n,i).then(function(y){l.push(y)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(u)).then(function(){return Mg(l)})]})})},r.prototype.resolveField=function(e,t,n,i){return Rs(this,void 0,void 0,function(){var a,s,o,l,u,c,h,f,d,g=this;return Os(this,function(v){return n?(a=i.variables,s=e.name.value,o=bo(e),l=s!==o,u=n[o]||n[s],c=Promise.resolve(u),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(h=n.__typename||i.defaultOperationType,f=this.resolvers&&this.resolvers[h],f&&(d=f[l?s:o],d&&(c=Promise.resolve(MA.withValue(this.cache,d,[n,Rg(e,a),i.context,{field:e,fragmentMap:i.fragmentMap}]))))),[2,c.then(function(y){var A,C;if(y===void 0&&(y=u),e.directives&&e.directives.forEach(function(T){T.name.value==="export"&&T.arguments&&T.arguments.forEach(function(S){S.name.value==="as"&&S.value.kind==="StringValue"&&(i.exportedVariables[S.value.value]=y)})}),!e.selectionSet||y==null)return y;var k=(C=(A=e.directives)===null||A===void 0?void 0:A.some(function(T){return T.name.value==="client"}))!==null&&C!==void 0?C:!1;if(Array.isArray(y))return g.resolveSubSelectedArray(e,t||k,y,i);if(e.selectionSet)return g.resolveSelectionSet(e.selectionSet,t||k,y,i)})]):[2,null]})})},r.prototype.resolveSubSelectedArray=function(e,t,n,i){var a=this;return Promise.all(n.map(function(s){if(s===null)return null;if(Array.isArray(s))return a.resolveSubSelectedArray(e,t,s,i);if(e.selectionSet)return a.resolveSelectionSet(e.selectionSet,t,s,i)}))},r.prototype.collectSelectionsToResolve=function(e,t){var n=function(s){return!Array.isArray(s)},i=this.selectionsToResolveCache;function a(s){if(!i.has(s)){var o=new Set;i.set(s,o),Ra(s,{Directive:function(l,u,c,h,f){l.name.value==="client"&&f.forEach(function(d){n(d)&&nw(d)&&o.add(d)})},FragmentSpread:function(l,u,c,h,f){var d=t[l.name.value];Mr(d,22,l.name.value);var g=a(d);g.size>0&&(f.forEach(function(v){n(v)&&nw(v)&&o.add(v)}),o.add(l),g.forEach(function(v){o.add(v)}))}})}return i.get(s)}return a(e)},r})(),sO=(function(){function r(e){var t=this,n,i,a;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw qi(16);var s=e.uri,o=e.credentials,l=e.headers,u=e.cache,c=e.documentTransform,h=e.ssrMode,f=h===void 0?!1:h,d=e.ssrForceFetchDelay,g=d===void 0?0:d,v=e.connectToDevTools,y=e.queryDeduplication,A=y===void 0?!0:y,C=e.defaultOptions,k=e.defaultContext,T=e.assumeImmutableResults,S=T===void 0?u.assumeImmutableResults:T,R=e.resolvers,B=e.typeDefs,G=e.fragmentMatcher,$=e.clientAwareness,Y=e.name,X=e.version,J=e.devtools,Q=e.dataMasking,oe=e.link;oe||(oe=s?new O4({uri:s,credentials:o,headers:l}):ss.empty()),this.link=oe,this.cache=u,this.disableNetworkFetches=f||g>0,this.queryDeduplication=A,this.defaultOptions=C||Object.create(null),this.typeDefs=B,this.devtoolsConfig=me(me({},J),{enabled:(n=J?.enabled)!==null&&n!==void 0?n:v}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=!1),g&&setTimeout(function(){return t.disableNetworkFetches=!1},g),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=AA,this.localState=new aO({cache:u,client:this,resolvers:R,fragmentMatcher:G}),this.queryManager=new iO({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:k,documentTransform:c,queryDeduplication:A,ssrMode:f,dataMasking:!!Q,clientAwareness:{name:(i=$?.name)!==null&&i!==void 0?i:Y,version:(a=$?.version)!==null&&a!==void 0?a:X},localState:this.localState,assumeImmutableResults:S,onBroadcast:this.devtoolsConfig.enabled?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return Object.defineProperty(r.prototype,"prioritizeCacheValues",{get:function(){return this.disableNetworkFetches},set:function(e){this.disableNetworkFetches=e},enumerable:!1,configurable:!0}),r.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this}},Object.defineProperty(r.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),r.prototype.stop=function(){this.queryManager.stop()},r.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=l0(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&(e.fetchPolicy==="network-only"||e.fetchPolicy==="cache-and-network")&&(e=me(me({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},r.prototype.query=function(e){return this.defaultOptions.query&&(e=l0(this.defaultOptions.query,e)),Mr(e.fetchPolicy!=="cache-and-network",18),this.disableNetworkFetches&&e.fetchPolicy==="network-only"&&(e=me(me({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},r.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=l0(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},r.prototype.subscribe=function(e){var t=this,n=this.queryManager.generateQueryId();return this.queryManager.startGraphQLSubscription(e).map(function(i){return me(me({},i),{data:t.queryManager.maskOperation({document:e.query,data:i.data,fetchPolicy:e.fetchPolicy,id:n})})})},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!1),this.cache.readQuery(e,t)},r.prototype.watchFragment=function(e){var t;return this.cache.watchFragment(me(me({},e),(t={},t[Symbol.for("apollo.dataMasking")]=this.queryManager.dataMasking,t)))},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!1),this.cache.readFragment(e,t)},r.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},r.prototype.__requestRaw=function(e){return gy(this.link,e)},r.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(t){return t()}))}).then(function(){return e.reFetchObservableQueries()})},r.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(t){return t()}))})},r.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},r.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],i=[];t.forEach(function(s,o){n.push(o),i.push(s)});var a=Promise.all(i);return a.queries=n,a.results=i,a.catch(function(s){}),a},r.prototype.getObservableQueries=function(e){return e===void 0&&(e="active"),this.queryManager.getObservableQueries(e)},r.prototype.extract=function(e){return this.cache.extract(e)},r.prototype.restore=function(e){return this.cache.restore(e)},r.prototype.addResolvers=function(e){this.localState.addResolvers(e)},r.prototype.setResolvers=function(e){this.localState.setResolvers(e)},r.prototype.getResolvers=function(){return this.localState.getResolvers()},r.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},r.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(r.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),r})(),qp=new Map,xy=new Map,Ik=!0,og=!1;function Dk(r){return r.replace(/[\s,]+/g," ").trim()}function oO(r){return Dk(r.source.body.substring(r.start,r.end))}function lO(r){var e=new Set,t=[];return r.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,a=oO(n.loc),s=xy.get(i);s&&!s.has(a)?Ik&&console.warn("Warning: fragment with name "+i+` already exists.
62
62
  graphql-tag enforces all fragment names across your application to be unique; read more about
63
- this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||xy.set(i,s=new Set),s.add(a),e.has(a)||(e.add(a),t.push(n))}else t.push(n)}),me(me({},r),{definitions:t})}function uO(r){var e=new Set(r.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var a=n[i];a&&typeof a=="object"&&e.add(a)})});var t=r.loc;return t&&(delete t.startToken,delete t.endToken),r}function cO(r){var e=Dk(r);if(!qp.has(e)){var t=OP(r,{experimentalFragmentVariables:og,allowLegacyFragmentVariables:og});if(!t||t.kind!=="Document")throw new Error("Not a valid GraphQL document.");qp.set(e,uO(lO(t)))}return qp.get(e)}function Fe(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];typeof r=="string"&&(r=[r]);var n=r[0];return e.forEach(function(i,a){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=r[a+1]}),cO(n)}function fO(){qp.clear(),xy.clear()}function dO(){Ik=!1}function hO(){og=!0}function pO(){og=!1}var hf={gql:Fe,resetCaches:fO,disableFragmentWarnings:dO,enableExperimentalFragmentVariables:hO,disableExperimentalFragmentVariables:pO};(function(r){r.gql=hf.gql,r.resetCaches=hf.resetCaches,r.disableFragmentWarnings=hf.disableFragmentWarnings,r.enableExperimentalFragmentVariables=hf.enableExperimentalFragmentVariables,r.disableExperimentalFragmentVariables=hf.disableExperimentalFragmentVariables})(Fe||(Fe={}));Fe.default=Fe;var yd=(r=>(r.Data="Data",r.Font="Font",r.Frame="Frame",r.Illustration="Illustration",r.Image="Image",r.Model="Model",r.Material="Material",r.Color="Color",r.QuestionnaireCollateral="QuestionnaireCollateral",r.RequestCollateral="RequestCollateral",r.SignupCollateral="SignupCollateral",r.Video="Video",r.ColorProfile="ColorProfile",r.Environment="Environment",r))(yd||{}),Pk=(r=>(r.AND="AND",r.OR="OR",r))(Pk||{}),zn=(r=>(r.FileUpload="FileUpload",r.Option="Option",r.ColorOption="ColorOption",r.Text="Text",r))(zn||{}),Je=(r=>(r.Information="Information",r.Bulk="Bulk",r.DigitalContent="DigitalContent",r.Finish="Finish",r.Frame="Frame",r.Illustration="Illustration",r.Introduction="Introduction",r.Material="Material",r.Model="Model",r.Module="Module",r.Picture="Picture",r.Photo="Photo",r.ProductOverlay="ProductOverlay",r.Question="Question",r.Shape="Shape",r.SilentIllustration="SilentIllustration",r.Text="Text",r))(Je||{}),Rk=(r=>(r.Color="Color",r.Colors="Colors",r.Selection="Selection",r.Selections="Selections",r.Text="Text",r.Upload="Upload",r))(Rk||{}),rc=(r=>(r.ThreeD="ThreeD",r.FreeDesign="FreeDesign",r.Print="Print",r))(rc||{}),Zt=(r=>(r.Frame="frame",r.Group="group",r.Image="image",r.Pattern="pattern",r.Illustration="illustration",r.Textbox="textbox",r))(Zt||{}),Ok=(r=>(r.Default="Default",r.FirstTransaction="FirstTransaction",r.OneToOne="OneToOne",r))(Ok||{}),UA=(r=>(r.Pending="Pending",r.Failed="Failed",r.Validated="Validated",r.Overridden="Overridden",r))(UA||{}),Bk=(r=>(r.Hyperlink="Hyperlink",r.Edit="Edit",r.Approve="Approve",r))(Bk||{}),Mk=(r=>(r.Hub="Hub",r.Shopify="Shopify",r))(Mk||{}),Ng=(r=>(r.AdvancedImageManipulation="BackgroundRemover",r.ConversionAccelerator="Conversion Accelerator",r.ProcessBuilder="ProcessBuilder",r))(Ng||{}),_k=(r=>(r[r.Orbit=0]="Orbit",r[r.Pan=1]="Pan",r))(_k||{}),VA=(r=>(r.Owner="Owner",r.Approver="Approver",r.Editor="Editor",r.Viewer="Viewer",r))(VA||{}),Pl=(r=>(r.Autosize="Autosize",r.Traditional="Traditional",r))(Pl||{}),gi=(r=>(r[r.North=0]="North",r[r.Northeast=1]="Northeast",r[r.East=2]="East",r[r.Southeast=3]="Southeast",r[r.South=4]="South",r[r.Southwest=5]="Southwest",r[r.West=6]="West",r[r.Northwest=7]="Northwest",r))(gi||{}),Nk=(r=>(r.Pixel="px",r.Millimeter="mm",r.Centimeter="cm",r))(Nk||{}),td=(r=>(r.Email="Email",r.FirstName="FirstName",r.LastName="LastName",r.Phone="Phone",r.Apartment="Apartment",r.City="City",r.Country="Country",r.OrganizationName="OrganizationName",r.PostCode="PostCode",r.State="State",r.StreetAddress="StreetAddress",r.Custom="Custom",r))(td||{});class Lk extends Error{constructor(e){super(e),this.name=this.constructor.name}}class zd extends Lk{constructor(e){super(`ConfigurationError - ${e}`)}}class Ad extends zd{constructor(e){super(`Option not Configured: ${e.stepTitle}`),this.optionId=e?.optionId||"N/A"}}class Ai extends zd{constructor(e){super(`Panel not Found: ${e.panelId}`),this.panelId=e?.panelId||"N/A"}}class So extends zd{constructor(e){super(`Asset not found for variant: ${e.name}`),this.variant=e}}class nc extends zd{constructor(e){super(`Resource not found for asset: ${e.name}`),this.asset=e}}class ns extends zd{constructor(e,t){super(`Workflow Misconfiguration: ${e.stepName} - ${t}`),this.step=e}}class Lg extends Lk{constructor(e){super(`ImplementationError - ${e}`)}}class nn extends Lg{constructor(e){super(`Unhandled Behavior Encountered: ${e}`)}}class wl extends Lg{constructor(e){super(`Parsing Error: ${e}`)}}class uo extends Lg{constructor(e){super(`Client Error: ${e}`)}}class Ug extends Lg{constructor(e){super(`Resource Generation Failed: ${e}`)}}class gO{get(e){return localStorage.getItem(e)||void 0}set(e,t){localStorage.setItem(e,t)}remove(e){localStorage.removeItem(e)}getMap(e){const t=this.get(e);if(t)return new Map(JSON.parse(t))}setMap(e,t){const n=JSON.stringify([...t.entries()]);this.set(e,n)}}class qw{constructor(){this.storage=new Map}get(e){return this.storage.get(e)||void 0}set(e,t){this.storage.set(e,t)}remove(e){this.storage.delete(e)}getMap(e){const t=this.get(e);if(t)return new Map(JSON.parse(t))}setMap(e,t){const n=JSON.stringify([...t.entries()]);this.set(e,n)}}const mO=()=>{try{return localStorage?new gO:new qw}catch{return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."),new qw}},xr=mO();function vO(r){return new ss(function(e,t){var n=rs(e,[]);return new un(function(i){var a,s=!1;return Promise.resolve(n).then(function(o){return r(o,e.getContext())}).then(e.setContext).then(function(){s||(a=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){s=!0,a&&a.unsubscribe()}})})}function Uk(r){return new ss(function(e,t){return new un(function(n){var i,a,s;try{i=t(e).subscribe({next:function(o){if(o.errors?s=r({graphQLErrors:o.errors,response:o,operation:e,forward:t}):ok(o)&&(s=r({protocolErrors:o.extensions[_g],response:o,operation:e,forward:t})),s){a=s.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(o)},error:function(o){if(s=r({operation:e,networkError:o,graphQLErrors:o&&o.result&&o.result.errors||void 0,forward:t}),s){a=s.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(o)},complete:function(){s||n.complete.bind(n)()}})}catch(o){r({networkError:o,operation:e,forward:t}),n.error(o)}return function(){i&&i.unsubscribe(),a&&i.unsubscribe()}})})}(function(r){Na(e,r);function e(t){var n=r.call(this)||this;return n.link=Uk(t),n}return e.prototype.request=function(t,n){return this.link.request(t,n)},e})(ss);class yO{constructor(){this.defaultServerUrl="https://api.au.spiffcommerce.com",this.defaultServicesApiUrl="https://services.au.spiffcommerce.com",this.defaultHubUrl="https://hub.au.spiffcommerce.com",this.serverUrl=this.defaultServerUrl,this.servicesApiUrl=this.defaultServicesApiUrl,this.hubUrl=this.defaultHubUrl,this.serverUrlCallbacks=[]}getServerUrl(){return this.serverUrl}getServicesApiUrl(){return this.servicesApiUrl}getHubUrl(){return this.hubUrl}setServerUrl(e){this.serverUrl=e,this.serverUrlCallbacks.forEach(t=>t())}setServicesApiUrl(e){this.servicesApiUrl=e}setHubUrl(e){this.hubUrl=e}addServerUrlCallback(e){this.serverUrlCallbacks.push(e)}}const _s=new yO;var eo={},ul={},Qh={exports:{}},br={};var Ww;function AO(){if(Ww)return br;Ww=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),h=Symbol.iterator;function f(K){return K===null||typeof K!="object"?null:(K=h&&K[h]||K["@@iterator"],typeof K=="function"?K:null)}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function y(K,ie,de){this.props=K,this.context=ie,this.refs=v,this.updater=de||d}y.prototype.isReactComponent={},y.prototype.setState=function(K,ie){if(typeof K!="object"&&typeof K!="function"&&K!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,K,ie,"setState")},y.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function A(){}A.prototype=y.prototype;function C(K,ie,de){this.props=K,this.context=ie,this.refs=v,this.updater=de||d}var k=C.prototype=new A;k.constructor=C,g(k,y.prototype),k.isPureReactComponent=!0;var T=Array.isArray,S=Object.prototype.hasOwnProperty,R={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function G(K,ie,de){var Be,Ee={},ze=null,je=null;if(ie!=null)for(Be in ie.ref!==void 0&&(je=ie.ref),ie.key!==void 0&&(ze=""+ie.key),ie)S.call(ie,Be)&&!B.hasOwnProperty(Be)&&(Ee[Be]=ie[Be]);var qe=arguments.length-2;if(qe===1)Ee.children=de;else if(1<qe){for(var Ge=Array(qe),bt=0;bt<qe;bt++)Ge[bt]=arguments[bt+2];Ee.children=Ge}if(K&&K.defaultProps)for(Be in qe=K.defaultProps,qe)Ee[Be]===void 0&&(Ee[Be]=qe[Be]);return{$$typeof:r,type:K,key:ze,ref:je,props:Ee,_owner:R.current}}function $(K,ie){return{$$typeof:r,type:K.type,key:ie,ref:K.ref,props:K.props,_owner:K._owner}}function Y(K){return typeof K=="object"&&K!==null&&K.$$typeof===r}function X(K){var ie={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(de){return ie[de]})}var J=/\/+/g;function Q(K,ie){return typeof K=="object"&&K!==null&&K.key!=null?X(""+K.key):ie.toString(36)}function oe(K,ie,de,Be,Ee){var ze=typeof K;(ze==="undefined"||ze==="boolean")&&(K=null);var je=!1;if(K===null)je=!0;else switch(ze){case"string":case"number":je=!0;break;case"object":switch(K.$$typeof){case r:case e:je=!0}}if(je)return je=K,Ee=Ee(je),K=Be===""?"."+Q(je,0):Be,T(Ee)?(de="",K!=null&&(de=K.replace(J,"$&/")+"/"),oe(Ee,ie,de,"",function(bt){return bt})):Ee!=null&&(Y(Ee)&&(Ee=$(Ee,de+(!Ee.key||je&&je.key===Ee.key?"":(""+Ee.key).replace(J,"$&/")+"/")+K)),ie.push(Ee)),1;if(je=0,Be=Be===""?".":Be+":",T(K))for(var qe=0;qe<K.length;qe++){ze=K[qe];var Ge=Be+Q(ze,qe);je+=oe(ze,ie,de,Ge,Ee)}else if(Ge=f(K),typeof Ge=="function")for(K=Ge.call(K),qe=0;!(ze=K.next()).done;)ze=ze.value,Ge=Be+Q(ze,qe++),je+=oe(ze,ie,de,Ge,Ee);else if(ze==="object")throw ie=String(K),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.");return je}function se(K,ie,de){if(K==null)return K;var Be=[],Ee=0;return oe(K,Be,"","",function(ze){return ie.call(de,ze,Ee++)}),Be}function he(K){if(K._status===-1){var ie=K._result;ie=ie(),ie.then(function(de){(K._status===0||K._status===-1)&&(K._status=1,K._result=de)},function(de){(K._status===0||K._status===-1)&&(K._status=2,K._result=de)}),K._status===-1&&(K._status=0,K._result=ie)}if(K._status===1)return K._result.default;throw K._result}var ye={current:null},Ue={transition:null},Oe={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:Ue,ReactCurrentOwner:R};function Te(){throw Error("act(...) is not supported in production builds of React.")}return br.Children={map:se,forEach:function(K,ie,de){se(K,function(){ie.apply(this,arguments)},de)},count:function(K){var ie=0;return se(K,function(){ie++}),ie},toArray:function(K){return se(K,function(ie){return ie})||[]},only:function(K){if(!Y(K))throw Error("React.Children.only expected to receive a single React element child.");return K}},br.Component=y,br.Fragment=t,br.Profiler=i,br.PureComponent=C,br.StrictMode=n,br.Suspense=l,br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Oe,br.act=Te,br.cloneElement=function(K,ie,de){if(K==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+K+".");var Be=g({},K.props),Ee=K.key,ze=K.ref,je=K._owner;if(ie!=null){if(ie.ref!==void 0&&(ze=ie.ref,je=R.current),ie.key!==void 0&&(Ee=""+ie.key),K.type&&K.type.defaultProps)var qe=K.type.defaultProps;for(Ge in ie)S.call(ie,Ge)&&!B.hasOwnProperty(Ge)&&(Be[Ge]=ie[Ge]===void 0&&qe!==void 0?qe[Ge]:ie[Ge])}var Ge=arguments.length-2;if(Ge===1)Be.children=de;else if(1<Ge){qe=Array(Ge);for(var bt=0;bt<Ge;bt++)qe[bt]=arguments[bt+2];Be.children=qe}return{$$typeof:r,type:K.type,key:Ee,ref:ze,props:Be,_owner:je}},br.createContext=function(K){return K={$$typeof:s,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},K.Provider={$$typeof:a,_context:K},K.Consumer=K},br.createElement=G,br.createFactory=function(K){var ie=G.bind(null,K);return ie.type=K,ie},br.createRef=function(){return{current:null}},br.forwardRef=function(K){return{$$typeof:o,render:K}},br.isValidElement=Y,br.lazy=function(K){return{$$typeof:c,_payload:{_status:-1,_result:K},_init:he}},br.memo=function(K,ie){return{$$typeof:u,type:K,compare:ie===void 0?null:ie}},br.startTransition=function(K){var ie=Ue.transition;Ue.transition={};try{K()}finally{Ue.transition=ie}},br.unstable_act=Te,br.useCallback=function(K,ie){return ye.current.useCallback(K,ie)},br.useContext=function(K){return ye.current.useContext(K)},br.useDebugValue=function(){},br.useDeferredValue=function(K){return ye.current.useDeferredValue(K)},br.useEffect=function(K,ie){return ye.current.useEffect(K,ie)},br.useId=function(){return ye.current.useId()},br.useImperativeHandle=function(K,ie,de){return ye.current.useImperativeHandle(K,ie,de)},br.useInsertionEffect=function(K,ie){return ye.current.useInsertionEffect(K,ie)},br.useLayoutEffect=function(K,ie){return ye.current.useLayoutEffect(K,ie)},br.useMemo=function(K,ie){return ye.current.useMemo(K,ie)},br.useReducer=function(K,ie,de){return ye.current.useReducer(K,ie,de)},br.useRef=function(K){return ye.current.useRef(K)},br.useState=function(K){return ye.current.useState(K)},br.useSyncExternalStore=function(K,ie,de){return ye.current.useSyncExternalStore(K,ie,de)},br.useTransition=function(){return ye.current.useTransition()},br.version="18.3.1",br}var zf={exports:{}};zf.exports;var Qw;function bO(){return Qw||(Qw=1,(function(r,e){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t="18.3.1",n=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=Symbol.iterator,A="@@iterator";function C(M){if(M===null||typeof M!="object")return null;var te=y&&M[y]||M[A];return typeof te=="function"?te:null}var k={current:null},T={transition:null},S={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},R={current:null},B={},G=null;function $(M){G=M}B.setExtraStackFrame=function(M){G=M},B.getCurrentStack=null,B.getStackAddendum=function(){var M="";G&&(M+=G);var te=B.getCurrentStack;return te&&(M+=te()||""),M};var Y=!1,X=!1,J=!1,Q=!1,oe=!1,se={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:T,ReactCurrentOwner:R};se.ReactDebugCurrentFrame=B,se.ReactCurrentActQueue=S;function he(M){{for(var te=arguments.length,fe=new Array(te>1?te-1:0),be=1;be<te;be++)fe[be-1]=arguments[be];Ue("warn",M,fe)}}function ye(M){{for(var te=arguments.length,fe=new Array(te>1?te-1:0),be=1;be<te;be++)fe[be-1]=arguments[be];Ue("error",M,fe)}}function Ue(M,te,fe){{var be=se.ReactDebugCurrentFrame,Me=be.getStackAddendum();Me!==""&&(te+="%s",fe=fe.concat([Me]));var Ke=fe.map(function(Xe){return String(Xe)});Ke.unshift("Warning: "+te),Function.prototype.apply.call(console[M],console,Ke)}}var Oe={};function Te(M,te){{var fe=M.constructor,be=fe&&(fe.displayName||fe.name)||"ReactClass",Me=be+"."+te;if(Oe[Me])return;ye("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",te,be),Oe[Me]=!0}}var K={isMounted:function(M){return!1},enqueueForceUpdate:function(M,te,fe){Te(M,"forceUpdate")},enqueueReplaceState:function(M,te,fe,be){Te(M,"replaceState")},enqueueSetState:function(M,te,fe,be){Te(M,"setState")}},ie=Object.assign,de={};Object.freeze(de);function Be(M,te,fe){this.props=M,this.context=te,this.refs=de,this.updater=fe||K}Be.prototype.isReactComponent={},Be.prototype.setState=function(M,te){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,te,"setState")},Be.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};{var Ee={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ze=function(M,te){Object.defineProperty(Be.prototype,M,{get:function(){he("%s(...) is deprecated in plain JavaScript React classes. %s",te[0],te[1])}})};for(var je in Ee)Ee.hasOwnProperty(je)&&ze(je,Ee[je])}function qe(){}qe.prototype=Be.prototype;function Ge(M,te,fe){this.props=M,this.context=te,this.refs=de,this.updater=fe||K}var bt=Ge.prototype=new qe;bt.constructor=Ge,ie(bt,Be.prototype),bt.isPureReactComponent=!0;function rr(){var M={current:null};return Object.seal(M),M}var Pr=Array.isArray;function $t(M){return Pr(M)}function ar(M){{var te=typeof Symbol=="function"&&Symbol.toStringTag,fe=te&&M[Symbol.toStringTag]||M.constructor.name||"Object";return fe}}function St(M){try{return st(M),!1}catch{return!0}}function st(M){return""+M}function Qr(M){if(St(M))return ye("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(M)),st(M)}function Sr(M,te,fe){var be=M.displayName;if(be)return be;var Me=te.displayName||te.name||"";return Me!==""?fe+"("+Me+")":fe}function gr(M){return M.displayName||"Context"}function nr(M){if(M==null)return null;if(typeof M.tag=="number"&&ye("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof M=="function")return M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case a:return"Fragment";case i:return"Portal";case o:return"Profiler";case s:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if(typeof M=="object")switch(M.$$typeof){case u:var te=M;return gr(te)+".Consumer";case l:var fe=M;return gr(fe._context)+".Provider";case c:return Sr(M,M.render,"ForwardRef");case d:var be=M.displayName||null;return be!==null?be:nr(M.type)||"Memo";case g:{var Me=M,Ke=Me._payload,Xe=Me._init;try{return nr(Xe(Ke))}catch{return null}}}return null}var fr=Object.prototype.hasOwnProperty,Yt={key:!0,ref:!0,__self:!0,__source:!0},Xt,mt,wr;wr={};function an(M){if(fr.call(M,"ref")){var te=Object.getOwnPropertyDescriptor(M,"ref").get;if(te&&te.isReactWarning)return!1}return M.ref!==void 0}function _r(M){if(fr.call(M,"key")){var te=Object.getOwnPropertyDescriptor(M,"key").get;if(te&&te.isReactWarning)return!1}return M.key!==void 0}function ir(M,te){var fe=function(){Xt||(Xt=!0,ye("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};fe.isReactWarning=!0,Object.defineProperty(M,"key",{get:fe,configurable:!0})}function Yr(M,te){var fe=function(){mt||(mt=!0,ye("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};fe.isReactWarning=!0,Object.defineProperty(M,"ref",{get:fe,configurable:!0})}function kr(M){if(typeof M.ref=="string"&&R.current&&M.__self&&R.current.stateNode!==M.__self){var te=nr(R.current.type);wr[te]||(ye('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',te,M.ref),wr[te]=!0)}}var Zr=function(M,te,fe,be,Me,Ke,Xe){var yt={$$typeof:n,type:M,key:te,ref:fe,props:Xe,_owner:Ke};return yt._store={},Object.defineProperty(yt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(yt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:be}),Object.defineProperty(yt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(yt.props),Object.freeze(yt)),yt};function Vr(M,te,fe){var be,Me={},Ke=null,Xe=null,yt=null,Pt=null;if(te!=null){an(te)&&(Xe=te.ref,kr(te)),_r(te)&&(Qr(te.key),Ke=""+te.key),yt=te.__self===void 0?null:te.__self,Pt=te.__source===void 0?null:te.__source;for(be in te)fr.call(te,be)&&!Yt.hasOwnProperty(be)&&(Me[be]=te[be])}var pr=arguments.length-2;if(pr===1)Me.children=fe;else if(pr>1){for(var yr=Array(pr),ur=0;ur<pr;ur++)yr[ur]=arguments[ur+2];Object.freeze&&Object.freeze(yr),Me.children=yr}if(M&&M.defaultProps){var Tr=M.defaultProps;for(be in Tr)Me[be]===void 0&&(Me[be]=Tr[be])}if(Ke||Xe){var $r=typeof M=="function"?M.displayName||M.name||"Unknown":M;Ke&&ir(Me,$r),Xe&&Yr(Me,$r)}return Zr(M,Ke,Xe,yt,Pt,R.current,Me)}function pn(M,te){var fe=Zr(M.type,te,M.ref,M._self,M._source,M._owner,M.props);return fe}function gn(M,te,fe){if(M==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var be,Me=ie({},M.props),Ke=M.key,Xe=M.ref,yt=M._self,Pt=M._source,pr=M._owner;if(te!=null){an(te)&&(Xe=te.ref,pr=R.current),_r(te)&&(Qr(te.key),Ke=""+te.key);var yr;M.type&&M.type.defaultProps&&(yr=M.type.defaultProps);for(be in te)fr.call(te,be)&&!Yt.hasOwnProperty(be)&&(te[be]===void 0&&yr!==void 0?Me[be]=yr[be]:Me[be]=te[be])}var ur=arguments.length-2;if(ur===1)Me.children=fe;else if(ur>1){for(var Tr=Array(ur),$r=0;$r<ur;$r++)Tr[$r]=arguments[$r+2];Me.children=Tr}return Zr(M.type,Ke,Xe,yt,Pt,pr,Me)}function Fr(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}var zr=".",en=":";function Hr(M){var te=/[=:]/g,fe={"=":"=0",":":"=2"},be=M.replace(te,function(Me){return fe[Me]});return"$"+be}var zt=!1,sr=/\/+/g;function Er(M){return M.replace(sr,"$&/")}function tt(M,te){return typeof M=="object"&&M!==null&&M.key!=null?(Qr(M.key),Hr(""+M.key)):te.toString(36)}function Nr(M,te,fe,be,Me){var Ke=typeof M;(Ke==="undefined"||Ke==="boolean")&&(M=null);var Xe=!1;if(M===null)Xe=!0;else switch(Ke){case"string":case"number":Xe=!0;break;case"object":switch(M.$$typeof){case n:case i:Xe=!0}}if(Xe){var yt=M,Pt=Me(yt),pr=be===""?zr+tt(yt,0):be;if($t(Pt)){var yr="";pr!=null&&(yr=Er(pr)+"/"),Nr(Pt,te,yr,"",function(Ha){return Ha})}else Pt!=null&&(Fr(Pt)&&(Pt.key&&(!yt||yt.key!==Pt.key)&&Qr(Pt.key),Pt=pn(Pt,fe+(Pt.key&&(!yt||yt.key!==Pt.key)?Er(""+Pt.key)+"/":"")+pr)),te.push(Pt));return 1}var ur,Tr,$r=0,yn=be===""?zr:be+en;if($t(M))for(var Xi=0;Xi<M.length;Xi++)ur=M[Xi],Tr=yn+tt(ur,Xi),$r+=Nr(ur,te,fe,Tr,Me);else{var ua=C(M);if(typeof ua=="function"){var Ji=M;ua===Ji.entries&&(zt||he("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),zt=!0);for(var $n=ua.call(Ji),Ki,pi=0;!(Ki=$n.next()).done;)ur=Ki.value,Tr=yn+tt(ur,pi++),$r+=Nr(ur,te,fe,Tr,Me)}else if(Ke==="object"){var za=String(M);throw new Error("Objects are not valid as a React child (found: "+(za==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":za)+"). If you meant to render a collection of children, use an array instead.")}}return $r}function Xr(M,te,fe){if(M==null)return M;var be=[],Me=0;return Nr(M,be,"","",function(Ke){return te.call(fe,Ke,Me++)}),be}function Se(M){var te=0;return Xr(M,function(){te++}),te}function P(M,te,fe){Xr(M,function(){te.apply(this,arguments)},fe)}function U(M){return Xr(M,function(te){return te})||[]}function Z(M){if(!Fr(M))throw new Error("React.Children.only expected to receive a single React element child.");return M}function ue(M){var te={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};te.Provider={$$typeof:l,_context:te};var fe=!1,be=!1,Me=!1;{var Ke={$$typeof:u,_context:te};Object.defineProperties(Ke,{Provider:{get:function(){return be||(be=!0,ye("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),te.Provider},set:function(Xe){te.Provider=Xe}},_currentValue:{get:function(){return te._currentValue},set:function(Xe){te._currentValue=Xe}},_currentValue2:{get:function(){return te._currentValue2},set:function(Xe){te._currentValue2=Xe}},_threadCount:{get:function(){return te._threadCount},set:function(Xe){te._threadCount=Xe}},Consumer:{get:function(){return fe||(fe=!0,ye("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),te.Consumer}},displayName:{get:function(){return te.displayName},set:function(Xe){Me||(he("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Xe),Me=!0)}}}),te.Consumer=Ke}return te._currentRenderer=null,te._currentRenderer2=null,te}var Ie=-1,We=0,wt=1,It=2;function Nt(M){if(M._status===Ie){var te=M._result,fe=te();if(fe.then(function(Ke){if(M._status===We||M._status===Ie){var Xe=M;Xe._status=wt,Xe._result=Ke}},function(Ke){if(M._status===We||M._status===Ie){var Xe=M;Xe._status=It,Xe._result=Ke}}),M._status===Ie){var be=M;be._status=We,be._result=fe}}if(M._status===wt){var Me=M._result;return Me===void 0&&ye(`lazy: Expected the result of a dynamic import() call. Instead received: %s
63
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||xy.set(i,s=new Set),s.add(a),e.has(a)||(e.add(a),t.push(n))}else t.push(n)}),me(me({},r),{definitions:t})}function uO(r){var e=new Set(r.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var a=n[i];a&&typeof a=="object"&&e.add(a)})});var t=r.loc;return t&&(delete t.startToken,delete t.endToken),r}function cO(r){var e=Dk(r);if(!qp.has(e)){var t=OP(r,{experimentalFragmentVariables:og,allowLegacyFragmentVariables:og});if(!t||t.kind!=="Document")throw new Error("Not a valid GraphQL document.");qp.set(e,uO(lO(t)))}return qp.get(e)}function ke(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];typeof r=="string"&&(r=[r]);var n=r[0];return e.forEach(function(i,a){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=r[a+1]}),cO(n)}function fO(){qp.clear(),xy.clear()}function dO(){Ik=!1}function hO(){og=!0}function pO(){og=!1}var hf={gql:ke,resetCaches:fO,disableFragmentWarnings:dO,enableExperimentalFragmentVariables:hO,disableExperimentalFragmentVariables:pO};(function(r){r.gql=hf.gql,r.resetCaches=hf.resetCaches,r.disableFragmentWarnings=hf.disableFragmentWarnings,r.enableExperimentalFragmentVariables=hf.enableExperimentalFragmentVariables,r.disableExperimentalFragmentVariables=hf.disableExperimentalFragmentVariables})(ke||(ke={}));ke.default=ke;var yd=(r=>(r.Data="Data",r.Font="Font",r.Frame="Frame",r.Illustration="Illustration",r.Image="Image",r.Model="Model",r.Material="Material",r.Color="Color",r.QuestionnaireCollateral="QuestionnaireCollateral",r.RequestCollateral="RequestCollateral",r.SignupCollateral="SignupCollateral",r.Video="Video",r.ColorProfile="ColorProfile",r.Environment="Environment",r))(yd||{}),Pk=(r=>(r.AND="AND",r.OR="OR",r))(Pk||{}),zn=(r=>(r.FileUpload="FileUpload",r.Option="Option",r.ColorOption="ColorOption",r.Text="Text",r))(zn||{}),Je=(r=>(r.Information="Information",r.Bulk="Bulk",r.DigitalContent="DigitalContent",r.Finish="Finish",r.Frame="Frame",r.Illustration="Illustration",r.Introduction="Introduction",r.Material="Material",r.Model="Model",r.Module="Module",r.Picture="Picture",r.Photo="Photo",r.ProductOverlay="ProductOverlay",r.Question="Question",r.Shape="Shape",r.SilentIllustration="SilentIllustration",r.Text="Text",r))(Je||{}),Rk=(r=>(r.Color="Color",r.Colors="Colors",r.Selection="Selection",r.Selections="Selections",r.Text="Text",r.Upload="Upload",r))(Rk||{}),rc=(r=>(r.ThreeD="ThreeD",r.FreeDesign="FreeDesign",r.Print="Print",r))(rc||{}),Zt=(r=>(r.Frame="frame",r.Group="group",r.Image="image",r.Pattern="pattern",r.Illustration="illustration",r.Textbox="textbox",r))(Zt||{}),Ok=(r=>(r.Default="Default",r.FirstTransaction="FirstTransaction",r.OneToOne="OneToOne",r))(Ok||{}),UA=(r=>(r.Pending="Pending",r.Failed="Failed",r.Validated="Validated",r.Overridden="Overridden",r))(UA||{}),Bk=(r=>(r.Hyperlink="Hyperlink",r.Edit="Edit",r.Approve="Approve",r))(Bk||{}),Mk=(r=>(r.Hub="Hub",r.Shopify="Shopify",r))(Mk||{}),Ng=(r=>(r.AdvancedImageManipulation="BackgroundRemover",r.ConversionAccelerator="Conversion Accelerator",r.ProcessBuilder="ProcessBuilder",r))(Ng||{}),_k=(r=>(r[r.Orbit=0]="Orbit",r[r.Pan=1]="Pan",r))(_k||{}),VA=(r=>(r.Owner="Owner",r.Approver="Approver",r.Editor="Editor",r.Viewer="Viewer",r))(VA||{}),Pl=(r=>(r.Autosize="Autosize",r.Traditional="Traditional",r))(Pl||{}),gi=(r=>(r[r.North=0]="North",r[r.Northeast=1]="Northeast",r[r.East=2]="East",r[r.Southeast=3]="Southeast",r[r.South=4]="South",r[r.Southwest=5]="Southwest",r[r.West=6]="West",r[r.Northwest=7]="Northwest",r))(gi||{}),Nk=(r=>(r.Pixel="px",r.Millimeter="mm",r.Centimeter="cm",r))(Nk||{}),td=(r=>(r.Email="Email",r.FirstName="FirstName",r.LastName="LastName",r.Phone="Phone",r.Apartment="Apartment",r.City="City",r.Country="Country",r.OrganizationName="OrganizationName",r.PostCode="PostCode",r.State="State",r.StreetAddress="StreetAddress",r.Custom="Custom",r))(td||{});class Lk extends Error{constructor(e){super(e),this.name=this.constructor.name}}class zd extends Lk{constructor(e){super(`ConfigurationError - ${e}`)}}class Ad extends zd{constructor(e){super(`Option not Configured: ${e.stepTitle}`),this.optionId=e?.optionId||"N/A"}}class Ai extends zd{constructor(e){super(`Panel not Found: ${e.panelId}`),this.panelId=e?.panelId||"N/A"}}class So extends zd{constructor(e){super(`Asset not found for variant: ${e.name}`),this.variant=e}}class nc extends zd{constructor(e){super(`Resource not found for asset: ${e.name}`),this.asset=e}}class ns extends zd{constructor(e,t){super(`Workflow Misconfiguration: ${e.stepName} - ${t}`),this.step=e}}class Lg extends Lk{constructor(e){super(`ImplementationError - ${e}`)}}class nn extends Lg{constructor(e){super(`Unhandled Behavior Encountered: ${e}`)}}class wl extends Lg{constructor(e){super(`Parsing Error: ${e}`)}}class uo extends Lg{constructor(e){super(`Client Error: ${e}`)}}class Ug extends Lg{constructor(e){super(`Resource Generation Failed: ${e}`)}}class gO{get(e){return localStorage.getItem(e)||void 0}set(e,t){localStorage.setItem(e,t)}remove(e){localStorage.removeItem(e)}getMap(e){const t=this.get(e);if(t)return new Map(JSON.parse(t))}setMap(e,t){const n=JSON.stringify([...t.entries()]);this.set(e,n)}}class qw{constructor(){this.storage=new Map}get(e){return this.storage.get(e)||void 0}set(e,t){this.storage.set(e,t)}remove(e){this.storage.delete(e)}getMap(e){const t=this.get(e);if(t)return new Map(JSON.parse(t))}setMap(e,t){const n=JSON.stringify([...t.entries()]);this.set(e,n)}}const mO=()=>{try{return localStorage?new gO:new qw}catch{return console.warn("Local storage was unavilable due to browser security settings. Using in-memory storage instead."),new qw}},xr=mO();function vO(r){return new ss(function(e,t){var n=rs(e,[]);return new un(function(i){var a,s=!1;return Promise.resolve(n).then(function(o){return r(o,e.getContext())}).then(e.setContext).then(function(){s||(a=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){s=!0,a&&a.unsubscribe()}})})}function Uk(r){return new ss(function(e,t){return new un(function(n){var i,a,s;try{i=t(e).subscribe({next:function(o){if(o.errors?s=r({graphQLErrors:o.errors,response:o,operation:e,forward:t}):ok(o)&&(s=r({protocolErrors:o.extensions[_g],response:o,operation:e,forward:t})),s){a=s.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(o)},error:function(o){if(s=r({operation:e,networkError:o,graphQLErrors:o&&o.result&&o.result.errors||void 0,forward:t}),s){a=s.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(o)},complete:function(){s||n.complete.bind(n)()}})}catch(o){r({networkError:o,operation:e,forward:t}),n.error(o)}return function(){i&&i.unsubscribe(),a&&i.unsubscribe()}})})}(function(r){Na(e,r);function e(t){var n=r.call(this)||this;return n.link=Uk(t),n}return e.prototype.request=function(t,n){return this.link.request(t,n)},e})(ss);class yO{constructor(){this.defaultServerUrl="https://api.au.spiffcommerce.com",this.defaultServicesApiUrl="https://services.au.spiffcommerce.com",this.defaultHubUrl="https://hub.au.spiffcommerce.com",this.serverUrl=this.defaultServerUrl,this.servicesApiUrl=this.defaultServicesApiUrl,this.hubUrl=this.defaultHubUrl,this.serverUrlCallbacks=[]}getServerUrl(){return this.serverUrl}getServicesApiUrl(){return this.servicesApiUrl}getHubUrl(){return this.hubUrl}setServerUrl(e){this.serverUrl=e,this.serverUrlCallbacks.forEach(t=>t())}setServicesApiUrl(e){this.servicesApiUrl=e}setHubUrl(e){this.hubUrl=e}addServerUrlCallback(e){this.serverUrlCallbacks.push(e)}}const _s=new yO;var eo={},ul={},Qh={exports:{}},br={};var Ww;function AO(){if(Ww)return br;Ww=1;var r=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),h=Symbol.iterator;function f(K){return K===null||typeof K!="object"?null:(K=h&&K[h]||K["@@iterator"],typeof K=="function"?K:null)}var d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function y(K,ie,de){this.props=K,this.context=ie,this.refs=v,this.updater=de||d}y.prototype.isReactComponent={},y.prototype.setState=function(K,ie){if(typeof K!="object"&&typeof K!="function"&&K!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,K,ie,"setState")},y.prototype.forceUpdate=function(K){this.updater.enqueueForceUpdate(this,K,"forceUpdate")};function A(){}A.prototype=y.prototype;function C(K,ie,de){this.props=K,this.context=ie,this.refs=v,this.updater=de||d}var k=C.prototype=new A;k.constructor=C,g(k,y.prototype),k.isPureReactComponent=!0;var T=Array.isArray,S=Object.prototype.hasOwnProperty,R={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function G(K,ie,de){var Be,Ee={},ze=null,je=null;if(ie!=null)for(Be in ie.ref!==void 0&&(je=ie.ref),ie.key!==void 0&&(ze=""+ie.key),ie)S.call(ie,Be)&&!B.hasOwnProperty(Be)&&(Ee[Be]=ie[Be]);var qe=arguments.length-2;if(qe===1)Ee.children=de;else if(1<qe){for(var Ge=Array(qe),bt=0;bt<qe;bt++)Ge[bt]=arguments[bt+2];Ee.children=Ge}if(K&&K.defaultProps)for(Be in qe=K.defaultProps,qe)Ee[Be]===void 0&&(Ee[Be]=qe[Be]);return{$$typeof:r,type:K,key:ze,ref:je,props:Ee,_owner:R.current}}function $(K,ie){return{$$typeof:r,type:K.type,key:ie,ref:K.ref,props:K.props,_owner:K._owner}}function Y(K){return typeof K=="object"&&K!==null&&K.$$typeof===r}function X(K){var ie={"=":"=0",":":"=2"};return"$"+K.replace(/[=:]/g,function(de){return ie[de]})}var J=/\/+/g;function Q(K,ie){return typeof K=="object"&&K!==null&&K.key!=null?X(""+K.key):ie.toString(36)}function oe(K,ie,de,Be,Ee){var ze=typeof K;(ze==="undefined"||ze==="boolean")&&(K=null);var je=!1;if(K===null)je=!0;else switch(ze){case"string":case"number":je=!0;break;case"object":switch(K.$$typeof){case r:case e:je=!0}}if(je)return je=K,Ee=Ee(je),K=Be===""?"."+Q(je,0):Be,T(Ee)?(de="",K!=null&&(de=K.replace(J,"$&/")+"/"),oe(Ee,ie,de,"",function(bt){return bt})):Ee!=null&&(Y(Ee)&&(Ee=$(Ee,de+(!Ee.key||je&&je.key===Ee.key?"":(""+Ee.key).replace(J,"$&/")+"/")+K)),ie.push(Ee)),1;if(je=0,Be=Be===""?".":Be+":",T(K))for(var qe=0;qe<K.length;qe++){ze=K[qe];var Ge=Be+Q(ze,qe);je+=oe(ze,ie,de,Ge,Ee)}else if(Ge=f(K),typeof Ge=="function")for(K=Ge.call(K),qe=0;!(ze=K.next()).done;)ze=ze.value,Ge=Be+Q(ze,qe++),je+=oe(ze,ie,de,Ge,Ee);else if(ze==="object")throw ie=String(K),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(K).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.");return je}function se(K,ie,de){if(K==null)return K;var Be=[],Ee=0;return oe(K,Be,"","",function(ze){return ie.call(de,ze,Ee++)}),Be}function he(K){if(K._status===-1){var ie=K._result;ie=ie(),ie.then(function(de){(K._status===0||K._status===-1)&&(K._status=1,K._result=de)},function(de){(K._status===0||K._status===-1)&&(K._status=2,K._result=de)}),K._status===-1&&(K._status=0,K._result=ie)}if(K._status===1)return K._result.default;throw K._result}var ye={current:null},Ue={transition:null},Oe={ReactCurrentDispatcher:ye,ReactCurrentBatchConfig:Ue,ReactCurrentOwner:R};function Te(){throw Error("act(...) is not supported in production builds of React.")}return br.Children={map:se,forEach:function(K,ie,de){se(K,function(){ie.apply(this,arguments)},de)},count:function(K){var ie=0;return se(K,function(){ie++}),ie},toArray:function(K){return se(K,function(ie){return ie})||[]},only:function(K){if(!Y(K))throw Error("React.Children.only expected to receive a single React element child.");return K}},br.Component=y,br.Fragment=t,br.Profiler=i,br.PureComponent=C,br.StrictMode=n,br.Suspense=l,br.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Oe,br.act=Te,br.cloneElement=function(K,ie,de){if(K==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+K+".");var Be=g({},K.props),Ee=K.key,ze=K.ref,je=K._owner;if(ie!=null){if(ie.ref!==void 0&&(ze=ie.ref,je=R.current),ie.key!==void 0&&(Ee=""+ie.key),K.type&&K.type.defaultProps)var qe=K.type.defaultProps;for(Ge in ie)S.call(ie,Ge)&&!B.hasOwnProperty(Ge)&&(Be[Ge]=ie[Ge]===void 0&&qe!==void 0?qe[Ge]:ie[Ge])}var Ge=arguments.length-2;if(Ge===1)Be.children=de;else if(1<Ge){qe=Array(Ge);for(var bt=0;bt<Ge;bt++)qe[bt]=arguments[bt+2];Be.children=qe}return{$$typeof:r,type:K.type,key:Ee,ref:ze,props:Be,_owner:je}},br.createContext=function(K){return K={$$typeof:s,_currentValue:K,_currentValue2:K,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},K.Provider={$$typeof:a,_context:K},K.Consumer=K},br.createElement=G,br.createFactory=function(K){var ie=G.bind(null,K);return ie.type=K,ie},br.createRef=function(){return{current:null}},br.forwardRef=function(K){return{$$typeof:o,render:K}},br.isValidElement=Y,br.lazy=function(K){return{$$typeof:c,_payload:{_status:-1,_result:K},_init:he}},br.memo=function(K,ie){return{$$typeof:u,type:K,compare:ie===void 0?null:ie}},br.startTransition=function(K){var ie=Ue.transition;Ue.transition={};try{K()}finally{Ue.transition=ie}},br.unstable_act=Te,br.useCallback=function(K,ie){return ye.current.useCallback(K,ie)},br.useContext=function(K){return ye.current.useContext(K)},br.useDebugValue=function(){},br.useDeferredValue=function(K){return ye.current.useDeferredValue(K)},br.useEffect=function(K,ie){return ye.current.useEffect(K,ie)},br.useId=function(){return ye.current.useId()},br.useImperativeHandle=function(K,ie,de){return ye.current.useImperativeHandle(K,ie,de)},br.useInsertionEffect=function(K,ie){return ye.current.useInsertionEffect(K,ie)},br.useLayoutEffect=function(K,ie){return ye.current.useLayoutEffect(K,ie)},br.useMemo=function(K,ie){return ye.current.useMemo(K,ie)},br.useReducer=function(K,ie,de){return ye.current.useReducer(K,ie,de)},br.useRef=function(K){return ye.current.useRef(K)},br.useState=function(K){return ye.current.useState(K)},br.useSyncExternalStore=function(K,ie,de){return ye.current.useSyncExternalStore(K,ie,de)},br.useTransition=function(){return ye.current.useTransition()},br.version="18.3.1",br}var zf={exports:{}};zf.exports;var Qw;function bO(){return Qw||(Qw=1,(function(r,e){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var t="18.3.1",n=Symbol.for("react.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=Symbol.iterator,A="@@iterator";function C(M){if(M===null||typeof M!="object")return null;var te=y&&M[y]||M[A];return typeof te=="function"?te:null}var k={current:null},T={transition:null},S={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},R={current:null},B={},G=null;function $(M){G=M}B.setExtraStackFrame=function(M){G=M},B.getCurrentStack=null,B.getStackAddendum=function(){var M="";G&&(M+=G);var te=B.getCurrentStack;return te&&(M+=te()||""),M};var Y=!1,X=!1,J=!1,Q=!1,oe=!1,se={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:T,ReactCurrentOwner:R};se.ReactDebugCurrentFrame=B,se.ReactCurrentActQueue=S;function he(M){{for(var te=arguments.length,fe=new Array(te>1?te-1:0),be=1;be<te;be++)fe[be-1]=arguments[be];Ue("warn",M,fe)}}function ye(M){{for(var te=arguments.length,fe=new Array(te>1?te-1:0),be=1;be<te;be++)fe[be-1]=arguments[be];Ue("error",M,fe)}}function Ue(M,te,fe){{var be=se.ReactDebugCurrentFrame,Me=be.getStackAddendum();Me!==""&&(te+="%s",fe=fe.concat([Me]));var Ke=fe.map(function(Xe){return String(Xe)});Ke.unshift("Warning: "+te),Function.prototype.apply.call(console[M],console,Ke)}}var Oe={};function Te(M,te){{var fe=M.constructor,be=fe&&(fe.displayName||fe.name)||"ReactClass",Me=be+"."+te;if(Oe[Me])return;ye("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",te,be),Oe[Me]=!0}}var K={isMounted:function(M){return!1},enqueueForceUpdate:function(M,te,fe){Te(M,"forceUpdate")},enqueueReplaceState:function(M,te,fe,be){Te(M,"replaceState")},enqueueSetState:function(M,te,fe,be){Te(M,"setState")}},ie=Object.assign,de={};Object.freeze(de);function Be(M,te,fe){this.props=M,this.context=te,this.refs=de,this.updater=fe||K}Be.prototype.isReactComponent={},Be.prototype.setState=function(M,te){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,te,"setState")},Be.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};{var Ee={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},ze=function(M,te){Object.defineProperty(Be.prototype,M,{get:function(){he("%s(...) is deprecated in plain JavaScript React classes. %s",te[0],te[1])}})};for(var je in Ee)Ee.hasOwnProperty(je)&&ze(je,Ee[je])}function qe(){}qe.prototype=Be.prototype;function Ge(M,te,fe){this.props=M,this.context=te,this.refs=de,this.updater=fe||K}var bt=Ge.prototype=new qe;bt.constructor=Ge,ie(bt,Be.prototype),bt.isPureReactComponent=!0;function rr(){var M={current:null};return Object.seal(M),M}var Pr=Array.isArray;function $t(M){return Pr(M)}function ar(M){{var te=typeof Symbol=="function"&&Symbol.toStringTag,fe=te&&M[Symbol.toStringTag]||M.constructor.name||"Object";return fe}}function St(M){try{return st(M),!1}catch{return!0}}function st(M){return""+M}function Qr(M){if(St(M))return ye("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ar(M)),st(M)}function Sr(M,te,fe){var be=M.displayName;if(be)return be;var Me=te.displayName||te.name||"";return Me!==""?fe+"("+Me+")":fe}function gr(M){return M.displayName||"Context"}function nr(M){if(M==null)return null;if(typeof M.tag=="number"&&ye("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof M=="function")return M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case a:return"Fragment";case i:return"Portal";case o:return"Profiler";case s:return"StrictMode";case h:return"Suspense";case f:return"SuspenseList"}if(typeof M=="object")switch(M.$$typeof){case u:var te=M;return gr(te)+".Consumer";case l:var fe=M;return gr(fe._context)+".Provider";case c:return Sr(M,M.render,"ForwardRef");case d:var be=M.displayName||null;return be!==null?be:nr(M.type)||"Memo";case g:{var Me=M,Ke=Me._payload,Xe=Me._init;try{return nr(Xe(Ke))}catch{return null}}}return null}var fr=Object.prototype.hasOwnProperty,Yt={key:!0,ref:!0,__self:!0,__source:!0},Xt,mt,wr;wr={};function an(M){if(fr.call(M,"ref")){var te=Object.getOwnPropertyDescriptor(M,"ref").get;if(te&&te.isReactWarning)return!1}return M.ref!==void 0}function _r(M){if(fr.call(M,"key")){var te=Object.getOwnPropertyDescriptor(M,"key").get;if(te&&te.isReactWarning)return!1}return M.key!==void 0}function ir(M,te){var fe=function(){Xt||(Xt=!0,ye("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};fe.isReactWarning=!0,Object.defineProperty(M,"key",{get:fe,configurable:!0})}function Yr(M,te){var fe=function(){mt||(mt=!0,ye("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",te))};fe.isReactWarning=!0,Object.defineProperty(M,"ref",{get:fe,configurable:!0})}function kr(M){if(typeof M.ref=="string"&&R.current&&M.__self&&R.current.stateNode!==M.__self){var te=nr(R.current.type);wr[te]||(ye('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',te,M.ref),wr[te]=!0)}}var Zr=function(M,te,fe,be,Me,Ke,Xe){var yt={$$typeof:n,type:M,key:te,ref:fe,props:Xe,_owner:Ke};return yt._store={},Object.defineProperty(yt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(yt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:be}),Object.defineProperty(yt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.freeze&&(Object.freeze(yt.props),Object.freeze(yt)),yt};function Vr(M,te,fe){var be,Me={},Ke=null,Xe=null,yt=null,Pt=null;if(te!=null){an(te)&&(Xe=te.ref,kr(te)),_r(te)&&(Qr(te.key),Ke=""+te.key),yt=te.__self===void 0?null:te.__self,Pt=te.__source===void 0?null:te.__source;for(be in te)fr.call(te,be)&&!Yt.hasOwnProperty(be)&&(Me[be]=te[be])}var pr=arguments.length-2;if(pr===1)Me.children=fe;else if(pr>1){for(var yr=Array(pr),ur=0;ur<pr;ur++)yr[ur]=arguments[ur+2];Object.freeze&&Object.freeze(yr),Me.children=yr}if(M&&M.defaultProps){var Tr=M.defaultProps;for(be in Tr)Me[be]===void 0&&(Me[be]=Tr[be])}if(Ke||Xe){var $r=typeof M=="function"?M.displayName||M.name||"Unknown":M;Ke&&ir(Me,$r),Xe&&Yr(Me,$r)}return Zr(M,Ke,Xe,yt,Pt,R.current,Me)}function pn(M,te){var fe=Zr(M.type,te,M.ref,M._self,M._source,M._owner,M.props);return fe}function gn(M,te,fe){if(M==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var be,Me=ie({},M.props),Ke=M.key,Xe=M.ref,yt=M._self,Pt=M._source,pr=M._owner;if(te!=null){an(te)&&(Xe=te.ref,pr=R.current),_r(te)&&(Qr(te.key),Ke=""+te.key);var yr;M.type&&M.type.defaultProps&&(yr=M.type.defaultProps);for(be in te)fr.call(te,be)&&!Yt.hasOwnProperty(be)&&(te[be]===void 0&&yr!==void 0?Me[be]=yr[be]:Me[be]=te[be])}var ur=arguments.length-2;if(ur===1)Me.children=fe;else if(ur>1){for(var Tr=Array(ur),$r=0;$r<ur;$r++)Tr[$r]=arguments[$r+2];Me.children=Tr}return Zr(M.type,Ke,Xe,yt,Pt,pr,Me)}function Fr(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}var zr=".",en=":";function Hr(M){var te=/[=:]/g,fe={"=":"=0",":":"=2"},be=M.replace(te,function(Me){return fe[Me]});return"$"+be}var zt=!1,sr=/\/+/g;function Er(M){return M.replace(sr,"$&/")}function tt(M,te){return typeof M=="object"&&M!==null&&M.key!=null?(Qr(M.key),Hr(""+M.key)):te.toString(36)}function Nr(M,te,fe,be,Me){var Ke=typeof M;(Ke==="undefined"||Ke==="boolean")&&(M=null);var Xe=!1;if(M===null)Xe=!0;else switch(Ke){case"string":case"number":Xe=!0;break;case"object":switch(M.$$typeof){case n:case i:Xe=!0}}if(Xe){var yt=M,Pt=Me(yt),pr=be===""?zr+tt(yt,0):be;if($t(Pt)){var yr="";pr!=null&&(yr=Er(pr)+"/"),Nr(Pt,te,yr,"",function(Ha){return Ha})}else Pt!=null&&(Fr(Pt)&&(Pt.key&&(!yt||yt.key!==Pt.key)&&Qr(Pt.key),Pt=pn(Pt,fe+(Pt.key&&(!yt||yt.key!==Pt.key)?Er(""+Pt.key)+"/":"")+pr)),te.push(Pt));return 1}var ur,Tr,$r=0,yn=be===""?zr:be+en;if($t(M))for(var Xi=0;Xi<M.length;Xi++)ur=M[Xi],Tr=yn+tt(ur,Xi),$r+=Nr(ur,te,fe,Tr,Me);else{var ua=C(M);if(typeof ua=="function"){var Ji=M;ua===Ji.entries&&(zt||he("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),zt=!0);for(var $n=ua.call(Ji),Ki,pi=0;!(Ki=$n.next()).done;)ur=Ki.value,Tr=yn+tt(ur,pi++),$r+=Nr(ur,te,fe,Tr,Me)}else if(Ke==="object"){var za=String(M);throw new Error("Objects are not valid as a React child (found: "+(za==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":za)+"). If you meant to render a collection of children, use an array instead.")}}return $r}function Xr(M,te,fe){if(M==null)return M;var be=[],Me=0;return Nr(M,be,"","",function(Ke){return te.call(fe,Ke,Me++)}),be}function Se(M){var te=0;return Xr(M,function(){te++}),te}function P(M,te,fe){Xr(M,function(){te.apply(this,arguments)},fe)}function U(M){return Xr(M,function(te){return te})||[]}function Z(M){if(!Fr(M))throw new Error("React.Children.only expected to receive a single React element child.");return M}function ue(M){var te={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};te.Provider={$$typeof:l,_context:te};var fe=!1,be=!1,Me=!1;{var Ke={$$typeof:u,_context:te};Object.defineProperties(Ke,{Provider:{get:function(){return be||(be=!0,ye("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),te.Provider},set:function(Xe){te.Provider=Xe}},_currentValue:{get:function(){return te._currentValue},set:function(Xe){te._currentValue=Xe}},_currentValue2:{get:function(){return te._currentValue2},set:function(Xe){te._currentValue2=Xe}},_threadCount:{get:function(){return te._threadCount},set:function(Xe){te._threadCount=Xe}},Consumer:{get:function(){return fe||(fe=!0,ye("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),te.Consumer}},displayName:{get:function(){return te.displayName},set:function(Xe){Me||(he("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",Xe),Me=!0)}}}),te.Consumer=Ke}return te._currentRenderer=null,te._currentRenderer2=null,te}var Ie=-1,We=0,wt=1,It=2;function Nt(M){if(M._status===Ie){var te=M._result,fe=te();if(fe.then(function(Ke){if(M._status===We||M._status===Ie){var Xe=M;Xe._status=wt,Xe._result=Ke}},function(Ke){if(M._status===We||M._status===Ie){var Xe=M;Xe._status=It,Xe._result=Ke}}),M._status===Ie){var be=M;be._status=We,be._result=fe}}if(M._status===wt){var Me=M._result;return Me===void 0&&ye(`lazy: Expected the result of a dynamic import() call. Instead received: %s
64
64
 
65
65
  Your code should look like:
66
66
  const MyComponent = lazy(() => import('./MyComponent'))
@@ -88,15 +88,15 @@ Check the top-level render call using <`+fe+">.")}return te}function Gn(M,te){if
88
88
  `?E.push(`
89
89
  `,z):E.push(""+z))}return typeof ce=="string"&&ce[0]===`
90
90
  `&&E.push(`
91
- `),ce;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":E.push(J(O));for(var Gr in z)if(t.call(z,Gr)&&(ce=z[Gr],ce!=null))switch(Gr){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,O));default:R(E,q,Gr,ce)}return E.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return $(E,z,O,q);case"html":return pe.insertionMode===0&&E.push("<!DOCTYPE html>"),$(E,z,O,q);default:if(O.indexOf("-")===-1&&typeof z.is!="string")return $(E,z,O,q);E.push(J(O)),xe=ce=null;for(lt in z)if(t.call(z,lt)&&(_e=z[lt],_e!=null))switch(lt){case"children":ce=_e;break;case"dangerouslySetInnerHTML":xe=_e;break;case"style":S(E,q,_e);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:s(lt)&&typeof _e!="function"&&typeof _e!="symbol"&&E.push(" ",lt,'="',g(_e),'"')}return E.push(">"),B(E,xe,ce),ce}}function oe(E,O,z){if(E.push('<!--$?--><template id="'),z===null)throw Error(e(395));return E.push(z),E.push('"></template>')}function se(E,O,z,q){switch(z.insertionMode){case 0:case 1:return E.push('<div hidden id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 2:return E.push('<svg aria-hidden="true" style="display:none" id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 3:return E.push('<math aria-hidden="true" style="display:none" id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 4:return E.push('<table hidden id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 5:return E.push('<table hidden><tbody id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 6:return E.push('<table hidden><tr id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 7:return E.push('<table hidden><colgroup id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');default:throw Error(e(397))}}function he(E,O){switch(O.insertionMode){case 0:case 1:return E.push("</div>");case 2:return E.push("</svg>");case 3:return E.push("</math>");case 4:return E.push("</table>");case 5:return E.push("</tbody></table>");case 6:return E.push("</tr></table>");case 7:return E.push("</colgroup></table>");default:throw Error(e(397))}}var ye=/[<\u2028\u2029]/g;function Ue(E){return JSON.stringify(E).replace(ye,function(O){switch(O){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Oe(E,O){return O=O===void 0?"":O,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:O+"P:",segmentPrefix:O+"S:",boundaryPrefix:O+"B:",idPrefix:O,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:E}}function Te(E,O,z,q){return z.generateStaticMarkup?(E.push(g(O)),!1):(O===""?E=q:(q&&E.push("<!-- -->"),E.push(g(O)),E=!0),E)}var K=Object.assign,ie=Symbol.for("react.element"),de=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ee=Symbol.for("react.strict_mode"),ze=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),qe=Symbol.for("react.context"),Ge=Symbol.for("react.forward_ref"),bt=Symbol.for("react.suspense"),rr=Symbol.for("react.suspense_list"),Pr=Symbol.for("react.memo"),$t=Symbol.for("react.lazy"),ar=Symbol.for("react.scope"),St=Symbol.for("react.debug_trace_mode"),st=Symbol.for("react.legacy_hidden"),Qr=Symbol.for("react.default_value"),Sr=Symbol.iterator;function gr(E){if(E==null)return null;if(typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case Be:return"Fragment";case de:return"Portal";case ze:return"Profiler";case Ee:return"StrictMode";case bt:return"Suspense";case rr:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case qe:return(E.displayName||"Context")+".Consumer";case je:return(E._context.displayName||"Context")+".Provider";case Ge:var O=E.render;return E=E.displayName,E||(E=O.displayName||O.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case Pr:return O=E.displayName||null,O!==null?O:gr(E.type)||"Memo";case $t:O=E._payload,E=E._init;try{return gr(E(O))}catch{}}return null}var nr={};function fr(E,O){if(E=E.contextTypes,!E)return nr;var z={},q;for(q in E)z[q]=O[q];return z}var Yt=null;function Xt(E,O){if(E!==O){E.context._currentValue2=E.parentValue,E=E.parent;var z=O.parent;if(E===null){if(z!==null)throw Error(e(401))}else{if(z===null)throw Error(e(401));Xt(E,z)}O.context._currentValue2=O.value}}function mt(E){E.context._currentValue2=E.parentValue,E=E.parent,E!==null&&mt(E)}function wr(E){var O=E.parent;O!==null&&wr(O),E.context._currentValue2=E.value}function an(E,O){if(E.context._currentValue2=E.parentValue,E=E.parent,E===null)throw Error(e(402));E.depth===O.depth?Xt(E,O):an(E,O)}function _r(E,O){var z=O.parent;if(z===null)throw Error(e(402));E.depth===z.depth?Xt(E,z):_r(E,z),O.context._currentValue2=O.value}function ir(E){var O=Yt;O!==E&&(O===null?wr(E):E===null?mt(O):O.depth===E.depth?Xt(O,E):O.depth>E.depth?an(O,E):_r(O,E),Yt=E)}var Yr={isMounted:function(){return!1},enqueueSetState:function(E,O){E=E._reactInternals,E.queue!==null&&E.queue.push(O)},enqueueReplaceState:function(E,O){E=E._reactInternals,E.replace=!0,E.queue=[O]},enqueueForceUpdate:function(){}};function kr(E,O,z,q){var pe=E.state!==void 0?E.state:null;E.updater=Yr,E.props=z,E.state=pe;var ce={queue:[],replace:!1};E._reactInternals=ce;var xe=O.contextType;if(E.context=typeof xe=="object"&&xe!==null?xe._currentValue2:q,xe=O.getDerivedStateFromProps,typeof xe=="function"&&(xe=xe(z,pe),pe=xe==null?pe:K({},pe,xe),E.state=pe),typeof O.getDerivedStateFromProps!="function"&&typeof E.getSnapshotBeforeUpdate!="function"&&(typeof E.UNSAFE_componentWillMount=="function"||typeof E.componentWillMount=="function"))if(O=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),O!==E.state&&Yr.enqueueReplaceState(E,E.state,null),ce.queue!==null&&0<ce.queue.length)if(O=ce.queue,xe=ce.replace,ce.queue=null,ce.replace=!1,xe&&O.length===1)E.state=O[0];else{for(ce=xe?O[0]:E.state,pe=!0,xe=xe?1:0;xe<O.length;xe++){var _e=O[xe];_e=typeof _e=="function"?_e.call(E,ce,z,q):_e,_e!=null&&(pe?(pe=!1,ce=K({},ce,_e)):K(ce,_e))}E.state=ce}else ce.queue=null}var Zr={id:1,overflow:""};function Vr(E,O,z){var q=E.id;E=E.overflow;var pe=32-pn(q)-1;q&=~(1<<pe),z+=1;var ce=32-pn(O)+pe;if(30<ce){var xe=pe-pe%5;return ce=(q&(1<<xe)-1).toString(32),q>>=xe,pe-=xe,{id:1<<32-pn(O)+pe|z<<pe|q,overflow:ce+E}}return{id:1<<ce|z<<pe|q,overflow:E}}var pn=Math.clz32?Math.clz32:zr,gn=Math.log,Fr=Math.LN2;function zr(E){return E>>>=0,E===0?32:31-(gn(E)/Fr|0)|0}function en(E,O){return E===O&&(E!==0||1/E===1/O)||E!==E&&O!==O}var Hr=typeof Object.is=="function"?Object.is:en,zt=null,sr=null,Er=null,tt=null,Nr=!1,Xr=!1,Se=0,P=null,U=0;function Z(){if(zt===null)throw Error(e(321));return zt}function ue(){if(0<U)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function Ie(){return tt===null?Er===null?(Nr=!1,Er=tt=ue()):(Nr=!0,tt=Er):tt.next===null?(Nr=!1,tt=tt.next=ue()):(Nr=!0,tt=tt.next),tt}function We(){sr=zt=null,Xr=!1,Er=null,U=0,tt=P=null}function wt(E,O){return typeof O=="function"?O(E):O}function It(E,O,z){if(zt=Z(),tt=Ie(),Nr){var q=tt.queue;if(O=q.dispatch,P!==null&&(z=P.get(q),z!==void 0)){P.delete(q),q=tt.memoizedState;do q=E(q,z.action),z=z.next;while(z!==null);return tt.memoizedState=q,[q,O]}return[tt.memoizedState,O]}return E=E===wt?typeof O=="function"?O():O:z!==void 0?z(O):O,tt.memoizedState=E,E=tt.queue={last:null,dispatch:null},E=E.dispatch=or.bind(null,zt,E),[tt.memoizedState,E]}function Nt(E,O){if(zt=Z(),tt=Ie(),O=O===void 0?null:O,tt!==null){var z=tt.memoizedState;if(z!==null&&O!==null){var q=z[1];e:if(q===null)q=!1;else{for(var pe=0;pe<q.length&&pe<O.length;pe++)if(!Hr(O[pe],q[pe])){q=!1;break e}q=!0}if(q)return z[0]}}return E=E(),tt.memoizedState=[E,O],E}function or(E,O,z){if(25<=U)throw Error(e(301));if(E===zt)if(Xr=!0,E={action:z,next:null},P===null&&(P=new Map),z=P.get(O),z===void 0)P.set(O,E);else{for(O=z;O.next!==null;)O=O.next;O.next=E}}function Lt(){throw Error(e(394))}function ee(){}var De={readContext:function(E){return E._currentValue2},useContext:function(E){return Z(),E._currentValue2},useMemo:Nt,useReducer:It,useRef:function(E){zt=Z(),tt=Ie();var O=tt.memoizedState;return O===null?(E={current:E},tt.memoizedState=E):O},useState:function(E){return It(wt,E)},useInsertionEffect:ee,useLayoutEffect:function(){},useCallback:function(E,O){return Nt(function(){return E},O)},useImperativeHandle:ee,useEffect:ee,useDebugValue:ee,useDeferredValue:function(E){return Z(),E},useTransition:function(){return Z(),[!1,Lt]},useId:function(){var E=sr.treeContext,O=E.overflow;E=E.id,E=(E&~(1<<32-pn(E)-1)).toString(32)+O;var z=Qe;if(z===null)throw Error(e(404));return O=Se++,E=":"+z.idPrefix+"R"+E,0<O&&(E+="H"+O.toString(32)),E+":"},useMutableSource:function(E,O){return Z(),O(E._source)},useSyncExternalStore:function(E,O,z){if(z===void 0)throw Error(e(407));return z()}},Qe=null,Ye=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ct(E){return console.error(E),null}function dt(){}function Dt(E,O,z,q,pe,ce,xe,_e,rt){var lt=[],nt=new Set;return O={destination:null,responseState:O,progressiveChunkSize:q===void 0?12800:q,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:nt,pingedTasks:lt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:pe===void 0?Ct:pe,onAllReady:dt,onShellReady:xe===void 0?dt:xe,onShellError:dt,onFatalError:dt},z=hr(O,0,null,z,!1,!1),z.parentFlushed=!0,E=Et(O,E,null,z,nt,nr,null,Zr),lt.push(E),O}function Et(E,O,z,q,pe,ce,xe,_e){E.allPendingTasks++,z===null?E.pendingRootTasks++:z.pendingTasks++;var rt={node:O,ping:function(){var lt=E.pingedTasks;lt.push(rt),lt.length===1&&cn(E)},blockedBoundary:z,blockedSegment:q,abortSet:pe,legacyContext:ce,context:xe,treeContext:_e};return pe.add(rt),rt}function hr(E,O,z,q,pe,ce){return{status:0,id:-1,index:O,parentFlushed:!1,chunks:[],children:[],formatContext:q,boundary:z,lastPushedText:pe,textEmbedded:ce}}function er(E,O){if(E=E.onError(O),E!=null&&typeof E!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof E+'" instead');return E}function dr(E,O){var z=E.onShellError;z(O),z=E.onFatalError,z(O),E.destination!==null?(E.status=2,E.destination.destroy(O)):(E.status=1,E.fatalError=O)}function Ht(E,O,z,q,pe){for(zt={},sr=O,Se=0,E=z(q,pe);Xr;)Xr=!1,Se=0,U+=1,tt=null,E=z(q,pe);return We(),E}function On(E,O,z,q){var pe=z.render(),ce=q.childContextTypes;if(ce!=null){var xe=O.legacyContext;if(typeof z.getChildContext!="function")q=xe;else{z=z.getChildContext();for(var _e in z)if(!(_e in ce))throw Error(e(108,gr(q)||"Unknown",_e));q=K({},xe,z)}O.legacyContext=q,Cr(E,O,pe),O.legacyContext=xe}else Cr(E,O,pe)}function Tn(E,O){if(E&&E.defaultProps){O=K({},O),E=E.defaultProps;for(var z in E)O[z]===void 0&&(O[z]=E[z]);return O}return O}function mr(E,O,z,q,pe){if(typeof z=="function")if(z.prototype&&z.prototype.isReactComponent){pe=fr(z,O.legacyContext);var ce=z.contextType;ce=new z(q,typeof ce=="object"&&ce!==null?ce._currentValue2:pe),kr(ce,z,q,pe),On(E,O,ce,z)}else{ce=fr(z,O.legacyContext),pe=Ht(E,O,z,q,ce);var xe=Se!==0;if(typeof pe=="object"&&pe!==null&&typeof pe.render=="function"&&pe.$$typeof===void 0)kr(pe,z,q,ce),On(E,O,pe,z);else if(xe){q=O.treeContext,O.treeContext=Vr(q,1,0);try{Cr(E,O,pe)}finally{O.treeContext=q}}else Cr(E,O,pe)}else if(typeof z=="string"){switch(pe=O.blockedSegment,ce=Q(pe.chunks,z,q,E.responseState,pe.formatContext),pe.lastPushedText=!1,xe=pe.formatContext,pe.formatContext=k(xe,z,q),Rr(E,O,ce),pe.formatContext=xe,z){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:pe.chunks.push("</",z,">")}pe.lastPushedText=!1}else{switch(z){case st:case St:case Ee:case ze:case Be:Cr(E,O,q.children);return;case rr:Cr(E,O,q.children);return;case ar:throw Error(e(343));case bt:e:{z=O.blockedBoundary,pe=O.blockedSegment,ce=q.fallback,q=q.children,xe=new Set;var _e={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:xe,errorDigest:null},rt=hr(E,pe.chunks.length,_e,pe.formatContext,!1,!1);pe.children.push(rt),pe.lastPushedText=!1;var lt=hr(E,0,null,pe.formatContext,!1,!1);lt.parentFlushed=!0,O.blockedBoundary=_e,O.blockedSegment=lt;try{if(Rr(E,O,q),E.responseState.generateStaticMarkup||lt.lastPushedText&&lt.textEmbedded&&lt.chunks.push("<!-- -->"),lt.status=1,jr(_e,lt),_e.pendingTasks===0)break e}catch(nt){lt.status=4,_e.forceClientRender=!0,_e.errorDigest=er(E,nt)}finally{O.blockedBoundary=z,O.blockedSegment=pe}O=Et(E,ce,z,rt,xe,O.legacyContext,O.context,O.treeContext),E.pingedTasks.push(O)}return}if(typeof z=="object"&&z!==null)switch(z.$$typeof){case Ge:if(q=Ht(E,O,z.render,q,pe),Se!==0){z=O.treeContext,O.treeContext=Vr(z,1,0);try{Cr(E,O,q)}finally{O.treeContext=z}}else Cr(E,O,q);return;case Pr:z=z.type,q=Tn(z,q),mr(E,O,z,q,pe);return;case je:if(pe=q.children,z=z._context,q=q.value,ce=z._currentValue2,z._currentValue2=q,xe=Yt,Yt=q={parent:xe,depth:xe===null?0:xe.depth+1,context:z,parentValue:ce,value:q},O.context=q,Cr(E,O,pe),E=Yt,E===null)throw Error(e(403));q=E.parentValue,E.context._currentValue2=q===Qr?E.context._defaultValue:q,E=Yt=E.parent,O.context=E;return;case qe:q=q.children,q=q(z._currentValue2),Cr(E,O,q);return;case $t:pe=z._init,z=pe(z._payload),q=Tn(z,q),mr(E,O,z,q,void 0);return}throw Error(e(130,z==null?z:typeof z,""))}}function Cr(E,O,z){if(O.node=z,typeof z=="object"&&z!==null){switch(z.$$typeof){case ie:mr(E,O,z.type,z.props,z.ref);return;case de:throw Error(e(257));case $t:var q=z._init;z=q(z._payload),Cr(E,O,z);return}if(A(z)){bn(E,O,z);return}if(z===null||typeof z!="object"?q=null:(q=Sr&&z[Sr]||z["@@iterator"],q=typeof q=="function"?q:null),q&&(q=q.call(z))){if(z=q.next(),!z.done){var pe=[];do pe.push(z.value),z=q.next();while(!z.done);bn(E,O,pe)}return}throw E=Object.prototype.toString.call(z),Error(e(31,E==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":E))}typeof z=="string"?(q=O.blockedSegment,q.lastPushedText=Te(O.blockedSegment.chunks,z,E.responseState,q.lastPushedText)):typeof z=="number"&&(q=O.blockedSegment,q.lastPushedText=Te(O.blockedSegment.chunks,""+z,E.responseState,q.lastPushedText))}function bn(E,O,z){for(var q=z.length,pe=0;pe<q;pe++){var ce=O.treeContext;O.treeContext=Vr(ce,q,pe);try{Rr(E,O,z[pe])}finally{O.treeContext=ce}}}function Rr(E,O,z){var q=O.blockedSegment.formatContext,pe=O.legacyContext,ce=O.context;try{return Cr(E,O,z)}catch(rt){if(We(),typeof rt=="object"&&rt!==null&&typeof rt.then=="function"){z=rt;var xe=O.blockedSegment,_e=hr(E,xe.chunks.length,null,xe.formatContext,xe.lastPushedText,!0);xe.children.push(_e),xe.lastPushedText=!1,E=Et(E,O.node,O.blockedBoundary,_e,O.abortSet,O.legacyContext,O.context,O.treeContext).ping,z.then(E,E),O.blockedSegment.formatContext=q,O.legacyContext=pe,O.context=ce,ir(ce)}else throw O.blockedSegment.formatContext=q,O.legacyContext=pe,O.context=ce,ir(ce),rt}}function jn(E){var O=E.blockedBoundary;E=E.blockedSegment,E.status=3,Cn(this,O,E)}function wn(E,O,z){var q=E.blockedBoundary;E.blockedSegment.status=3,q===null?(O.allPendingTasks--,O.status!==2&&(O.status=2,O.destination!==null&&O.destination.push(null))):(q.pendingTasks--,q.forceClientRender||(q.forceClientRender=!0,E=z===void 0?Error(e(432)):z,q.errorDigest=O.onError(E),q.parentFlushed&&O.clientRenderedBoundaries.push(q)),q.fallbackAbortableTasks.forEach(function(pe){return wn(pe,O,z)}),q.fallbackAbortableTasks.clear(),O.allPendingTasks--,O.allPendingTasks===0&&(q=O.onAllReady,q()))}function jr(E,O){if(O.chunks.length===0&&O.children.length===1&&O.children[0].boundary===null){var z=O.children[0];z.id=O.id,z.parentFlushed=!0,z.status===1&&jr(E,z)}else E.completedSegments.push(O)}function Cn(E,O,z){if(O===null){if(z.parentFlushed){if(E.completedRootSegment!==null)throw Error(e(389));E.completedRootSegment=z}E.pendingRootTasks--,E.pendingRootTasks===0&&(E.onShellError=dt,O=E.onShellReady,O())}else O.pendingTasks--,O.forceClientRender||(O.pendingTasks===0?(z.parentFlushed&&z.status===1&&jr(O,z),O.parentFlushed&&E.completedBoundaries.push(O),O.fallbackAbortableTasks.forEach(jn,E),O.fallbackAbortableTasks.clear()):z.parentFlushed&&z.status===1&&(jr(O,z),O.completedSegments.length===1&&O.parentFlushed&&E.partialBoundaries.push(O)));E.allPendingTasks--,E.allPendingTasks===0&&(E=E.onAllReady,E())}function cn(E){if(E.status!==2){var O=Yt,z=Ye.current;Ye.current=De;var q=Qe;Qe=E.responseState;try{var pe=E.pingedTasks,ce;for(ce=0;ce<pe.length;ce++){var xe=pe[ce],_e=E,rt=xe.blockedSegment;if(rt.status===0){ir(xe.context);try{Cr(_e,xe,xe.node),_e.responseState.generateStaticMarkup||rt.lastPushedText&&rt.textEmbedded&&rt.chunks.push("<!-- -->"),xe.abortSet.delete(xe),rt.status=1,Cn(_e,xe.blockedBoundary,rt)}catch(fn){if(We(),typeof fn=="object"&&fn!==null&&typeof fn.then=="function"){var lt=xe.ping;fn.then(lt,lt)}else{xe.abortSet.delete(xe),rt.status=4;var nt=xe.blockedBoundary,Jt=fn,vr=er(_e,Jt);if(nt===null?dr(_e,Jt):(nt.pendingTasks--,nt.forceClientRender||(nt.forceClientRender=!0,nt.errorDigest=vr,nt.parentFlushed&&_e.clientRenderedBoundaries.push(nt))),_e.allPendingTasks--,_e.allPendingTasks===0){var Gr=_e.onAllReady;Gr()}}}}}pe.splice(0,ce),E.destination!==null&&sn(E,E.destination)}catch(fn){er(E,fn),dr(E,fn)}finally{Qe=q,Ye.current=z,z===De&&ir(O)}}}function tn(E,O,z){switch(z.parentFlushed=!0,z.status){case 0:var q=z.id=E.nextSegmentId++;return z.lastPushedText=!1,z.textEmbedded=!1,E=E.responseState,O.push('<template id="'),O.push(E.placeholderPrefix),E=q.toString(16),O.push(E),O.push('"></template>');case 1:z.status=2;var pe=!0;q=z.chunks;var ce=0;z=z.children;for(var xe=0;xe<z.length;xe++){for(pe=z[xe];ce<pe.index;ce++)O.push(q[ce]);pe=Jn(E,O,pe)}for(;ce<q.length-1;ce++)O.push(q[ce]);return ce<q.length&&(pe=O.push(q[ce])),pe;default:throw Error(e(390))}}function Jn(E,O,z){var q=z.boundary;if(q===null)return tn(E,O,z);if(q.parentFlushed=!0,q.forceClientRender)return E.responseState.generateStaticMarkup||(q=q.errorDigest,O.push("<!--$!-->"),O.push("<template"),q&&(O.push(' data-dgst="'),q=g(q),O.push(q),O.push('"')),O.push("></template>")),tn(E,O,z),E=E.responseState.generateStaticMarkup?!0:O.push("<!--/$-->"),E;if(0<q.pendingTasks){q.rootSegmentID=E.nextSegmentId++,0<q.completedSegments.length&&E.partialBoundaries.push(q);var pe=E.responseState,ce=pe.nextSuspenseID++;return pe=pe.boundaryPrefix+ce.toString(16),q=q.id=pe,oe(O,E.responseState,q),tn(E,O,z),O.push("<!--/$-->")}if(q.byteSize>E.progressiveChunkSize)return q.rootSegmentID=E.nextSegmentId++,E.completedBoundaries.push(q),oe(O,E.responseState,q.id),tn(E,O,z),O.push("<!--/$-->");if(E.responseState.generateStaticMarkup||O.push("<!--$-->"),z=q.completedSegments,z.length!==1)throw Error(e(391));return Jn(E,O,z[0]),E=E.responseState.generateStaticMarkup?!0:O.push("<!--/$-->"),E}function si(E,O,z){return se(O,E.responseState,z.formatContext,z.id),Jn(E,O,z),he(O,z.formatContext)}function xn(E,O,z){for(var q=z.completedSegments,pe=0;pe<q.length;pe++)mn(E,O,z,q[pe]);if(q.length=0,E=E.responseState,q=z.id,z=z.rootSegmentID,O.push(E.startInlineScript),E.sentCompleteBoundaryFunction?O.push('$RC("'):(E.sentCompleteBoundaryFunction=!0,O.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),q===null)throw Error(e(395));return z=z.toString(16),O.push(q),O.push('","'),O.push(E.segmentPrefix),O.push(z),O.push('")<\/script>')}function mn(E,O,z,q){if(q.status===2)return!0;var pe=q.id;if(pe===-1){if((q.id=z.rootSegmentID)===-1)throw Error(e(392));return si(E,O,q)}return si(E,O,q),E=E.responseState,O.push(E.startInlineScript),E.sentCompleteSegmentFunction?O.push('$RS("'):(E.sentCompleteSegmentFunction=!0,O.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),O.push(E.segmentPrefix),pe=pe.toString(16),O.push(pe),O.push('","'),O.push(E.placeholderPrefix),O.push(pe),O.push('")<\/script>')}function sn(E,O){try{var z=E.completedRootSegment;if(z!==null&&E.pendingRootTasks===0){Jn(E,O,z),E.completedRootSegment=null;var q=E.responseState.bootstrapChunks;for(z=0;z<q.length-1;z++)O.push(q[z]);z<q.length&&O.push(q[z])}var pe=E.clientRenderedBoundaries,ce;for(ce=0;ce<pe.length;ce++){var xe=pe[ce];q=O;var _e=E.responseState,rt=xe.id,lt=xe.errorDigest,nt=xe.errorMessage,Jt=xe.errorComponentStack;if(q.push(_e.startInlineScript),_e.sentClientRenderFunction?q.push('$RX("'):(_e.sentClientRenderFunction=!0,q.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),rt===null)throw Error(e(395));if(q.push(rt),q.push('"'),lt||nt||Jt){q.push(",");var vr=Ue(lt||"");q.push(vr)}if(nt||Jt){q.push(",");var Gr=Ue(nt||"");q.push(Gr)}if(Jt){q.push(",");var fn=Ue(Jt);q.push(fn)}if(!q.push(")<\/script>")){E.destination=null,ce++,pe.splice(0,ce);return}}pe.splice(0,ce);var Kn=E.completedBoundaries;for(ce=0;ce<Kn.length;ce++)if(!xn(E,O,Kn[ce])){E.destination=null,ce++,Kn.splice(0,ce);return}Kn.splice(0,ce);var Ln=E.partialBoundaries;for(ce=0;ce<Ln.length;ce++){var vn=Ln[ce];e:{pe=E,xe=O;var Or=vn.completedSegments;for(_e=0;_e<Or.length;_e++)if(!mn(pe,xe,vn,Or[_e])){_e++,Or.splice(0,_e);var Gn=!1;break e}Or.splice(0,_e),Gn=!0}if(!Gn){E.destination=null,ce++,Ln.splice(0,ce);return}}Ln.splice(0,ce);var Bn=E.completedBoundaries;for(ce=0;ce<Bn.length;ce++)if(!xn(E,O,Bn[ce])){E.destination=null,ce++,Bn.splice(0,ce);return}Bn.splice(0,ce)}finally{E.allPendingTasks===0&&E.pingedTasks.length===0&&E.clientRenderedBoundaries.length===0&&E.completedBoundaries.length===0&&O.push(null)}}function rn(E,O){try{var z=E.abortableTasks;z.forEach(function(q){return wn(q,E,O)}),z.clear(),E.destination!==null&&sn(E,E.destination)}catch(q){er(E,q),dr(E,q)}}function Lr(){}function on(E,O,z,q){var pe=!1,ce=null,xe="",_e={push:function(lt){return lt!==null&&(xe+=lt),!0},destroy:function(lt){pe=!0,ce=lt}},rt=!1;if(E=Dt(E,Oe(z,O?O.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,Lr,void 0,function(){rt=!0}),cn(E),rn(E,q),E.status===1)E.status=2,_e.destroy(E.fatalError);else if(E.status!==2&&E.destination===null){E.destination=_e;try{sn(E,_e)}catch(lt){er(E,lt),dr(E,lt)}}if(pe)throw ce;if(!rt)throw Error(e(426));return xe}return ul.renderToNodeStream=function(){throw Error(e(207))},ul.renderToStaticMarkup=function(E,O){return on(E,O,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},ul.renderToStaticNodeStream=function(){throw Error(e(208))},ul.renderToString=function(E,O){return on(E,O,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},ul.version="18.3.1",ul}var Yh={};var Jw;function CO(){if(Jw)return Yh;Jw=1;var r=Rl();function e(F){for(var _="https://reactjs.org/docs/error-decoder.html?invariant="+F,V=1;V<arguments.length;V++)_+="&args[]="+encodeURIComponent(arguments[V]);return"Minified React error #"+F+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=null,n=0;function i(F,_){if(_.length!==0)if(512<_.length)0<n&&(F.enqueue(new Uint8Array(t.buffer,0,n)),t=new Uint8Array(512),n=0),F.enqueue(_);else{var V=t.length-n;V<_.length&&(V===0?F.enqueue(t):(t.set(_.subarray(0,V),n),F.enqueue(t),_=_.subarray(V)),t=new Uint8Array(512),n=0),t.set(_,n),n+=_.length}}function a(F,_){return i(F,_),!0}function s(F){t&&0<n&&(F.enqueue(new Uint8Array(t.buffer,0,n)),t=null,n=0)}var o=new TextEncoder;function l(F){return o.encode(F)}function u(F){return o.encode(F)}function c(F,_){typeof F.error=="function"?F.error(_):F.close()}var h=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},g={};function v(F){return h.call(g,F)?!0:h.call(d,F)?!1:f.test(F)?g[F]=!0:(d[F]=!0,!1)}function y(F,_,V,W,Ae,ve,ke){this.acceptsBooleans=_===2||_===3||_===4,this.attributeName=W,this.attributeNamespace=Ae,this.mustUseProperty=V,this.propertyName=F,this.type=_,this.sanitizeURL=ve,this.removeEmptyString=ke}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(F){A[F]=new y(F,0,!1,F,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(F){var _=F[0];A[_]=new y(_,1,!1,F[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(F){A[F]=new y(F,2,!1,F.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(F){A[F]=new y(F,2,!1,F,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(F){A[F]=new y(F,3,!1,F.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(F){A[F]=new y(F,3,!0,F,null,!1,!1)}),["capture","download"].forEach(function(F){A[F]=new y(F,4,!1,F,null,!1,!1)}),["cols","rows","size","span"].forEach(function(F){A[F]=new y(F,6,!1,F,null,!1,!1)}),["rowSpan","start"].forEach(function(F){A[F]=new y(F,5,!1,F.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function k(F){return F[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(F){var _=F.replace(C,k);A[_]=new y(_,1,!1,F,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(F){var _=F.replace(C,k);A[_]=new y(_,1,!1,F,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(F){var _=F.replace(C,k);A[_]=new y(_,1,!1,F,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(F){A[F]=new y(F,1,!1,F.toLowerCase(),null,!1,!1)}),A.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(F){A[F]=new y(F,1,!1,F.toLowerCase(),null,!0,!0)});var T={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},S=["Webkit","ms","Moz","O"];Object.keys(T).forEach(function(F){S.forEach(function(_){_=_+F.charAt(0).toUpperCase()+F.substring(1),T[_]=T[F]})});var R=/["'&<>]/;function B(F){if(typeof F=="boolean"||typeof F=="number")return""+F;F=""+F;var _=R.exec(F);if(_){var V="",W,Ae=0;for(W=_.index;W<F.length;W++){switch(F.charCodeAt(W)){case 34:_="&quot;";break;case 38:_="&amp;";break;case 39:_="&#x27;";break;case 60:_="&lt;";break;case 62:_="&gt;";break;default:continue}Ae!==W&&(V+=F.substring(Ae,W)),Ae=W+1,V+=_}F=Ae!==W?V+F.substring(Ae,W):V}return F}var G=/([A-Z])/g,$=/^ms-/,Y=Array.isArray,X=u("<script>"),J=u("<\/script>"),Q=u('<script src="'),oe=u('<script type="module" src="'),se=u('" async=""><\/script>'),he=/(<\/|<)(s)(cript)/gi;function ye(F,_,V,W){return""+_+(V==="s"?"\\u0073":"\\u0053")+W}function Ue(F,_,V,W,Ae){F=F===void 0?"":F,_=_===void 0?X:u('<script nonce="'+B(_)+'">');var ve=[];if(V!==void 0&&ve.push(_,l((""+V).replace(he,ye)),J),W!==void 0)for(V=0;V<W.length;V++)ve.push(Q,l(B(W[V])),se);if(Ae!==void 0)for(W=0;W<Ae.length;W++)ve.push(oe,l(B(Ae[W])),se);return{bootstrapChunks:ve,startInlineScript:_,placeholderPrefix:u(F+"P:"),segmentPrefix:u(F+"S:"),boundaryPrefix:F+"B:",idPrefix:F,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function Oe(F,_){return{insertionMode:F,selectedValue:_}}function Te(F){return Oe(F==="http://www.w3.org/2000/svg"?2:F==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function K(F,_,V){switch(_){case"select":return Oe(1,V.value!=null?V.value:V.defaultValue);case"svg":return Oe(2,null);case"math":return Oe(3,null);case"foreignObject":return Oe(1,null);case"table":return Oe(4,null);case"thead":case"tbody":case"tfoot":return Oe(5,null);case"colgroup":return Oe(7,null);case"tr":return Oe(6,null)}return 4<=F.insertionMode||F.insertionMode===0?Oe(1,null):F}var ie=u("<!-- -->");function de(F,_,V,W){return _===""?W:(W&&F.push(ie),F.push(l(B(_))),!0)}var Be=new Map,Ee=u(' style="'),ze=u(":"),je=u(";");function qe(F,_,V){if(typeof V!="object")throw Error(e(62));_=!0;for(var W in V)if(h.call(V,W)){var Ae=V[W];if(Ae!=null&&typeof Ae!="boolean"&&Ae!==""){if(W.indexOf("--")===0){var ve=l(B(W));Ae=l(B((""+Ae).trim()))}else{ve=W;var ke=Be.get(ve);ke!==void 0||(ke=u(B(ve.replace(G,"-$1").toLowerCase().replace($,"-ms-"))),Be.set(ve,ke)),ve=ke,Ae=typeof Ae=="number"?Ae===0||h.call(T,W)?l(""+Ae):l(Ae+"px"):l(B((""+Ae).trim()))}_?(_=!1,F.push(Ee,ve,ze,Ae)):F.push(je,ve,ze,Ae)}}_||F.push(rr)}var Ge=u(" "),bt=u('="'),rr=u('"'),Pr=u('=""');function $t(F,_,V,W){switch(V){case"style":qe(F,_,W);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<V.length)||V[0]!=="o"&&V[0]!=="O"||V[1]!=="n"&&V[1]!=="N"){if(_=A.hasOwnProperty(V)?A[V]:null,_!==null){switch(typeof W){case"function":case"symbol":return;case"boolean":if(!_.acceptsBooleans)return}switch(V=l(_.attributeName),_.type){case 3:W&&F.push(Ge,V,Pr);break;case 4:W===!0?F.push(Ge,V,Pr):W!==!1&&F.push(Ge,V,bt,l(B(W)),rr);break;case 5:isNaN(W)||F.push(Ge,V,bt,l(B(W)),rr);break;case 6:!isNaN(W)&&1<=W&&F.push(Ge,V,bt,l(B(W)),rr);break;default:_.sanitizeURL&&(W=""+W),F.push(Ge,V,bt,l(B(W)),rr)}}else if(v(V)){switch(typeof W){case"function":case"symbol":return;case"boolean":if(_=V.toLowerCase().slice(0,5),_!=="data-"&&_!=="aria-")return}F.push(Ge,l(V),bt,l(B(W)),rr)}}}var ar=u(">"),St=u("/>");function st(F,_,V){if(_!=null){if(V!=null)throw Error(e(60));if(typeof _!="object"||!("__html"in _))throw Error(e(61));_=_.__html,_!=null&&F.push(l(""+_))}}function Qr(F){var _="";return r.Children.forEach(F,function(V){V!=null&&(_+=V)}),_}var Sr=u(' selected=""');function gr(F,_,V,W){F.push(Xt(V));var Ae=V=null,ve;for(ve in _)if(h.call(_,ve)){var ke=_[ve];if(ke!=null)switch(ve){case"children":V=ke;break;case"dangerouslySetInnerHTML":Ae=ke;break;default:$t(F,W,ve,ke)}}return F.push(ar),st(F,Ae,V),typeof V=="string"?(F.push(l(B(V))),null):V}var nr=u(`
92
- `),fr=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Yt=new Map;function Xt(F){var _=Yt.get(F);if(_===void 0){if(!fr.test(F))throw Error(e(65,F));_=u("<"+F),Yt.set(F,_)}return _}var mt=u("<!DOCTYPE html>");function wr(F,_,V,W,Ae){switch(_){case"select":F.push(Xt("select"));var ve=null,ke=null;for(qt in V)if(h.call(V,qt)){var He=V[qt];if(He!=null)switch(qt){case"children":ve=He;break;case"dangerouslySetInnerHTML":ke=He;break;case"defaultValue":case"value":break;default:$t(F,W,qt,He)}}return F.push(ar),st(F,ke,ve),ve;case"option":ke=Ae.selectedValue,F.push(Xt("option"));var Rt=He=null,Kt=null,qt=null;for(ve in V)if(h.call(V,ve)){var qr=V[ve];if(qr!=null)switch(ve){case"children":He=qr;break;case"selected":Kt=qr;break;case"dangerouslySetInnerHTML":qt=qr;break;case"value":Rt=qr;default:$t(F,W,ve,qr)}}if(ke!=null)if(V=Rt!==null?""+Rt:Qr(He),Y(ke)){for(W=0;W<ke.length;W++)if(""+ke[W]===V){F.push(Sr);break}}else""+ke===V&&F.push(Sr);else Kt&&F.push(Sr);return F.push(ar),st(F,qt,He),He;case"textarea":F.push(Xt("textarea")),qt=ke=ve=null;for(He in V)if(h.call(V,He)&&(Rt=V[He],Rt!=null))switch(He){case"children":qt=Rt;break;case"value":ve=Rt;break;case"defaultValue":ke=Rt;break;case"dangerouslySetInnerHTML":throw Error(e(91));default:$t(F,W,He,Rt)}if(ve===null&&ke!==null&&(ve=ke),F.push(ar),qt!=null){if(ve!=null)throw Error(e(92));if(Y(qt)&&1<qt.length)throw Error(e(93));ve=""+qt}return typeof ve=="string"&&ve[0]===`
93
- `&&F.push(nr),ve!==null&&F.push(l(B(""+ve))),null;case"input":F.push(Xt("input")),Rt=qt=He=ve=null;for(ke in V)if(h.call(V,ke)&&(Kt=V[ke],Kt!=null))switch(ke){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,"input"));case"defaultChecked":Rt=Kt;break;case"defaultValue":He=Kt;break;case"checked":qt=Kt;break;case"value":ve=Kt;break;default:$t(F,W,ke,Kt)}return qt!==null?$t(F,W,"checked",qt):Rt!==null&&$t(F,W,"checked",Rt),ve!==null?$t(F,W,"value",ve):He!==null&&$t(F,W,"value",He),F.push(St),null;case"menuitem":F.push(Xt("menuitem"));for(var L in V)if(h.call(V,L)&&(ve=V[L],ve!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(e(400));default:$t(F,W,L,ve)}return F.push(ar),null;case"title":F.push(Xt("title")),ve=null;for(qr in V)if(h.call(V,qr)&&(ke=V[qr],ke!=null))switch(qr){case"children":ve=ke;break;case"dangerouslySetInnerHTML":throw Error(e(434));default:$t(F,W,qr,ke)}return F.push(ar),ve;case"listing":case"pre":F.push(Xt(_)),ke=ve=null;for(Rt in V)if(h.call(V,Rt)&&(He=V[Rt],He!=null))switch(Rt){case"children":ve=He;break;case"dangerouslySetInnerHTML":ke=He;break;default:$t(F,W,Rt,He)}if(F.push(ar),ke!=null){if(ve!=null)throw Error(e(60));if(typeof ke!="object"||!("__html"in ke))throw Error(e(61));V=ke.__html,V!=null&&(typeof V=="string"&&0<V.length&&V[0]===`
91
+ `),ce;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":E.push(J(O));for(var Gr in z)if(t.call(z,Gr)&&(ce=z[Gr],ce!=null))switch(Gr){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,O));default:R(E,q,Gr,ce)}return E.push("/>"),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return $(E,z,O,q);case"html":return pe.insertionMode===0&&E.push("<!DOCTYPE html>"),$(E,z,O,q);default:if(O.indexOf("-")===-1&&typeof z.is!="string")return $(E,z,O,q);E.push(J(O)),xe=ce=null;for(lt in z)if(t.call(z,lt)&&(_e=z[lt],_e!=null))switch(lt){case"children":ce=_e;break;case"dangerouslySetInnerHTML":xe=_e;break;case"style":S(E,q,_e);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:s(lt)&&typeof _e!="function"&&typeof _e!="symbol"&&E.push(" ",lt,'="',g(_e),'"')}return E.push(">"),B(E,xe,ce),ce}}function oe(E,O,z){if(E.push('<!--$?--><template id="'),z===null)throw Error(e(395));return E.push(z),E.push('"></template>')}function se(E,O,z,q){switch(z.insertionMode){case 0:case 1:return E.push('<div hidden id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 2:return E.push('<svg aria-hidden="true" style="display:none" id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 3:return E.push('<math aria-hidden="true" style="display:none" id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 4:return E.push('<table hidden id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 5:return E.push('<table hidden><tbody id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 6:return E.push('<table hidden><tr id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');case 7:return E.push('<table hidden><colgroup id="'),E.push(O.segmentPrefix),O=q.toString(16),E.push(O),E.push('">');default:throw Error(e(397))}}function he(E,O){switch(O.insertionMode){case 0:case 1:return E.push("</div>");case 2:return E.push("</svg>");case 3:return E.push("</math>");case 4:return E.push("</table>");case 5:return E.push("</tbody></table>");case 6:return E.push("</tr></table>");case 7:return E.push("</colgroup></table>");default:throw Error(e(397))}}var ye=/[<\u2028\u2029]/g;function Ue(E){return JSON.stringify(E).replace(ye,function(O){switch(O){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Oe(E,O){return O=O===void 0?"":O,{bootstrapChunks:[],startInlineScript:"<script>",placeholderPrefix:O+"P:",segmentPrefix:O+"S:",boundaryPrefix:O+"B:",idPrefix:O,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1,generateStaticMarkup:E}}function Te(E,O,z,q){return z.generateStaticMarkup?(E.push(g(O)),!1):(O===""?E=q:(q&&E.push("<!-- -->"),E.push(g(O)),E=!0),E)}var K=Object.assign,ie=Symbol.for("react.element"),de=Symbol.for("react.portal"),Be=Symbol.for("react.fragment"),Ee=Symbol.for("react.strict_mode"),ze=Symbol.for("react.profiler"),je=Symbol.for("react.provider"),qe=Symbol.for("react.context"),Ge=Symbol.for("react.forward_ref"),bt=Symbol.for("react.suspense"),rr=Symbol.for("react.suspense_list"),Pr=Symbol.for("react.memo"),$t=Symbol.for("react.lazy"),ar=Symbol.for("react.scope"),St=Symbol.for("react.debug_trace_mode"),st=Symbol.for("react.legacy_hidden"),Qr=Symbol.for("react.default_value"),Sr=Symbol.iterator;function gr(E){if(E==null)return null;if(typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case Be:return"Fragment";case de:return"Portal";case ze:return"Profiler";case Ee:return"StrictMode";case bt:return"Suspense";case rr:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case qe:return(E.displayName||"Context")+".Consumer";case je:return(E._context.displayName||"Context")+".Provider";case Ge:var O=E.render;return E=E.displayName,E||(E=O.displayName||O.name||"",E=E!==""?"ForwardRef("+E+")":"ForwardRef"),E;case Pr:return O=E.displayName||null,O!==null?O:gr(E.type)||"Memo";case $t:O=E._payload,E=E._init;try{return gr(E(O))}catch{}}return null}var nr={};function fr(E,O){if(E=E.contextTypes,!E)return nr;var z={},q;for(q in E)z[q]=O[q];return z}var Yt=null;function Xt(E,O){if(E!==O){E.context._currentValue2=E.parentValue,E=E.parent;var z=O.parent;if(E===null){if(z!==null)throw Error(e(401))}else{if(z===null)throw Error(e(401));Xt(E,z)}O.context._currentValue2=O.value}}function mt(E){E.context._currentValue2=E.parentValue,E=E.parent,E!==null&&mt(E)}function wr(E){var O=E.parent;O!==null&&wr(O),E.context._currentValue2=E.value}function an(E,O){if(E.context._currentValue2=E.parentValue,E=E.parent,E===null)throw Error(e(402));E.depth===O.depth?Xt(E,O):an(E,O)}function _r(E,O){var z=O.parent;if(z===null)throw Error(e(402));E.depth===z.depth?Xt(E,z):_r(E,z),O.context._currentValue2=O.value}function ir(E){var O=Yt;O!==E&&(O===null?wr(E):E===null?mt(O):O.depth===E.depth?Xt(O,E):O.depth>E.depth?an(O,E):_r(O,E),Yt=E)}var Yr={isMounted:function(){return!1},enqueueSetState:function(E,O){E=E._reactInternals,E.queue!==null&&E.queue.push(O)},enqueueReplaceState:function(E,O){E=E._reactInternals,E.replace=!0,E.queue=[O]},enqueueForceUpdate:function(){}};function kr(E,O,z,q){var pe=E.state!==void 0?E.state:null;E.updater=Yr,E.props=z,E.state=pe;var ce={queue:[],replace:!1};E._reactInternals=ce;var xe=O.contextType;if(E.context=typeof xe=="object"&&xe!==null?xe._currentValue2:q,xe=O.getDerivedStateFromProps,typeof xe=="function"&&(xe=xe(z,pe),pe=xe==null?pe:K({},pe,xe),E.state=pe),typeof O.getDerivedStateFromProps!="function"&&typeof E.getSnapshotBeforeUpdate!="function"&&(typeof E.UNSAFE_componentWillMount=="function"||typeof E.componentWillMount=="function"))if(O=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),O!==E.state&&Yr.enqueueReplaceState(E,E.state,null),ce.queue!==null&&0<ce.queue.length)if(O=ce.queue,xe=ce.replace,ce.queue=null,ce.replace=!1,xe&&O.length===1)E.state=O[0];else{for(ce=xe?O[0]:E.state,pe=!0,xe=xe?1:0;xe<O.length;xe++){var _e=O[xe];_e=typeof _e=="function"?_e.call(E,ce,z,q):_e,_e!=null&&(pe?(pe=!1,ce=K({},ce,_e)):K(ce,_e))}E.state=ce}else ce.queue=null}var Zr={id:1,overflow:""};function Vr(E,O,z){var q=E.id;E=E.overflow;var pe=32-pn(q)-1;q&=~(1<<pe),z+=1;var ce=32-pn(O)+pe;if(30<ce){var xe=pe-pe%5;return ce=(q&(1<<xe)-1).toString(32),q>>=xe,pe-=xe,{id:1<<32-pn(O)+pe|z<<pe|q,overflow:ce+E}}return{id:1<<ce|z<<pe|q,overflow:E}}var pn=Math.clz32?Math.clz32:zr,gn=Math.log,Fr=Math.LN2;function zr(E){return E>>>=0,E===0?32:31-(gn(E)/Fr|0)|0}function en(E,O){return E===O&&(E!==0||1/E===1/O)||E!==E&&O!==O}var Hr=typeof Object.is=="function"?Object.is:en,zt=null,sr=null,Er=null,tt=null,Nr=!1,Xr=!1,Se=0,P=null,U=0;function Z(){if(zt===null)throw Error(e(321));return zt}function ue(){if(0<U)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function Ie(){return tt===null?Er===null?(Nr=!1,Er=tt=ue()):(Nr=!0,tt=Er):tt.next===null?(Nr=!1,tt=tt.next=ue()):(Nr=!0,tt=tt.next),tt}function We(){sr=zt=null,Xr=!1,Er=null,U=0,tt=P=null}function wt(E,O){return typeof O=="function"?O(E):O}function It(E,O,z){if(zt=Z(),tt=Ie(),Nr){var q=tt.queue;if(O=q.dispatch,P!==null&&(z=P.get(q),z!==void 0)){P.delete(q),q=tt.memoizedState;do q=E(q,z.action),z=z.next;while(z!==null);return tt.memoizedState=q,[q,O]}return[tt.memoizedState,O]}return E=E===wt?typeof O=="function"?O():O:z!==void 0?z(O):O,tt.memoizedState=E,E=tt.queue={last:null,dispatch:null},E=E.dispatch=or.bind(null,zt,E),[tt.memoizedState,E]}function Nt(E,O){if(zt=Z(),tt=Ie(),O=O===void 0?null:O,tt!==null){var z=tt.memoizedState;if(z!==null&&O!==null){var q=z[1];e:if(q===null)q=!1;else{for(var pe=0;pe<q.length&&pe<O.length;pe++)if(!Hr(O[pe],q[pe])){q=!1;break e}q=!0}if(q)return z[0]}}return E=E(),tt.memoizedState=[E,O],E}function or(E,O,z){if(25<=U)throw Error(e(301));if(E===zt)if(Xr=!0,E={action:z,next:null},P===null&&(P=new Map),z=P.get(O),z===void 0)P.set(O,E);else{for(O=z;O.next!==null;)O=O.next;O.next=E}}function Lt(){throw Error(e(394))}function ee(){}var De={readContext:function(E){return E._currentValue2},useContext:function(E){return Z(),E._currentValue2},useMemo:Nt,useReducer:It,useRef:function(E){zt=Z(),tt=Ie();var O=tt.memoizedState;return O===null?(E={current:E},tt.memoizedState=E):O},useState:function(E){return It(wt,E)},useInsertionEffect:ee,useLayoutEffect:function(){},useCallback:function(E,O){return Nt(function(){return E},O)},useImperativeHandle:ee,useEffect:ee,useDebugValue:ee,useDeferredValue:function(E){return Z(),E},useTransition:function(){return Z(),[!1,Lt]},useId:function(){var E=sr.treeContext,O=E.overflow;E=E.id,E=(E&~(1<<32-pn(E)-1)).toString(32)+O;var z=Qe;if(z===null)throw Error(e(404));return O=Se++,E=":"+z.idPrefix+"R"+E,0<O&&(E+="H"+O.toString(32)),E+":"},useMutableSource:function(E,O){return Z(),O(E._source)},useSyncExternalStore:function(E,O,z){if(z===void 0)throw Error(e(407));return z()}},Qe=null,Ye=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function Ct(E){return console.error(E),null}function dt(){}function Dt(E,O,z,q,pe,ce,xe,_e,rt){var lt=[],nt=new Set;return O={destination:null,responseState:O,progressiveChunkSize:q===void 0?12800:q,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:nt,pingedTasks:lt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:pe===void 0?Ct:pe,onAllReady:dt,onShellReady:xe===void 0?dt:xe,onShellError:dt,onFatalError:dt},z=hr(O,0,null,z,!1,!1),z.parentFlushed=!0,E=Et(O,E,null,z,nt,nr,null,Zr),lt.push(E),O}function Et(E,O,z,q,pe,ce,xe,_e){E.allPendingTasks++,z===null?E.pendingRootTasks++:z.pendingTasks++;var rt={node:O,ping:function(){var lt=E.pingedTasks;lt.push(rt),lt.length===1&&cn(E)},blockedBoundary:z,blockedSegment:q,abortSet:pe,legacyContext:ce,context:xe,treeContext:_e};return pe.add(rt),rt}function hr(E,O,z,q,pe,ce){return{status:0,id:-1,index:O,parentFlushed:!1,chunks:[],children:[],formatContext:q,boundary:z,lastPushedText:pe,textEmbedded:ce}}function er(E,O){if(E=E.onError(O),E!=null&&typeof E!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof E+'" instead');return E}function dr(E,O){var z=E.onShellError;z(O),z=E.onFatalError,z(O),E.destination!==null?(E.status=2,E.destination.destroy(O)):(E.status=1,E.fatalError=O)}function Ht(E,O,z,q,pe){for(zt={},sr=O,Se=0,E=z(q,pe);Xr;)Xr=!1,Se=0,U+=1,tt=null,E=z(q,pe);return We(),E}function On(E,O,z,q){var pe=z.render(),ce=q.childContextTypes;if(ce!=null){var xe=O.legacyContext;if(typeof z.getChildContext!="function")q=xe;else{z=z.getChildContext();for(var _e in z)if(!(_e in ce))throw Error(e(108,gr(q)||"Unknown",_e));q=K({},xe,z)}O.legacyContext=q,Cr(E,O,pe),O.legacyContext=xe}else Cr(E,O,pe)}function Tn(E,O){if(E&&E.defaultProps){O=K({},O),E=E.defaultProps;for(var z in E)O[z]===void 0&&(O[z]=E[z]);return O}return O}function mr(E,O,z,q,pe){if(typeof z=="function")if(z.prototype&&z.prototype.isReactComponent){pe=fr(z,O.legacyContext);var ce=z.contextType;ce=new z(q,typeof ce=="object"&&ce!==null?ce._currentValue2:pe),kr(ce,z,q,pe),On(E,O,ce,z)}else{ce=fr(z,O.legacyContext),pe=Ht(E,O,z,q,ce);var xe=Se!==0;if(typeof pe=="object"&&pe!==null&&typeof pe.render=="function"&&pe.$$typeof===void 0)kr(pe,z,q,ce),On(E,O,pe,z);else if(xe){q=O.treeContext,O.treeContext=Vr(q,1,0);try{Cr(E,O,pe)}finally{O.treeContext=q}}else Cr(E,O,pe)}else if(typeof z=="string"){switch(pe=O.blockedSegment,ce=Q(pe.chunks,z,q,E.responseState,pe.formatContext),pe.lastPushedText=!1,xe=pe.formatContext,pe.formatContext=k(xe,z,q),Rr(E,O,ce),pe.formatContext=xe,z){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:pe.chunks.push("</",z,">")}pe.lastPushedText=!1}else{switch(z){case st:case St:case Ee:case ze:case Be:Cr(E,O,q.children);return;case rr:Cr(E,O,q.children);return;case ar:throw Error(e(343));case bt:e:{z=O.blockedBoundary,pe=O.blockedSegment,ce=q.fallback,q=q.children,xe=new Set;var _e={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:xe,errorDigest:null},rt=hr(E,pe.chunks.length,_e,pe.formatContext,!1,!1);pe.children.push(rt),pe.lastPushedText=!1;var lt=hr(E,0,null,pe.formatContext,!1,!1);lt.parentFlushed=!0,O.blockedBoundary=_e,O.blockedSegment=lt;try{if(Rr(E,O,q),E.responseState.generateStaticMarkup||lt.lastPushedText&&lt.textEmbedded&&lt.chunks.push("<!-- -->"),lt.status=1,jr(_e,lt),_e.pendingTasks===0)break e}catch(nt){lt.status=4,_e.forceClientRender=!0,_e.errorDigest=er(E,nt)}finally{O.blockedBoundary=z,O.blockedSegment=pe}O=Et(E,ce,z,rt,xe,O.legacyContext,O.context,O.treeContext),E.pingedTasks.push(O)}return}if(typeof z=="object"&&z!==null)switch(z.$$typeof){case Ge:if(q=Ht(E,O,z.render,q,pe),Se!==0){z=O.treeContext,O.treeContext=Vr(z,1,0);try{Cr(E,O,q)}finally{O.treeContext=z}}else Cr(E,O,q);return;case Pr:z=z.type,q=Tn(z,q),mr(E,O,z,q,pe);return;case je:if(pe=q.children,z=z._context,q=q.value,ce=z._currentValue2,z._currentValue2=q,xe=Yt,Yt=q={parent:xe,depth:xe===null?0:xe.depth+1,context:z,parentValue:ce,value:q},O.context=q,Cr(E,O,pe),E=Yt,E===null)throw Error(e(403));q=E.parentValue,E.context._currentValue2=q===Qr?E.context._defaultValue:q,E=Yt=E.parent,O.context=E;return;case qe:q=q.children,q=q(z._currentValue2),Cr(E,O,q);return;case $t:pe=z._init,z=pe(z._payload),q=Tn(z,q),mr(E,O,z,q,void 0);return}throw Error(e(130,z==null?z:typeof z,""))}}function Cr(E,O,z){if(O.node=z,typeof z=="object"&&z!==null){switch(z.$$typeof){case ie:mr(E,O,z.type,z.props,z.ref);return;case de:throw Error(e(257));case $t:var q=z._init;z=q(z._payload),Cr(E,O,z);return}if(A(z)){bn(E,O,z);return}if(z===null||typeof z!="object"?q=null:(q=Sr&&z[Sr]||z["@@iterator"],q=typeof q=="function"?q:null),q&&(q=q.call(z))){if(z=q.next(),!z.done){var pe=[];do pe.push(z.value),z=q.next();while(!z.done);bn(E,O,pe)}return}throw E=Object.prototype.toString.call(z),Error(e(31,E==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":E))}typeof z=="string"?(q=O.blockedSegment,q.lastPushedText=Te(O.blockedSegment.chunks,z,E.responseState,q.lastPushedText)):typeof z=="number"&&(q=O.blockedSegment,q.lastPushedText=Te(O.blockedSegment.chunks,""+z,E.responseState,q.lastPushedText))}function bn(E,O,z){for(var q=z.length,pe=0;pe<q;pe++){var ce=O.treeContext;O.treeContext=Vr(ce,q,pe);try{Rr(E,O,z[pe])}finally{O.treeContext=ce}}}function Rr(E,O,z){var q=O.blockedSegment.formatContext,pe=O.legacyContext,ce=O.context;try{return Cr(E,O,z)}catch(rt){if(We(),typeof rt=="object"&&rt!==null&&typeof rt.then=="function"){z=rt;var xe=O.blockedSegment,_e=hr(E,xe.chunks.length,null,xe.formatContext,xe.lastPushedText,!0);xe.children.push(_e),xe.lastPushedText=!1,E=Et(E,O.node,O.blockedBoundary,_e,O.abortSet,O.legacyContext,O.context,O.treeContext).ping,z.then(E,E),O.blockedSegment.formatContext=q,O.legacyContext=pe,O.context=ce,ir(ce)}else throw O.blockedSegment.formatContext=q,O.legacyContext=pe,O.context=ce,ir(ce),rt}}function jn(E){var O=E.blockedBoundary;E=E.blockedSegment,E.status=3,Cn(this,O,E)}function wn(E,O,z){var q=E.blockedBoundary;E.blockedSegment.status=3,q===null?(O.allPendingTasks--,O.status!==2&&(O.status=2,O.destination!==null&&O.destination.push(null))):(q.pendingTasks--,q.forceClientRender||(q.forceClientRender=!0,E=z===void 0?Error(e(432)):z,q.errorDigest=O.onError(E),q.parentFlushed&&O.clientRenderedBoundaries.push(q)),q.fallbackAbortableTasks.forEach(function(pe){return wn(pe,O,z)}),q.fallbackAbortableTasks.clear(),O.allPendingTasks--,O.allPendingTasks===0&&(q=O.onAllReady,q()))}function jr(E,O){if(O.chunks.length===0&&O.children.length===1&&O.children[0].boundary===null){var z=O.children[0];z.id=O.id,z.parentFlushed=!0,z.status===1&&jr(E,z)}else E.completedSegments.push(O)}function Cn(E,O,z){if(O===null){if(z.parentFlushed){if(E.completedRootSegment!==null)throw Error(e(389));E.completedRootSegment=z}E.pendingRootTasks--,E.pendingRootTasks===0&&(E.onShellError=dt,O=E.onShellReady,O())}else O.pendingTasks--,O.forceClientRender||(O.pendingTasks===0?(z.parentFlushed&&z.status===1&&jr(O,z),O.parentFlushed&&E.completedBoundaries.push(O),O.fallbackAbortableTasks.forEach(jn,E),O.fallbackAbortableTasks.clear()):z.parentFlushed&&z.status===1&&(jr(O,z),O.completedSegments.length===1&&O.parentFlushed&&E.partialBoundaries.push(O)));E.allPendingTasks--,E.allPendingTasks===0&&(E=E.onAllReady,E())}function cn(E){if(E.status!==2){var O=Yt,z=Ye.current;Ye.current=De;var q=Qe;Qe=E.responseState;try{var pe=E.pingedTasks,ce;for(ce=0;ce<pe.length;ce++){var xe=pe[ce],_e=E,rt=xe.blockedSegment;if(rt.status===0){ir(xe.context);try{Cr(_e,xe,xe.node),_e.responseState.generateStaticMarkup||rt.lastPushedText&&rt.textEmbedded&&rt.chunks.push("<!-- -->"),xe.abortSet.delete(xe),rt.status=1,Cn(_e,xe.blockedBoundary,rt)}catch(fn){if(We(),typeof fn=="object"&&fn!==null&&typeof fn.then=="function"){var lt=xe.ping;fn.then(lt,lt)}else{xe.abortSet.delete(xe),rt.status=4;var nt=xe.blockedBoundary,Jt=fn,vr=er(_e,Jt);if(nt===null?dr(_e,Jt):(nt.pendingTasks--,nt.forceClientRender||(nt.forceClientRender=!0,nt.errorDigest=vr,nt.parentFlushed&&_e.clientRenderedBoundaries.push(nt))),_e.allPendingTasks--,_e.allPendingTasks===0){var Gr=_e.onAllReady;Gr()}}}}}pe.splice(0,ce),E.destination!==null&&sn(E,E.destination)}catch(fn){er(E,fn),dr(E,fn)}finally{Qe=q,Ye.current=z,z===De&&ir(O)}}}function tn(E,O,z){switch(z.parentFlushed=!0,z.status){case 0:var q=z.id=E.nextSegmentId++;return z.lastPushedText=!1,z.textEmbedded=!1,E=E.responseState,O.push('<template id="'),O.push(E.placeholderPrefix),E=q.toString(16),O.push(E),O.push('"></template>');case 1:z.status=2;var pe=!0;q=z.chunks;var ce=0;z=z.children;for(var xe=0;xe<z.length;xe++){for(pe=z[xe];ce<pe.index;ce++)O.push(q[ce]);pe=Jn(E,O,pe)}for(;ce<q.length-1;ce++)O.push(q[ce]);return ce<q.length&&(pe=O.push(q[ce])),pe;default:throw Error(e(390))}}function Jn(E,O,z){var q=z.boundary;if(q===null)return tn(E,O,z);if(q.parentFlushed=!0,q.forceClientRender)return E.responseState.generateStaticMarkup||(q=q.errorDigest,O.push("<!--$!-->"),O.push("<template"),q&&(O.push(' data-dgst="'),q=g(q),O.push(q),O.push('"')),O.push("></template>")),tn(E,O,z),E=E.responseState.generateStaticMarkup?!0:O.push("<!--/$-->"),E;if(0<q.pendingTasks){q.rootSegmentID=E.nextSegmentId++,0<q.completedSegments.length&&E.partialBoundaries.push(q);var pe=E.responseState,ce=pe.nextSuspenseID++;return pe=pe.boundaryPrefix+ce.toString(16),q=q.id=pe,oe(O,E.responseState,q),tn(E,O,z),O.push("<!--/$-->")}if(q.byteSize>E.progressiveChunkSize)return q.rootSegmentID=E.nextSegmentId++,E.completedBoundaries.push(q),oe(O,E.responseState,q.id),tn(E,O,z),O.push("<!--/$-->");if(E.responseState.generateStaticMarkup||O.push("<!--$-->"),z=q.completedSegments,z.length!==1)throw Error(e(391));return Jn(E,O,z[0]),E=E.responseState.generateStaticMarkup?!0:O.push("<!--/$-->"),E}function si(E,O,z){return se(O,E.responseState,z.formatContext,z.id),Jn(E,O,z),he(O,z.formatContext)}function xn(E,O,z){for(var q=z.completedSegments,pe=0;pe<q.length;pe++)mn(E,O,z,q[pe]);if(q.length=0,E=E.responseState,q=z.id,z=z.rootSegmentID,O.push(E.startInlineScript),E.sentCompleteBoundaryFunction?O.push('$RC("'):(E.sentCompleteBoundaryFunction=!0,O.push('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("')),q===null)throw Error(e(395));return z=z.toString(16),O.push(q),O.push('","'),O.push(E.segmentPrefix),O.push(z),O.push('")<\/script>')}function mn(E,O,z,q){if(q.status===2)return!0;var pe=q.id;if(pe===-1){if((q.id=z.rootSegmentID)===-1)throw Error(e(392));return si(E,O,q)}return si(E,O,q),E=E.responseState,O.push(E.startInlineScript),E.sentCompleteSegmentFunction?O.push('$RS("'):(E.sentCompleteSegmentFunction=!0,O.push('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("')),O.push(E.segmentPrefix),pe=pe.toString(16),O.push(pe),O.push('","'),O.push(E.placeholderPrefix),O.push(pe),O.push('")<\/script>')}function sn(E,O){try{var z=E.completedRootSegment;if(z!==null&&E.pendingRootTasks===0){Jn(E,O,z),E.completedRootSegment=null;var q=E.responseState.bootstrapChunks;for(z=0;z<q.length-1;z++)O.push(q[z]);z<q.length&&O.push(q[z])}var pe=E.clientRenderedBoundaries,ce;for(ce=0;ce<pe.length;ce++){var xe=pe[ce];q=O;var _e=E.responseState,rt=xe.id,lt=xe.errorDigest,nt=xe.errorMessage,Jt=xe.errorComponentStack;if(q.push(_e.startInlineScript),_e.sentClientRenderFunction?q.push('$RX("'):(_e.sentClientRenderFunction=!0,q.push('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("')),rt===null)throw Error(e(395));if(q.push(rt),q.push('"'),lt||nt||Jt){q.push(",");var vr=Ue(lt||"");q.push(vr)}if(nt||Jt){q.push(",");var Gr=Ue(nt||"");q.push(Gr)}if(Jt){q.push(",");var fn=Ue(Jt);q.push(fn)}if(!q.push(")<\/script>")){E.destination=null,ce++,pe.splice(0,ce);return}}pe.splice(0,ce);var Kn=E.completedBoundaries;for(ce=0;ce<Kn.length;ce++)if(!xn(E,O,Kn[ce])){E.destination=null,ce++,Kn.splice(0,ce);return}Kn.splice(0,ce);var Ln=E.partialBoundaries;for(ce=0;ce<Ln.length;ce++){var vn=Ln[ce];e:{pe=E,xe=O;var Or=vn.completedSegments;for(_e=0;_e<Or.length;_e++)if(!mn(pe,xe,vn,Or[_e])){_e++,Or.splice(0,_e);var Gn=!1;break e}Or.splice(0,_e),Gn=!0}if(!Gn){E.destination=null,ce++,Ln.splice(0,ce);return}}Ln.splice(0,ce);var Bn=E.completedBoundaries;for(ce=0;ce<Bn.length;ce++)if(!xn(E,O,Bn[ce])){E.destination=null,ce++,Bn.splice(0,ce);return}Bn.splice(0,ce)}finally{E.allPendingTasks===0&&E.pingedTasks.length===0&&E.clientRenderedBoundaries.length===0&&E.completedBoundaries.length===0&&O.push(null)}}function rn(E,O){try{var z=E.abortableTasks;z.forEach(function(q){return wn(q,E,O)}),z.clear(),E.destination!==null&&sn(E,E.destination)}catch(q){er(E,q),dr(E,q)}}function Lr(){}function on(E,O,z,q){var pe=!1,ce=null,xe="",_e={push:function(lt){return lt!==null&&(xe+=lt),!0},destroy:function(lt){pe=!0,ce=lt}},rt=!1;if(E=Dt(E,Oe(z,O?O.identifierPrefix:void 0),{insertionMode:1,selectedValue:null},1/0,Lr,void 0,function(){rt=!0}),cn(E),rn(E,q),E.status===1)E.status=2,_e.destroy(E.fatalError);else if(E.status!==2&&E.destination===null){E.destination=_e;try{sn(E,_e)}catch(lt){er(E,lt),dr(E,lt)}}if(pe)throw ce;if(!rt)throw Error(e(426));return xe}return ul.renderToNodeStream=function(){throw Error(e(207))},ul.renderToStaticMarkup=function(E,O){return on(E,O,!0,'The server used "renderToStaticMarkup" which does not support Suspense. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},ul.renderToStaticNodeStream=function(){throw Error(e(208))},ul.renderToString=function(E,O){return on(E,O,!1,'The server used "renderToString" which does not support Suspense. If you intended for this Suspense boundary to render the fallback content on the server consider throwing an Error somewhere within the Suspense boundary. If you intended to have the server wait for the suspended component please switch to "renderToReadableStream" which supports Suspense on the server')},ul.version="18.3.1",ul}var Yh={};var Jw;function CO(){if(Jw)return Yh;Jw=1;var r=Rl();function e(F){for(var _="https://reactjs.org/docs/error-decoder.html?invariant="+F,V=1;V<arguments.length;V++)_+="&args[]="+encodeURIComponent(arguments[V]);return"Minified React error #"+F+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t=null,n=0;function i(F,_){if(_.length!==0)if(512<_.length)0<n&&(F.enqueue(new Uint8Array(t.buffer,0,n)),t=new Uint8Array(512),n=0),F.enqueue(_);else{var V=t.length-n;V<_.length&&(V===0?F.enqueue(t):(t.set(_.subarray(0,V),n),F.enqueue(t),_=_.subarray(V)),t=new Uint8Array(512),n=0),t.set(_,n),n+=_.length}}function a(F,_){return i(F,_),!0}function s(F){t&&0<n&&(F.enqueue(new Uint8Array(t.buffer,0,n)),t=null,n=0)}var o=new TextEncoder;function l(F){return o.encode(F)}function u(F){return o.encode(F)}function c(F,_){typeof F.error=="function"?F.error(_):F.close()}var h=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,d={},g={};function v(F){return h.call(g,F)?!0:h.call(d,F)?!1:f.test(F)?g[F]=!0:(d[F]=!0,!1)}function y(F,_,V,W,Ae,ve,Fe){this.acceptsBooleans=_===2||_===3||_===4,this.attributeName=W,this.attributeNamespace=Ae,this.mustUseProperty=V,this.propertyName=F,this.type=_,this.sanitizeURL=ve,this.removeEmptyString=Fe}var A={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(F){A[F]=new y(F,0,!1,F,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(F){var _=F[0];A[_]=new y(_,1,!1,F[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(F){A[F]=new y(F,2,!1,F.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(F){A[F]=new y(F,2,!1,F,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(F){A[F]=new y(F,3,!1,F.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(F){A[F]=new y(F,3,!0,F,null,!1,!1)}),["capture","download"].forEach(function(F){A[F]=new y(F,4,!1,F,null,!1,!1)}),["cols","rows","size","span"].forEach(function(F){A[F]=new y(F,6,!1,F,null,!1,!1)}),["rowSpan","start"].forEach(function(F){A[F]=new y(F,5,!1,F.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function k(F){return F[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(F){var _=F.replace(C,k);A[_]=new y(_,1,!1,F,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(F){var _=F.replace(C,k);A[_]=new y(_,1,!1,F,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(F){var _=F.replace(C,k);A[_]=new y(_,1,!1,F,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(F){A[F]=new y(F,1,!1,F.toLowerCase(),null,!1,!1)}),A.xlinkHref=new y("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(F){A[F]=new y(F,1,!1,F.toLowerCase(),null,!0,!0)});var T={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},S=["Webkit","ms","Moz","O"];Object.keys(T).forEach(function(F){S.forEach(function(_){_=_+F.charAt(0).toUpperCase()+F.substring(1),T[_]=T[F]})});var R=/["'&<>]/;function B(F){if(typeof F=="boolean"||typeof F=="number")return""+F;F=""+F;var _=R.exec(F);if(_){var V="",W,Ae=0;for(W=_.index;W<F.length;W++){switch(F.charCodeAt(W)){case 34:_="&quot;";break;case 38:_="&amp;";break;case 39:_="&#x27;";break;case 60:_="&lt;";break;case 62:_="&gt;";break;default:continue}Ae!==W&&(V+=F.substring(Ae,W)),Ae=W+1,V+=_}F=Ae!==W?V+F.substring(Ae,W):V}return F}var G=/([A-Z])/g,$=/^ms-/,Y=Array.isArray,X=u("<script>"),J=u("<\/script>"),Q=u('<script src="'),oe=u('<script type="module" src="'),se=u('" async=""><\/script>'),he=/(<\/|<)(s)(cript)/gi;function ye(F,_,V,W){return""+_+(V==="s"?"\\u0073":"\\u0053")+W}function Ue(F,_,V,W,Ae){F=F===void 0?"":F,_=_===void 0?X:u('<script nonce="'+B(_)+'">');var ve=[];if(V!==void 0&&ve.push(_,l((""+V).replace(he,ye)),J),W!==void 0)for(V=0;V<W.length;V++)ve.push(Q,l(B(W[V])),se);if(Ae!==void 0)for(W=0;W<Ae.length;W++)ve.push(oe,l(B(Ae[W])),se);return{bootstrapChunks:ve,startInlineScript:_,placeholderPrefix:u(F+"P:"),segmentPrefix:u(F+"S:"),boundaryPrefix:F+"B:",idPrefix:F,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}function Oe(F,_){return{insertionMode:F,selectedValue:_}}function Te(F){return Oe(F==="http://www.w3.org/2000/svg"?2:F==="http://www.w3.org/1998/Math/MathML"?3:0,null)}function K(F,_,V){switch(_){case"select":return Oe(1,V.value!=null?V.value:V.defaultValue);case"svg":return Oe(2,null);case"math":return Oe(3,null);case"foreignObject":return Oe(1,null);case"table":return Oe(4,null);case"thead":case"tbody":case"tfoot":return Oe(5,null);case"colgroup":return Oe(7,null);case"tr":return Oe(6,null)}return 4<=F.insertionMode||F.insertionMode===0?Oe(1,null):F}var ie=u("<!-- -->");function de(F,_,V,W){return _===""?W:(W&&F.push(ie),F.push(l(B(_))),!0)}var Be=new Map,Ee=u(' style="'),ze=u(":"),je=u(";");function qe(F,_,V){if(typeof V!="object")throw Error(e(62));_=!0;for(var W in V)if(h.call(V,W)){var Ae=V[W];if(Ae!=null&&typeof Ae!="boolean"&&Ae!==""){if(W.indexOf("--")===0){var ve=l(B(W));Ae=l(B((""+Ae).trim()))}else{ve=W;var Fe=Be.get(ve);Fe!==void 0||(Fe=u(B(ve.replace(G,"-$1").toLowerCase().replace($,"-ms-"))),Be.set(ve,Fe)),ve=Fe,Ae=typeof Ae=="number"?Ae===0||h.call(T,W)?l(""+Ae):l(Ae+"px"):l(B((""+Ae).trim()))}_?(_=!1,F.push(Ee,ve,ze,Ae)):F.push(je,ve,ze,Ae)}}_||F.push(rr)}var Ge=u(" "),bt=u('="'),rr=u('"'),Pr=u('=""');function $t(F,_,V,W){switch(V){case"style":qe(F,_,W);return;case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(2<V.length)||V[0]!=="o"&&V[0]!=="O"||V[1]!=="n"&&V[1]!=="N"){if(_=A.hasOwnProperty(V)?A[V]:null,_!==null){switch(typeof W){case"function":case"symbol":return;case"boolean":if(!_.acceptsBooleans)return}switch(V=l(_.attributeName),_.type){case 3:W&&F.push(Ge,V,Pr);break;case 4:W===!0?F.push(Ge,V,Pr):W!==!1&&F.push(Ge,V,bt,l(B(W)),rr);break;case 5:isNaN(W)||F.push(Ge,V,bt,l(B(W)),rr);break;case 6:!isNaN(W)&&1<=W&&F.push(Ge,V,bt,l(B(W)),rr);break;default:_.sanitizeURL&&(W=""+W),F.push(Ge,V,bt,l(B(W)),rr)}}else if(v(V)){switch(typeof W){case"function":case"symbol":return;case"boolean":if(_=V.toLowerCase().slice(0,5),_!=="data-"&&_!=="aria-")return}F.push(Ge,l(V),bt,l(B(W)),rr)}}}var ar=u(">"),St=u("/>");function st(F,_,V){if(_!=null){if(V!=null)throw Error(e(60));if(typeof _!="object"||!("__html"in _))throw Error(e(61));_=_.__html,_!=null&&F.push(l(""+_))}}function Qr(F){var _="";return r.Children.forEach(F,function(V){V!=null&&(_+=V)}),_}var Sr=u(' selected=""');function gr(F,_,V,W){F.push(Xt(V));var Ae=V=null,ve;for(ve in _)if(h.call(_,ve)){var Fe=_[ve];if(Fe!=null)switch(ve){case"children":V=Fe;break;case"dangerouslySetInnerHTML":Ae=Fe;break;default:$t(F,W,ve,Fe)}}return F.push(ar),st(F,Ae,V),typeof V=="string"?(F.push(l(B(V))),null):V}var nr=u(`
92
+ `),fr=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Yt=new Map;function Xt(F){var _=Yt.get(F);if(_===void 0){if(!fr.test(F))throw Error(e(65,F));_=u("<"+F),Yt.set(F,_)}return _}var mt=u("<!DOCTYPE html>");function wr(F,_,V,W,Ae){switch(_){case"select":F.push(Xt("select"));var ve=null,Fe=null;for(qt in V)if(h.call(V,qt)){var He=V[qt];if(He!=null)switch(qt){case"children":ve=He;break;case"dangerouslySetInnerHTML":Fe=He;break;case"defaultValue":case"value":break;default:$t(F,W,qt,He)}}return F.push(ar),st(F,Fe,ve),ve;case"option":Fe=Ae.selectedValue,F.push(Xt("option"));var Rt=He=null,Kt=null,qt=null;for(ve in V)if(h.call(V,ve)){var qr=V[ve];if(qr!=null)switch(ve){case"children":He=qr;break;case"selected":Kt=qr;break;case"dangerouslySetInnerHTML":qt=qr;break;case"value":Rt=qr;default:$t(F,W,ve,qr)}}if(Fe!=null)if(V=Rt!==null?""+Rt:Qr(He),Y(Fe)){for(W=0;W<Fe.length;W++)if(""+Fe[W]===V){F.push(Sr);break}}else""+Fe===V&&F.push(Sr);else Kt&&F.push(Sr);return F.push(ar),st(F,qt,He),He;case"textarea":F.push(Xt("textarea")),qt=Fe=ve=null;for(He in V)if(h.call(V,He)&&(Rt=V[He],Rt!=null))switch(He){case"children":qt=Rt;break;case"value":ve=Rt;break;case"defaultValue":Fe=Rt;break;case"dangerouslySetInnerHTML":throw Error(e(91));default:$t(F,W,He,Rt)}if(ve===null&&Fe!==null&&(ve=Fe),F.push(ar),qt!=null){if(ve!=null)throw Error(e(92));if(Y(qt)&&1<qt.length)throw Error(e(93));ve=""+qt}return typeof ve=="string"&&ve[0]===`
93
+ `&&F.push(nr),ve!==null&&F.push(l(B(""+ve))),null;case"input":F.push(Xt("input")),Rt=qt=He=ve=null;for(Fe in V)if(h.call(V,Fe)&&(Kt=V[Fe],Kt!=null))switch(Fe){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,"input"));case"defaultChecked":Rt=Kt;break;case"defaultValue":He=Kt;break;case"checked":qt=Kt;break;case"value":ve=Kt;break;default:$t(F,W,Fe,Kt)}return qt!==null?$t(F,W,"checked",qt):Rt!==null&&$t(F,W,"checked",Rt),ve!==null?$t(F,W,"value",ve):He!==null&&$t(F,W,"value",He),F.push(St),null;case"menuitem":F.push(Xt("menuitem"));for(var L in V)if(h.call(V,L)&&(ve=V[L],ve!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(e(400));default:$t(F,W,L,ve)}return F.push(ar),null;case"title":F.push(Xt("title")),ve=null;for(qr in V)if(h.call(V,qr)&&(Fe=V[qr],Fe!=null))switch(qr){case"children":ve=Fe;break;case"dangerouslySetInnerHTML":throw Error(e(434));default:$t(F,W,qr,Fe)}return F.push(ar),ve;case"listing":case"pre":F.push(Xt(_)),Fe=ve=null;for(Rt in V)if(h.call(V,Rt)&&(He=V[Rt],He!=null))switch(Rt){case"children":ve=He;break;case"dangerouslySetInnerHTML":Fe=He;break;default:$t(F,W,Rt,He)}if(F.push(ar),Fe!=null){if(ve!=null)throw Error(e(60));if(typeof Fe!="object"||!("__html"in Fe))throw Error(e(61));V=Fe.__html,V!=null&&(typeof V=="string"&&0<V.length&&V[0]===`
94
94
  `?F.push(nr,l(V)):F.push(l(""+V)))}return typeof ve=="string"&&ve[0]===`
95
- `&&F.push(nr),ve;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":F.push(Xt(_));for(var re in V)if(h.call(V,re)&&(ve=V[re],ve!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,_));default:$t(F,W,re,ve)}return F.push(St),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return gr(F,V,_,W);case"html":return Ae.insertionMode===0&&F.push(mt),gr(F,V,_,W);default:if(_.indexOf("-")===-1&&typeof V.is!="string")return gr(F,V,_,W);F.push(Xt(_)),ke=ve=null;for(Kt in V)if(h.call(V,Kt)&&(He=V[Kt],He!=null))switch(Kt){case"children":ve=He;break;case"dangerouslySetInnerHTML":ke=He;break;case"style":qe(F,W,He);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:v(Kt)&&typeof He!="function"&&typeof He!="symbol"&&F.push(Ge,l(Kt),bt,l(B(He)),rr)}return F.push(ar),st(F,ke,ve),ve}}var an=u("</"),_r=u(">"),ir=u('<template id="'),Yr=u('"></template>'),kr=u("<!--$-->"),Zr=u('<!--$?--><template id="'),Vr=u('"></template>'),pn=u("<!--$!-->"),gn=u("<!--/$-->"),Fr=u("<template"),zr=u('"'),en=u(' data-dgst="');u(' data-msg="'),u(' data-stck="');var Hr=u("></template>");function zt(F,_,V){if(i(F,Zr),V===null)throw Error(e(395));return i(F,V),a(F,Vr)}var sr=u('<div hidden id="'),Er=u('">'),tt=u("</div>"),Nr=u('<svg aria-hidden="true" style="display:none" id="'),Xr=u('">'),Se=u("</svg>"),P=u('<math aria-hidden="true" style="display:none" id="'),U=u('">'),Z=u("</math>"),ue=u('<table hidden id="'),Ie=u('">'),We=u("</table>"),wt=u('<table hidden><tbody id="'),It=u('">'),Nt=u("</tbody></table>"),or=u('<table hidden><tr id="'),Lt=u('">'),ee=u("</tr></table>"),De=u('<table hidden><colgroup id="'),Qe=u('">'),Ye=u("</colgroup></table>");function Ct(F,_,V,W){switch(V.insertionMode){case 0:case 1:return i(F,sr),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Er);case 2:return i(F,Nr),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Xr);case 3:return i(F,P),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,U);case 4:return i(F,ue),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Ie);case 5:return i(F,wt),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,It);case 6:return i(F,or),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Lt);case 7:return i(F,De),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Qe);default:throw Error(e(397))}}function dt(F,_){switch(_.insertionMode){case 0:case 1:return a(F,tt);case 2:return a(F,Se);case 3:return a(F,Z);case 4:return a(F,We);case 5:return a(F,Nt);case 6:return a(F,ee);case 7:return a(F,Ye);default:throw Error(e(397))}}var Dt=u('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),Et=u('$RS("'),hr=u('","'),er=u('")<\/script>'),dr=u('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Ht=u('$RC("'),On=u('","'),Tn=u('")<\/script>'),mr=u('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Cr=u('$RX("'),bn=u('"'),Rr=u(")<\/script>"),jn=u(","),wn=/[<\u2028\u2029]/g;function jr(F){return JSON.stringify(F).replace(wn,function(_){switch(_){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Cn=Object.assign,cn=Symbol.for("react.element"),tn=Symbol.for("react.portal"),Jn=Symbol.for("react.fragment"),si=Symbol.for("react.strict_mode"),xn=Symbol.for("react.profiler"),mn=Symbol.for("react.provider"),sn=Symbol.for("react.context"),rn=Symbol.for("react.forward_ref"),Lr=Symbol.for("react.suspense"),on=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),z=Symbol.for("react.scope"),q=Symbol.for("react.debug_trace_mode"),pe=Symbol.for("react.legacy_hidden"),ce=Symbol.for("react.default_value"),xe=Symbol.iterator;function _e(F){if(F==null)return null;if(typeof F=="function")return F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case Jn:return"Fragment";case tn:return"Portal";case xn:return"Profiler";case si:return"StrictMode";case Lr:return"Suspense";case on:return"SuspenseList"}if(typeof F=="object")switch(F.$$typeof){case sn:return(F.displayName||"Context")+".Consumer";case mn:return(F._context.displayName||"Context")+".Provider";case rn:var _=F.render;return F=F.displayName,F||(F=_.displayName||_.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case E:return _=F.displayName||null,_!==null?_:_e(F.type)||"Memo";case O:_=F._payload,F=F._init;try{return _e(F(_))}catch{}}return null}var rt={};function lt(F,_){if(F=F.contextTypes,!F)return rt;var V={},W;for(W in F)V[W]=_[W];return V}var nt=null;function Jt(F,_){if(F!==_){F.context._currentValue=F.parentValue,F=F.parent;var V=_.parent;if(F===null){if(V!==null)throw Error(e(401))}else{if(V===null)throw Error(e(401));Jt(F,V)}_.context._currentValue=_.value}}function vr(F){F.context._currentValue=F.parentValue,F=F.parent,F!==null&&vr(F)}function Gr(F){var _=F.parent;_!==null&&Gr(_),F.context._currentValue=F.value}function fn(F,_){if(F.context._currentValue=F.parentValue,F=F.parent,F===null)throw Error(e(402));F.depth===_.depth?Jt(F,_):fn(F,_)}function Kn(F,_){var V=_.parent;if(V===null)throw Error(e(402));F.depth===V.depth?Jt(F,V):Kn(F,V),_.context._currentValue=_.value}function Ln(F){var _=nt;_!==F&&(_===null?Gr(F):F===null?vr(_):_.depth===F.depth?Jt(_,F):_.depth>F.depth?fn(_,F):Kn(_,F),nt=F)}var vn={isMounted:function(){return!1},enqueueSetState:function(F,_){F=F._reactInternals,F.queue!==null&&F.queue.push(_)},enqueueReplaceState:function(F,_){F=F._reactInternals,F.replace=!0,F.queue=[_]},enqueueForceUpdate:function(){}};function Or(F,_,V,W){var Ae=F.state!==void 0?F.state:null;F.updater=vn,F.props=V,F.state=Ae;var ve={queue:[],replace:!1};F._reactInternals=ve;var ke=_.contextType;if(F.context=typeof ke=="object"&&ke!==null?ke._currentValue:W,ke=_.getDerivedStateFromProps,typeof ke=="function"&&(ke=ke(V,Ae),Ae=ke==null?Ae:Cn({},Ae,ke),F.state=Ae),typeof _.getDerivedStateFromProps!="function"&&typeof F.getSnapshotBeforeUpdate!="function"&&(typeof F.UNSAFE_componentWillMount=="function"||typeof F.componentWillMount=="function"))if(_=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),_!==F.state&&vn.enqueueReplaceState(F,F.state,null),ve.queue!==null&&0<ve.queue.length)if(_=ve.queue,ke=ve.replace,ve.queue=null,ve.replace=!1,ke&&_.length===1)F.state=_[0];else{for(ve=ke?_[0]:F.state,Ae=!0,ke=ke?1:0;ke<_.length;ke++){var He=_[ke];He=typeof He=="function"?He.call(F,ve,V,W):He,He!=null&&(Ae?(Ae=!1,ve=Cn({},ve,He)):Cn(ve,He))}F.state=ve}else ve.queue=null}var Gn={id:1,overflow:""};function Bn(F,_,V){var W=F.id;F=F.overflow;var Ae=32-Mn(W)-1;W&=~(1<<Ae),V+=1;var ve=32-Mn(_)+Ae;if(30<ve){var ke=Ae-Ae%5;return ve=(W&(1<<ke)-1).toString(32),W>>=ke,Ae-=ke,{id:1<<32-Mn(_)+Ae|V<<Ae|W,overflow:ve+F}}return{id:1<<ve|V<<Ae|W,overflow:F}}var Mn=Math.clz32?Math.clz32:wi,Oi=Math.log,bi=Math.LN2;function wi(F){return F>>>=0,F===0?32:31-(Oi(F)/bi|0)|0}function _n(F,_){return F===_&&(F!==0||1/F===1/_)||F!==F&&_!==_}var Ei=typeof Object.is=="function"?Object.is:_n,Un=null,Sn=null,Zn=null,lr=null,In=!1,Ci=!1,I=0,H=null,ae=0;function Ce(){if(Un===null)throw Error(e(321));return Un}function ht(){if(0<ae)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function ot(){return lr===null?Zn===null?(In=!1,Zn=lr=ht()):(In=!0,lr=Zn):lr.next===null?(In=!1,lr=lr.next=ht()):(In=!0,lr=lr.next),lr}function jt(){Sn=Un=null,Ci=!1,Zn=null,ae=0,lr=H=null}function Ut(F,_){return typeof _=="function"?_(F):_}function Br(F,_,V){if(Un=Ce(),lr=ot(),In){var W=lr.queue;if(_=W.dispatch,H!==null&&(V=H.get(W),V!==void 0)){H.delete(W),W=lr.memoizedState;do W=F(W,V.action),V=V.next;while(V!==null);return lr.memoizedState=W,[W,_]}return[lr.memoizedState,_]}return F=F===Ut?typeof _=="function"?_():_:V!==void 0?V(_):_,lr.memoizedState=F,F=lr.queue={last:null,dispatch:null},F=F.dispatch=te.bind(null,Un,F),[lr.memoizedState,F]}function M(F,_){if(Un=Ce(),lr=ot(),_=_===void 0?null:_,lr!==null){var V=lr.memoizedState;if(V!==null&&_!==null){var W=V[1];e:if(W===null)W=!1;else{for(var Ae=0;Ae<W.length&&Ae<_.length;Ae++)if(!Ei(_[Ae],W[Ae])){W=!1;break e}W=!0}if(W)return V[0]}}return F=F(),lr.memoizedState=[F,_],F}function te(F,_,V){if(25<=ae)throw Error(e(301));if(F===Un)if(Ci=!0,F={action:V,next:null},H===null&&(H=new Map),V=H.get(_),V===void 0)H.set(_,F);else{for(_=V;_.next!==null;)_=_.next;_.next=F}}function fe(){throw Error(e(394))}function be(){}var Me={readContext:function(F){return F._currentValue},useContext:function(F){return Ce(),F._currentValue},useMemo:M,useReducer:Br,useRef:function(F){Un=Ce(),lr=ot();var _=lr.memoizedState;return _===null?(F={current:F},lr.memoizedState=F):_},useState:function(F){return Br(Ut,F)},useInsertionEffect:be,useLayoutEffect:function(){},useCallback:function(F,_){return M(function(){return F},_)},useImperativeHandle:be,useEffect:be,useDebugValue:be,useDeferredValue:function(F){return Ce(),F},useTransition:function(){return Ce(),[!1,fe]},useId:function(){var F=Sn.treeContext,_=F.overflow;F=F.id,F=(F&~(1<<32-Mn(F)-1)).toString(32)+_;var V=Ke;if(V===null)throw Error(e(404));return _=I++,F=":"+V.idPrefix+"R"+F,0<_&&(F+="H"+_.toString(32)),F+":"},useMutableSource:function(F,_){return Ce(),_(F._source)},useSyncExternalStore:function(F,_,V){if(V===void 0)throw Error(e(407));return V()}},Ke=null,Xe=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function yt(F){return console.error(F),null}function Pt(){}function pr(F,_,V,W,Ae,ve,ke,He,Rt){var Kt=[],qt=new Set;return _={destination:null,responseState:_,progressiveChunkSize:W===void 0?12800:W,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:qt,pingedTasks:Kt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Ae===void 0?yt:Ae,onAllReady:ve===void 0?Pt:ve,onShellReady:ke===void 0?Pt:ke,onShellError:He===void 0?Pt:He,onFatalError:Rt===void 0?Pt:Rt},V=ur(_,0,null,V,!1,!1),V.parentFlushed=!0,F=yr(_,F,null,V,qt,rt,null,Gn),Kt.push(F),_}function yr(F,_,V,W,Ae,ve,ke,He){F.allPendingTasks++,V===null?F.pendingRootTasks++:V.pendingTasks++;var Rt={node:_,ping:function(){var Kt=F.pingedTasks;Kt.push(Rt),Kt.length===1&&us(F)},blockedBoundary:V,blockedSegment:W,abortSet:Ae,legacyContext:ve,context:ke,treeContext:He};return Ae.add(Rt),Rt}function ur(F,_,V,W,Ae,ve){return{status:0,id:-1,index:_,parentFlushed:!1,chunks:[],children:[],formatContext:W,boundary:V,lastPushedText:Ae,textEmbedded:ve}}function Tr(F,_){if(F=F.onError(_),F!=null&&typeof F!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof F+'" instead');return F}function $r(F,_){var V=F.onShellError;V(_),V=F.onFatalError,V(_),F.destination!==null?(F.status=2,c(F.destination,_)):(F.status=1,F.fatalError=_)}function yn(F,_,V,W,Ae){for(Un={},Sn=_,I=0,F=V(W,Ae);Ci;)Ci=!1,I=0,ae+=1,lr=null,F=V(W,Ae);return jt(),F}function Xi(F,_,V,W){var Ae=V.render(),ve=W.childContextTypes;if(ve!=null){var ke=_.legacyContext;if(typeof V.getChildContext!="function")W=ke;else{V=V.getChildContext();for(var He in V)if(!(He in ve))throw Error(e(108,_e(W)||"Unknown",He));W=Cn({},ke,V)}_.legacyContext=W,$n(F,_,Ae),_.legacyContext=ke}else $n(F,_,Ae)}function ua(F,_){if(F&&F.defaultProps){_=Cn({},_),F=F.defaultProps;for(var V in F)_[V]===void 0&&(_[V]=F[V]);return _}return _}function Ji(F,_,V,W,Ae){if(typeof V=="function")if(V.prototype&&V.prototype.isReactComponent){Ae=lt(V,_.legacyContext);var ve=V.contextType;ve=new V(W,typeof ve=="object"&&ve!==null?ve._currentValue:Ae),Or(ve,V,W,Ae),Xi(F,_,ve,V)}else{ve=lt(V,_.legacyContext),Ae=yn(F,_,V,W,ve);var ke=I!==0;if(typeof Ae=="object"&&Ae!==null&&typeof Ae.render=="function"&&Ae.$$typeof===void 0)Or(Ae,V,W,ve),Xi(F,_,Ae,V);else if(ke){W=_.treeContext,_.treeContext=Bn(W,1,0);try{$n(F,_,Ae)}finally{_.treeContext=W}}else $n(F,_,Ae)}else if(typeof V=="string"){switch(Ae=_.blockedSegment,ve=wr(Ae.chunks,V,W,F.responseState,Ae.formatContext),Ae.lastPushedText=!1,ke=Ae.formatContext,Ae.formatContext=K(ke,V,W),pi(F,_,ve),Ae.formatContext=ke,V){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:Ae.chunks.push(an,l(V),_r)}Ae.lastPushedText=!1}else{switch(V){case pe:case q:case si:case xn:case Jn:$n(F,_,W.children);return;case on:$n(F,_,W.children);return;case z:throw Error(e(343));case Lr:e:{V=_.blockedBoundary,Ae=_.blockedSegment,ve=W.fallback,W=W.children,ke=new Set;var He={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:ke,errorDigest:null},Rt=ur(F,Ae.chunks.length,He,Ae.formatContext,!1,!1);Ae.children.push(Rt),Ae.lastPushedText=!1;var Kt=ur(F,0,null,Ae.formatContext,!1,!1);Kt.parentFlushed=!0,_.blockedBoundary=He,_.blockedSegment=Kt;try{if(pi(F,_,W),Kt.lastPushedText&&Kt.textEmbedded&&Kt.chunks.push(ie),Kt.status=1,ca(He,Kt),He.pendingTasks===0)break e}catch(qt){Kt.status=4,He.forceClientRender=!0,He.errorDigest=Tr(F,qt)}finally{_.blockedBoundary=V,_.blockedSegment=Ae}_=yr(F,ve,V,Rt,ke,_.legacyContext,_.context,_.treeContext),F.pingedTasks.push(_)}return}if(typeof V=="object"&&V!==null)switch(V.$$typeof){case rn:if(W=yn(F,_,V.render,W,Ae),I!==0){V=_.treeContext,_.treeContext=Bn(V,1,0);try{$n(F,_,W)}finally{_.treeContext=V}}else $n(F,_,W);return;case E:V=V.type,W=ua(V,W),Ji(F,_,V,W,Ae);return;case mn:if(Ae=W.children,V=V._context,W=W.value,ve=V._currentValue,V._currentValue=W,ke=nt,nt=W={parent:ke,depth:ke===null?0:ke.depth+1,context:V,parentValue:ve,value:W},_.context=W,$n(F,_,Ae),F=nt,F===null)throw Error(e(403));W=F.parentValue,F.context._currentValue=W===ce?F.context._defaultValue:W,F=nt=F.parent,_.context=F;return;case sn:W=W.children,W=W(V._currentValue),$n(F,_,W);return;case O:Ae=V._init,V=Ae(V._payload),W=ua(V,W),Ji(F,_,V,W,void 0);return}throw Error(e(130,V==null?V:typeof V,""))}}function $n(F,_,V){if(_.node=V,typeof V=="object"&&V!==null){switch(V.$$typeof){case cn:Ji(F,_,V.type,V.props,V.ref);return;case tn:throw Error(e(257));case O:var W=V._init;V=W(V._payload),$n(F,_,V);return}if(Y(V)){Ki(F,_,V);return}if(V===null||typeof V!="object"?W=null:(W=xe&&V[xe]||V["@@iterator"],W=typeof W=="function"?W:null),W&&(W=W.call(V))){if(V=W.next(),!V.done){var Ae=[];do Ae.push(V.value),V=W.next();while(!V.done);Ki(F,_,Ae)}return}throw F=Object.prototype.toString.call(V),Error(e(31,F==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":F))}typeof V=="string"?(W=_.blockedSegment,W.lastPushedText=de(_.blockedSegment.chunks,V,F.responseState,W.lastPushedText)):typeof V=="number"&&(W=_.blockedSegment,W.lastPushedText=de(_.blockedSegment.chunks,""+V,F.responseState,W.lastPushedText))}function Ki(F,_,V){for(var W=V.length,Ae=0;Ae<W;Ae++){var ve=_.treeContext;_.treeContext=Bn(ve,W,Ae);try{pi(F,_,V[Ae])}finally{_.treeContext=ve}}}function pi(F,_,V){var W=_.blockedSegment.formatContext,Ae=_.legacyContext,ve=_.context;try{return $n(F,_,V)}catch(Rt){if(jt(),typeof Rt=="object"&&Rt!==null&&typeof Rt.then=="function"){V=Rt;var ke=_.blockedSegment,He=ur(F,ke.chunks.length,null,ke.formatContext,ke.lastPushedText,!0);ke.children.push(He),ke.lastPushedText=!1,F=yr(F,_.node,_.blockedBoundary,He,_.abortSet,_.legacyContext,_.context,_.treeContext).ping,V.then(F,F),_.blockedSegment.formatContext=W,_.legacyContext=Ae,_.context=ve,Ln(ve)}else throw _.blockedSegment.formatContext=W,_.legacyContext=Ae,_.context=ve,Ln(ve),Rt}}function za(F){var _=F.blockedBoundary;F=F.blockedSegment,F.status=3,ls(this,_,F)}function Ha(F,_,V){var W=F.blockedBoundary;F.blockedSegment.status=3,W===null?(_.allPendingTasks--,_.status!==2&&(_.status=2,_.destination!==null&&_.destination.close())):(W.pendingTasks--,W.forceClientRender||(W.forceClientRender=!0,F=V===void 0?Error(e(432)):V,W.errorDigest=_.onError(F),W.parentFlushed&&_.clientRenderedBoundaries.push(W)),W.fallbackAbortableTasks.forEach(function(Ae){return Ha(Ae,_,V)}),W.fallbackAbortableTasks.clear(),_.allPendingTasks--,_.allPendingTasks===0&&(W=_.onAllReady,W()))}function ca(F,_){if(_.chunks.length===0&&_.children.length===1&&_.children[0].boundary===null){var V=_.children[0];V.id=_.id,V.parentFlushed=!0,V.status===1&&ca(F,V)}else F.completedSegments.push(_)}function ls(F,_,V){if(_===null){if(V.parentFlushed){if(F.completedRootSegment!==null)throw Error(e(389));F.completedRootSegment=V}F.pendingRootTasks--,F.pendingRootTasks===0&&(F.onShellError=Pt,_=F.onShellReady,_())}else _.pendingTasks--,_.forceClientRender||(_.pendingTasks===0?(V.parentFlushed&&V.status===1&&ca(_,V),_.parentFlushed&&F.completedBoundaries.push(_),_.fallbackAbortableTasks.forEach(za,F),_.fallbackAbortableTasks.clear()):V.parentFlushed&&V.status===1&&(ca(_,V),_.completedSegments.length===1&&_.parentFlushed&&F.partialBoundaries.push(_)));F.allPendingTasks--,F.allPendingTasks===0&&(F=F.onAllReady,F())}function us(F){if(F.status!==2){var _=nt,V=Xe.current;Xe.current=Me;var W=Ke;Ke=F.responseState;try{var Ae=F.pingedTasks,ve;for(ve=0;ve<Ae.length;ve++){var ke=Ae[ve],He=F,Rt=ke.blockedSegment;if(Rt.status===0){Ln(ke.context);try{$n(He,ke,ke.node),Rt.lastPushedText&&Rt.textEmbedded&&Rt.chunks.push(ie),ke.abortSet.delete(ke),Rt.status=1,ls(He,ke.blockedBoundary,Rt)}catch(le){if(jt(),typeof le=="object"&&le!==null&&typeof le.then=="function"){var Kt=ke.ping;le.then(Kt,Kt)}else{ke.abortSet.delete(ke),Rt.status=4;var qt=ke.blockedBoundary,qr=le,L=Tr(He,qr);if(qt===null?$r(He,qr):(qt.pendingTasks--,qt.forceClientRender||(qt.forceClientRender=!0,qt.errorDigest=L,qt.parentFlushed&&He.clientRenderedBoundaries.push(qt))),He.allPendingTasks--,He.allPendingTasks===0){var re=He.onAllReady;re()}}}}}Ae.splice(0,ve),F.destination!==null&&fa(F,F.destination)}catch(le){Tr(F,le),$r(F,le)}finally{Ke=W,Xe.current=V,V===Me&&Ln(_)}}}function ki(F,_,V){switch(V.parentFlushed=!0,V.status){case 0:var W=V.id=F.nextSegmentId++;return V.lastPushedText=!1,V.textEmbedded=!1,F=F.responseState,i(_,ir),i(_,F.placeholderPrefix),F=l(W.toString(16)),i(_,F),a(_,Yr);case 1:V.status=2;var Ae=!0;W=V.chunks;var ve=0;V=V.children;for(var ke=0;ke<V.length;ke++){for(Ae=V[ke];ve<Ae.index;ve++)i(_,W[ve]);Ae=ja(F,_,Ae)}for(;ve<W.length-1;ve++)i(_,W[ve]);return ve<W.length&&(Ae=a(_,W[ve])),Ae;default:throw Error(e(390))}}function ja(F,_,V){var W=V.boundary;if(W===null)return ki(F,_,V);if(W.parentFlushed=!0,W.forceClientRender)W=W.errorDigest,a(_,pn),i(_,Fr),W&&(i(_,en),i(_,l(B(W))),i(_,zr)),a(_,Hr),ki(F,_,V);else if(0<W.pendingTasks){W.rootSegmentID=F.nextSegmentId++,0<W.completedSegments.length&&F.partialBoundaries.push(W);var Ae=F.responseState,ve=Ae.nextSuspenseID++;Ae=u(Ae.boundaryPrefix+ve.toString(16)),W=W.id=Ae,zt(_,F.responseState,W),ki(F,_,V)}else if(W.byteSize>F.progressiveChunkSize)W.rootSegmentID=F.nextSegmentId++,F.completedBoundaries.push(W),zt(_,F.responseState,W.id),ki(F,_,V);else{if(a(_,kr),V=W.completedSegments,V.length!==1)throw Error(e(391));ja(F,_,V[0])}return a(_,gn)}function cs(F,_,V){return Ct(_,F.responseState,V.formatContext,V.id),ja(F,_,V),dt(_,V.formatContext)}function fs(F,_,V){for(var W=V.completedSegments,Ae=0;Ae<W.length;Ae++)ds(F,_,V,W[Ae]);if(W.length=0,F=F.responseState,W=V.id,V=V.rootSegmentID,i(_,F.startInlineScript),F.sentCompleteBoundaryFunction?i(_,Ht):(F.sentCompleteBoundaryFunction=!0,i(_,dr)),W===null)throw Error(e(395));return V=l(V.toString(16)),i(_,W),i(_,On),i(_,F.segmentPrefix),i(_,V),a(_,Tn)}function ds(F,_,V,W){if(W.status===2)return!0;var Ae=W.id;if(Ae===-1){if((W.id=V.rootSegmentID)===-1)throw Error(e(392));return cs(F,_,W)}return cs(F,_,W),F=F.responseState,i(_,F.startInlineScript),F.sentCompleteSegmentFunction?i(_,Et):(F.sentCompleteSegmentFunction=!0,i(_,Dt)),i(_,F.segmentPrefix),Ae=l(Ae.toString(16)),i(_,Ae),i(_,hr),i(_,F.placeholderPrefix),i(_,Ae),a(_,er)}function fa(F,_){t=new Uint8Array(512),n=0;try{var V=F.completedRootSegment;if(V!==null&&F.pendingRootTasks===0){ja(F,_,V),F.completedRootSegment=null;var W=F.responseState.bootstrapChunks;for(V=0;V<W.length-1;V++)i(_,W[V]);V<W.length&&a(_,W[V])}var Ae=F.clientRenderedBoundaries,ve;for(ve=0;ve<Ae.length;ve++){var ke=Ae[ve];W=_;var He=F.responseState,Rt=ke.id,Kt=ke.errorDigest,qt=ke.errorMessage,qr=ke.errorComponentStack;if(i(W,He.startInlineScript),He.sentClientRenderFunction?i(W,Cr):(He.sentClientRenderFunction=!0,i(W,mr)),Rt===null)throw Error(e(395));i(W,Rt),i(W,bn),(Kt||qt||qr)&&(i(W,jn),i(W,l(jr(Kt||"")))),(qt||qr)&&(i(W,jn),i(W,l(jr(qt||"")))),qr&&(i(W,jn),i(W,l(jr(qr)))),a(W,Rr)}Ae.splice(0,ve);var L=F.completedBoundaries;for(ve=0;ve<L.length;ve++)fs(F,_,L[ve]);L.splice(0,ve),s(_),t=new Uint8Array(512),n=0;var re=F.partialBoundaries;for(ve=0;ve<re.length;ve++){var le=re[ve];e:{Ae=F,ke=_;var Ve=le.completedSegments;for(He=0;He<Ve.length;He++)if(!ds(Ae,ke,le,Ve[He])){He++,Ve.splice(0,He);var pt=!1;break e}Ve.splice(0,He),pt=!0}if(!pt){F.destination=null,ve++,re.splice(0,ve);return}}re.splice(0,ve);var _t=F.completedBoundaries;for(ve=0;ve<_t.length;ve++)fs(F,_,_t[ve]);_t.splice(0,ve)}finally{s(_),F.allPendingTasks===0&&F.pingedTasks.length===0&&F.clientRenderedBoundaries.length===0&&F.completedBoundaries.length===0&&_.close()}}function zi(F,_){try{var V=F.abortableTasks;V.forEach(function(W){return Ha(W,F,_)}),V.clear(),F.destination!==null&&fa(F,F.destination)}catch(W){Tr(F,W),$r(F,W)}}return Yh.renderToReadableStream=function(F,_){return new Promise(function(V,W){var Ae,ve,ke=new Promise(function(qt,qr){ve=qt,Ae=qr}),He=pr(F,Ue(_?_.identifierPrefix:void 0,_?_.nonce:void 0,_?_.bootstrapScriptContent:void 0,_?_.bootstrapScripts:void 0,_?_.bootstrapModules:void 0),Te(_?_.namespaceURI:void 0),_?_.progressiveChunkSize:void 0,_?_.onError:void 0,ve,function(){var qt=new ReadableStream({type:"bytes",pull:function(qr){if(He.status===1)He.status=2,c(qr,He.fatalError);else if(He.status!==2&&He.destination===null){He.destination=qr;try{fa(He,qr)}catch(L){Tr(He,L),$r(He,L)}}},cancel:function(){zi(He)}},{highWaterMark:0});qt.allReady=ke,V(qt)},function(qt){ke.catch(function(){}),W(qt)},Ae);if(_&&_.signal){var Rt=_.signal,Kt=function(){zi(He,Rt.reason),Rt.removeEventListener("abort",Kt)};Rt.addEventListener("abort",Kt)}us(He)})},Yh.version="18.3.1",Yh}var cl={};var Kw;function xO(){return Kw||(Kw=1,process.env.NODE_ENV!=="production"&&(function(){var r=Rl(),e="18.3.1",t=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(p){{for(var m=arguments.length,b=new Array(m>1?m-1:0),x=1;x<m;x++)b[x-1]=arguments[x];a("warn",p,b)}}function i(p){{for(var m=arguments.length,b=new Array(m>1?m-1:0),x=1;x<m;x++)b[x-1]=arguments[x];a("error",p,b)}}function a(p,m,b){{var x=t.ReactDebugCurrentFrame,D=x.getStackAddendum();D!==""&&(m+="%s",b=b.concat([D]));var N=b.map(function(j){return String(j)});N.unshift("Warning: "+m),Function.prototype.apply.call(console[p],console,N)}}function s(p){p()}function o(p){}function l(p,m){u(p,m)}function u(p,m){return p.push(m)}function c(p){}function h(p){p.push(null)}function f(p){return p}function d(p){return p}function g(p,m){p.destroy(m)}function v(p){{var m=typeof Symbol=="function"&&Symbol.toStringTag,b=m&&p[Symbol.toStringTag]||p.constructor.name||"Object";return b}}function y(p){try{return A(p),!1}catch{return!0}}function A(p){return""+p}function C(p,m){if(y(p))return i("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",m,v(p)),A(p)}function k(p,m){if(y(p))return i("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",m,v(p)),A(p)}function T(p){if(y(p))return i("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",v(p)),A(p)}var S=Object.prototype.hasOwnProperty,R=0,B=1,G=2,$=3,Y=4,X=5,J=6,Q=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",oe=Q+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",se=new RegExp("^["+Q+"]["+oe+"]*$"),he={},ye={};function Ue(p){return S.call(ye,p)?!0:S.call(he,p)?!1:se.test(p)?(ye[p]=!0,!0):(he[p]=!0,i("Invalid attribute name: `%s`",p),!1)}function Oe(p,m,b,x){if(b!==null&&b.type===R)return!1;switch(typeof m){case"function":case"symbol":return!0;case"boolean":{if(b!==null)return!b.acceptsBooleans;var D=p.toLowerCase().slice(0,5);return D!=="data-"&&D!=="aria-"}default:return!1}}function Te(p){return ie.hasOwnProperty(p)?ie[p]:null}function K(p,m,b,x,D,N,j){this.acceptsBooleans=m===G||m===$||m===Y,this.attributeName=x,this.attributeNamespace=D,this.mustUseProperty=b,this.propertyName=p,this.type=m,this.sanitizeURL=N,this.removeEmptyString=j}var ie={},de=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];de.forEach(function(p){ie[p]=new K(p,R,!1,p,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(p){var m=p[0],b=p[1];ie[m]=new K(m,B,!1,b,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(p){ie[p]=new K(p,G,!1,p.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(p){ie[p]=new K(p,G,!1,p,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(p){ie[p]=new K(p,$,!1,p.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(p){ie[p]=new K(p,$,!0,p,null,!1,!1)}),["capture","download"].forEach(function(p){ie[p]=new K(p,Y,!1,p,null,!1,!1)}),["cols","rows","size","span"].forEach(function(p){ie[p]=new K(p,J,!1,p,null,!1,!1)}),["rowSpan","start"].forEach(function(p){ie[p]=new K(p,X,!1,p.toLowerCase(),null,!1,!1)});var Be=/[\-\:]([a-z])/g,Ee=function(p){return p[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(p){var m=p.replace(Be,Ee);ie[m]=new K(m,B,!1,p,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(p){var m=p.replace(Be,Ee);ie[m]=new K(m,B,!1,p,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(p){var m=p.replace(Be,Ee);ie[m]=new K(m,B,!1,p,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(p){ie[p]=new K(p,B,!1,p.toLowerCase(),null,!1,!1)});var ze="xlinkHref";ie[ze]=new K("xlinkHref",B,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(p){ie[p]=new K(p,B,!1,p.toLowerCase(),null,!0,!0)});var je={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function qe(p,m){return p+m.charAt(0).toUpperCase()+m.substring(1)}var Ge=["Webkit","ms","Moz","O"];Object.keys(je).forEach(function(p){Ge.forEach(function(m){je[qe(m,p)]=je[p]})});var bt={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function rr(p,m){bt[m.type]||m.onChange||m.onInput||m.readOnly||m.disabled||m.value==null||i("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),m.onChange||m.readOnly||m.disabled||m.checked==null||i("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Pr(p,m){if(p.indexOf("-")===-1)return typeof m.is=="string";switch(p){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $t={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},ar={},St=new RegExp("^(aria)-["+oe+"]*$"),st=new RegExp("^(aria)[A-Z]["+oe+"]*$");function Qr(p,m){{if(S.call(ar,m)&&ar[m])return!0;if(st.test(m)){var b="aria-"+m.slice(4).toLowerCase(),x=$t.hasOwnProperty(b)?b:null;if(x==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",m),ar[m]=!0,!0;if(m!==x)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",m,x),ar[m]=!0,!0}if(St.test(m)){var D=m.toLowerCase(),N=$t.hasOwnProperty(D)?D:null;if(N==null)return ar[m]=!0,!1;if(m!==N)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",m,N),ar[m]=!0,!0}}return!0}function Sr(p,m){{var b=[];for(var x in m){var D=Qr(p,x);D||b.push(x)}var N=b.map(function(j){return"`"+j+"`"}).join(", ");b.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",N,p):b.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",N,p)}}function gr(p,m){Pr(p,m)||Sr(p,m)}var nr=!1;function fr(p,m){{if(p!=="input"&&p!=="textarea"&&p!=="select")return;m!=null&&m.value===null&&!nr&&(nr=!0,p==="select"&&m.multiple?i("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",p):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",p))}}var Yt={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Xt=function(){};{var mt={},wr=/^on./,an=/^on[^A-Z]/,_r=new RegExp("^(aria)-["+oe+"]*$"),ir=new RegExp("^(aria)[A-Z]["+oe+"]*$");Xt=function(p,m,b,x){if(S.call(mt,m)&&mt[m])return!0;var D=m.toLowerCase();if(D==="onfocusin"||D==="onfocusout")return i("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),mt[m]=!0,!0;if(x!=null){var N=x.registrationNameDependencies,j=x.possibleRegistrationNames;if(N.hasOwnProperty(m))return!0;var ne=j.hasOwnProperty(D)?j[D]:null;if(ne!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",m,ne),mt[m]=!0,!0;if(wr.test(m))return i("Unknown event handler property `%s`. It will be ignored.",m),mt[m]=!0,!0}else if(wr.test(m))return an.test(m)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",m),mt[m]=!0,!0;if(_r.test(m)||ir.test(m))return!0;if(D==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),mt[m]=!0,!0;if(D==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),mt[m]=!0,!0;if(D==="is"&&b!==null&&b!==void 0&&typeof b!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof b),mt[m]=!0,!0;if(typeof b=="number"&&isNaN(b))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",m),mt[m]=!0,!0;var ge=Te(m),Pe=ge!==null&&ge.type===R;if(Yt.hasOwnProperty(D)){var Ne=Yt[D];if(Ne!==m)return i("Invalid DOM property `%s`. Did you mean `%s`?",m,Ne),mt[m]=!0,!0}else if(!Pe&&m!==D)return i("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",m,D),mt[m]=!0,!0;return typeof b=="boolean"&&Oe(m,b,ge)?(b?i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',b,m,m,b,m):i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',b,m,m,b,m,m,m),mt[m]=!0,!0):Pe?!0:Oe(m,b,ge)?(mt[m]=!0,!1):((b==="false"||b==="true")&&ge!==null&&ge.type===$&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",b,m,b==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',m,b),mt[m]=!0),!0)}}var Yr=function(p,m,b){{var x=[];for(var D in m){var N=Xt(p,D,m[D],b);N||x.push(D)}var j=x.map(function(ne){return"`"+ne+"`"}).join(", ");x.length===1?i("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",j,p):x.length>1&&i("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",j,p)}};function kr(p,m,b){Pr(p,m)||Yr(p,m,b)}var Zr=function(){};{var Vr=/^(?:webkit|moz|o)[A-Z]/,pn=/^-ms-/,gn=/-(.)/g,Fr=/;\s*$/,zr={},en={},Hr=!1,zt=!1,sr=function(p){return p.replace(gn,function(m,b){return b.toUpperCase()})},Er=function(p){zr.hasOwnProperty(p)&&zr[p]||(zr[p]=!0,i("Unsupported style property %s. Did you mean %s?",p,sr(p.replace(pn,"ms-"))))},tt=function(p){zr.hasOwnProperty(p)&&zr[p]||(zr[p]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",p,p.charAt(0).toUpperCase()+p.slice(1)))},Nr=function(p,m){en.hasOwnProperty(m)&&en[m]||(en[m]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,p,m.replace(Fr,"")))},Xr=function(p,m){Hr||(Hr=!0,i("`NaN` is an invalid value for the `%s` css style property.",p))},Se=function(p,m){zt||(zt=!0,i("`Infinity` is an invalid value for the `%s` css style property.",p))};Zr=function(p,m){p.indexOf("-")>-1?Er(p):Vr.test(p)?tt(p):Fr.test(m)&&Nr(p,m),typeof m=="number"&&(isNaN(m)?Xr(p,m):isFinite(m)||Se(p,m))}}var P=Zr,U=/["'&<>]/;function Z(p){T(p);var m=""+p,b=U.exec(m);if(!b)return m;var x,D="",N,j=0;for(N=b.index;N<m.length;N++){switch(m.charCodeAt(N)){case 34:x="&quot;";break;case 38:x="&amp;";break;case 39:x="&#x27;";break;case 60:x="&lt;";break;case 62:x="&gt;";break;default:continue}j!==N&&(D+=m.substring(j,N)),j=N+1,D+=x}return j!==N?D+m.substring(j,N):D}function ue(p){return typeof p=="boolean"||typeof p=="number"?""+p:Z(p)}var Ie=/([A-Z])/g,We=/^ms-/;function wt(p){return p.replace(Ie,"-$1").toLowerCase().replace(We,"-ms-")}var It=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Nt=!1;function or(p){!Nt&&It.test(p)&&(Nt=!0,i("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(p)))}var Lt=Array.isArray;function ee(p){return Lt(p)}var De="<script>";function Qe(p,m,b,x,D){var N=p===void 0?"":p,j=De,ne=[];return{bootstrapChunks:ne,startInlineScript:j,placeholderPrefix:N+"P:",segmentPrefix:N+"S:",boundaryPrefix:N+"B:",idPrefix:N,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var Ye=0,Ct=1,dt=2,Dt=3,Et=4,hr=5,er=6,dr=7;function Ht(p,m){return{insertionMode:p,selectedValue:m}}function On(p,m,b){switch(m){case"select":return Ht(Ct,b.value!=null?b.value:b.defaultValue);case"svg":return Ht(dt,null);case"math":return Ht(Dt,null);case"foreignObject":return Ht(Ct,null);case"table":return Ht(Et,null);case"thead":case"tbody":case"tfoot":return Ht(hr,null);case"colgroup":return Ht(dr,null);case"tr":return Ht(er,null)}return p.insertionMode>=Et||p.insertionMode===Ye?Ht(Ct,null):p}var Tn=null;function mr(p){var m=p.nextSuspenseID++;return p.boundaryPrefix+m.toString(16)}function Cr(p,m,b){var x=p.idPrefix,D=":"+x+"R"+m;return b>0&&(D+="H"+b.toString(32)),D+":"}function bn(p){return ue(p)}var Rr="<!-- -->";function jn(p,m,b,x){return m===""?x:(x&&p.push(Rr),p.push(bn(m)),!0)}function wn(p,m,b,x){b&&x&&p.push(Rr)}var jr=new Map;function Cn(p){var m=jr.get(p);if(m!==void 0)return m;var b=ue(wt(p));return jr.set(p,b),b}var cn=' style="',tn=":",Jn=";";function si(p,m,b){if(typeof b!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var x=!0;for(var D in b)if(S.call(b,D)){var N=b[D];if(!(N==null||typeof N=="boolean"||N==="")){var j=void 0,ne=void 0,ge=D.indexOf("--")===0;ge?(j=ue(D),k(N,D),ne=ue((""+N).trim())):(P(D,N),j=Cn(D),typeof N=="number"?N!==0&&!S.call(je,D)?ne=N+"px":ne=""+N:(k(N,D),ne=ue((""+N).trim()))),x?(x=!1,p.push(cn,j,tn,ne)):p.push(Jn,j,tn,ne)}}x||p.push(sn)}var xn=" ",mn='="',sn='"',rn='=""';function Lr(p,m,b,x){switch(b){case"style":{si(p,m,x);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(b.length>2&&(b[0]==="o"||b[0]==="O")&&(b[1]==="n"||b[1]==="N"))){var D=Te(b);if(D!==null){switch(typeof x){case"function":case"symbol":return;case"boolean":if(!D.acceptsBooleans)return}var N=D.attributeName,j=N;switch(D.type){case $:x&&p.push(xn,j,rn);return;case Y:x===!0?p.push(xn,j,rn):x===!1||p.push(xn,j,mn,ue(x),sn);return;case X:isNaN(x)||p.push(xn,j,mn,ue(x),sn);break;case J:!isNaN(x)&&x>=1&&p.push(xn,j,mn,ue(x),sn);break;default:D.sanitizeURL&&(C(x,N),x=""+x,or(x)),p.push(xn,j,mn,ue(x),sn)}}else if(Ue(b)){switch(typeof x){case"function":case"symbol":return;case"boolean":{var ne=b.toLowerCase().slice(0,5);if(ne!=="data-"&&ne!=="aria-")return}}p.push(xn,b,mn,ue(x),sn)}}}var on=">",E="/>";function O(p,m,b){if(m!=null){if(b!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof m!="object"||!("__html"in m))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var x=m.__html;x!=null&&(T(x),p.push(""+x))}}var z=!1,q=!1,pe=!1,ce=!1,xe=!1,_e=!1,rt=!1;function lt(p,m){{var b=p[m];if(b!=null){var x=ee(b);p.multiple&&!x?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",m):!p.multiple&&x&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",m)}}}function nt(p,m,b){rr("select",m),lt(m,"value"),lt(m,"defaultValue"),m.value!==void 0&&m.defaultValue!==void 0&&!pe&&(i("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),pe=!0),p.push(_n("select"));var x=null,D=null;for(var N in m)if(S.call(m,N)){var j=m[N];if(j==null)continue;switch(N){case"children":x=j;break;case"dangerouslySetInnerHTML":D=j;break;case"defaultValue":case"value":break;default:Lr(p,b,N,j);break}}return p.push(on),O(p,D,x),x}function Jt(p){var m="";return r.Children.forEach(p,function(b){b!=null&&(m+=b,!xe&&typeof b!="string"&&typeof b!="number"&&(xe=!0,i("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),m}var vr=' selected=""';function Gr(p,m,b,x){var D=x.selectedValue;p.push(_n("option"));var N=null,j=null,ne=null,ge=null;for(var Pe in m)if(S.call(m,Pe)){var Ne=m[Pe];if(Ne==null)continue;switch(Pe){case"children":N=Ne;break;case"selected":ne=Ne,rt||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),rt=!0);break;case"dangerouslySetInnerHTML":ge=Ne;break;case"value":j=Ne;default:Lr(p,b,Pe,Ne);break}}if(D!=null){var Ze;if(j!==null?(C(j,"value"),Ze=""+j):(ge!==null&&(_e||(_e=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),Ze=Jt(N)),ee(D))for(var Vt=0;Vt<D.length;Vt++){C(D[Vt],"value");var Dr=""+D[Vt];if(Dr===Ze){p.push(vr);break}}else C(D,"select.value"),""+D===Ze&&p.push(vr)}else ne&&p.push(vr);return p.push(on),O(p,ge,N),N}function fn(p,m,b){rr("input",m),m.checked!==void 0&&m.defaultChecked!==void 0&&!q&&(i("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",m.type),q=!0),m.value!==void 0&&m.defaultValue!==void 0&&!z&&(i("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",m.type),z=!0),p.push(_n("input"));var x=null,D=null,N=null,j=null;for(var ne in m)if(S.call(m,ne)){var ge=m[ne];if(ge==null)continue;switch(ne){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":j=ge;break;case"defaultValue":D=ge;break;case"checked":N=ge;break;case"value":x=ge;break;default:Lr(p,b,ne,ge);break}}return N!==null?Lr(p,b,"checked",N):j!==null&&Lr(p,b,"checked",j),x!==null?Lr(p,b,"value",x):D!==null&&Lr(p,b,"value",D),p.push(E),null}function Kn(p,m,b){rr("textarea",m),m.value!==void 0&&m.defaultValue!==void 0&&!ce&&(i("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"),ce=!0),p.push(_n("textarea"));var x=null,D=null,N=null;for(var j in m)if(S.call(m,j)){var ne=m[j];if(ne==null)continue;switch(j){case"children":N=ne;break;case"value":x=ne;break;case"defaultValue":D=ne;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:Lr(p,b,j,ne);break}}if(x===null&&D!==null&&(x=D),p.push(on),N!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),x!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(ee(N)){if(N.length>1)throw new Error("<textarea> can only have at most one child.");T(N[0]),x=""+N[0]}T(N),x=""+N}return typeof x=="string"&&x[0]===`
95
+ `&&F.push(nr),ve;case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":F.push(Xt(_));for(var re in V)if(h.call(V,re)&&(ve=V[re],ve!=null))switch(re){case"children":case"dangerouslySetInnerHTML":throw Error(e(399,_));default:$t(F,W,re,ve)}return F.push(St),null;case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return gr(F,V,_,W);case"html":return Ae.insertionMode===0&&F.push(mt),gr(F,V,_,W);default:if(_.indexOf("-")===-1&&typeof V.is!="string")return gr(F,V,_,W);F.push(Xt(_)),Fe=ve=null;for(Kt in V)if(h.call(V,Kt)&&(He=V[Kt],He!=null))switch(Kt){case"children":ve=He;break;case"dangerouslySetInnerHTML":Fe=He;break;case"style":qe(F,W,He);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:v(Kt)&&typeof He!="function"&&typeof He!="symbol"&&F.push(Ge,l(Kt),bt,l(B(He)),rr)}return F.push(ar),st(F,Fe,ve),ve}}var an=u("</"),_r=u(">"),ir=u('<template id="'),Yr=u('"></template>'),kr=u("<!--$-->"),Zr=u('<!--$?--><template id="'),Vr=u('"></template>'),pn=u("<!--$!-->"),gn=u("<!--/$-->"),Fr=u("<template"),zr=u('"'),en=u(' data-dgst="');u(' data-msg="'),u(' data-stck="');var Hr=u("></template>");function zt(F,_,V){if(i(F,Zr),V===null)throw Error(e(395));return i(F,V),a(F,Vr)}var sr=u('<div hidden id="'),Er=u('">'),tt=u("</div>"),Nr=u('<svg aria-hidden="true" style="display:none" id="'),Xr=u('">'),Se=u("</svg>"),P=u('<math aria-hidden="true" style="display:none" id="'),U=u('">'),Z=u("</math>"),ue=u('<table hidden id="'),Ie=u('">'),We=u("</table>"),wt=u('<table hidden><tbody id="'),It=u('">'),Nt=u("</tbody></table>"),or=u('<table hidden><tr id="'),Lt=u('">'),ee=u("</tr></table>"),De=u('<table hidden><colgroup id="'),Qe=u('">'),Ye=u("</colgroup></table>");function Ct(F,_,V,W){switch(V.insertionMode){case 0:case 1:return i(F,sr),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Er);case 2:return i(F,Nr),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Xr);case 3:return i(F,P),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,U);case 4:return i(F,ue),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Ie);case 5:return i(F,wt),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,It);case 6:return i(F,or),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Lt);case 7:return i(F,De),i(F,_.segmentPrefix),i(F,l(W.toString(16))),a(F,Qe);default:throw Error(e(397))}}function dt(F,_){switch(_.insertionMode){case 0:case 1:return a(F,tt);case 2:return a(F,Se);case 3:return a(F,Z);case 4:return a(F,We);case 5:return a(F,Nt);case 6:return a(F,ee);case 7:return a(F,Ye);default:throw Error(e(397))}}var Dt=u('function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};$RS("'),Et=u('$RS("'),hr=u('","'),er=u('")<\/script>'),dr=u('function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}};$RC("'),Ht=u('$RC("'),On=u('","'),Tn=u('")<\/script>'),mr=u('function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};$RX("'),Cr=u('$RX("'),bn=u('"'),Rr=u(")<\/script>"),jn=u(","),wn=/[<\u2028\u2029]/g;function jr(F){return JSON.stringify(F).replace(wn,function(_){switch(_){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Cn=Object.assign,cn=Symbol.for("react.element"),tn=Symbol.for("react.portal"),Jn=Symbol.for("react.fragment"),si=Symbol.for("react.strict_mode"),xn=Symbol.for("react.profiler"),mn=Symbol.for("react.provider"),sn=Symbol.for("react.context"),rn=Symbol.for("react.forward_ref"),Lr=Symbol.for("react.suspense"),on=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),z=Symbol.for("react.scope"),q=Symbol.for("react.debug_trace_mode"),pe=Symbol.for("react.legacy_hidden"),ce=Symbol.for("react.default_value"),xe=Symbol.iterator;function _e(F){if(F==null)return null;if(typeof F=="function")return F.displayName||F.name||null;if(typeof F=="string")return F;switch(F){case Jn:return"Fragment";case tn:return"Portal";case xn:return"Profiler";case si:return"StrictMode";case Lr:return"Suspense";case on:return"SuspenseList"}if(typeof F=="object")switch(F.$$typeof){case sn:return(F.displayName||"Context")+".Consumer";case mn:return(F._context.displayName||"Context")+".Provider";case rn:var _=F.render;return F=F.displayName,F||(F=_.displayName||_.name||"",F=F!==""?"ForwardRef("+F+")":"ForwardRef"),F;case E:return _=F.displayName||null,_!==null?_:_e(F.type)||"Memo";case O:_=F._payload,F=F._init;try{return _e(F(_))}catch{}}return null}var rt={};function lt(F,_){if(F=F.contextTypes,!F)return rt;var V={},W;for(W in F)V[W]=_[W];return V}var nt=null;function Jt(F,_){if(F!==_){F.context._currentValue=F.parentValue,F=F.parent;var V=_.parent;if(F===null){if(V!==null)throw Error(e(401))}else{if(V===null)throw Error(e(401));Jt(F,V)}_.context._currentValue=_.value}}function vr(F){F.context._currentValue=F.parentValue,F=F.parent,F!==null&&vr(F)}function Gr(F){var _=F.parent;_!==null&&Gr(_),F.context._currentValue=F.value}function fn(F,_){if(F.context._currentValue=F.parentValue,F=F.parent,F===null)throw Error(e(402));F.depth===_.depth?Jt(F,_):fn(F,_)}function Kn(F,_){var V=_.parent;if(V===null)throw Error(e(402));F.depth===V.depth?Jt(F,V):Kn(F,V),_.context._currentValue=_.value}function Ln(F){var _=nt;_!==F&&(_===null?Gr(F):F===null?vr(_):_.depth===F.depth?Jt(_,F):_.depth>F.depth?fn(_,F):Kn(_,F),nt=F)}var vn={isMounted:function(){return!1},enqueueSetState:function(F,_){F=F._reactInternals,F.queue!==null&&F.queue.push(_)},enqueueReplaceState:function(F,_){F=F._reactInternals,F.replace=!0,F.queue=[_]},enqueueForceUpdate:function(){}};function Or(F,_,V,W){var Ae=F.state!==void 0?F.state:null;F.updater=vn,F.props=V,F.state=Ae;var ve={queue:[],replace:!1};F._reactInternals=ve;var Fe=_.contextType;if(F.context=typeof Fe=="object"&&Fe!==null?Fe._currentValue:W,Fe=_.getDerivedStateFromProps,typeof Fe=="function"&&(Fe=Fe(V,Ae),Ae=Fe==null?Ae:Cn({},Ae,Fe),F.state=Ae),typeof _.getDerivedStateFromProps!="function"&&typeof F.getSnapshotBeforeUpdate!="function"&&(typeof F.UNSAFE_componentWillMount=="function"||typeof F.componentWillMount=="function"))if(_=F.state,typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount(),_!==F.state&&vn.enqueueReplaceState(F,F.state,null),ve.queue!==null&&0<ve.queue.length)if(_=ve.queue,Fe=ve.replace,ve.queue=null,ve.replace=!1,Fe&&_.length===1)F.state=_[0];else{for(ve=Fe?_[0]:F.state,Ae=!0,Fe=Fe?1:0;Fe<_.length;Fe++){var He=_[Fe];He=typeof He=="function"?He.call(F,ve,V,W):He,He!=null&&(Ae?(Ae=!1,ve=Cn({},ve,He)):Cn(ve,He))}F.state=ve}else ve.queue=null}var Gn={id:1,overflow:""};function Bn(F,_,V){var W=F.id;F=F.overflow;var Ae=32-Mn(W)-1;W&=~(1<<Ae),V+=1;var ve=32-Mn(_)+Ae;if(30<ve){var Fe=Ae-Ae%5;return ve=(W&(1<<Fe)-1).toString(32),W>>=Fe,Ae-=Fe,{id:1<<32-Mn(_)+Ae|V<<Ae|W,overflow:ve+F}}return{id:1<<ve|V<<Ae|W,overflow:F}}var Mn=Math.clz32?Math.clz32:wi,Oi=Math.log,bi=Math.LN2;function wi(F){return F>>>=0,F===0?32:31-(Oi(F)/bi|0)|0}function _n(F,_){return F===_&&(F!==0||1/F===1/_)||F!==F&&_!==_}var Ei=typeof Object.is=="function"?Object.is:_n,Un=null,Sn=null,Zn=null,lr=null,In=!1,Ci=!1,I=0,H=null,ae=0;function Ce(){if(Un===null)throw Error(e(321));return Un}function ht(){if(0<ae)throw Error(e(312));return{memoizedState:null,queue:null,next:null}}function ot(){return lr===null?Zn===null?(In=!1,Zn=lr=ht()):(In=!0,lr=Zn):lr.next===null?(In=!1,lr=lr.next=ht()):(In=!0,lr=lr.next),lr}function jt(){Sn=Un=null,Ci=!1,Zn=null,ae=0,lr=H=null}function Ut(F,_){return typeof _=="function"?_(F):_}function Br(F,_,V){if(Un=Ce(),lr=ot(),In){var W=lr.queue;if(_=W.dispatch,H!==null&&(V=H.get(W),V!==void 0)){H.delete(W),W=lr.memoizedState;do W=F(W,V.action),V=V.next;while(V!==null);return lr.memoizedState=W,[W,_]}return[lr.memoizedState,_]}return F=F===Ut?typeof _=="function"?_():_:V!==void 0?V(_):_,lr.memoizedState=F,F=lr.queue={last:null,dispatch:null},F=F.dispatch=te.bind(null,Un,F),[lr.memoizedState,F]}function M(F,_){if(Un=Ce(),lr=ot(),_=_===void 0?null:_,lr!==null){var V=lr.memoizedState;if(V!==null&&_!==null){var W=V[1];e:if(W===null)W=!1;else{for(var Ae=0;Ae<W.length&&Ae<_.length;Ae++)if(!Ei(_[Ae],W[Ae])){W=!1;break e}W=!0}if(W)return V[0]}}return F=F(),lr.memoizedState=[F,_],F}function te(F,_,V){if(25<=ae)throw Error(e(301));if(F===Un)if(Ci=!0,F={action:V,next:null},H===null&&(H=new Map),V=H.get(_),V===void 0)H.set(_,F);else{for(_=V;_.next!==null;)_=_.next;_.next=F}}function fe(){throw Error(e(394))}function be(){}var Me={readContext:function(F){return F._currentValue},useContext:function(F){return Ce(),F._currentValue},useMemo:M,useReducer:Br,useRef:function(F){Un=Ce(),lr=ot();var _=lr.memoizedState;return _===null?(F={current:F},lr.memoizedState=F):_},useState:function(F){return Br(Ut,F)},useInsertionEffect:be,useLayoutEffect:function(){},useCallback:function(F,_){return M(function(){return F},_)},useImperativeHandle:be,useEffect:be,useDebugValue:be,useDeferredValue:function(F){return Ce(),F},useTransition:function(){return Ce(),[!1,fe]},useId:function(){var F=Sn.treeContext,_=F.overflow;F=F.id,F=(F&~(1<<32-Mn(F)-1)).toString(32)+_;var V=Ke;if(V===null)throw Error(e(404));return _=I++,F=":"+V.idPrefix+"R"+F,0<_&&(F+="H"+_.toString(32)),F+":"},useMutableSource:function(F,_){return Ce(),_(F._source)},useSyncExternalStore:function(F,_,V){if(V===void 0)throw Error(e(407));return V()}},Ke=null,Xe=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher;function yt(F){return console.error(F),null}function Pt(){}function pr(F,_,V,W,Ae,ve,Fe,He,Rt){var Kt=[],qt=new Set;return _={destination:null,responseState:_,progressiveChunkSize:W===void 0?12800:W,status:0,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:qt,pingedTasks:Kt,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:Ae===void 0?yt:Ae,onAllReady:ve===void 0?Pt:ve,onShellReady:Fe===void 0?Pt:Fe,onShellError:He===void 0?Pt:He,onFatalError:Rt===void 0?Pt:Rt},V=ur(_,0,null,V,!1,!1),V.parentFlushed=!0,F=yr(_,F,null,V,qt,rt,null,Gn),Kt.push(F),_}function yr(F,_,V,W,Ae,ve,Fe,He){F.allPendingTasks++,V===null?F.pendingRootTasks++:V.pendingTasks++;var Rt={node:_,ping:function(){var Kt=F.pingedTasks;Kt.push(Rt),Kt.length===1&&us(F)},blockedBoundary:V,blockedSegment:W,abortSet:Ae,legacyContext:ve,context:Fe,treeContext:He};return Ae.add(Rt),Rt}function ur(F,_,V,W,Ae,ve){return{status:0,id:-1,index:_,parentFlushed:!1,chunks:[],children:[],formatContext:W,boundary:V,lastPushedText:Ae,textEmbedded:ve}}function Tr(F,_){if(F=F.onError(_),F!=null&&typeof F!="string")throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof F+'" instead');return F}function $r(F,_){var V=F.onShellError;V(_),V=F.onFatalError,V(_),F.destination!==null?(F.status=2,c(F.destination,_)):(F.status=1,F.fatalError=_)}function yn(F,_,V,W,Ae){for(Un={},Sn=_,I=0,F=V(W,Ae);Ci;)Ci=!1,I=0,ae+=1,lr=null,F=V(W,Ae);return jt(),F}function Xi(F,_,V,W){var Ae=V.render(),ve=W.childContextTypes;if(ve!=null){var Fe=_.legacyContext;if(typeof V.getChildContext!="function")W=Fe;else{V=V.getChildContext();for(var He in V)if(!(He in ve))throw Error(e(108,_e(W)||"Unknown",He));W=Cn({},Fe,V)}_.legacyContext=W,$n(F,_,Ae),_.legacyContext=Fe}else $n(F,_,Ae)}function ua(F,_){if(F&&F.defaultProps){_=Cn({},_),F=F.defaultProps;for(var V in F)_[V]===void 0&&(_[V]=F[V]);return _}return _}function Ji(F,_,V,W,Ae){if(typeof V=="function")if(V.prototype&&V.prototype.isReactComponent){Ae=lt(V,_.legacyContext);var ve=V.contextType;ve=new V(W,typeof ve=="object"&&ve!==null?ve._currentValue:Ae),Or(ve,V,W,Ae),Xi(F,_,ve,V)}else{ve=lt(V,_.legacyContext),Ae=yn(F,_,V,W,ve);var Fe=I!==0;if(typeof Ae=="object"&&Ae!==null&&typeof Ae.render=="function"&&Ae.$$typeof===void 0)Or(Ae,V,W,ve),Xi(F,_,Ae,V);else if(Fe){W=_.treeContext,_.treeContext=Bn(W,1,0);try{$n(F,_,Ae)}finally{_.treeContext=W}}else $n(F,_,Ae)}else if(typeof V=="string"){switch(Ae=_.blockedSegment,ve=wr(Ae.chunks,V,W,F.responseState,Ae.formatContext),Ae.lastPushedText=!1,Fe=Ae.formatContext,Ae.formatContext=K(Fe,V,W),pi(F,_,ve),Ae.formatContext=Fe,V){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:Ae.chunks.push(an,l(V),_r)}Ae.lastPushedText=!1}else{switch(V){case pe:case q:case si:case xn:case Jn:$n(F,_,W.children);return;case on:$n(F,_,W.children);return;case z:throw Error(e(343));case Lr:e:{V=_.blockedBoundary,Ae=_.blockedSegment,ve=W.fallback,W=W.children,Fe=new Set;var He={id:null,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:Fe,errorDigest:null},Rt=ur(F,Ae.chunks.length,He,Ae.formatContext,!1,!1);Ae.children.push(Rt),Ae.lastPushedText=!1;var Kt=ur(F,0,null,Ae.formatContext,!1,!1);Kt.parentFlushed=!0,_.blockedBoundary=He,_.blockedSegment=Kt;try{if(pi(F,_,W),Kt.lastPushedText&&Kt.textEmbedded&&Kt.chunks.push(ie),Kt.status=1,ca(He,Kt),He.pendingTasks===0)break e}catch(qt){Kt.status=4,He.forceClientRender=!0,He.errorDigest=Tr(F,qt)}finally{_.blockedBoundary=V,_.blockedSegment=Ae}_=yr(F,ve,V,Rt,Fe,_.legacyContext,_.context,_.treeContext),F.pingedTasks.push(_)}return}if(typeof V=="object"&&V!==null)switch(V.$$typeof){case rn:if(W=yn(F,_,V.render,W,Ae),I!==0){V=_.treeContext,_.treeContext=Bn(V,1,0);try{$n(F,_,W)}finally{_.treeContext=V}}else $n(F,_,W);return;case E:V=V.type,W=ua(V,W),Ji(F,_,V,W,Ae);return;case mn:if(Ae=W.children,V=V._context,W=W.value,ve=V._currentValue,V._currentValue=W,Fe=nt,nt=W={parent:Fe,depth:Fe===null?0:Fe.depth+1,context:V,parentValue:ve,value:W},_.context=W,$n(F,_,Ae),F=nt,F===null)throw Error(e(403));W=F.parentValue,F.context._currentValue=W===ce?F.context._defaultValue:W,F=nt=F.parent,_.context=F;return;case sn:W=W.children,W=W(V._currentValue),$n(F,_,W);return;case O:Ae=V._init,V=Ae(V._payload),W=ua(V,W),Ji(F,_,V,W,void 0);return}throw Error(e(130,V==null?V:typeof V,""))}}function $n(F,_,V){if(_.node=V,typeof V=="object"&&V!==null){switch(V.$$typeof){case cn:Ji(F,_,V.type,V.props,V.ref);return;case tn:throw Error(e(257));case O:var W=V._init;V=W(V._payload),$n(F,_,V);return}if(Y(V)){Ki(F,_,V);return}if(V===null||typeof V!="object"?W=null:(W=xe&&V[xe]||V["@@iterator"],W=typeof W=="function"?W:null),W&&(W=W.call(V))){if(V=W.next(),!V.done){var Ae=[];do Ae.push(V.value),V=W.next();while(!V.done);Ki(F,_,Ae)}return}throw F=Object.prototype.toString.call(V),Error(e(31,F==="[object Object]"?"object with keys {"+Object.keys(V).join(", ")+"}":F))}typeof V=="string"?(W=_.blockedSegment,W.lastPushedText=de(_.blockedSegment.chunks,V,F.responseState,W.lastPushedText)):typeof V=="number"&&(W=_.blockedSegment,W.lastPushedText=de(_.blockedSegment.chunks,""+V,F.responseState,W.lastPushedText))}function Ki(F,_,V){for(var W=V.length,Ae=0;Ae<W;Ae++){var ve=_.treeContext;_.treeContext=Bn(ve,W,Ae);try{pi(F,_,V[Ae])}finally{_.treeContext=ve}}}function pi(F,_,V){var W=_.blockedSegment.formatContext,Ae=_.legacyContext,ve=_.context;try{return $n(F,_,V)}catch(Rt){if(jt(),typeof Rt=="object"&&Rt!==null&&typeof Rt.then=="function"){V=Rt;var Fe=_.blockedSegment,He=ur(F,Fe.chunks.length,null,Fe.formatContext,Fe.lastPushedText,!0);Fe.children.push(He),Fe.lastPushedText=!1,F=yr(F,_.node,_.blockedBoundary,He,_.abortSet,_.legacyContext,_.context,_.treeContext).ping,V.then(F,F),_.blockedSegment.formatContext=W,_.legacyContext=Ae,_.context=ve,Ln(ve)}else throw _.blockedSegment.formatContext=W,_.legacyContext=Ae,_.context=ve,Ln(ve),Rt}}function za(F){var _=F.blockedBoundary;F=F.blockedSegment,F.status=3,ls(this,_,F)}function Ha(F,_,V){var W=F.blockedBoundary;F.blockedSegment.status=3,W===null?(_.allPendingTasks--,_.status!==2&&(_.status=2,_.destination!==null&&_.destination.close())):(W.pendingTasks--,W.forceClientRender||(W.forceClientRender=!0,F=V===void 0?Error(e(432)):V,W.errorDigest=_.onError(F),W.parentFlushed&&_.clientRenderedBoundaries.push(W)),W.fallbackAbortableTasks.forEach(function(Ae){return Ha(Ae,_,V)}),W.fallbackAbortableTasks.clear(),_.allPendingTasks--,_.allPendingTasks===0&&(W=_.onAllReady,W()))}function ca(F,_){if(_.chunks.length===0&&_.children.length===1&&_.children[0].boundary===null){var V=_.children[0];V.id=_.id,V.parentFlushed=!0,V.status===1&&ca(F,V)}else F.completedSegments.push(_)}function ls(F,_,V){if(_===null){if(V.parentFlushed){if(F.completedRootSegment!==null)throw Error(e(389));F.completedRootSegment=V}F.pendingRootTasks--,F.pendingRootTasks===0&&(F.onShellError=Pt,_=F.onShellReady,_())}else _.pendingTasks--,_.forceClientRender||(_.pendingTasks===0?(V.parentFlushed&&V.status===1&&ca(_,V),_.parentFlushed&&F.completedBoundaries.push(_),_.fallbackAbortableTasks.forEach(za,F),_.fallbackAbortableTasks.clear()):V.parentFlushed&&V.status===1&&(ca(_,V),_.completedSegments.length===1&&_.parentFlushed&&F.partialBoundaries.push(_)));F.allPendingTasks--,F.allPendingTasks===0&&(F=F.onAllReady,F())}function us(F){if(F.status!==2){var _=nt,V=Xe.current;Xe.current=Me;var W=Ke;Ke=F.responseState;try{var Ae=F.pingedTasks,ve;for(ve=0;ve<Ae.length;ve++){var Fe=Ae[ve],He=F,Rt=Fe.blockedSegment;if(Rt.status===0){Ln(Fe.context);try{$n(He,Fe,Fe.node),Rt.lastPushedText&&Rt.textEmbedded&&Rt.chunks.push(ie),Fe.abortSet.delete(Fe),Rt.status=1,ls(He,Fe.blockedBoundary,Rt)}catch(le){if(jt(),typeof le=="object"&&le!==null&&typeof le.then=="function"){var Kt=Fe.ping;le.then(Kt,Kt)}else{Fe.abortSet.delete(Fe),Rt.status=4;var qt=Fe.blockedBoundary,qr=le,L=Tr(He,qr);if(qt===null?$r(He,qr):(qt.pendingTasks--,qt.forceClientRender||(qt.forceClientRender=!0,qt.errorDigest=L,qt.parentFlushed&&He.clientRenderedBoundaries.push(qt))),He.allPendingTasks--,He.allPendingTasks===0){var re=He.onAllReady;re()}}}}}Ae.splice(0,ve),F.destination!==null&&fa(F,F.destination)}catch(le){Tr(F,le),$r(F,le)}finally{Ke=W,Xe.current=V,V===Me&&Ln(_)}}}function ki(F,_,V){switch(V.parentFlushed=!0,V.status){case 0:var W=V.id=F.nextSegmentId++;return V.lastPushedText=!1,V.textEmbedded=!1,F=F.responseState,i(_,ir),i(_,F.placeholderPrefix),F=l(W.toString(16)),i(_,F),a(_,Yr);case 1:V.status=2;var Ae=!0;W=V.chunks;var ve=0;V=V.children;for(var Fe=0;Fe<V.length;Fe++){for(Ae=V[Fe];ve<Ae.index;ve++)i(_,W[ve]);Ae=ja(F,_,Ae)}for(;ve<W.length-1;ve++)i(_,W[ve]);return ve<W.length&&(Ae=a(_,W[ve])),Ae;default:throw Error(e(390))}}function ja(F,_,V){var W=V.boundary;if(W===null)return ki(F,_,V);if(W.parentFlushed=!0,W.forceClientRender)W=W.errorDigest,a(_,pn),i(_,Fr),W&&(i(_,en),i(_,l(B(W))),i(_,zr)),a(_,Hr),ki(F,_,V);else if(0<W.pendingTasks){W.rootSegmentID=F.nextSegmentId++,0<W.completedSegments.length&&F.partialBoundaries.push(W);var Ae=F.responseState,ve=Ae.nextSuspenseID++;Ae=u(Ae.boundaryPrefix+ve.toString(16)),W=W.id=Ae,zt(_,F.responseState,W),ki(F,_,V)}else if(W.byteSize>F.progressiveChunkSize)W.rootSegmentID=F.nextSegmentId++,F.completedBoundaries.push(W),zt(_,F.responseState,W.id),ki(F,_,V);else{if(a(_,kr),V=W.completedSegments,V.length!==1)throw Error(e(391));ja(F,_,V[0])}return a(_,gn)}function cs(F,_,V){return Ct(_,F.responseState,V.formatContext,V.id),ja(F,_,V),dt(_,V.formatContext)}function fs(F,_,V){for(var W=V.completedSegments,Ae=0;Ae<W.length;Ae++)ds(F,_,V,W[Ae]);if(W.length=0,F=F.responseState,W=V.id,V=V.rootSegmentID,i(_,F.startInlineScript),F.sentCompleteBoundaryFunction?i(_,Ht):(F.sentCompleteBoundaryFunction=!0,i(_,dr)),W===null)throw Error(e(395));return V=l(V.toString(16)),i(_,W),i(_,On),i(_,F.segmentPrefix),i(_,V),a(_,Tn)}function ds(F,_,V,W){if(W.status===2)return!0;var Ae=W.id;if(Ae===-1){if((W.id=V.rootSegmentID)===-1)throw Error(e(392));return cs(F,_,W)}return cs(F,_,W),F=F.responseState,i(_,F.startInlineScript),F.sentCompleteSegmentFunction?i(_,Et):(F.sentCompleteSegmentFunction=!0,i(_,Dt)),i(_,F.segmentPrefix),Ae=l(Ae.toString(16)),i(_,Ae),i(_,hr),i(_,F.placeholderPrefix),i(_,Ae),a(_,er)}function fa(F,_){t=new Uint8Array(512),n=0;try{var V=F.completedRootSegment;if(V!==null&&F.pendingRootTasks===0){ja(F,_,V),F.completedRootSegment=null;var W=F.responseState.bootstrapChunks;for(V=0;V<W.length-1;V++)i(_,W[V]);V<W.length&&a(_,W[V])}var Ae=F.clientRenderedBoundaries,ve;for(ve=0;ve<Ae.length;ve++){var Fe=Ae[ve];W=_;var He=F.responseState,Rt=Fe.id,Kt=Fe.errorDigest,qt=Fe.errorMessage,qr=Fe.errorComponentStack;if(i(W,He.startInlineScript),He.sentClientRenderFunction?i(W,Cr):(He.sentClientRenderFunction=!0,i(W,mr)),Rt===null)throw Error(e(395));i(W,Rt),i(W,bn),(Kt||qt||qr)&&(i(W,jn),i(W,l(jr(Kt||"")))),(qt||qr)&&(i(W,jn),i(W,l(jr(qt||"")))),qr&&(i(W,jn),i(W,l(jr(qr)))),a(W,Rr)}Ae.splice(0,ve);var L=F.completedBoundaries;for(ve=0;ve<L.length;ve++)fs(F,_,L[ve]);L.splice(0,ve),s(_),t=new Uint8Array(512),n=0;var re=F.partialBoundaries;for(ve=0;ve<re.length;ve++){var le=re[ve];e:{Ae=F,Fe=_;var Ve=le.completedSegments;for(He=0;He<Ve.length;He++)if(!ds(Ae,Fe,le,Ve[He])){He++,Ve.splice(0,He);var pt=!1;break e}Ve.splice(0,He),pt=!0}if(!pt){F.destination=null,ve++,re.splice(0,ve);return}}re.splice(0,ve);var _t=F.completedBoundaries;for(ve=0;ve<_t.length;ve++)fs(F,_,_t[ve]);_t.splice(0,ve)}finally{s(_),F.allPendingTasks===0&&F.pingedTasks.length===0&&F.clientRenderedBoundaries.length===0&&F.completedBoundaries.length===0&&_.close()}}function zi(F,_){try{var V=F.abortableTasks;V.forEach(function(W){return Ha(W,F,_)}),V.clear(),F.destination!==null&&fa(F,F.destination)}catch(W){Tr(F,W),$r(F,W)}}return Yh.renderToReadableStream=function(F,_){return new Promise(function(V,W){var Ae,ve,Fe=new Promise(function(qt,qr){ve=qt,Ae=qr}),He=pr(F,Ue(_?_.identifierPrefix:void 0,_?_.nonce:void 0,_?_.bootstrapScriptContent:void 0,_?_.bootstrapScripts:void 0,_?_.bootstrapModules:void 0),Te(_?_.namespaceURI:void 0),_?_.progressiveChunkSize:void 0,_?_.onError:void 0,ve,function(){var qt=new ReadableStream({type:"bytes",pull:function(qr){if(He.status===1)He.status=2,c(qr,He.fatalError);else if(He.status!==2&&He.destination===null){He.destination=qr;try{fa(He,qr)}catch(L){Tr(He,L),$r(He,L)}}},cancel:function(){zi(He)}},{highWaterMark:0});qt.allReady=Fe,V(qt)},function(qt){Fe.catch(function(){}),W(qt)},Ae);if(_&&_.signal){var Rt=_.signal,Kt=function(){zi(He,Rt.reason),Rt.removeEventListener("abort",Kt)};Rt.addEventListener("abort",Kt)}us(He)})},Yh.version="18.3.1",Yh}var cl={};var Kw;function xO(){return Kw||(Kw=1,process.env.NODE_ENV!=="production"&&(function(){var r=Rl(),e="18.3.1",t=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(p){{for(var m=arguments.length,b=new Array(m>1?m-1:0),x=1;x<m;x++)b[x-1]=arguments[x];a("warn",p,b)}}function i(p){{for(var m=arguments.length,b=new Array(m>1?m-1:0),x=1;x<m;x++)b[x-1]=arguments[x];a("error",p,b)}}function a(p,m,b){{var x=t.ReactDebugCurrentFrame,D=x.getStackAddendum();D!==""&&(m+="%s",b=b.concat([D]));var N=b.map(function(j){return String(j)});N.unshift("Warning: "+m),Function.prototype.apply.call(console[p],console,N)}}function s(p){p()}function o(p){}function l(p,m){u(p,m)}function u(p,m){return p.push(m)}function c(p){}function h(p){p.push(null)}function f(p){return p}function d(p){return p}function g(p,m){p.destroy(m)}function v(p){{var m=typeof Symbol=="function"&&Symbol.toStringTag,b=m&&p[Symbol.toStringTag]||p.constructor.name||"Object";return b}}function y(p){try{return A(p),!1}catch{return!0}}function A(p){return""+p}function C(p,m){if(y(p))return i("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",m,v(p)),A(p)}function k(p,m){if(y(p))return i("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",m,v(p)),A(p)}function T(p){if(y(p))return i("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",v(p)),A(p)}var S=Object.prototype.hasOwnProperty,R=0,B=1,G=2,$=3,Y=4,X=5,J=6,Q=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",oe=Q+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",se=new RegExp("^["+Q+"]["+oe+"]*$"),he={},ye={};function Ue(p){return S.call(ye,p)?!0:S.call(he,p)?!1:se.test(p)?(ye[p]=!0,!0):(he[p]=!0,i("Invalid attribute name: `%s`",p),!1)}function Oe(p,m,b,x){if(b!==null&&b.type===R)return!1;switch(typeof m){case"function":case"symbol":return!0;case"boolean":{if(b!==null)return!b.acceptsBooleans;var D=p.toLowerCase().slice(0,5);return D!=="data-"&&D!=="aria-"}default:return!1}}function Te(p){return ie.hasOwnProperty(p)?ie[p]:null}function K(p,m,b,x,D,N,j){this.acceptsBooleans=m===G||m===$||m===Y,this.attributeName=x,this.attributeNamespace=D,this.mustUseProperty=b,this.propertyName=p,this.type=m,this.sanitizeURL=N,this.removeEmptyString=j}var ie={},de=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];de.forEach(function(p){ie[p]=new K(p,R,!1,p,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(p){var m=p[0],b=p[1];ie[m]=new K(m,B,!1,b,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(p){ie[p]=new K(p,G,!1,p.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(p){ie[p]=new K(p,G,!1,p,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(p){ie[p]=new K(p,$,!1,p.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(p){ie[p]=new K(p,$,!0,p,null,!1,!1)}),["capture","download"].forEach(function(p){ie[p]=new K(p,Y,!1,p,null,!1,!1)}),["cols","rows","size","span"].forEach(function(p){ie[p]=new K(p,J,!1,p,null,!1,!1)}),["rowSpan","start"].forEach(function(p){ie[p]=new K(p,X,!1,p.toLowerCase(),null,!1,!1)});var Be=/[\-\:]([a-z])/g,Ee=function(p){return p[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(p){var m=p.replace(Be,Ee);ie[m]=new K(m,B,!1,p,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(p){var m=p.replace(Be,Ee);ie[m]=new K(m,B,!1,p,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(p){var m=p.replace(Be,Ee);ie[m]=new K(m,B,!1,p,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(p){ie[p]=new K(p,B,!1,p.toLowerCase(),null,!1,!1)});var ze="xlinkHref";ie[ze]=new K("xlinkHref",B,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(p){ie[p]=new K(p,B,!1,p.toLowerCase(),null,!0,!0)});var je={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function qe(p,m){return p+m.charAt(0).toUpperCase()+m.substring(1)}var Ge=["Webkit","ms","Moz","O"];Object.keys(je).forEach(function(p){Ge.forEach(function(m){je[qe(m,p)]=je[p]})});var bt={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function rr(p,m){bt[m.type]||m.onChange||m.onInput||m.readOnly||m.disabled||m.value==null||i("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),m.onChange||m.readOnly||m.disabled||m.checked==null||i("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function Pr(p,m){if(p.indexOf("-")===-1)return typeof m.is=="string";switch(p){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $t={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},ar={},St=new RegExp("^(aria)-["+oe+"]*$"),st=new RegExp("^(aria)[A-Z]["+oe+"]*$");function Qr(p,m){{if(S.call(ar,m)&&ar[m])return!0;if(st.test(m)){var b="aria-"+m.slice(4).toLowerCase(),x=$t.hasOwnProperty(b)?b:null;if(x==null)return i("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",m),ar[m]=!0,!0;if(m!==x)return i("Invalid ARIA attribute `%s`. Did you mean `%s`?",m,x),ar[m]=!0,!0}if(St.test(m)){var D=m.toLowerCase(),N=$t.hasOwnProperty(D)?D:null;if(N==null)return ar[m]=!0,!1;if(m!==N)return i("Unknown ARIA attribute `%s`. Did you mean `%s`?",m,N),ar[m]=!0,!0}}return!0}function Sr(p,m){{var b=[];for(var x in m){var D=Qr(p,x);D||b.push(x)}var N=b.map(function(j){return"`"+j+"`"}).join(", ");b.length===1?i("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",N,p):b.length>1&&i("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",N,p)}}function gr(p,m){Pr(p,m)||Sr(p,m)}var nr=!1;function fr(p,m){{if(p!=="input"&&p!=="textarea"&&p!=="select")return;m!=null&&m.value===null&&!nr&&(nr=!0,p==="select"&&m.multiple?i("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",p):i("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",p))}}var Yt={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},Xt=function(){};{var mt={},wr=/^on./,an=/^on[^A-Z]/,_r=new RegExp("^(aria)-["+oe+"]*$"),ir=new RegExp("^(aria)[A-Z]["+oe+"]*$");Xt=function(p,m,b,x){if(S.call(mt,m)&&mt[m])return!0;var D=m.toLowerCase();if(D==="onfocusin"||D==="onfocusout")return i("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),mt[m]=!0,!0;if(x!=null){var N=x.registrationNameDependencies,j=x.possibleRegistrationNames;if(N.hasOwnProperty(m))return!0;var ne=j.hasOwnProperty(D)?j[D]:null;if(ne!=null)return i("Invalid event handler property `%s`. Did you mean `%s`?",m,ne),mt[m]=!0,!0;if(wr.test(m))return i("Unknown event handler property `%s`. It will be ignored.",m),mt[m]=!0,!0}else if(wr.test(m))return an.test(m)&&i("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",m),mt[m]=!0,!0;if(_r.test(m)||ir.test(m))return!0;if(D==="innerhtml")return i("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),mt[m]=!0,!0;if(D==="aria")return i("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),mt[m]=!0,!0;if(D==="is"&&b!==null&&b!==void 0&&typeof b!="string")return i("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof b),mt[m]=!0,!0;if(typeof b=="number"&&isNaN(b))return i("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",m),mt[m]=!0,!0;var ge=Te(m),Pe=ge!==null&&ge.type===R;if(Yt.hasOwnProperty(D)){var Ne=Yt[D];if(Ne!==m)return i("Invalid DOM property `%s`. Did you mean `%s`?",m,Ne),mt[m]=!0,!0}else if(!Pe&&m!==D)return i("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",m,D),mt[m]=!0,!0;return typeof b=="boolean"&&Oe(m,b,ge)?(b?i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',b,m,m,b,m):i('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',b,m,m,b,m,m,m),mt[m]=!0,!0):Pe?!0:Oe(m,b,ge)?(mt[m]=!0,!1):((b==="false"||b==="true")&&ge!==null&&ge.type===$&&(i("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",b,m,b==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',m,b),mt[m]=!0),!0)}}var Yr=function(p,m,b){{var x=[];for(var D in m){var N=Xt(p,D,m[D],b);N||x.push(D)}var j=x.map(function(ne){return"`"+ne+"`"}).join(", ");x.length===1?i("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",j,p):x.length>1&&i("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",j,p)}};function kr(p,m,b){Pr(p,m)||Yr(p,m,b)}var Zr=function(){};{var Vr=/^(?:webkit|moz|o)[A-Z]/,pn=/^-ms-/,gn=/-(.)/g,Fr=/;\s*$/,zr={},en={},Hr=!1,zt=!1,sr=function(p){return p.replace(gn,function(m,b){return b.toUpperCase()})},Er=function(p){zr.hasOwnProperty(p)&&zr[p]||(zr[p]=!0,i("Unsupported style property %s. Did you mean %s?",p,sr(p.replace(pn,"ms-"))))},tt=function(p){zr.hasOwnProperty(p)&&zr[p]||(zr[p]=!0,i("Unsupported vendor-prefixed style property %s. Did you mean %s?",p,p.charAt(0).toUpperCase()+p.slice(1)))},Nr=function(p,m){en.hasOwnProperty(m)&&en[m]||(en[m]=!0,i(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,p,m.replace(Fr,"")))},Xr=function(p,m){Hr||(Hr=!0,i("`NaN` is an invalid value for the `%s` css style property.",p))},Se=function(p,m){zt||(zt=!0,i("`Infinity` is an invalid value for the `%s` css style property.",p))};Zr=function(p,m){p.indexOf("-")>-1?Er(p):Vr.test(p)?tt(p):Fr.test(m)&&Nr(p,m),typeof m=="number"&&(isNaN(m)?Xr(p,m):isFinite(m)||Se(p,m))}}var P=Zr,U=/["'&<>]/;function Z(p){T(p);var m=""+p,b=U.exec(m);if(!b)return m;var x,D="",N,j=0;for(N=b.index;N<m.length;N++){switch(m.charCodeAt(N)){case 34:x="&quot;";break;case 38:x="&amp;";break;case 39:x="&#x27;";break;case 60:x="&lt;";break;case 62:x="&gt;";break;default:continue}j!==N&&(D+=m.substring(j,N)),j=N+1,D+=x}return j!==N?D+m.substring(j,N):D}function ue(p){return typeof p=="boolean"||typeof p=="number"?""+p:Z(p)}var Ie=/([A-Z])/g,We=/^ms-/;function wt(p){return p.replace(Ie,"-$1").toLowerCase().replace(We,"-ms-")}var It=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,Nt=!1;function or(p){!Nt&&It.test(p)&&(Nt=!0,i("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(p)))}var Lt=Array.isArray;function ee(p){return Lt(p)}var De="<script>";function Qe(p,m,b,x,D){var N=p===void 0?"":p,j=De,ne=[];return{bootstrapChunks:ne,startInlineScript:j,placeholderPrefix:N+"P:",segmentPrefix:N+"S:",boundaryPrefix:N+"B:",idPrefix:N,nextSuspenseID:0,sentCompleteSegmentFunction:!1,sentCompleteBoundaryFunction:!1,sentClientRenderFunction:!1}}var Ye=0,Ct=1,dt=2,Dt=3,Et=4,hr=5,er=6,dr=7;function Ht(p,m){return{insertionMode:p,selectedValue:m}}function On(p,m,b){switch(m){case"select":return Ht(Ct,b.value!=null?b.value:b.defaultValue);case"svg":return Ht(dt,null);case"math":return Ht(Dt,null);case"foreignObject":return Ht(Ct,null);case"table":return Ht(Et,null);case"thead":case"tbody":case"tfoot":return Ht(hr,null);case"colgroup":return Ht(dr,null);case"tr":return Ht(er,null)}return p.insertionMode>=Et||p.insertionMode===Ye?Ht(Ct,null):p}var Tn=null;function mr(p){var m=p.nextSuspenseID++;return p.boundaryPrefix+m.toString(16)}function Cr(p,m,b){var x=p.idPrefix,D=":"+x+"R"+m;return b>0&&(D+="H"+b.toString(32)),D+":"}function bn(p){return ue(p)}var Rr="<!-- -->";function jn(p,m,b,x){return m===""?x:(x&&p.push(Rr),p.push(bn(m)),!0)}function wn(p,m,b,x){b&&x&&p.push(Rr)}var jr=new Map;function Cn(p){var m=jr.get(p);if(m!==void 0)return m;var b=ue(wt(p));return jr.set(p,b),b}var cn=' style="',tn=":",Jn=";";function si(p,m,b){if(typeof b!="object")throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");var x=!0;for(var D in b)if(S.call(b,D)){var N=b[D];if(!(N==null||typeof N=="boolean"||N==="")){var j=void 0,ne=void 0,ge=D.indexOf("--")===0;ge?(j=ue(D),k(N,D),ne=ue((""+N).trim())):(P(D,N),j=Cn(D),typeof N=="number"?N!==0&&!S.call(je,D)?ne=N+"px":ne=""+N:(k(N,D),ne=ue((""+N).trim()))),x?(x=!1,p.push(cn,j,tn,ne)):p.push(Jn,j,tn,ne)}}x||p.push(sn)}var xn=" ",mn='="',sn='"',rn='=""';function Lr(p,m,b,x){switch(b){case"style":{si(p,m,x);return}case"defaultValue":case"defaultChecked":case"innerHTML":case"suppressContentEditableWarning":case"suppressHydrationWarning":return}if(!(b.length>2&&(b[0]==="o"||b[0]==="O")&&(b[1]==="n"||b[1]==="N"))){var D=Te(b);if(D!==null){switch(typeof x){case"function":case"symbol":return;case"boolean":if(!D.acceptsBooleans)return}var N=D.attributeName,j=N;switch(D.type){case $:x&&p.push(xn,j,rn);return;case Y:x===!0?p.push(xn,j,rn):x===!1||p.push(xn,j,mn,ue(x),sn);return;case X:isNaN(x)||p.push(xn,j,mn,ue(x),sn);break;case J:!isNaN(x)&&x>=1&&p.push(xn,j,mn,ue(x),sn);break;default:D.sanitizeURL&&(C(x,N),x=""+x,or(x)),p.push(xn,j,mn,ue(x),sn)}}else if(Ue(b)){switch(typeof x){case"function":case"symbol":return;case"boolean":{var ne=b.toLowerCase().slice(0,5);if(ne!=="data-"&&ne!=="aria-")return}}p.push(xn,b,mn,ue(x),sn)}}}var on=">",E="/>";function O(p,m,b){if(m!=null){if(b!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof m!="object"||!("__html"in m))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var x=m.__html;x!=null&&(T(x),p.push(""+x))}}var z=!1,q=!1,pe=!1,ce=!1,xe=!1,_e=!1,rt=!1;function lt(p,m){{var b=p[m];if(b!=null){var x=ee(b);p.multiple&&!x?i("The `%s` prop supplied to <select> must be an array if `multiple` is true.",m):!p.multiple&&x&&i("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.",m)}}}function nt(p,m,b){rr("select",m),lt(m,"value"),lt(m,"defaultValue"),m.value!==void 0&&m.defaultValue!==void 0&&!pe&&(i("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),pe=!0),p.push(_n("select"));var x=null,D=null;for(var N in m)if(S.call(m,N)){var j=m[N];if(j==null)continue;switch(N){case"children":x=j;break;case"dangerouslySetInnerHTML":D=j;break;case"defaultValue":case"value":break;default:Lr(p,b,N,j);break}}return p.push(on),O(p,D,x),x}function Jt(p){var m="";return r.Children.forEach(p,function(b){b!=null&&(m+=b,!xe&&typeof b!="string"&&typeof b!="number"&&(xe=!0,i("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")))}),m}var vr=' selected=""';function Gr(p,m,b,x){var D=x.selectedValue;p.push(_n("option"));var N=null,j=null,ne=null,ge=null;for(var Pe in m)if(S.call(m,Pe)){var Ne=m[Pe];if(Ne==null)continue;switch(Pe){case"children":N=Ne;break;case"selected":ne=Ne,rt||(i("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),rt=!0);break;case"dangerouslySetInnerHTML":ge=Ne;break;case"value":j=Ne;default:Lr(p,b,Pe,Ne);break}}if(D!=null){var Ze;if(j!==null?(C(j,"value"),Ze=""+j):(ge!==null&&(_e||(_e=!0,i("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),Ze=Jt(N)),ee(D))for(var Vt=0;Vt<D.length;Vt++){C(D[Vt],"value");var Dr=""+D[Vt];if(Dr===Ze){p.push(vr);break}}else C(D,"select.value"),""+D===Ze&&p.push(vr)}else ne&&p.push(vr);return p.push(on),O(p,ge,N),N}function fn(p,m,b){rr("input",m),m.checked!==void 0&&m.defaultChecked!==void 0&&!q&&(i("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",m.type),q=!0),m.value!==void 0&&m.defaultValue!==void 0&&!z&&(i("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components","A component",m.type),z=!0),p.push(_n("input"));var x=null,D=null,N=null,j=null;for(var ne in m)if(S.call(m,ne)){var ge=m[ne];if(ge==null)continue;switch(ne){case"children":case"dangerouslySetInnerHTML":throw new Error("input is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");case"defaultChecked":j=ge;break;case"defaultValue":D=ge;break;case"checked":N=ge;break;case"value":x=ge;break;default:Lr(p,b,ne,ge);break}}return N!==null?Lr(p,b,"checked",N):j!==null&&Lr(p,b,"checked",j),x!==null?Lr(p,b,"value",x):D!==null&&Lr(p,b,"value",D),p.push(E),null}function Kn(p,m,b){rr("textarea",m),m.value!==void 0&&m.defaultValue!==void 0&&!ce&&(i("Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components"),ce=!0),p.push(_n("textarea"));var x=null,D=null,N=null;for(var j in m)if(S.call(m,j)){var ne=m[j];if(ne==null)continue;switch(j){case"children":N=ne;break;case"value":x=ne;break;case"defaultValue":D=ne;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");default:Lr(p,b,j,ne);break}}if(x===null&&D!==null&&(x=D),p.push(on),N!=null){if(i("Use the `defaultValue` or `value` props instead of setting children on <textarea>."),x!=null)throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(ee(N)){if(N.length>1)throw new Error("<textarea> can only have at most one child.");T(N[0]),x=""+N[0]}T(N),x=""+N}return typeof x=="string"&&x[0]===`
96
96
  `&&p.push(Mn),x!==null&&(C(x,"value"),p.push(bn(""+x))),null}function Ln(p,m,b,x){p.push(_n(b));for(var D in m)if(S.call(m,D)){var N=m[D];if(N==null)continue;switch(D){case"children":case"dangerouslySetInnerHTML":throw new Error(b+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:Lr(p,x,D,N);break}}return p.push(E),null}function vn(p,m,b){p.push(_n("menuitem"));for(var x in m)if(S.call(m,x)){var D=m[x];if(D==null)continue;switch(x){case"children":case"dangerouslySetInnerHTML":throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:Lr(p,b,x,D);break}}return p.push(on),null}function Or(p,m,b){p.push(_n("title"));var x=null;for(var D in m)if(S.call(m,D)){var N=m[D];if(N==null)continue;switch(D){case"children":x=N;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:Lr(p,b,D,N);break}}p.push(on);{var j=Array.isArray(x)&&x.length<2?x[0]||null:x;Array.isArray(x)&&x.length>1?i("A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):j!=null&&j.$$typeof!=null?i("A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):j!=null&&typeof j!="string"&&typeof j!="number"&&i("A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering")}return x}function Gn(p,m,b,x){p.push(_n(b));var D=null,N=null;for(var j in m)if(S.call(m,j)){var ne=m[j];if(ne==null)continue;switch(j){case"children":D=ne;break;case"dangerouslySetInnerHTML":N=ne;break;default:Lr(p,x,j,ne);break}}return p.push(on),O(p,N,D),typeof D=="string"?(p.push(bn(D)),null):D}function Bn(p,m,b,x){p.push(_n(b));var D=null,N=null;for(var j in m)if(S.call(m,j)){var ne=m[j];if(ne==null)continue;switch(j){case"children":D=ne;break;case"dangerouslySetInnerHTML":N=ne;break;case"style":si(p,x,ne);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:Ue(j)&&typeof ne!="function"&&typeof ne!="symbol"&&p.push(xn,j,mn,ue(ne),sn);break}}return p.push(on),O(p,N,D),D}var Mn=`
97
97
  `;function Oi(p,m,b,x){p.push(_n(b));var D=null,N=null;for(var j in m)if(S.call(m,j)){var ne=m[j];if(ne==null)continue;switch(j){case"children":D=ne;break;case"dangerouslySetInnerHTML":N=ne;break;default:Lr(p,x,j,ne);break}}if(p.push(on),N!=null){if(D!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof N!="object"||!("__html"in N))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var ge=N.__html;ge!=null&&(typeof ge=="string"&&ge.length>0&&ge[0]===`
98
98
  `?p.push(Mn,ge):(T(ge),p.push(""+ge)))}return typeof D=="string"&&D[0]===`
99
- `&&p.push(Mn),D}var bi=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,wi=new Map;function _n(p){var m=wi.get(p);if(m===void 0){if(!bi.test(p))throw new Error("Invalid tag: "+p);m="<"+p,wi.set(p,m)}return m}var Ei="<!DOCTYPE html>";function Un(p,m,b,x,D){switch(gr(m,b),fr(m,b),kr(m,b,null),!b.suppressContentEditableWarning&&b.contentEditable&&b.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),D.insertionMode!==dt&&D.insertionMode!==Dt&&m.indexOf("-")===-1&&typeof b.is!="string"&&m.toLowerCase()!==m&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",m),m){case"select":return nt(p,b,x);case"option":return Gr(p,b,x,D);case"textarea":return Kn(p,b,x);case"input":return fn(p,b,x);case"menuitem":return vn(p,b,x);case"title":return Or(p,b,x);case"listing":case"pre":return Oi(p,b,m,x);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return Ln(p,b,m,x);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return Gn(p,b,m,x);case"html":return D.insertionMode===Ye&&p.push(Ei),Gn(p,b,m,x);default:return m.indexOf("-")===-1&&typeof b.is!="string"?Gn(p,b,m,x):Bn(p,b,m,x)}}var Sn="</",Zn=">";function lr(p,m,b){switch(m){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:p.push(Sn,m,Zn)}}function In(p,m){for(var b=m.bootstrapChunks,x=0;x<b.length-1;x++)l(p,b[x]);return x<b.length?u(p,b[x]):!0}var Ci='<template id="',I='"></template>';function H(p,m,b){l(p,Ci),l(p,m.placeholderPrefix);var x=b.toString(16);return l(p,x),u(p,I)}var ae="<!--$-->",Ce='<!--$?--><template id="',ht='"></template>',ot="<!--$!-->",jt="<!--/$-->",Ut="<template",Br='"',M=' data-dgst="',te=' data-msg="',fe=' data-stck="',be="></template>";function Me(p,m){return u(p,ae)}function Ke(p,m,b){if(l(p,Ce),b===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return l(p,b),u(p,ht)}function Xe(p,m,b,x,D){var N;return N=u(p,ot),l(p,Ut),b&&(l(p,M),l(p,ue(b)),l(p,Br)),x&&(l(p,te),l(p,ue(x)),l(p,Br)),D&&(l(p,fe),l(p,ue(D)),l(p,Br)),N=u(p,be),N}function yt(p,m){return u(p,jt)}function Pt(p,m){return u(p,jt)}function pr(p,m){return u(p,jt)}var yr='<div hidden id="',ur='">',Tr="</div>",$r='<svg aria-hidden="true" style="display:none" id="',yn='">',Xi="</svg>",ua='<math aria-hidden="true" style="display:none" id="',Ji='">',$n="</math>",Ki='<table hidden id="',pi='">',za="</table>",Ha='<table hidden><tbody id="',ca='">',ls="</tbody></table>",us='<table hidden><tr id="',ki='">',ja="</tr></table>",cs='<table hidden><colgroup id="',fs='">',ds="</colgroup></table>";function fa(p,m,b,x){switch(b.insertionMode){case Ye:case Ct:return l(p,yr),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,ur);case dt:return l(p,$r),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,yn);case Dt:return l(p,ua),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,Ji);case Et:return l(p,Ki),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,pi);case hr:return l(p,Ha),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,ca);case er:return l(p,us),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,ki);case dr:return l(p,cs),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,fs);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function zi(p,m){switch(m.insertionMode){case Ye:case Ct:return u(p,Tr);case dt:return u(p,Xi);case Dt:return u(p,$n);case Et:return u(p,za);case hr:return u(p,ls);case er:return u(p,ja);case dr:return u(p,ds);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var F="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",_='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',V='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',W=F+';$RS("',Ae='$RS("',ve='","',ke='")<\/script>';function He(p,m,b){l(p,m.startInlineScript),m.sentCompleteSegmentFunction?l(p,Ae):(m.sentCompleteSegmentFunction=!0,l(p,W)),l(p,m.segmentPrefix);var x=b.toString(16);return l(p,x),l(p,ve),l(p,m.placeholderPrefix),l(p,x),u(p,ke)}var Rt=_+';$RC("',Kt='$RC("',qt='","',qr='")<\/script>';function L(p,m,b,x){if(l(p,m.startInlineScript),m.sentCompleteBoundaryFunction?l(p,Kt):(m.sentCompleteBoundaryFunction=!0,l(p,Rt)),b===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var D=x.toString(16);return l(p,b),l(p,qt),l(p,m.segmentPrefix),l(p,D),u(p,qr)}var re=V+';$RX("',le='$RX("',Ve='"',pt=")<\/script>",_t=",";function Wr(p,m,b,x,D,N){if(l(p,m.startInlineScript),m.sentClientRenderFunction?l(p,le):(m.sentClientRenderFunction=!0,l(p,re)),b===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return l(p,b),l(p,Ve),(x||D||N)&&(l(p,_t),l(p,oi(x||""))),(D||N)&&(l(p,_t),l(p,oi(D||""))),N&&(l(p,_t),l(p,oi(N))),u(p,pt)}var Vn=/[<\u2028\u2029]/g;function oi(p){var m=JSON.stringify(p);return m.replace(Vn,function(b){switch(b){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Hi(p,m){var b=Qe(m);return{bootstrapChunks:b.bootstrapChunks,startInlineScript:b.startInlineScript,placeholderPrefix:b.placeholderPrefix,segmentPrefix:b.segmentPrefix,boundaryPrefix:b.boundaryPrefix,idPrefix:b.idPrefix,nextSuspenseID:b.nextSuspenseID,sentCompleteSegmentFunction:b.sentCompleteSegmentFunction,sentCompleteBoundaryFunction:b.sentCompleteBoundaryFunction,sentClientRenderFunction:b.sentClientRenderFunction,generateStaticMarkup:p}}function Ul(){return{insertionMode:Ct,selectedValue:null}}function Vl(p,m,b,x){return b.generateStaticMarkup?(p.push(ue(m)),!1):jn(p,m,b,x)}function _o(p,m,b,x){if(!m.generateStaticMarkup)return wn(p,m,b,x)}function da(p,m){return m.generateStaticMarkup?!0:Me(p)}function Aa(p,m,b,x,D){return m.generateStaticMarkup?!0:Xe(p,m,b,x,D)}function um(p,m){return m.generateStaticMarkup?!0:yt(p)}function cm(p,m){return m.generateStaticMarkup?!0:pr(p)}var Fi=Object.assign,fm=Symbol.for("react.element"),sh=Symbol.for("react.portal"),zl=Symbol.for("react.fragment"),Bi=Symbol.for("react.strict_mode"),oh=Symbol.for("react.profiler"),Hl=Symbol.for("react.provider"),jl=Symbol.for("react.context"),Gl=Symbol.for("react.forward_ref"),$l=Symbol.for("react.suspense"),No=Symbol.for("react.suspense_list"),Lo=Symbol.for("react.memo"),Hs=Symbol.for("react.lazy"),Ec=Symbol.for("react.scope"),kc=Symbol.for("react.debug_trace_mode"),Fc=Symbol.for("react.legacy_hidden"),ql=Symbol.for("react.default_value"),lh=Symbol.iterator,dm="@@iterator";function hm(p){if(p===null||typeof p!="object")return null;var m=lh&&p[lh]||p[dm];return typeof m=="function"?m:null}function pm(p,m,b){var x=p.displayName;if(x)return x;var D=m.displayName||m.name||"";return D!==""?b+"("+D+")":b}function Tc(p){return p.displayName||"Context"}function An(p){if(p==null)return null;if(typeof p.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case zl:return"Fragment";case sh:return"Portal";case oh:return"Profiler";case Bi:return"StrictMode";case $l:return"Suspense";case No:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case jl:var m=p;return Tc(m)+".Consumer";case Hl:var b=p;return Tc(b._context)+".Provider";case Gl:return pm(p,p.render,"ForwardRef");case Lo:var x=p.displayName||null;return x!==null?x:An(p.type)||"Memo";case Hs:{var D=p,N=D._payload,j=D._init;try{return An(j(N))}catch{return null}}}return null}var Uo=0,uh,Ic,dn,js,Dc,Pc,Rc;function Oc(){}Oc.__reactDisabledLog=!0;function ch(){{if(Uo===0){uh=console.log,Ic=console.info,dn=console.warn,js=console.error,Dc=console.group,Pc=console.groupCollapsed,Rc=console.groupEnd;var p={configurable:!0,enumerable:!0,value:Oc,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}Uo++}}function fh(){{if(Uo--,Uo===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Fi({},p,{value:uh}),info:Fi({},p,{value:Ic}),warn:Fi({},p,{value:dn}),error:Fi({},p,{value:js}),group:Fi({},p,{value:Dc}),groupCollapsed:Fi({},p,{value:Pc}),groupEnd:Fi({},p,{value:Rc})})}Uo<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Wl=t.ReactCurrentDispatcher,Ql;function Vo(p,m,b){{if(Ql===void 0)try{throw Error()}catch(D){var x=D.stack.trim().match(/\n( *(at )?)/);Ql=x&&x[1]||""}return`
99
+ `&&p.push(Mn),D}var bi=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,wi=new Map;function _n(p){var m=wi.get(p);if(m===void 0){if(!bi.test(p))throw new Error("Invalid tag: "+p);m="<"+p,wi.set(p,m)}return m}var Ei="<!DOCTYPE html>";function Un(p,m,b,x,D){switch(gr(m,b),fr(m,b),kr(m,b,null),!b.suppressContentEditableWarning&&b.contentEditable&&b.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),D.insertionMode!==dt&&D.insertionMode!==Dt&&m.indexOf("-")===-1&&typeof b.is!="string"&&m.toLowerCase()!==m&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",m),m){case"select":return nt(p,b,x);case"option":return Gr(p,b,x,D);case"textarea":return Kn(p,b,x);case"input":return fn(p,b,x);case"menuitem":return vn(p,b,x);case"title":return Or(p,b,x);case"listing":case"pre":return Oi(p,b,m,x);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return Ln(p,b,m,x);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return Gn(p,b,m,x);case"html":return D.insertionMode===Ye&&p.push(Ei),Gn(p,b,m,x);default:return m.indexOf("-")===-1&&typeof b.is!="string"?Gn(p,b,m,x):Bn(p,b,m,x)}}var Sn="</",Zn=">";function lr(p,m,b){switch(m){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:p.push(Sn,m,Zn)}}function In(p,m){for(var b=m.bootstrapChunks,x=0;x<b.length-1;x++)l(p,b[x]);return x<b.length?u(p,b[x]):!0}var Ci='<template id="',I='"></template>';function H(p,m,b){l(p,Ci),l(p,m.placeholderPrefix);var x=b.toString(16);return l(p,x),u(p,I)}var ae="<!--$-->",Ce='<!--$?--><template id="',ht='"></template>',ot="<!--$!-->",jt="<!--/$-->",Ut="<template",Br='"',M=' data-dgst="',te=' data-msg="',fe=' data-stck="',be="></template>";function Me(p,m){return u(p,ae)}function Ke(p,m,b){if(l(p,Ce),b===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return l(p,b),u(p,ht)}function Xe(p,m,b,x,D){var N;return N=u(p,ot),l(p,Ut),b&&(l(p,M),l(p,ue(b)),l(p,Br)),x&&(l(p,te),l(p,ue(x)),l(p,Br)),D&&(l(p,fe),l(p,ue(D)),l(p,Br)),N=u(p,be),N}function yt(p,m){return u(p,jt)}function Pt(p,m){return u(p,jt)}function pr(p,m){return u(p,jt)}var yr='<div hidden id="',ur='">',Tr="</div>",$r='<svg aria-hidden="true" style="display:none" id="',yn='">',Xi="</svg>",ua='<math aria-hidden="true" style="display:none" id="',Ji='">',$n="</math>",Ki='<table hidden id="',pi='">',za="</table>",Ha='<table hidden><tbody id="',ca='">',ls="</tbody></table>",us='<table hidden><tr id="',ki='">',ja="</tr></table>",cs='<table hidden><colgroup id="',fs='">',ds="</colgroup></table>";function fa(p,m,b,x){switch(b.insertionMode){case Ye:case Ct:return l(p,yr),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,ur);case dt:return l(p,$r),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,yn);case Dt:return l(p,ua),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,Ji);case Et:return l(p,Ki),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,pi);case hr:return l(p,Ha),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,ca);case er:return l(p,us),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,ki);case dr:return l(p,cs),l(p,m.segmentPrefix),l(p,x.toString(16)),u(p,fs);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function zi(p,m){switch(m.insertionMode){case Ye:case Ct:return u(p,Tr);case dt:return u(p,Xi);case Dt:return u(p,$n);case Et:return u(p,za);case hr:return u(p,ls);case er:return u(p,ja);case dr:return u(p,ds);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var F="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",_='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',V='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',W=F+';$RS("',Ae='$RS("',ve='","',Fe='")<\/script>';function He(p,m,b){l(p,m.startInlineScript),m.sentCompleteSegmentFunction?l(p,Ae):(m.sentCompleteSegmentFunction=!0,l(p,W)),l(p,m.segmentPrefix);var x=b.toString(16);return l(p,x),l(p,ve),l(p,m.placeholderPrefix),l(p,x),u(p,Fe)}var Rt=_+';$RC("',Kt='$RC("',qt='","',qr='")<\/script>';function L(p,m,b,x){if(l(p,m.startInlineScript),m.sentCompleteBoundaryFunction?l(p,Kt):(m.sentCompleteBoundaryFunction=!0,l(p,Rt)),b===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var D=x.toString(16);return l(p,b),l(p,qt),l(p,m.segmentPrefix),l(p,D),u(p,qr)}var re=V+';$RX("',le='$RX("',Ve='"',pt=")<\/script>",_t=",";function Wr(p,m,b,x,D,N){if(l(p,m.startInlineScript),m.sentClientRenderFunction?l(p,le):(m.sentClientRenderFunction=!0,l(p,re)),b===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return l(p,b),l(p,Ve),(x||D||N)&&(l(p,_t),l(p,oi(x||""))),(D||N)&&(l(p,_t),l(p,oi(D||""))),N&&(l(p,_t),l(p,oi(N))),u(p,pt)}var Vn=/[<\u2028\u2029]/g;function oi(p){var m=JSON.stringify(p);return m.replace(Vn,function(b){switch(b){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}function Hi(p,m){var b=Qe(m);return{bootstrapChunks:b.bootstrapChunks,startInlineScript:b.startInlineScript,placeholderPrefix:b.placeholderPrefix,segmentPrefix:b.segmentPrefix,boundaryPrefix:b.boundaryPrefix,idPrefix:b.idPrefix,nextSuspenseID:b.nextSuspenseID,sentCompleteSegmentFunction:b.sentCompleteSegmentFunction,sentCompleteBoundaryFunction:b.sentCompleteBoundaryFunction,sentClientRenderFunction:b.sentClientRenderFunction,generateStaticMarkup:p}}function Ul(){return{insertionMode:Ct,selectedValue:null}}function Vl(p,m,b,x){return b.generateStaticMarkup?(p.push(ue(m)),!1):jn(p,m,b,x)}function _o(p,m,b,x){if(!m.generateStaticMarkup)return wn(p,m,b,x)}function da(p,m){return m.generateStaticMarkup?!0:Me(p)}function Aa(p,m,b,x,D){return m.generateStaticMarkup?!0:Xe(p,m,b,x,D)}function um(p,m){return m.generateStaticMarkup?!0:yt(p)}function cm(p,m){return m.generateStaticMarkup?!0:pr(p)}var Fi=Object.assign,fm=Symbol.for("react.element"),sh=Symbol.for("react.portal"),zl=Symbol.for("react.fragment"),Bi=Symbol.for("react.strict_mode"),oh=Symbol.for("react.profiler"),Hl=Symbol.for("react.provider"),jl=Symbol.for("react.context"),Gl=Symbol.for("react.forward_ref"),$l=Symbol.for("react.suspense"),No=Symbol.for("react.suspense_list"),Lo=Symbol.for("react.memo"),Hs=Symbol.for("react.lazy"),Ec=Symbol.for("react.scope"),kc=Symbol.for("react.debug_trace_mode"),Fc=Symbol.for("react.legacy_hidden"),ql=Symbol.for("react.default_value"),lh=Symbol.iterator,dm="@@iterator";function hm(p){if(p===null||typeof p!="object")return null;var m=lh&&p[lh]||p[dm];return typeof m=="function"?m:null}function pm(p,m,b){var x=p.displayName;if(x)return x;var D=m.displayName||m.name||"";return D!==""?b+"("+D+")":b}function Tc(p){return p.displayName||"Context"}function An(p){if(p==null)return null;if(typeof p.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case zl:return"Fragment";case sh:return"Portal";case oh:return"Profiler";case Bi:return"StrictMode";case $l:return"Suspense";case No:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case jl:var m=p;return Tc(m)+".Consumer";case Hl:var b=p;return Tc(b._context)+".Provider";case Gl:return pm(p,p.render,"ForwardRef");case Lo:var x=p.displayName||null;return x!==null?x:An(p.type)||"Memo";case Hs:{var D=p,N=D._payload,j=D._init;try{return An(j(N))}catch{return null}}}return null}var Uo=0,uh,Ic,dn,js,Dc,Pc,Rc;function Oc(){}Oc.__reactDisabledLog=!0;function ch(){{if(Uo===0){uh=console.log,Ic=console.info,dn=console.warn,js=console.error,Dc=console.group,Pc=console.groupCollapsed,Rc=console.groupEnd;var p={configurable:!0,enumerable:!0,value:Oc,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}Uo++}}function fh(){{if(Uo--,Uo===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Fi({},p,{value:uh}),info:Fi({},p,{value:Ic}),warn:Fi({},p,{value:dn}),error:Fi({},p,{value:js}),group:Fi({},p,{value:Dc}),groupCollapsed:Fi({},p,{value:Pc}),groupEnd:Fi({},p,{value:Rc})})}Uo<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Wl=t.ReactCurrentDispatcher,Ql;function Vo(p,m,b){{if(Ql===void 0)try{throw Error()}catch(D){var x=D.stack.trim().match(/\n( *(at )?)/);Ql=x&&x[1]||""}return`
100
100
  `+Ql+p}}var Bc=!1,Gs;{var Mc=typeof WeakMap=="function"?WeakMap:Map;Gs=new Mc}function hs(p,m){if(!p||Bc)return"";{var b=Gs.get(p);if(b!==void 0)return b}var x;Bc=!0;var D=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var N;N=Wl.current,Wl.current=null,ch();try{if(m){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(li){x=li}Reflect.construct(p,[],j)}else{try{j.call()}catch(li){x=li}p.call(j.prototype)}}else{try{throw Error()}catch(li){x=li}p()}}catch(li){if(li&&x&&typeof li.stack=="string"){for(var ne=li.stack.split(`
101
101
  `),ge=x.stack.split(`
102
102
  `),Pe=ne.length-1,Ne=ge.length-1;Pe>=1&&Ne>=0&&ne[Pe]!==ge[Ne];)Ne--;for(;Pe>=1&&Ne>=0;Pe--,Ne--)if(ne[Pe]!==ge[Ne]){if(Pe!==1||Ne!==1)do if(Pe--,Ne--,Ne<0||ne[Pe]!==ge[Ne]){var Ze=`
@@ -127,7 +127,7 @@ Error generating stack: `+x.message+`
127
127
  `&&w.push(I),b!==null&&(R(b,"value"),w.push(y(sn(""+b)))),null}function Sn(w,p,m,b){w.push(ht(m));for(var x in p)if($.call(p,x)){var D=p[x];if(D==null)continue;switch(x){case"children":case"dangerouslySetInnerHTML":throw new Error(m+" is a self-closing tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:nt(w,b,x,D);break}}return w.push(vr),null}function Zn(w,p,m){w.push(ht("menuitem"));for(var b in p)if($.call(p,b)){var x=p[b];if(x==null)continue;switch(b){case"children":case"dangerouslySetInnerHTML":throw new Error("menuitems cannot have `children` nor `dangerouslySetInnerHTML`.");default:nt(w,m,b,x);break}}return w.push(Jt),null}function lr(w,p,m){w.push(ht("title"));var b=null;for(var x in p)if($.call(p,x)){var D=p[x];if(D==null)continue;switch(x){case"children":b=D;break;case"dangerouslySetInnerHTML":throw new Error("`dangerouslySetInnerHTML` does not make sense on <title>.");default:nt(w,m,x,D);break}}w.push(Jt);{var N=Array.isArray(b)&&b.length<2?b[0]||null:b;Array.isArray(b)&&b.length>1?i("A title element received an array with more than 1 element as children. In browsers title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):N!=null&&N.$$typeof!=null?i("A title element received a React element for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering"):N!=null&&typeof N!="string"&&typeof N!="number"&&i("A title element received a value that was not a string or number for children. In the browser title Elements can only have Text Nodes as children. If the children being rendered output more than a single text node in aggregate the browser will display markup and comments as text in the title and hydration will likely fail and fall back to client rendering")}return b}function In(w,p,m,b){w.push(ht(m));var x=null,D=null;for(var N in p)if($.call(p,N)){var j=p[N];if(j==null)continue;switch(N){case"children":x=j;break;case"dangerouslySetInnerHTML":D=j;break;default:nt(w,b,N,j);break}}return w.push(Jt),Gr(w,D,x),typeof x=="string"?(w.push(y(sn(x))),null):x}function Ci(w,p,m,b){w.push(ht(m));var x=null,D=null;for(var N in p)if($.call(p,N)){var j=p[N];if(j==null)continue;switch(N){case"children":x=j;break;case"dangerouslySetInnerHTML":D=j;break;case"style":ce(w,b,j);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":break;default:ie(N)&&typeof j!="function"&&typeof j!="symbol"&&w.push(xe,y(N),_e,y(It(j)),rt);break}}return w.push(Jt),Gr(w,D,x),x}var I=A(`
128
128
  `);function H(w,p,m,b){w.push(ht(m));var x=null,D=null;for(var N in p)if($.call(p,N)){var j=p[N];if(j==null)continue;switch(N){case"children":x=j;break;case"dangerouslySetInnerHTML":D=j;break;default:nt(w,b,N,j);break}}if(w.push(Jt),D!=null){if(x!=null)throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof D!="object"||!("__html"in D))throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");var ne=D.__html;ne!=null&&(typeof ne=="string"&&ne.length>0&&ne[0]===`
129
129
  `?w.push(I,y(ne)):(G(ne),w.push(y(""+ne))))}return typeof x=="string"&&x[0]===`
130
- `&&w.push(I),x}var ae=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ce=new Map;function ht(w){var p=Ce.get(w);if(p===void 0){if(!ae.test(w))throw new Error("Invalid tag: "+w);p=A("<"+w),Ce.set(w,p)}return p}var ot=A("<!DOCTYPE html>");function jt(w,p,m,b,x){switch(Xt(p,m),wr(p,m),gn(p,m,null),!m.suppressContentEditableWarning&&m.contentEditable&&m.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),x.insertionMode!==bn&&x.insertionMode!==Rr&&p.indexOf("-")===-1&&typeof m.is!="string"&&p.toLowerCase()!==p&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",p),p){case"select":return Oi(w,m,b);case"option":return _n(w,m,b,x);case"textarea":return Un(w,m,b);case"input":return Ei(w,m,b);case"menuitem":return Zn(w,m,b);case"title":return lr(w,m,b);case"listing":case"pre":return H(w,m,p,b);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return Sn(w,m,p,b);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return In(w,m,p,b);case"html":return x.insertionMode===mr&&w.push(ot),In(w,m,p,b);default:return p.indexOf("-")===-1&&typeof m.is!="string"?In(w,m,p,b):Ci(w,m,p,b)}}var Ut=A("</"),Br=A(">");function M(w,p,m){switch(p){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:w.push(Ut,y(p),Br)}}function te(w,p){for(var m=p.bootstrapChunks,b=0;b<m.length-1;b++)h(w,m[b]);return b<m.length?f(w,m[b]):!0}var fe=A('<template id="'),be=A('"></template>');function Me(w,p,m){h(w,fe),h(w,p.placeholderPrefix);var b=y(m.toString(16));return h(w,b),f(w,be)}var Ke=A("<!--$-->"),Xe=A('<!--$?--><template id="'),yt=A('"></template>'),Pt=A("<!--$!-->"),pr=A("<!--/$-->"),yr=A("<template"),ur=A('"'),Tr=A(' data-dgst="'),$r=A(' data-msg="'),yn=A(' data-stck="'),Xi=A("></template>");function ua(w,p){return f(w,Ke)}function Ji(w,p,m){if(h(w,Xe),m===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return h(w,m),f(w,yt)}function $n(w,p,m,b,x){var D;return D=f(w,Pt),h(w,yr),m&&(h(w,Tr),h(w,y(It(m))),h(w,ur)),b&&(h(w,$r),h(w,y(It(b))),h(w,ur)),x&&(h(w,yn),h(w,y(It(x))),h(w,ur)),D=f(w,Xi),D}function Ki(w,p){return f(w,pr)}function pi(w,p){return f(w,pr)}function za(w,p){return f(w,pr)}var Ha=A('<div hidden id="'),ca=A('">'),ls=A("</div>"),us=A('<svg aria-hidden="true" style="display:none" id="'),ki=A('">'),ja=A("</svg>"),cs=A('<math aria-hidden="true" style="display:none" id="'),fs=A('">'),ds=A("</math>"),fa=A('<table hidden id="'),zi=A('">'),F=A("</table>"),_=A('<table hidden><tbody id="'),V=A('">'),W=A("</tbody></table>"),Ae=A('<table hidden><tr id="'),ve=A('">'),ke=A("</tr></table>"),He=A('<table hidden><colgroup id="'),Rt=A('">'),Kt=A("</colgroup></table>");function qt(w,p,m,b){switch(m.insertionMode){case mr:case Cr:return h(w,Ha),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,ca);case bn:return h(w,us),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,ki);case Rr:return h(w,cs),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,fs);case jn:return h(w,fa),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,zi);case wn:return h(w,_),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,V);case jr:return h(w,Ae),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,ve);case Cn:return h(w,He),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,Rt);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function qr(w,p){switch(p.insertionMode){case mr:case Cr:return f(w,ls);case bn:return f(w,ja);case Rr:return f(w,ds);case jn:return f(w,F);case wn:return f(w,W);case jr:return f(w,ke);case Cn:return f(w,Kt);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var L="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",re='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',le='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',Ve=A(L+';$RS("'),pt=A('$RS("'),_t=A('","'),Wr=A('")<\/script>');function Vn(w,p,m){h(w,p.startInlineScript),p.sentCompleteSegmentFunction?h(w,pt):(p.sentCompleteSegmentFunction=!0,h(w,Ve)),h(w,p.segmentPrefix);var b=y(m.toString(16));return h(w,b),h(w,_t),h(w,p.placeholderPrefix),h(w,b),f(w,Wr)}var oi=A(re+';$RC("'),Hi=A('$RC("'),Ul=A('","'),Vl=A('")<\/script>');function _o(w,p,m,b){if(h(w,p.startInlineScript),p.sentCompleteBoundaryFunction?h(w,Hi):(p.sentCompleteBoundaryFunction=!0,h(w,oi)),m===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var x=y(b.toString(16));return h(w,m),h(w,Ul),h(w,p.segmentPrefix),h(w,x),f(w,Vl)}var da=A(le+';$RX("'),Aa=A('$RX("'),um=A('"'),cm=A(")<\/script>"),Fi=A(",");function fm(w,p,m,b,x,D){if(h(w,p.startInlineScript),p.sentClientRenderFunction?h(w,Aa):(p.sentClientRenderFunction=!0,h(w,da)),m===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return h(w,m),h(w,um),(b||x||D)&&(h(w,Fi),h(w,y(zl(b||"")))),(x||D)&&(h(w,Fi),h(w,y(zl(x||"")))),D&&(h(w,Fi),h(w,y(zl(D)))),f(w,cm)}var sh=/[<\u2028\u2029]/g;function zl(w){var p=JSON.stringify(w);return p.replace(sh,function(m){switch(m){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Bi=Object.assign,oh=Symbol.for("react.element"),Hl=Symbol.for("react.portal"),jl=Symbol.for("react.fragment"),Gl=Symbol.for("react.strict_mode"),$l=Symbol.for("react.profiler"),No=Symbol.for("react.provider"),Lo=Symbol.for("react.context"),Hs=Symbol.for("react.forward_ref"),Ec=Symbol.for("react.suspense"),kc=Symbol.for("react.suspense_list"),Fc=Symbol.for("react.memo"),ql=Symbol.for("react.lazy"),lh=Symbol.for("react.scope"),dm=Symbol.for("react.debug_trace_mode"),hm=Symbol.for("react.legacy_hidden"),pm=Symbol.for("react.default_value"),Tc=Symbol.iterator,An="@@iterator";function Uo(w){if(w===null||typeof w!="object")return null;var p=Tc&&w[Tc]||w[An];return typeof p=="function"?p:null}function uh(w,p,m){var b=w.displayName;if(b)return b;var x=p.displayName||p.name||"";return x!==""?m+"("+x+")":m}function Ic(w){return w.displayName||"Context"}function dn(w){if(w==null)return null;if(typeof w.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case jl:return"Fragment";case Hl:return"Portal";case $l:return"Profiler";case Gl:return"StrictMode";case Ec:return"Suspense";case kc:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case Lo:var p=w;return Ic(p)+".Consumer";case No:var m=w;return Ic(m._context)+".Provider";case Hs:return uh(w,w.render,"ForwardRef");case Fc:var b=w.displayName||null;return b!==null?b:dn(w.type)||"Memo";case ql:{var x=w,D=x._payload,N=x._init;try{return dn(N(D))}catch{return null}}}return null}var js=0,Dc,Pc,Rc,Oc,ch,fh,Wl;function Ql(){}Ql.__reactDisabledLog=!0;function Vo(){{if(js===0){Dc=console.log,Pc=console.info,Rc=console.warn,Oc=console.error,ch=console.group,fh=console.groupCollapsed,Wl=console.groupEnd;var w={configurable:!0,enumerable:!0,value:Ql,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}js++}}function Bc(){{if(js--,js===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Bi({},w,{value:Dc}),info:Bi({},w,{value:Pc}),warn:Bi({},w,{value:Rc}),error:Bi({},w,{value:Oc}),group:Bi({},w,{value:ch}),groupCollapsed:Bi({},w,{value:fh}),groupEnd:Bi({},w,{value:Wl})})}js<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Gs=t.ReactCurrentDispatcher,Mc;function hs(w,p,m){{if(Mc===void 0)try{throw Error()}catch(x){var b=x.stack.trim().match(/\n( *(at )?)/);Mc=b&&b[1]||""}return`
130
+ `&&w.push(I),x}var ae=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Ce=new Map;function ht(w){var p=Ce.get(w);if(p===void 0){if(!ae.test(w))throw new Error("Invalid tag: "+w);p=A("<"+w),Ce.set(w,p)}return p}var ot=A("<!DOCTYPE html>");function jt(w,p,m,b,x){switch(Xt(p,m),wr(p,m),gn(p,m,null),!m.suppressContentEditableWarning&&m.contentEditable&&m.children!=null&&i("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional."),x.insertionMode!==bn&&x.insertionMode!==Rr&&p.indexOf("-")===-1&&typeof m.is!="string"&&p.toLowerCase()!==p&&i("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",p),p){case"select":return Oi(w,m,b);case"option":return _n(w,m,b,x);case"textarea":return Un(w,m,b);case"input":return Ei(w,m,b);case"menuitem":return Zn(w,m,b);case"title":return lr(w,m,b);case"listing":case"pre":return H(w,m,p,b);case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":return Sn(w,m,p,b);case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return In(w,m,p,b);case"html":return x.insertionMode===mr&&w.push(ot),In(w,m,p,b);default:return p.indexOf("-")===-1&&typeof m.is!="string"?In(w,m,p,b):Ci(w,m,p,b)}}var Ut=A("</"),Br=A(">");function M(w,p,m){switch(p){case"area":case"base":case"br":case"col":case"embed":case"hr":case"img":case"input":case"keygen":case"link":case"meta":case"param":case"source":case"track":case"wbr":break;default:w.push(Ut,y(p),Br)}}function te(w,p){for(var m=p.bootstrapChunks,b=0;b<m.length-1;b++)h(w,m[b]);return b<m.length?f(w,m[b]):!0}var fe=A('<template id="'),be=A('"></template>');function Me(w,p,m){h(w,fe),h(w,p.placeholderPrefix);var b=y(m.toString(16));return h(w,b),f(w,be)}var Ke=A("<!--$-->"),Xe=A('<!--$?--><template id="'),yt=A('"></template>'),Pt=A("<!--$!-->"),pr=A("<!--/$-->"),yr=A("<template"),ur=A('"'),Tr=A(' data-dgst="'),$r=A(' data-msg="'),yn=A(' data-stck="'),Xi=A("></template>");function ua(w,p){return f(w,Ke)}function Ji(w,p,m){if(h(w,Xe),m===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return h(w,m),f(w,yt)}function $n(w,p,m,b,x){var D;return D=f(w,Pt),h(w,yr),m&&(h(w,Tr),h(w,y(It(m))),h(w,ur)),b&&(h(w,$r),h(w,y(It(b))),h(w,ur)),x&&(h(w,yn),h(w,y(It(x))),h(w,ur)),D=f(w,Xi),D}function Ki(w,p){return f(w,pr)}function pi(w,p){return f(w,pr)}function za(w,p){return f(w,pr)}var Ha=A('<div hidden id="'),ca=A('">'),ls=A("</div>"),us=A('<svg aria-hidden="true" style="display:none" id="'),ki=A('">'),ja=A("</svg>"),cs=A('<math aria-hidden="true" style="display:none" id="'),fs=A('">'),ds=A("</math>"),fa=A('<table hidden id="'),zi=A('">'),F=A("</table>"),_=A('<table hidden><tbody id="'),V=A('">'),W=A("</tbody></table>"),Ae=A('<table hidden><tr id="'),ve=A('">'),Fe=A("</tr></table>"),He=A('<table hidden><colgroup id="'),Rt=A('">'),Kt=A("</colgroup></table>");function qt(w,p,m,b){switch(m.insertionMode){case mr:case Cr:return h(w,Ha),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,ca);case bn:return h(w,us),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,ki);case Rr:return h(w,cs),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,fs);case jn:return h(w,fa),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,zi);case wn:return h(w,_),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,V);case jr:return h(w,Ae),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,ve);case Cn:return h(w,He),h(w,p.segmentPrefix),h(w,y(b.toString(16))),f(w,Rt);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}function qr(w,p){switch(p.insertionMode){case mr:case Cr:return f(w,ls);case bn:return f(w,ja);case Rr:return f(w,ds);case jn:return f(w,F);case wn:return f(w,W);case jr:return f(w,Fe);case Cn:return f(w,Kt);default:throw new Error("Unknown insertion mode. This is a bug in React.")}}var L="function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}",re='function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}',le='function $RX(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())}',Ve=A(L+';$RS("'),pt=A('$RS("'),_t=A('","'),Wr=A('")<\/script>');function Vn(w,p,m){h(w,p.startInlineScript),p.sentCompleteSegmentFunction?h(w,pt):(p.sentCompleteSegmentFunction=!0,h(w,Ve)),h(w,p.segmentPrefix);var b=y(m.toString(16));return h(w,b),h(w,_t),h(w,p.placeholderPrefix),h(w,b),f(w,Wr)}var oi=A(re+';$RC("'),Hi=A('$RC("'),Ul=A('","'),Vl=A('")<\/script>');function _o(w,p,m,b){if(h(w,p.startInlineScript),p.sentCompleteBoundaryFunction?h(w,Hi):(p.sentCompleteBoundaryFunction=!0,h(w,oi)),m===null)throw new Error("An ID must have been assigned before we can complete the boundary.");var x=y(b.toString(16));return h(w,m),h(w,Ul),h(w,p.segmentPrefix),h(w,x),f(w,Vl)}var da=A(le+';$RX("'),Aa=A('$RX("'),um=A('"'),cm=A(")<\/script>"),Fi=A(",");function fm(w,p,m,b,x,D){if(h(w,p.startInlineScript),p.sentClientRenderFunction?h(w,Aa):(p.sentClientRenderFunction=!0,h(w,da)),m===null)throw new Error("An ID must have been assigned before we can complete the boundary.");return h(w,m),h(w,um),(b||x||D)&&(h(w,Fi),h(w,y(zl(b||"")))),(x||D)&&(h(w,Fi),h(w,y(zl(x||"")))),D&&(h(w,Fi),h(w,y(zl(D)))),f(w,cm)}var sh=/[<\u2028\u2029]/g;function zl(w){var p=JSON.stringify(w);return p.replace(sh,function(m){switch(m){case"<":return"\\u003c";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("escapeJSStringsForInstructionScripts encountered a match it does not know how to replace. this means the match regex and the replacement characters are no longer in sync. This is a bug in React")}})}var Bi=Object.assign,oh=Symbol.for("react.element"),Hl=Symbol.for("react.portal"),jl=Symbol.for("react.fragment"),Gl=Symbol.for("react.strict_mode"),$l=Symbol.for("react.profiler"),No=Symbol.for("react.provider"),Lo=Symbol.for("react.context"),Hs=Symbol.for("react.forward_ref"),Ec=Symbol.for("react.suspense"),kc=Symbol.for("react.suspense_list"),Fc=Symbol.for("react.memo"),ql=Symbol.for("react.lazy"),lh=Symbol.for("react.scope"),dm=Symbol.for("react.debug_trace_mode"),hm=Symbol.for("react.legacy_hidden"),pm=Symbol.for("react.default_value"),Tc=Symbol.iterator,An="@@iterator";function Uo(w){if(w===null||typeof w!="object")return null;var p=Tc&&w[Tc]||w[An];return typeof p=="function"?p:null}function uh(w,p,m){var b=w.displayName;if(b)return b;var x=p.displayName||p.name||"";return x!==""?m+"("+x+")":m}function Ic(w){return w.displayName||"Context"}function dn(w){if(w==null)return null;if(typeof w.tag=="number"&&i("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof w=="function")return w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case jl:return"Fragment";case Hl:return"Portal";case $l:return"Profiler";case Gl:return"StrictMode";case Ec:return"Suspense";case kc:return"SuspenseList"}if(typeof w=="object")switch(w.$$typeof){case Lo:var p=w;return Ic(p)+".Consumer";case No:var m=w;return Ic(m._context)+".Provider";case Hs:return uh(w,w.render,"ForwardRef");case Fc:var b=w.displayName||null;return b!==null?b:dn(w.type)||"Memo";case ql:{var x=w,D=x._payload,N=x._init;try{return dn(N(D))}catch{return null}}}return null}var js=0,Dc,Pc,Rc,Oc,ch,fh,Wl;function Ql(){}Ql.__reactDisabledLog=!0;function Vo(){{if(js===0){Dc=console.log,Pc=console.info,Rc=console.warn,Oc=console.error,ch=console.group,fh=console.groupCollapsed,Wl=console.groupEnd;var w={configurable:!0,enumerable:!0,value:Ql,writable:!0};Object.defineProperties(console,{info:w,log:w,warn:w,error:w,group:w,groupCollapsed:w,groupEnd:w})}js++}}function Bc(){{if(js--,js===0){var w={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Bi({},w,{value:Dc}),info:Bi({},w,{value:Pc}),warn:Bi({},w,{value:Rc}),error:Bi({},w,{value:Oc}),group:Bi({},w,{value:ch}),groupCollapsed:Bi({},w,{value:fh}),groupEnd:Bi({},w,{value:Wl})})}js<0&&i("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Gs=t.ReactCurrentDispatcher,Mc;function hs(w,p,m){{if(Mc===void 0)try{throw Error()}catch(x){var b=x.stack.trim().match(/\n( *(at )?)/);Mc=b&&b[1]||""}return`
131
131
  `+Mc+w}}var _c=!1,zo;{var gm=typeof WeakMap=="function"?WeakMap:Map;zo=new gm}function Ho(w,p){if(!w||_c)return"";{var m=zo.get(w);if(m!==void 0)return m}var b;_c=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var D;D=Gs.current,Gs.current=null,Vo();try{if(p){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(Dr){b=Dr}Reflect.construct(w,[],N)}else{try{N.call()}catch(Dr){b=Dr}w.call(N.prototype)}}else{try{throw Error()}catch(Dr){b=Dr}w()}}catch(Dr){if(Dr&&b&&typeof Dr.stack=="string"){for(var j=Dr.stack.split(`
132
132
  `),ne=b.stack.split(`
133
133
  `),ge=j.length-1,Pe=ne.length-1;ge>=1&&Pe>=0&&j[ge]!==ne[Pe];)Pe--;for(;ge>=1&&Pe>=0;ge--,Pe--)if(j[ge]!==ne[Pe]){if(ge!==1||Pe!==1)do if(ge--,Pe--,Pe<0||j[ge]!==ne[Pe]){var Ne=`
@@ -156,21 +156,21 @@ Incoming: %s`,Qa,"["+w.join(", ")+"]","["+p.join(", ")+"]");for(var m=0;m<p.leng
156
156
  Error generating stack: `+b.message+`
157
157
  `+b.stack}}var mu=t.ReactCurrentDispatcher,vu=t.ReactDebugCurrentFrame,yu=0,Ys=1,Yc=2,ys=3,Th=4,_m=0,Xs=1,Js=2,Nm=12800;function Lm(w){return console.error(w),null}function As(){}function Au(w,p,m,b,x,D,N,j,ne){var ge=[],Pe=new Set,Ne={destination:null,responseState:p,progressiveChunkSize:b===void 0?Nm:b,status:_m,fatalError:null,nextSegmentId:0,allPendingTasks:0,pendingRootTasks:0,completedRootSegment:null,abortableTasks:Pe,pingedTasks:ge,clientRenderedBoundaries:[],completedBoundaries:[],partialBoundaries:[],onError:x===void 0?Lm:x,onAllReady:D===void 0?As:D,onShellReady:N===void 0?As:N,onShellError:j===void 0?As:j,onFatalError:ne===void 0?As:ne},Ze=el(Ne,0,null,m,!1,!1);Ze.parentFlushed=!0;var Vt=bs(Ne,w,null,Ze,Pe,Kl,Zl,bm);return ge.push(Vt),Ne}function wa(w,p){var m=w.pingedTasks;m.push(p),m.length===1&&s(function(){return of(w)})}function Xc(w,p){return{id:si,rootSegmentID:-1,parentFlushed:!1,pendingTasks:0,forceClientRender:!1,completedSegments:[],byteSize:0,fallbackAbortableTasks:p,errorDigest:null}}function bs(w,p,m,b,x,D,N,j){w.allPendingTasks++,m===null?w.pendingRootTasks++:m.pendingTasks++;var ne={node:p,ping:function(){return wa(w,ne)},blockedBoundary:m,blockedSegment:b,abortSet:x,legacyContext:D,context:N,treeContext:j};return ne.componentStack=null,x.add(ne),ne}function el(w,p,m,b,x,D){return{status:yu,id:-1,index:p,parentFlushed:!1,chunks:[],children:[],formatContext:b,boundary:m,lastPushedText:x,textEmbedded:D}}var Ca=null;function pa(){return Ca===null||Ca.componentStack===null?"":Qs(Ca.componentStack)}function xa(w,p){w.componentStack={tag:0,parent:w.componentStack,type:p}}function bu(w,p){w.componentStack={tag:1,parent:w.componentStack,type:p}}function tl(w,p){w.componentStack={tag:2,parent:w.componentStack,type:p}}function ea(w){w.componentStack===null?i("Unexpectedly popped too many stack frames. This is a bug in React."):w.componentStack=w.componentStack.parent}var rl=null;function Jc(w,p){{var m;typeof p=="string"?m=p:p&&typeof p.message=="string"?m=p.message:m=String(p);var b=rl||pa();rl=null,w.errorMessage=m,w.errorComponentStack=b}}function nl(w,p){var m=w.onError(p);if(m!=null&&typeof m!="string")throw new Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof m+'" instead');return m}function il(w,p){var m=w.onShellError;m(p);var b=w.onFatalError;b(p),w.destination!==null?(w.status=Js,C(w.destination,p)):(w.status=Xs,w.fatalError=p)}function Ih(w,p,m){xa(p,"Suspense");var b=p.blockedBoundary,x=p.blockedSegment,D=m.fallback,N=m.children,j=new Set,ne=Xc(w,j),ge=x.chunks.length,Pe=el(w,ge,ne,x.formatContext,!1,!1);x.children.push(Pe),x.lastPushedText=!1;var Ne=el(w,0,null,x.formatContext,!1,!1);Ne.parentFlushed=!0,p.blockedBoundary=ne,p.blockedSegment=Ne;try{if(Ks(w,p,N),on(Ne.chunks,w.responseState,Ne.lastPushedText,Ne.textEmbedded),Ne.status=Ys,ws(ne,Ne),ne.pendingTasks===0){ea(p);return}}catch(Vt){Ne.status=Th,ne.forceClientRender=!0,ne.errorDigest=nl(w,Vt),Jc(ne,Vt)}finally{p.blockedBoundary=b,p.blockedSegment=x}var Ze=bs(w,D,b,Pe,j,p.legacyContext,p.context,p.treeContext);Ze.componentStack=p.componentStack,w.pingedTasks.push(Ze),ea(p)}function Um(w,p,m,b){xa(p,m);var x=p.blockedSegment,D=jt(x.chunks,m,b,w.responseState,x.formatContext);x.lastPushedText=!1;var N=x.formatContext;x.formatContext=Jn(N,m,b),Ks(w,p,D),x.formatContext=N,M(x.chunks,m),x.lastPushedText=!1,ea(p)}function Dh(w){return w.prototype&&w.prototype.isReactComponent}function al(w,p,m,b,x){var D={};Fm(p,D);var N=m(b,x);return Tm(m,b,N,x)}function Kc(w,p,m,b,x){var D=m.render();m.props!==x&&(rf||i("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",dn(b)||"a component"),rf=!0);{var N=b.childContextTypes;if(N!=null){var j=p.legacyContext,ne=Lc(m,b,j,N);p.legacyContext=ne,xi(w,p,D),p.legacyContext=j;return}}xi(w,p,D)}function Ph(w,p,m,b){tl(p,m);var x=Ga(m,p.legacyContext),D=wh(m,b,x);Jo(D,m,b,x),Kc(w,p,D,m,b),ea(p)}var Zc={},sl={},ef={},tf={},rf=!1,Rh={},Oh=!1,nf=!1,Bh=!1;function Vm(w,p,m,b){var x;if(x=Ga(m,p.legacyContext),bu(p,m),m.prototype&&typeof m.prototype.render=="function"){var D=dn(m)||"Unknown";Zc[D]||(i("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",D,D),Zc[D]=!0)}var N=al(w,p,m,b,x),j=fu();if(typeof N=="object"&&N!==null&&typeof N.render=="function"&&N.$$typeof===void 0){var ne=dn(m)||"Unknown";sl[ne]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",ne,ne,ne),sl[ne]=!0)}if(typeof N=="object"&&N!==null&&typeof N.render=="function"&&N.$$typeof===void 0){{var ge=dn(m)||"Unknown";sl[ge]||(i("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",ge,ge,ge),sl[ge]=!0)}Jo(N,m,b,x),Kc(w,p,N,m,b)}else if(zm(m),j){var Pe=p.treeContext,Ne=1,Ze=0;p.treeContext=jc(Pe,Ne,Ze);try{xi(w,p,N)}finally{p.treeContext=Pe}}else xi(w,p,N);ea(p)}function zm(w){{if(w&&w.childContextTypes&&i("%s(...): childContextTypes cannot be defined on a function component.",w.displayName||w.name||"Component"),w.defaultProps!==void 0){var p=dn(w)||"Unknown";Rh[p]||(i("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",p),Rh[p]=!0)}if(typeof w.getDerivedStateFromProps=="function"){var m=dn(w)||"Unknown";tf[m]||(i("%s: Function components do not support getDerivedStateFromProps.",m),tf[m]=!0)}if(typeof w.contextType=="object"&&w.contextType!==null){var b=dn(w)||"Unknown";ef[b]||(i("%s: Function components do not support contextType.",b),ef[b]=!0)}}}function Mh(w,p){if(w&&w.defaultProps){var m=Bi({},p),b=w.defaultProps;for(var x in b)m[x]===void 0&&(m[x]=b[x]);return m}return p}function Hm(w,p,m,b,x){bu(p,m.render);var D=al(w,p,m.render,b,x),N=fu();if(N){var j=p.treeContext,ne=1,ge=0;p.treeContext=jc(j,ne,ge);try{xi(w,p,D)}finally{p.treeContext=j}}else xi(w,p,D);ea(p)}function af(w,p,m,b,x){var D=m.type,N=Mh(D,b);wu(w,p,D,N,x)}function jm(w,p,m,b){m._context===void 0?m!==m.Consumer&&(Bh||(Bh=!0,i("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?"))):m=m._context;var x=b.children;typeof x!="function"&&i("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");var D=$s(m),N=x(D);xi(w,p,N)}function Li(w,p,m,b){var x=m._context,D=b.value,N=b.children,j;j=p.context,p.context=Uc(x,D),xi(w,p,N),p.context=mm(x),j!==p.context&&i("Popping the context provider did not return back to the original snapshot. This is a bug in React.")}function Gm(w,p,m,b,x){xa(p,"Lazy");var D=m._payload,N=m._init,j=N(D),ne=Mh(j,b);wu(w,p,j,ne,x),ea(p)}function wu(w,p,m,b,x){if(typeof m=="function")if(Dh(m)){Ph(w,p,m,b);return}else{Vm(w,p,m,b);return}if(typeof m=="string"){Um(w,p,m,b);return}switch(m){case hm:case dm:case Gl:case $l:case jl:{xi(w,p,b.children);return}case kc:{xa(p,"SuspenseList"),xi(w,p,b.children),ea(p);return}case lh:throw new Error("ReactDOMServer does not yet support scope components.");case Ec:{Ih(w,p,b);return}}if(typeof m=="object"&&m!==null)switch(m.$$typeof){case Hs:{Hm(w,p,m,b,x);return}case Fc:{af(w,p,m,b,x);return}case No:{Li(w,p,m,b);return}case Lo:{jm(w,p,m,b);return}case ql:{Gm(w,p,m,b);return}}var D="";throw(m===void 0||typeof m=="object"&&m!==null&&Object.keys(m).length===0)&&(D+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(m==null?m:typeof m)+"."+D))}function $m(w,p){typeof Symbol=="function"&&w[Symbol.toStringTag]==="Generator"&&(Oh||i("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers."),Oh=!0),w.entries===p&&(nf||i("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),nf=!0)}function xi(w,p,m){try{return qm(w,p,m)}catch(b){throw typeof b=="object"&&b!==null&&typeof b.then=="function"||(rl=rl!==null?rl:pa()),b}}function qm(w,p,m){if(p.node=m,typeof m=="object"&&m!==null){switch(m.$$typeof){case oh:{var b=m,x=b.type,D=b.props,N=b.ref;wu(w,p,x,D,N);return}case Hl:throw new Error("Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.");case ql:{var j=m,ne=j._payload,ge=j._init,Pe;try{Pe=ge(ne)}catch(Sa){throw typeof Sa=="object"&&Sa!==null&&typeof Sa.then=="function"&&xa(p,"Lazy"),Sa}xi(w,p,Pe);return}}if(Ct(m)){_h(w,p,m);return}var Ne=Uo(m);if(Ne){$m(m,Ne);var Ze=Ne.call(m);if(Ze){var Vt=Ze.next();if(!Vt.done){var Dr=[];do Dr.push(Vt.value),Vt=Ze.next();while(!Vt.done);_h(w,p,Dr);return}return}}var li=Object.prototype.toString.call(m);throw new Error("Objects are not valid as a React child (found: "+(li==="[object Object]"?"object with keys {"+Object.keys(m).join(", ")+"}":li)+"). If you meant to render a collection of children, use an array instead.")}if(typeof m=="string"){var Cs=p.blockedSegment;Cs.lastPushedText=Lr(p.blockedSegment.chunks,m,w.responseState,Cs.lastPushedText);return}if(typeof m=="number"){var xs=p.blockedSegment;xs.lastPushedText=Lr(p.blockedSegment.chunks,""+m,w.responseState,xs.lastPushedText);return}typeof m=="function"&&i("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}function _h(w,p,m){for(var b=m.length,x=0;x<b;x++){var D=p.treeContext;p.treeContext=jc(D,b,x);try{Ks(w,p,m[x])}finally{p.treeContext=D}}}function Nh(w,p,m){var b=p.blockedSegment,x=b.chunks.length,D=el(w,x,null,b.formatContext,b.lastPushedText,!0);b.children.push(D),b.lastPushedText=!1;var N=bs(w,p.node,p.blockedBoundary,D,p.abortSet,p.legacyContext,p.context,p.treeContext);p.componentStack!==null&&(N.componentStack=p.componentStack.parent);var j=N.ping;m.then(j,j)}function Ks(w,p,m){var b=p.blockedSegment.formatContext,x=p.legacyContext,D=p.context,N=null;N=p.componentStack;try{return xi(w,p,m)}catch(j){if(qc(),typeof j=="object"&&j!==null&&typeof j.then=="function"){Nh(w,p,j),p.blockedSegment.formatContext=b,p.legacyContext=x,p.context=D,qa(D),p.componentStack=N;return}else throw p.blockedSegment.formatContext=b,p.legacyContext=x,p.context=D,qa(D),p.componentStack=N,j}}function Lh(w,p,m,b){var x=nl(w,b);if(p===null?il(w,b):(p.pendingTasks--,p.forceClientRender||(p.forceClientRender=!0,p.errorDigest=x,Jc(p,b),p.parentFlushed&&w.clientRenderedBoundaries.push(p))),w.allPendingTasks--,w.allPendingTasks===0){var D=w.onAllReady;D()}}function Wm(w){var p=this,m=w.blockedBoundary,b=w.blockedSegment;b.status=ys,ol(p,m,b)}function sf(w,p,m){var b=w.blockedBoundary,x=w.blockedSegment;if(x.status=ys,b===null)p.allPendingTasks--,p.status!==Js&&(p.status=Js,p.destination!==null&&g(p.destination));else{if(b.pendingTasks--,!b.forceClientRender){b.forceClientRender=!0;var D=m===void 0?new Error("The render was aborted by the server without a reason."):m;b.errorDigest=p.onError(D);{var N="The server did not finish this Suspense boundary: ";D&&typeof D.message=="string"?D=N+D.message:D=N+String(D);var j=Ca;Ca=w;try{Jc(b,D)}finally{Ca=j}}b.parentFlushed&&p.clientRenderedBoundaries.push(b)}if(b.fallbackAbortableTasks.forEach(function(ge){return sf(ge,p,m)}),b.fallbackAbortableTasks.clear(),p.allPendingTasks--,p.allPendingTasks===0){var ne=p.onAllReady;ne()}}}function ws(w,p){if(p.chunks.length===0&&p.children.length===1&&p.children[0].boundary===null){var m=p.children[0];m.id=p.id,m.parentFlushed=!0,m.status===Ys&&ws(w,m)}else{var b=w.completedSegments;b.push(p)}}function ol(w,p,m){if(p===null){if(m.parentFlushed){if(w.completedRootSegment!==null)throw new Error("There can only be one root segment. This is a bug in React.");w.completedRootSegment=m}if(w.pendingRootTasks--,w.pendingRootTasks===0){w.onShellError=As;var b=w.onShellReady;b()}}else if(p.pendingTasks--,!p.forceClientRender){if(p.pendingTasks===0)m.parentFlushed&&m.status===Ys&&ws(p,m),p.parentFlushed&&w.completedBoundaries.push(p),p.fallbackAbortableTasks.forEach(Wm,w),p.fallbackAbortableTasks.clear();else if(m.parentFlushed&&m.status===Ys){ws(p,m);var x=p.completedSegments;x.length===1&&p.parentFlushed&&w.partialBoundaries.push(p)}}if(w.allPendingTasks--,w.allPendingTasks===0){var D=w.onAllReady;D()}}function Qm(w,p){var m=p.blockedSegment;if(m.status===yu){qa(p.context);var b=null;b=Ca,Ca=p;try{xi(w,p,p.node),on(m.chunks,w.responseState,m.lastPushedText,m.textEmbedded),p.abortSet.delete(p),m.status=Ys,ol(w,p.blockedBoundary,m)}catch(D){if(qc(),typeof D=="object"&&D!==null&&typeof D.then=="function"){var x=p.ping;D.then(x,x)}else p.abortSet.delete(p),m.status=Th,Lh(w,p.blockedBoundary,m,D)}finally{Ca=b}}}function of(w){if(w.status!==Js){var p=vh(),m=mu.current;mu.current=pu;var b;b=vu.getCurrentStack,vu.getCurrentStack=pa;var x=Zo;gu(w.responseState);try{var D=w.pingedTasks,N;for(N=0;N<D.length;N++){var j=D[N];Qm(w,j)}D.splice(0,N),w.destination!==null&&lf(w,w.destination)}catch(ne){nl(w,ne),il(w,ne)}finally{gu(x),mu.current=m,vu.getCurrentStack=b,m===pu&&qa(p)}}}function ll(w,p,m){switch(m.parentFlushed=!0,m.status){case yu:{var b=m.id=w.nextSegmentId++;return m.lastPushedText=!1,m.textEmbedded=!1,Me(p,w.responseState,b)}case Ys:{m.status=Yc;for(var x=!0,D=m.chunks,N=0,j=m.children,ne=0;ne<j.length;ne++){for(var ge=j[ne];N<ge.index;N++)h(p,D[N]);x=Cu(w,p,ge)}for(;N<D.length-1;N++)h(p,D[N]);return N<D.length&&(x=f(p,D[N])),x}default:throw new Error("Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.")}}function Cu(w,p,m){var b=m.boundary;if(b===null)return ll(w,p,m);if(b.parentFlushed=!0,b.forceClientRender)return $n(p,w.responseState,b.errorDigest,b.errorMessage,b.errorComponentStack),ll(w,p,m),za(p,w.responseState);if(b.pendingTasks>0){b.rootSegmentID=w.nextSegmentId++,b.completedSegments.length>0&&w.partialBoundaries.push(b);var x=b.id=xn(w.responseState);return Ji(p,w.responseState,x),ll(w,p,m),pi(p,w.responseState)}else{if(b.byteSize>w.progressiveChunkSize)return b.rootSegmentID=w.nextSegmentId++,w.completedBoundaries.push(b),Ji(p,w.responseState,b.id),ll(w,p,m),pi(p,w.responseState);ua(p,w.responseState);var D=b.completedSegments;if(D.length!==1)throw new Error("A previously unvisited boundary must have exactly one root segment. This is a bug in React.");var N=D[0];return Cu(w,p,N),Ki(p,w.responseState)}}function Uh(w,p,m){return fm(p,w.responseState,m.id,m.errorDigest,m.errorMessage,m.errorComponentStack)}function xu(w,p,m){return qt(p,w.responseState,m.formatContext,m.id),Cu(w,p,m),qr(p,m.formatContext)}function Vh(w,p,m){for(var b=m.completedSegments,x=0;x<b.length;x++){var D=b[x];zh(w,p,m,D)}return b.length=0,_o(p,w.responseState,m.id,m.rootSegmentID)}function Ym(w,p,m){for(var b=m.completedSegments,x=0;x<b.length;x++){var D=b[x];if(!zh(w,p,m,D))return x++,b.splice(0,x),!1}return b.splice(0,x),!0}function zh(w,p,m,b){if(b.status===Yc)return!0;var x=b.id;if(x===-1){var D=b.id=m.rootSegmentID;if(D===-1)throw new Error("A root segment ID must have been assigned by now. This is a bug in React.");return xu(w,p,b)}else return xu(w,p,b),Vn(p,w.responseState,x)}function lf(w,p){c();try{var m=w.completedRootSegment;m!==null&&w.pendingRootTasks===0&&(Cu(w,p,m),w.completedRootSegment=null,te(p,w.responseState));var b=w.clientRenderedBoundaries,x;for(x=0;x<b.length;x++){var D=b[x];Uh(w,p,D)}b.splice(0,x);var N=w.completedBoundaries;for(x=0;x<N.length;x++){var j=N[x];Vh(w,p,j)}N.splice(0,x),d(p),c(p);var ne=w.partialBoundaries;for(x=0;x<ne.length;x++){var ge=ne[x];if(!Ym(w,p,ge)){w.destination=null,x++,ne.splice(0,x);return}}ne.splice(0,x);var Pe=w.completedBoundaries;for(x=0;x<Pe.length;x++){var Ne=Pe[x];Vh(w,p,Ne)}Pe.splice(0,x)}finally{d(p),w.allPendingTasks===0&&w.pingedTasks.length===0&&w.clientRenderedBoundaries.length===0&&w.completedBoundaries.length===0&&(w.abortableTasks.size!==0&&i("There was still abortable task at the root when we closed. This is a bug in React."),g(p))}}function Hh(w){s(function(){return of(w)})}function Xm(w,p){if(w.status===Xs){w.status=Js,C(p,w.fatalError);return}if(w.status!==Js&&w.destination===null){w.destination=p;try{lf(w,p)}catch(m){nl(w,m),il(w,m)}}}function jh(w,p){try{var m=w.abortableTasks;m.forEach(function(b){return sf(b,w,p)}),m.clear(),w.destination!==null&&lf(w,w.destination)}catch(b){nl(w,b),il(w,b)}}function Jm(w,p){return new Promise(function(m,b){var x,D,N=new Promise(function(Ze,Vt){D=Ze,x=Vt});function j(){var Ze=new ReadableStream({type:"bytes",pull:function(Vt){Xm(ge,Vt)},cancel:function(Vt){jh(ge)}},{highWaterMark:0});Ze.allReady=N,m(Ze)}function ne(Ze){N.catch(function(){}),b(Ze)}var ge=Au(w,Tn(p?p.identifierPrefix:void 0,p?p.nonce:void 0,p?p.bootstrapScriptContent:void 0,p?p.bootstrapScripts:void 0,p?p.bootstrapModules:void 0),tn(p?p.namespaceURI:void 0),p?p.progressiveChunkSize:void 0,p?p.onError:void 0,D,j,ne,x);if(p&&p.signal){var Pe=p.signal,Ne=function(){jh(ge,Pe.reason),Pe.removeEventListener("abort",Ne)};Pe.addEventListener("abort",Ne)}Hh(ge)})}Xh.renderToReadableStream=Jm,Xh.version=e})()),Xh}var eC;function EO(){if(eC)return eo;eC=1;var r,e;return process.env.NODE_ENV==="production"?(r=wO(),e=CO()):(r=xO(),e=SO()),eo.version=r.version,eo.renderToString=r.renderToString,eo.renderToStaticMarkup=r.renderToStaticMarkup,eo.renderToNodeStream=r.renderToNodeStream,eo.renderToStaticNodeStream=r.renderToStaticNodeStream,eo.renderToReadableStream=e.renderToReadableStream,eo}var kO=EO();let Sy,Ey;function FO(r){Sy=r}function TO(r){Ey=r}function Hd(){return Sy?new Sy().window:(console.log("DOM constructor is not registered. Assuming browser environment. If not, please register DOM constructor before calling this function."),window)}function Pa(r,e){if(!Ey){if(typeof window<"u"&&window.fetch)return window.fetch(r,e);if(typeof global<"u"&&global.fetch)return global.fetch(r,e);throw new Error("Fetch implementation is not registered. Please register it before calling this function.")}return Ey(r,e)}const Vk=new Map,tC=new Map,rC=new Map,zk=async r=>{const e=tC.get(r);if(e)return e;const n=(async()=>{const i=await Pa(r);return Vk.set(r,i.headers?.get("content-type")||""),await i.arrayBuffer()})();return tC.set(r,n),n},IO=async r=>{const e=rC.get(r);if(e)return e;const n=(async()=>await(await Pa(r)).text())();return rC.set(r,n),n},bc=r=>r.every(e=>e!=="undefined"),Jh=r=>bc([typeof document])?document.createElement(r):Hd().document.createElement(r),DO=(r,e)=>{if(bc([typeof document]))return document.createElementNS(r,e);const n=Hd().document.createElement(e);return n.setAttribute("xmlns",r),n},os=()=>{if(bc([typeof DOMParser]))return new DOMParser;const r=Hd();return new r.DOMParser},PO=()=>bc([typeof DOMParser])?DOMParser:Hd().DOMParser,Vg=(r,e)=>new Promise((t,n)=>{e?zk(r).then(t).catch(n):Pa(r).then(i=>{i.arrayBuffer().then(t).catch(n)}).catch(i=>{n(i)})}),ia=(r,e)=>new Promise((t,n)=>{e?IO(r).then(t).catch(n):Pa(r).then(i=>{i.text().then(t).catch(n)}).catch(n)}),Hk=r=>kO.renderToStaticMarkup(r),v0=new Map,RO=async(r,e)=>{if(bc([typeof FontFace])){if(v0.has(e))return v0.get(e);const t=r.names.fullName.en,n=new FontFace(t,`url(${e})`);document.fonts.add(n);const i=n.load();return v0.set(e,i),i}},Po=()=>{if(bc([typeof XMLSerializer]))return new XMLSerializer;const r=Hd();return new r.XMLSerializer},nC=r=>btoa(r),zg=r=>{function e(){const n=new Uint8Array(r),i=4;if(n.length>=i){const a=new Array(i);for(let l=0;l<i;l++)a[l]=new Uint8Array(r)[l].toString(16);const s=a.join("").toUpperCase();switch(s){case"89504E47":return"image/png";case"47494638":return"image/gif";case"25504446":return"application/pdf";case"504B0304":return"application/zip"}if(s.slice(0,4)==="FFD8")return"image/jpeg"}return null}const t=e();return t||"image/svg+xml"},OO=async r=>{const e=await zk(r),t=Vk.get(r)||zg(e);return await _O(new Blob([e],{type:t}))},BO=r=>{let e="";const t=r.byteLength;for(let n=0;n<t;n++)e+=String.fromCharCode(r[n]);return e},MO=async r=>{const e=zg(r),t=new Uint8Array(r),n=BO(t),i=btoa(n);return`data:${e};base64,${i}`},Hg=r=>`data:image/svg+xml;base64,${btoa(r)}`,jk=r=>{const e=r.replace(/\r?\n/g,""),t=e.indexOf(",");if(t===-1||t<=4)throw new TypeError("malformed data: URI");const n=e.substring(5,t).split(";");let i=!1;for(let s=1;s<n.length;s++)n[s]==="base64"&&(i=!0);const a=decodeURI(e.substring(t+1));return i?new Uint8Array(atob(a).split("").map(o=>o.charCodeAt(0))).buffer:new Uint8Array(a.split("").map(o=>o.charCodeAt(0))).buffer},_O=r=>new Promise((e,t)=>{const n=new FileReader;n.onload=function(i){const a=i.target;!a||!a.result?t():e(a.result.toString())},n.readAsDataURL(r)});var NO="__KEEP";function LO(r){return r===void 0&&(r=Object.create(null)),Object.assign(new ss(function(e,t){var n=r.except,i=e.query,a=e.variables;return a&&(e.variables=n?UO(i,a,n):BA(a)),t(e)}),{})}function UO(r,e,t){var n=VO(r);return Object.fromEntries(Object.entries(e).map(function(i){var a=i[0],s=i[1],o=n[a],l=t[o];return i[1]=l?ky(s,l):BA(s),i}))}function ky(r,e){if(e===NO)return r;if(Array.isArray(r))return r.map(function(n){return ky(n,e)});if(M2(r)){var t={};return Object.keys(r).forEach(function(n){var i=r[n];if(n!=="__typename"){var a=e[n];t[n]=a?ky(i,a):BA(i)}}),t}return r}var VO=Ku(function(r){var e={};return Ra(r,{VariableDefinition:function(t){e[t.variable.name.value]=Fy(t.type)}}),e},{max:Us["removeTypenameFromVariables.getVariableDefinitions"]||2e3,cache:gd});function Fy(r){switch(r.kind){case et.NON_NULL_TYPE:return Fy(r.type);case et.LIST_TYPE:return Fy(r.type);case et.NAMED_TYPE:return r.name.value}}let zO,zA;const HO=r=>{zA=r},jO=()=>zA;let Gk;const $k=r=>{Gk=r},GO=()=>new Promise(r=>{const e=_s.getHubUrl(),t=n=>{n.origin===e&&(window.removeEventListener("message",t),r(n.data))};window.parent!==window&&(window.addEventListener("message",t,!1),window.parent.postMessage("ready",e))}),$O=async()=>{const r={applicationKey:zA,customerToken:zO,bearer:Gk};return typeof window<"u"&&(window.location.href.includes("/workflows/product/")||window.location.href.includes("hub=true"))?{...await GO(),...r}:r};async function qO(r,e){const t=_s.getServerUrl(),n=t.includes(".aumelbdev.spiffcommerce.com")?"https://moonlight.aumelbdev.spiffcommerce.com":t.includes(".us.spiffcommerce.com")?"https://moonlight.us.spiffcommerce.com":"https://moonlight.au.spiffcommerce.com";let i=await Pa(r,{...e,redirect:"manual"});return(i.type==="opaqueredirect"||i.status===307)&&(typeof r!="string"&&"url"in r?i=await Pa({...r,url:`${n}/graphql`},e):i=await Pa(`${n}/graphql`,e)),i}class WO{constructor(){this.shadowGraphqlClient=this.constructShadowGraphqlClient(),_s.addServerUrlCallback(()=>{this.shadowGraphqlClient=this.constructShadowGraphqlClient()})}setSpiffCommerceClient(e){this.spiffClient=e,this.shadowGraphqlClient=this.constructShadowGraphqlClient()}getShadowGraphqlClient(){return this.shadowGraphqlClient}constructShadowGraphqlClient(){const e=ck({uri:`${_s.getServerUrl()}/graphql`,fetch:qO}),t=vO(async(a,s)=>{const{headers:o}=s,l=o||{},u=await $O();let c=s.bearer??u.bearer,h=!1;if(this.spiffClient){try{c=await this.spiffClient.loggedInBearerToken()}catch{}try{s.skipIntegrationCheck||(h=await this.spiffClient.getBetaEnabled())}catch{}}const f=s.partnerId??u.partnerId,d=s.activeIntegration??u.activeIntegration,g=s.transactionOwnerId,v=s.customerToken??u.customerToken,y=s.applicationKey??u.applicationKey,A=s.bundleOwnerId;try{if(window&&window.__SENTRY__){const C=window.__SENTRY__.hub;if(C){const k=C.traceHeaders();Object.entries(k).forEach(([T,S])=>{l[T]=S})}}}catch{}return c&&(l.Authorization=`Bearer ${c}`),f&&(l.partnerId=f),d&&(l.activeIntegration=d),g&&(l.transactionOwnerId=g),v&&(l.customerToken=v),y&&(l["X-Application-Key"]=y),A&&(l.bundleOwnerId=A),h&&(l["X-Spiff-Beta"]="true"),l["Allow-Moonlight-Redirect"]="true",{headers:l}}),n=Uk(({operation:a,graphQLErrors:s,networkError:o})=>{const l=s||[],u=a.getContext();o&&!u?.fetchOptions?.signal?.aborted&&console.log("GraphQL Network error"),l.forEach(()=>console.log("GraphQL Error: "+a.operationName))}),i=LO();return new sO({link:o4([i,n,t,e]),cache:new tO,name:"Core"})}}const $e=new WO;let Ty,Iy;const Eo=(r,e,t)=>{if(Ty!==void 0)return Ty(r,e,t);try{const n=qk(!0);return HA(n),n.createCanvas(r,e,t)}catch{throw new Error("Canvas module not set")}},jd=(r,e)=>{if(Iy!==void 0)return Iy(r,e);try{const t=qk(!0);return HA(t),t.loadImage(r,e)}catch{throw new Error("Canvas module not set")}};function HA(r){Ty=r?.createCanvas,Iy=r?.loadImage}function qk(r){try{if(document.createElement("canvas").getContext("2d"))return{createCanvas:(t,n,i)=>{const a=document.createElement("canvas");return t!=null&&(a.width=t),n!=null&&(a.height=n),a},loadImage:(t,n)=>new Promise((i,a)=>{const s=document.createElement("img");n!==!1&&(s.crossOrigin="Anonymous"),s.onload=()=>{i(s)},s.onerror=a,s.src=t})}}catch(e){throw e}}let y0;function jA(){return y0===void 0&&(y0=PO()),y0}var Hf={exports:{}},QO=Hf.exports,iC;function YO(){return iC||(iC=1,(function(r,e){(function(t,n){n(e)})(QO,(function(t){function n(Se,P,U){return P in Se?Object.defineProperty(Se,P,{value:U,enumerable:!0,configurable:!0,writable:!0}):Se[P]=U,Se}var i=typeof self<"u"?self:di;const a=typeof navigator<"u",s=a&&typeof HTMLImageElement>"u",o=!(typeof di>"u"||typeof process>"u"||!process.versions||!process.versions.node),l=i.Buffer,u=!!l,c=Se=>Se!==void 0;function h(Se){return Se===void 0||(Se instanceof Map?Se.size===0:Object.values(Se).filter(c).length===0)}function f(Se){let P=new Error(Se);throw delete P.stack,P}function d(Se){let P=(function(U){let Z=0;return U.ifd0.enabled&&(Z+=1024),U.exif.enabled&&(Z+=2048),U.makerNote&&(Z+=2048),U.userComment&&(Z+=1024),U.gps.enabled&&(Z+=512),U.interop.enabled&&(Z+=100),U.ifd1.enabled&&(Z+=1024),Z+2048})(Se);return Se.jfif.enabled&&(P+=50),Se.xmp.enabled&&(P+=2e4),Se.iptc.enabled&&(P+=14e3),Se.icc.enabled&&(P+=6e3),P}const g=Se=>String.fromCharCode.apply(null,Se),v=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;class y{static from(P,U){return P instanceof this&&P.le===U?P:new y(P,void 0,void 0,U)}constructor(P,U=0,Z,ue){if(typeof ue=="boolean"&&(this.le=ue),Array.isArray(P)&&(P=new Uint8Array(P)),P===0)this.byteOffset=0,this.byteLength=0;else if(P instanceof ArrayBuffer){Z===void 0&&(Z=P.byteLength-U);let Ie=new DataView(P,U,Z);this._swapDataView(Ie)}else if(P instanceof Uint8Array||P instanceof DataView||P instanceof y){Z===void 0&&(Z=P.byteLength-U),(U+=P.byteOffset)+Z>P.byteOffset+P.byteLength&&f("Creating view outside of available memory in ArrayBuffer");let Ie=new DataView(P.buffer,U,Z);this._swapDataView(Ie)}else if(typeof P=="number"){let Ie=new DataView(new ArrayBuffer(P));this._swapDataView(Ie)}else f("Invalid input argument for BufferView: "+P)}_swapArrayBuffer(P){this._swapDataView(new DataView(P))}_swapBuffer(P){this._swapDataView(new DataView(P.buffer,P.byteOffset,P.byteLength))}_swapDataView(P){this.dataView=P,this.buffer=P.buffer,this.byteOffset=P.byteOffset,this.byteLength=P.byteLength}_lengthToEnd(P){return this.byteLength-P}set(P,U,Z=y){return P instanceof DataView||P instanceof y?P=new Uint8Array(P.buffer,P.byteOffset,P.byteLength):P instanceof ArrayBuffer&&(P=new Uint8Array(P)),P instanceof Uint8Array||f("BufferView.set(): Invalid data argument."),this.toUint8().set(P,U),new Z(this,U,P.byteLength)}subarray(P,U){return U=U||this._lengthToEnd(P),new y(this,P,U)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(P,U){return new Uint8Array(this.buffer,this.byteOffset+P,U)}getString(P=0,U=this.byteLength){return ue=this.getUint8Array(P,U),v?v.decode(ue):u?Buffer.from(ue).toString("utf8"):decodeURIComponent(escape(g(ue)));var ue}getLatin1String(P=0,U=this.byteLength){let Z=this.getUint8Array(P,U);return g(Z)}getUnicodeString(P=0,U=this.byteLength){const Z=[];for(let ue=0;ue<U&&P+ue<this.byteLength;ue+=2)Z.push(this.getUint16(P+ue));return g(Z)}getInt8(P){return this.dataView.getInt8(P)}getUint8(P){return this.dataView.getUint8(P)}getInt16(P,U=this.le){return this.dataView.getInt16(P,U)}getInt32(P,U=this.le){return this.dataView.getInt32(P,U)}getUint16(P,U=this.le){return this.dataView.getUint16(P,U)}getUint32(P,U=this.le){return this.dataView.getUint32(P,U)}getFloat32(P,U=this.le){return this.dataView.getFloat32(P,U)}getFloat64(P,U=this.le){return this.dataView.getFloat64(P,U)}getFloat(P,U=this.le){return this.dataView.getFloat32(P,U)}getDouble(P,U=this.le){return this.dataView.getFloat64(P,U)}getUintBytes(P,U,Z){switch(U){case 1:return this.getUint8(P,Z);case 2:return this.getUint16(P,Z);case 4:return this.getUint32(P,Z);case 8:return this.getUint64&&this.getUint64(P,Z)}}getUint(P,U,Z){switch(U){case 8:return this.getUint8(P,Z);case 16:return this.getUint16(P,Z);case 32:return this.getUint32(P,Z);case 64:return this.getUint64&&this.getUint64(P,Z)}}toString(P){return this.dataView.toString(P,this.constructor.name)}ensureChunk(){}}function A(Se,P){f(`${Se} '${P}' was not loaded, try using full build of exifr.`)}class C extends Map{constructor(P){super(),this.kind=P}get(P,U){return this.has(P)||A(this.kind,P),U&&(P in U||(function(Z,ue){f(`Unknown ${Z} '${ue}'.`)})(this.kind,P),U[P].enabled||A(this.kind,P)),super.get(P)}keyList(){return Array.from(this.keys())}}var k=new C("file parser"),T=new C("segment parser"),S=new C("file reader");let R=i.fetch;const B="Invalid input argument";function G(Se,P){return(U=Se).startsWith("data:")||U.length>1e4?Y(Se,P,"base64"):o&&Se.includes("://")?$(Se,P,"url",X):o?Y(Se,P,"fs"):a?$(Se,P,"url",X):void f(B);var U}async function $(Se,P,U,Z){return S.has(U)?Y(Se,P,U):Z?(async function(ue,Ie){let We=await Ie(ue);return new y(We)})(Se,Z):void f(`Parser ${U} is not loaded`)}async function Y(Se,P,U){let Z=new(S.get(U))(Se,P);return await Z.read(),Z}const X=Se=>R(Se).then((P=>P.arrayBuffer())),J=Se=>new Promise(((P,U)=>{let Z=new FileReader;Z.onloadend=()=>P(Z.result||new ArrayBuffer),Z.onerror=U,Z.readAsArrayBuffer(Se)}));class Q extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function oe(Se,P,U){let Z=new Q;for(let[ue,Ie]of U)Z.set(ue,Ie);if(Array.isArray(P))for(let ue of P)Se.set(ue,Z);else Se.set(P,Z);return Z}function se(Se,P,U){let Z,ue=Se.get(P);for(Z of U)ue.set(Z[0],Z[1])}const he=new Map,ye=new Map,Ue=new Map,Oe=37500,Te=37510,K=33723,ie=34675,de=34665,Be=34853,Ee=40965,ze=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],je=["jfif","xmp","icc","iptc","ihdr"],qe=["tiff",...je],Ge=["ifd0","ifd1","exif","gps","interop"],bt=[...qe,...Ge],rr=["makerNote","userComment"],Pr=["translateKeys","translateValues","reviveValues","multiSegment"],$t=[...Pr,"sanitize","mergeOutput","silentErrors"];class ar{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class St extends ar{get needed(){return this.enabled||this.deps.size>0}constructor(P,U,Z,ue){if(super(),n(this,"enabled",!1),n(this,"skip",new Set),n(this,"pick",new Set),n(this,"deps",new Set),n(this,"translateKeys",!1),n(this,"translateValues",!1),n(this,"reviveValues",!1),this.key=P,this.enabled=U,this.parse=this.enabled,this.applyInheritables(ue),this.canBeFiltered=Ge.includes(P),this.canBeFiltered&&(this.dict=he.get(P)),Z!==void 0)if(Array.isArray(Z))this.parse=this.enabled=!0,this.canBeFiltered&&Z.length>0&&this.translateTagSet(Z,this.pick);else if(typeof Z=="object"){if(this.enabled=!0,this.parse=Z.parse!==!1,this.canBeFiltered){let{pick:Ie,skip:We}=Z;Ie&&Ie.length>0&&this.translateTagSet(Ie,this.pick),We&&We.length>0&&this.translateTagSet(We,this.skip)}this.applyInheritables(Z)}else Z===!0||Z===!1?this.parse=this.enabled=Z:f(`Invalid options argument: ${Z}`)}applyInheritables(P){let U,Z;for(U of Pr)Z=P[U],Z!==void 0&&(this[U]=Z)}translateTagSet(P,U){if(this.dict){let Z,ue,{tagKeys:Ie,tagValues:We}=this.dict;for(Z of P)typeof Z=="string"?(ue=We.indexOf(Z),ue===-1&&(ue=Ie.indexOf(Number(Z))),ue!==-1&&U.add(Number(Ie[ue]))):U.add(Z)}else for(let Z of P)U.add(Z)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,fr(this.pick,this.deps)):this.enabled&&this.pick.size>0&&fr(this.pick,this.deps)}}var st={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Qr=new Map;class Sr extends ar{static useCached(P){let U=Qr.get(P);return U!==void 0||(U=new this(P),Qr.set(P,U)),U}constructor(P){super(),P===!0?this.setupFromTrue():P===void 0?this.setupFromUndefined():Array.isArray(P)?this.setupFromArray(P):typeof P=="object"?this.setupFromObject(P):f(`Invalid options argument ${P}`),this.firstChunkSize===void 0&&(this.firstChunkSize=a?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let P;for(P of ze)this[P]=st[P];for(P of $t)this[P]=st[P];for(P of rr)this[P]=st[P];for(P of bt)this[P]=new St(P,st[P],void 0,this)}setupFromTrue(){let P;for(P of ze)this[P]=st[P];for(P of $t)this[P]=st[P];for(P of rr)this[P]=!0;for(P of bt)this[P]=new St(P,!0,void 0,this)}setupFromArray(P){let U;for(U of ze)this[U]=st[U];for(U of $t)this[U]=st[U];for(U of rr)this[U]=st[U];for(U of bt)this[U]=new St(U,!1,void 0,this);this.setupGlobalFilters(P,void 0,Ge)}setupFromObject(P){let U;for(U of(Ge.ifd0=Ge.ifd0||Ge.image,Ge.ifd1=Ge.ifd1||Ge.thumbnail,Object.assign(this,P),ze))this[U]=nr(P[U],st[U]);for(U of $t)this[U]=nr(P[U],st[U]);for(U of rr)this[U]=nr(P[U],st[U]);for(U of qe)this[U]=new St(U,st[U],P[U],this);for(U of Ge)this[U]=new St(U,st[U],P[U],this.tiff);this.setupGlobalFilters(P.pick,P.skip,Ge,bt),P.tiff===!0?this.batchEnableWithBool(Ge,!0):P.tiff===!1?this.batchEnableWithUserValue(Ge,P):Array.isArray(P.tiff)?this.setupGlobalFilters(P.tiff,void 0,Ge):typeof P.tiff=="object"&&this.setupGlobalFilters(P.tiff.pick,P.tiff.skip,Ge)}batchEnableWithBool(P,U){for(let Z of P)this[Z].enabled=U}batchEnableWithUserValue(P,U){for(let Z of P){let ue=U[Z];this[Z].enabled=ue!==!1&&ue!==void 0}}setupGlobalFilters(P,U,Z,ue=Z){if(P&&P.length){for(let We of ue)this[We].enabled=!1;let Ie=gr(P,Z);for(let[We,wt]of Ie)fr(this[We].pick,wt),this[We].enabled=!0}else if(U&&U.length){let Ie=gr(U,Z);for(let[We,wt]of Ie)fr(this[We].skip,wt)}}filterNestedSegmentTags(){let{ifd0:P,exif:U,xmp:Z,iptc:ue,icc:Ie}=this;this.makerNote?U.deps.add(Oe):U.skip.add(Oe),this.userComment?U.deps.add(Te):U.skip.add(Te),Z.enabled||P.skip.add(700),ue.enabled||P.skip.add(K),Ie.enabled||P.skip.add(ie)}traverseTiffDependencyTree(){let{ifd0:P,exif:U,gps:Z,interop:ue}=this;ue.needed&&(U.deps.add(Ee),P.deps.add(Ee)),U.needed&&P.deps.add(de),Z.needed&&P.deps.add(Be),this.tiff.enabled=Ge.some((Ie=>this[Ie].enabled===!0))||this.makerNote||this.userComment;for(let Ie of Ge)this[Ie].finalizeFilters()}get onlyTiff(){return!je.map((P=>this[P].enabled)).some((P=>P===!0))&&this.tiff.enabled}checkLoadedPlugins(){for(let P of qe)this[P].enabled&&!T.has(P)&&A("segment parser",P)}}function gr(Se,P){let U,Z,ue,Ie,We=[];for(ue of P){for(Ie of(U=he.get(ue),Z=[],U))(Se.includes(Ie[0])||Se.includes(Ie[1]))&&Z.push(Ie[0]);Z.length&&We.push([ue,Z])}return We}function nr(Se,P){return Se!==void 0?Se:P!==void 0?P:void 0}function fr(Se,P){for(let U of P)Se.add(U)}n(Sr,"default",st);class Yt{constructor(P){n(this,"parsers",{}),n(this,"output",{}),n(this,"errors",[]),n(this,"pushToErrors",(U=>this.errors.push(U))),this.options=Sr.useCached(P)}async read(P){this.file=await(function(U,Z){return typeof U=="string"?G(U,Z):a&&!s&&U instanceof HTMLImageElement?G(U.src,Z):U instanceof Uint8Array||U instanceof ArrayBuffer||U instanceof DataView?new y(U):a&&U instanceof Blob?$(U,Z,"blob",J):void f(B)})(P,this.options)}setup(){if(this.fileParser)return;let{file:P}=this,U=P.getUint16(0);for(let[Z,ue]of k)if(ue.canHandle(P,U))return this.fileParser=new ue(this.options,this.file,this.parsers),P[Z]=!0;this.file.close&&this.file.close(),f("Unknown file format")}async parse(){let{output:P,errors:U}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),U.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&U.length>0&&(P.errors=U),h(Z=P)?void 0:Z;var Z}async executeParsers(){let{output:P}=this;await this.fileParser.parse();let U=Object.values(this.parsers).map((async Z=>{let ue=await Z.parse();Z.assignToOutput(P,ue)}));this.options.silentErrors&&(U=U.map((Z=>Z.catch(this.pushToErrors)))),await Promise.all(U)}async extractThumbnail(){this.setup();let{options:P,file:U}=this,Z=T.get("tiff",P);var ue;if(U.tiff?ue={start:0,type:"tiff"}:U.jpeg&&(ue=await this.fileParser.getOrFindSegment("tiff")),ue===void 0)return;let Ie=await this.fileParser.ensureSegmentChunk(ue),We=this.parsers.tiff=new Z(Ie,P,U),wt=await We.extractThumbnail();return U.close&&U.close(),wt}}async function Xt(Se,P){let U=new Yt(P);return await U.read(Se),U.parse()}var mt=Object.freeze({__proto__:null,parse:Xt,Exifr:Yt,fileParsers:k,segmentParsers:T,fileReaders:S,tagKeys:he,tagValues:ye,tagRevivers:Ue,createDictionary:oe,extendDictionary:se,fetchUrlAsArrayBuffer:X,readBlobAsArrayBuffer:J,chunkedProps:ze,otherSegments:je,segments:qe,tiffBlocks:Ge,segmentsAndBlocks:bt,tiffExtractables:rr,inheritables:Pr,allFormatters:$t,Options:Sr});class wr{static findPosition(P,U){let Z=P.getUint16(U+2)+2,ue=typeof this.headerLength=="function"?this.headerLength(P,U,Z):this.headerLength,Ie=U+ue,We=Z-ue;return{offset:U,length:Z,headerLength:ue,start:Ie,size:We,end:Ie+We}}static parse(P,U={}){return new this(P,new Sr({[this.type]:U}),P).parse()}normalizeInput(P){return P instanceof y?P:new y(P)}constructor(P,U={},Z){n(this,"errors",[]),n(this,"raw",new Map),n(this,"handleError",(ue=>{if(!this.options.silentErrors)throw ue;this.errors.push(ue.message)})),this.chunk=this.normalizeInput(P),this.file=Z,this.type=this.constructor.type,this.globalOptions=this.options=U,this.localOptions=U[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(P,U){let Z=Ue.get(U),ue=ye.get(U),Ie=he.get(U),We=this.options[U],wt=We.reviveValues&&!!Z,It=We.translateValues&&!!ue,Nt=We.translateKeys&&!!Ie,or={};for(let[Lt,ee]of P)wt&&Z.has(Lt)?ee=Z.get(Lt)(ee):It&&ue.has(Lt)&&(ee=this.translateValue(ee,ue.get(Lt))),Nt&&Ie.has(Lt)&&(Lt=Ie.get(Lt)||Lt),or[Lt]=ee;return or}translateValue(P,U){return U[P]||U.DEFAULT||P}assignToOutput(P,U){this.assignObjectToOutput(P,this.constructor.type,U)}assignObjectToOutput(P,U,Z){if(this.globalOptions.mergeOutput)return Object.assign(P,Z);P[U]?Object.assign(P[U],Z):P[U]=Z}}n(wr,"headerLength",4),n(wr,"type",void 0),n(wr,"multiSegment",!1),n(wr,"canHandle",(()=>!1));function an(Se){return Se===192||Se===194||Se===196||Se===219||Se===221||Se===218||Se===254}function _r(Se){return Se>=224&&Se<=239}function ir(Se,P,U){for(let[Z,ue]of T)if(ue.canHandle(Se,P,U))return Z}class Yr extends class{constructor(P,U,Z){n(this,"errors",[]),n(this,"ensureSegmentChunk",(async ue=>{let Ie=ue.start,We=ue.size||65536;if(this.file.chunked)if(this.file.available(Ie,We))ue.chunk=this.file.subarray(Ie,We);else try{ue.chunk=await this.file.readChunk(Ie,We)}catch(wt){f(`Couldn't read segment: ${JSON.stringify(ue)}. ${wt.message}`)}else this.file.byteLength>Ie+We?ue.chunk=this.file.subarray(Ie,We):ue.size===void 0?ue.chunk=this.file.subarray(Ie):f("Segment unreachable: "+JSON.stringify(ue));return ue.chunk})),this.extendOptions&&this.extendOptions(P),this.options=P,this.file=U,this.parsers=Z}injectSegment(P,U){this.options[P].enabled&&this.createParser(P,U)}createParser(P,U){let Z=new(T.get(P))(U,this.options,this.file);return this.parsers[P]=Z}createParsers(P){for(let U of P){let{type:Z,chunk:ue}=U,Ie=this.options[Z];if(Ie&&Ie.enabled){let We=this.parsers[Z];We&&We.append||We||this.createParser(Z,ue)}}}async readSegments(P){let U=P.map(this.ensureSegmentChunk);await Promise.all(U)}}{constructor(...P){super(...P),n(this,"appSegments",[]),n(this,"jpegSegments",[]),n(this,"unknownSegments",[])}static canHandle(P,U){return U===65496}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(P){P===!0?(this.findAll=!0,this.wanted=new Set(T.keyList())):(P=P===void 0?T.keyList().filter((U=>this.options[U].enabled)):P.filter((U=>this.options[U].enabled&&T.has(U))),this.findAll=!1,this.remaining=new Set(P),this.wanted=new Set(P)),this.unfinishedMultiSegment=!1}async findAppSegments(P=0,U){this.setupSegmentFinderArgs(U);let{file:Z,findAll:ue,wanted:Ie,remaining:We}=this;if(!ue&&this.file.chunked&&(ue=Array.from(Ie).some((wt=>{let It=T.get(wt),Nt=this.options[wt];return It.multiSegment&&Nt.multiSegment})),ue&&await this.file.readWhole()),P=this.findAppSegmentsInRange(P,Z.byteLength),!this.options.onlyTiff&&Z.chunked){let wt=!1;for(;We.size>0&&!wt&&(Z.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:It}=Z,Nt=this.appSegments.some((or=>!this.file.available(or.offset||or.start,or.length||or.size)));if(wt=P>It&&!Nt?!await Z.readNextChunk(P):!await Z.readNextChunk(It),(P=this.findAppSegmentsInRange(P,Z.byteLength))===void 0)return}}}findAppSegmentsInRange(P,U){U-=2;let Z,ue,Ie,We,wt,It,{file:Nt,findAll:or,wanted:Lt,remaining:ee,options:De}=this;for(;P<U;P++)if(Nt.getUint8(P)===255){if(Z=Nt.getUint8(P+1),_r(Z)){if(ue=Nt.getUint16(P+2),Ie=ir(Nt,P,ue),Ie&&Lt.has(Ie)&&(We=T.get(Ie),wt=We.findPosition(Nt,P),It=De[Ie],wt.type=Ie,this.appSegments.push(wt),!or&&(We.multiSegment&&It.multiSegment?(this.unfinishedMultiSegment=wt.chunkNumber<wt.chunkCount,this.unfinishedMultiSegment||ee.delete(Ie)):ee.delete(Ie),ee.size===0)))break;De.recordUnknownSegments&&(wt=wr.findPosition(Nt,P),wt.marker=Z,this.unknownSegments.push(wt)),P+=ue+1}else if(an(Z)){if(ue=Nt.getUint16(P+2),Z===218&&De.stopAfterSos!==!1)return;De.recordJpegSegments&&this.jpegSegments.push({offset:P,length:ue,marker:Z}),P+=ue+1}}return P}mergeMultiSegments(){if(!this.appSegments.some((U=>U.multiSegment)))return;let P=(function(U,Z){let ue,Ie,We,wt=new Map;for(let It=0;It<U.length;It++)ue=U[It],Ie=ue[Z],wt.has(Ie)?We=wt.get(Ie):wt.set(Ie,We=[]),We.push(ue);return Array.from(wt)})(this.appSegments,"type");this.mergedAppSegments=P.map((([U,Z])=>{let ue=T.get(U,this.options);return ue.handleMultiSegments?{type:U,chunk:ue.handleMultiSegments(Z)}:Z[0]}))}getSegment(P){return this.appSegments.find((U=>U.type===P))}async getOrFindSegment(P){let U=this.getSegment(P);return U===void 0&&(await this.findAppSegments(0,[P]),U=this.getSegment(P)),U}}n(Yr,"type","jpeg"),k.set("jpeg",Yr);const kr=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class Zr extends wr{parseHeader(){var P=this.chunk.getUint16();P===18761?this.le=!0:P===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(P,U,Z=new Map){let{pick:ue,skip:Ie}=this.options[U];ue=new Set(ue);let We=ue.size>0,wt=Ie.size===0,It=this.chunk.getUint16(P);P+=2;for(let Nt=0;Nt<It;Nt++){let or=this.chunk.getUint16(P);if(We){if(ue.has(or)&&(Z.set(or,this.parseTag(P,or,U)),ue.delete(or),ue.size===0))break}else!wt&&Ie.has(or)||Z.set(or,this.parseTag(P,or,U));P+=12}return Z}parseTag(P,U,Z){let{chunk:ue}=this,Ie=ue.getUint16(P+2),We=ue.getUint32(P+4),wt=kr[Ie];if(wt*We<=4?P+=8:P=ue.getUint32(P+8),(Ie<1||Ie>13)&&f(`Invalid TIFF value type. block: ${Z.toUpperCase()}, tag: ${U.toString(16)}, type: ${Ie}, offset ${P}`),P>ue.byteLength&&f(`Invalid TIFF value offset. block: ${Z.toUpperCase()}, tag: ${U.toString(16)}, type: ${Ie}, offset ${P} is outside of chunk size ${ue.byteLength}`),Ie===1)return ue.getUint8Array(P,We);if(Ie===2)return(It=(function(Nt){for(;Nt.endsWith("\0");)Nt=Nt.slice(0,-1);return Nt})(It=ue.getString(P,We)).trim())===""?void 0:It;var It;if(Ie===7)return ue.getUint8Array(P,We);if(We===1)return this.parseTagValue(Ie,P);{let Nt=new((function(Lt){switch(Lt){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}})(Ie))(We),or=wt;for(let Lt=0;Lt<We;Lt++)Nt[Lt]=this.parseTagValue(Ie,P),P+=or;return Nt}}parseTagValue(P,U){let{chunk:Z}=this;switch(P){case 1:return Z.getUint8(U);case 3:return Z.getUint16(U);case 4:return Z.getUint32(U);case 5:return Z.getUint32(U)/Z.getUint32(U+4);case 6:return Z.getInt8(U);case 8:return Z.getInt16(U);case 9:return Z.getInt32(U);case 10:return Z.getInt32(U)/Z.getInt32(U+4);case 11:return Z.getFloat(U);case 12:return Z.getDouble(U);case 13:return Z.getUint32(U);default:f(`Invalid tiff type ${P}`)}}}class Vr extends Zr{static canHandle(P,U){return P.getUint8(U+1)===225&&P.getUint32(U+4)===1165519206&&P.getUint16(U+8)===0}async parse(){this.parseHeader();let{options:P}=this;return P.ifd0.enabled&&await this.parseIfd0Block(),P.exif.enabled&&await this.safeParse("parseExifBlock"),P.gps.enabled&&await this.safeParse("parseGpsBlock"),P.interop.enabled&&await this.safeParse("parseInteropBlock"),P.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(P){let U=this[P]();return U.catch!==void 0&&(U=U.catch(this.handleError)),U}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let P=this.chunk.getUint16(this.ifd0Offset),U=this.ifd0Offset+2+12*P;this.ifd1Offset=this.chunk.getUint32(U)}}parseBlock(P,U){let Z=new Map;return this[U]=Z,this.parseTags(P,U,Z),Z}async parseIfd0Block(){if(this.ifd0)return;let{file:P}=this;this.findIfd0Offset(),this.ifd0Offset<8&&f("Malformed EXIF data"),!P.chunked&&this.ifd0Offset>P.byteLength&&f(`IFD0 offset points to outside of file.
158
158
  this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&await P.ensureChunk(this.ifd0Offset,d(this.options));let U=this.parseBlock(this.ifd0Offset,"ifd0");return U.size!==0?(this.exifOffset=U.get(de),this.interopOffset=U.get(Ee),this.gpsOffset=U.get(Be),this.xmp=U.get(700),this.iptc=U.get(K),this.icc=U.get(ie),this.options.sanitize&&(U.delete(de),U.delete(Ee),U.delete(Be),U.delete(700),U.delete(K),U.delete(ie)),U):void 0}async parseExifBlock(){if(this.exif||(this.ifd0||await this.parseIfd0Block(),this.exifOffset===void 0))return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,d(this.options));let P=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=P.get(Ee)),this.makerNote=P.get(Oe),this.userComment=P.get(Te),this.options.sanitize&&(P.delete(Ee),P.delete(Oe),P.delete(Te)),this.unpack(P,41728),this.unpack(P,41729),P}unpack(P,U){let Z=P.get(U);Z&&Z.length===1&&P.set(U,Z[0])}async parseGpsBlock(){if(this.gps||(this.ifd0||await this.parseIfd0Block(),this.gpsOffset===void 0))return;let P=this.parseBlock(this.gpsOffset,"gps");return P&&P.has(2)&&P.has(4)&&(P.set("latitude",pn(...P.get(2),P.get(1))),P.set("longitude",pn(...P.get(4),P.get(3)))),P}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),this.interopOffset!==void 0||this.exif||await this.parseExifBlock(),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(P=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||P))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),this.ifd1===void 0)return;let P=this.ifd1.get(513),U=this.ifd1.get(514);return this.chunk.getUint8Array(P,U)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let P,U,Z,ue={};for(U of Ge)if(P=this[U],!h(P))if(Z=this.canTranslate?this.translateBlock(P,U):Object.fromEntries(P),this.options.mergeOutput){if(U==="ifd1")continue;Object.assign(ue,Z)}else ue[U]=Z;return this.makerNote&&(ue.makerNote=this.makerNote),this.userComment&&(ue.userComment=this.userComment),ue}assignToOutput(P,U){if(this.globalOptions.mergeOutput)Object.assign(P,U);else for(let[Z,ue]of Object.entries(U))this.assignObjectToOutput(P,Z,ue)}}function pn(Se,P,U,Z){var ue=Se+P/60+U/3600;return Z!=="S"&&Z!=="W"||(ue*=-1),ue}n(Vr,"type","tiff"),n(Vr,"headerLength",10),T.set("tiff",Vr);var gn=Object.freeze({__proto__:null,default:mt,Exifr:Yt,fileParsers:k,segmentParsers:T,fileReaders:S,tagKeys:he,tagValues:ye,tagRevivers:Ue,createDictionary:oe,extendDictionary:se,fetchUrlAsArrayBuffer:X,readBlobAsArrayBuffer:J,chunkedProps:ze,otherSegments:je,segments:qe,tiffBlocks:Ge,segmentsAndBlocks:bt,tiffExtractables:rr,inheritables:Pr,allFormatters:$t,Options:Sr,parse:Xt});const Fr={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},zr=Object.assign({},Fr,{firstChunkSize:4e4,gps:[1,2,3,4]}),en=Object.assign({},Fr,{tiff:!1,ifd1:!0,mergeOutput:!1}),Hr=Object.assign({},Fr,{firstChunkSize:4e4,ifd0:[274]});async function zt(Se){let P=new Yt(Hr);await P.read(Se);let U=await P.parse();if(U&&U.ifd0)return U.ifd0[274]}const sr=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});if(t.rotateCanvas=!0,t.rotateCss=!0,typeof navigator=="object"){let Se=navigator.userAgent;if(Se.includes("iPad")||Se.includes("iPhone")){let P=Se.match(/OS (\d+)_(\d+)/);if(P){let[,U,Z]=P,ue=Number(U)+.1*Number(Z);t.rotateCanvas=ue<13.4,t.rotateCss=!1}}else if(Se.includes("OS X 10")){let[,P]=Se.match(/OS X 10[_.](\d+)/);t.rotateCanvas=t.rotateCss=Number(P)<15}if(Se.includes("Chrome/")){let[,P]=Se.match(/Chrome\/(\d+)/);t.rotateCanvas=t.rotateCss=Number(P)<81}else if(Se.includes("Firefox/")){let[,P]=Se.match(/Firefox\/(\d+)/);t.rotateCanvas=t.rotateCss=Number(P)<77}}class Er extends y{constructor(...P){super(...P),n(this,"ranges",new tt),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(P,U,Z){if(P===0&&this.byteLength===0&&Z){let ue=new DataView(Z.buffer||Z,Z.byteOffset,Z.byteLength);this._swapDataView(ue)}else{let ue=P+U;if(ue>this.byteLength){let{dataView:Ie}=this._extend(ue);this._swapDataView(Ie)}}}_extend(P){let U;U=u?l.allocUnsafe(P):new Uint8Array(P);let Z=new DataView(U.buffer,U.byteOffset,U.byteLength);return U.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:U,dataView:Z}}subarray(P,U,Z=!1){return U=U||this._lengthToEnd(P),Z&&this._tryExtend(P,U),this.ranges.add(P,U),super.subarray(P,U)}set(P,U,Z=!1){Z&&this._tryExtend(U,P.byteLength,P);let ue=super.set(P,U);return this.ranges.add(U,ue.byteLength),ue}async ensureChunk(P,U){this.chunked&&(this.ranges.available(P,U)||await this.readChunk(P,U))}available(P,U){return this.ranges.available(P,U)}}class tt{constructor(){n(this,"list",[])}get length(){return this.list.length}add(P,U,Z=0){let ue=P+U,Ie=this.list.filter((We=>Nr(P,We.offset,ue)||Nr(P,We.end,ue)));if(Ie.length>0){P=Math.min(P,...Ie.map((wt=>wt.offset))),ue=Math.max(ue,...Ie.map((wt=>wt.end))),U=ue-P;let We=Ie.shift();We.offset=P,We.length=U,We.end=ue,this.list=this.list.filter((wt=>!Ie.includes(wt)))}else this.list.push({offset:P,length:U,end:ue})}available(P,U){let Z=P+U;return this.list.some((ue=>ue.offset<=P&&Z<=ue.end))}}function Nr(Se,P,U){return Se<=P&&P<=U}class Xr extends Er{constructor(P,U){super(0),n(this,"chunksRead",0),this.input=P,this.options=U}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(P=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let U=this.options.chunkSize,Z=await this.readChunk(P,U);return!!Z&&Z.byteLength===U}async readChunk(P,U){if(this.chunksRead++,(U=this.safeWrapAddress(P,U))!==0)return this._readChunk(P,U)}safeWrapAddress(P,U){return this.size!==void 0&&P+U>this.size?Math.max(0,this.size-P):U}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}S.set("blob",class extends Xr{async readWhole(){this.chunked=!1;let Se=await J(this.input);this._swapArrayBuffer(Se)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(Se,P){let U=P?Se+P:void 0,Z=this.input.slice(Se,U),ue=await J(Z);return this.set(ue,Se,!0)}}),t.Exifr=Yt,t.Options=Sr,t.allFormatters=$t,t.chunkedProps=ze,t.createDictionary=oe,t.default=gn,t.extendDictionary=se,t.fetchUrlAsArrayBuffer=X,t.fileParsers=k,t.fileReaders=S,t.gps=async function(Se){let P=new Yt(zr);await P.read(Se);let U=await P.parse();if(U&&U.gps){let{latitude:Z,longitude:ue}=U.gps;return{latitude:Z,longitude:ue}}},t.gpsOnlyOptions=zr,t.inheritables=Pr,t.orientation=zt,t.orientationOnlyOptions=Hr,t.otherSegments=je,t.parse=Xt,t.readBlobAsArrayBuffer=J,t.rotation=async function(Se){let P=await zt(Se);return Object.assign({canvas:t.rotateCanvas,css:t.rotateCss},sr[P])},t.rotations=sr,t.segmentParsers=T,t.segments=qe,t.segmentsAndBlocks=bt,t.tagKeys=he,t.tagRevivers=Ue,t.tagValues=ye,t.thumbnail=async function(Se){let P=new Yt(en);await P.read(Se);let U=await P.extractThumbnail();return U&&u?l.from(U):U},t.thumbnailOnlyOptions=en,t.thumbnailUrl=async function(Se){let P=await this.thumbnail(Se);if(P!==void 0){let U=new Blob([P]);return URL.createObjectURL(U)}},t.tiffBlocks=Ge,t.tiffExtractables=rr,Object.defineProperty(t,"__esModule",{value:!0})}))})(Hf,Hf.exports)),Hf.exports}var XO=YO();let Kh=null;const JO=r=>new Promise(e=>{if(zg(r)!=="image/jpeg")return e(1);XO.orientation(r).then(n=>e(n||1)).catch(()=>e(1))}),KO=async()=>{if(Kh!==null)return!Kh;const e=await jd("data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k=");return Kh=e.width===2&&e.height===3,!Kh},ZO=r=>{const t=r.naturalWidth/r.naturalHeight;return r.naturalHeight<=8192&&r.naturalWidth<=8192?[r.naturalWidth,r.naturalHeight]:r.naturalHeight>r.naturalWidth?[t*8192,8192]:[8192,8192/t]},eB=async r=>{const e=await MO(r),t=await jd(e),[n,i]=ZO(t);if(!await KO()){const h=Eo(n,i);return h.getContext("2d")?.drawImage(t,0,0,n,i),h}const s=await JO(r),[o,l]=s>4?[i,n]:[n,i],u=Eo(o,l),c=u.getContext("2d");switch(s){case 2:c.translate(o,0),c.scale(-1,1);break;case 3:c.translate(o,l),c.rotate(Math.PI);break;case 4:c.translate(0,l),c.scale(1,-1);break;case 5:c.rotate(-.5*Math.PI),c.scale(-1,1);break;case 6:c.rotate(-.5*Math.PI),c.translate(-o,0);break;case 7:c.rotate(-.5*Math.PI),c.translate(-o,l),c.scale(1,-1);break;case 8:c.rotate(.5*Math.PI),c.translate(0,-l);break}return c.drawImage(t,0,0,o,l),u},Gd=async r=>{const e=await eB(r);return zg(r)==="image/jpeg"?{dataUrl:e.toDataURL("image/jpeg",1),height:e.height,width:e.width}:{dataUrl:e.toDataURL(),height:e.height,width:e.width}};var A0={},b0,aC;function tB(){if(aC)return b0;aC=1;var r=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g;b0=function(n,i){i=i||{};var a=1,s=1;function o(ie){var de=ie.match(/\n/g);de&&(a+=de.length);var Be=ie.lastIndexOf(`
159
- `);s=~Be?ie.length-Be:s+ie.length}function l(){var ie={line:a,column:s};return function(de){return de.position=new u(ie),A(),de}}function u(ie){this.start=ie,this.end={line:a,column:s},this.source=i.source}u.prototype.content=n;var c=[];function h(ie){var de=new Error(i.source+":"+a+":"+s+": "+ie);if(de.reason=ie,de.filename=i.source,de.line=a,de.column=s,de.source=n,i.silent)c.push(de);else throw de}function f(){var ie=v();return{type:"stylesheet",stylesheet:{source:i.source,rules:ie,parsingErrors:c}}}function d(){return y(/^{\s*/)}function g(){return y(/^}/)}function v(){var ie,de=[];for(A(),C(de);n.length&&n.charAt(0)!="}"&&(ie=Te()||K());)ie!==!1&&(de.push(ie),C(de));return de}function y(ie){var de=ie.exec(n);if(de){var Be=de[0];return o(Be),n=n.slice(Be.length),de}}function A(){y(/^\s*/)}function C(ie){var de;for(ie=ie||[];de=k();)de!==!1&&ie.push(de);return ie}function k(){var ie=l();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var de=2;n.charAt(de)!=""&&(n.charAt(de)!="*"||n.charAt(de+1)!="/");)++de;if(de+=2,n.charAt(de-1)==="")return h("End of comment missing");var Be=n.slice(2,de-2);return s+=2,o(Be),n=n.slice(de),s+=2,ie({type:"comment",comment:Be})}}function T(){var ie=y(/^([^{]+)/);if(ie)return e(ie[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(de){return de.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(de){return de.replace(/\u200C/g,",")})}function S(){var ie=l(),de=y(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(de){if(de=e(de[0]),!y(/^:\s*/))return h("property missing ':'");var Be=y(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),Ee=ie({type:"declaration",property:de.replace(r,""),value:Be?e(Be[0]).replace(r,""):""});return y(/^[;\s]*/),Ee}}function R(){var ie=[];if(!d())return h("missing '{'");C(ie);for(var de;de=S();)de!==!1&&(ie.push(de),C(ie));return g()?ie:h("missing '}'")}function B(){for(var ie,de=[],Be=l();ie=y(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)de.push(ie[1]),y(/^,\s*/);if(de.length)return Be({type:"keyframe",values:de,declarations:R()})}function G(){var ie=l(),Be=y(/^@([-\w]+)?keyframes\s*/);if(Be){var de=Be[1],Be=y(/^([-\w]+)\s*/);if(!Be)return h("@keyframes missing name");var Ee=Be[1];if(!d())return h("@keyframes missing '{'");for(var ze,je=C();ze=B();)je.push(ze),je=je.concat(C());return g()?ie({type:"keyframes",name:Ee,vendor:de,keyframes:je}):h("@keyframes missing '}'")}}function $(){var ie=l(),de=y(/^@supports *([^{]+)/);if(de){var Be=e(de[1]);if(!d())return h("@supports missing '{'");var Ee=C().concat(v());return g()?ie({type:"supports",supports:Be,rules:Ee}):h("@supports missing '}'")}}function Y(){var ie=l(),de=y(/^@host\s*/);if(de){if(!d())return h("@host missing '{'");var Be=C().concat(v());return g()?ie({type:"host",rules:Be}):h("@host missing '}'")}}function X(){var ie=l(),de=y(/^@media *([^{]+)/);if(de){var Be=e(de[1]);if(!d())return h("@media missing '{'");var Ee=C().concat(v());return g()?ie({type:"media",media:Be,rules:Ee}):h("@media missing '}'")}}function J(){var ie=l(),de=y(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(de)return ie({type:"custom-media",name:e(de[1]),media:e(de[2])})}function Q(){var ie=l(),de=y(/^@page */);if(de){var Be=T()||[];if(!d())return h("@page missing '{'");for(var Ee=C(),ze;ze=S();)Ee.push(ze),Ee=Ee.concat(C());return g()?ie({type:"page",selectors:Be,declarations:Ee}):h("@page missing '}'")}}function oe(){var ie=l(),de=y(/^@([-\w]+)?document *([^{]+)/);if(de){var Be=e(de[1]),Ee=e(de[2]);if(!d())return h("@document missing '{'");var ze=C().concat(v());return g()?ie({type:"document",document:Ee,vendor:Be,rules:ze}):h("@document missing '}'")}}function se(){var ie=l(),de=y(/^@font-face\s*/);if(de){if(!d())return h("@font-face missing '{'");for(var Be=C(),Ee;Ee=S();)Be.push(Ee),Be=Be.concat(C());return g()?ie({type:"font-face",declarations:Be}):h("@font-face missing '}'")}}var he=Oe("import"),ye=Oe("charset"),Ue=Oe("namespace");function Oe(ie){var de=new RegExp("^@"+ie+"\\s*([^;]+);");return function(){var Be=l(),Ee=y(de);if(Ee){var ze={type:ie};return ze[ie]=Ee[1].trim(),Be(ze)}}}function Te(){if(n[0]=="@")return G()||X()||J()||$()||he()||ye()||Ue()||oe()||Q()||Y()||se()}function K(){var ie=l(),de=T();return de?(C(),ie({type:"rule",selectors:de,declarations:R()})):h("selector missing")}return t(f())};function e(n){return n?n.replace(/^\s+|\s+$/g,""):""}function t(n,i){var a=n&&typeof n.type=="string",s=a?n:i;for(var o in n){var l=n[o];Array.isArray(l)?l.forEach(function(u){t(u,s)}):l&&typeof l=="object"&&t(l,s)}return a&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),n}return b0}var sC;function rB(){return sC||(sC=1,A0.parse=tB()),A0}var Wk=rB();function Ro(r){return Array.isArray?Array.isArray(r):Yk(r)==="[object Array]"}function nB(r){if(typeof r=="string")return r;if(typeof r=="bigint")return r.toString();const e=r+"";return e=="0"&&1/r==-1/0?"-0":e}function Dy(r){return r==null?"":nB(r)}function Vi(r){return typeof r=="string"}function Wp(r){return typeof r=="number"}function iB(r){return r===!0||r===!1||aB(r)&&Yk(r)=="[object Boolean]"}function Qk(r){return typeof r=="object"}function aB(r){return Qk(r)&&r!==null}function Gi(r){return r!=null}function Zh(r){return!r.trim().length}function Yk(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const sB="Incorrect 'index' type",oB=r=>`Invalid value for key ${r}`,lB=r=>`Pattern length exceeds max of ${r}.`,uB=r=>`Missing ${r} property in key`,cB=r=>`Property 'weight' in key '${r}' must be a positive integer`,oC=Object.prototype.hasOwnProperty;class fB{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=Xk(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Xk(r){let e=null,t=null,n=null,i=1,a=null;if(Vi(r)||Ro(r))n=r,e=lC(r),t=Py(r);else{if(!oC.call(r,"name"))throw new Error(uB("name"));const s=r.name;if(n=s,oC.call(r,"weight")&&(i=r.weight,i<=0))throw new Error(cB(s));e=lC(s),t=Py(s),a=r.getFn}return{path:e,id:t,weight:i,src:n,getFn:a}}function lC(r){return Ro(r)?r:r.split(".")}function Py(r){return Ro(r)?r.join("."):r}function dB(r,e){const t=[];let n=!1;const i=(a,s,o,l)=>{if(Gi(a))if(!s[o])t.push(l!==void 0?{v:a,i:l}:a);else{const u=s[o],c=a[u];if(!Gi(c))return;if(o===s.length-1&&(Vi(c)||Wp(c)||iB(c)||typeof c=="bigint"))t.push(l!==void 0?{v:Dy(c),i:l}:Dy(c));else if(Ro(c)){n=!0;for(let h=0,f=c.length;h<f;h+=1)i(c[h],s,o+1,h)}else s.length&&i(c,s,o+1,l)}};return i(r,Vi(e)?e.split("."):e,0),n?t:t[0]}const hB={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},pB={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},gB={location:0,threshold:.6,distance:100},mB={useExtendedSearch:!1,useTokenSearch:!1,getFn:dB,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Wt=Object.freeze({...pB,...hB,...gB,...mB}),vB=/[^ ]+/g;function yB(r=1,e=3){const t=new Map,n=Math.pow(10,e);return{get(i){const a=i.match(vB).length;if(t.has(a))return t.get(a);const s=1/Math.pow(a,.5*r),o=parseFloat(Math.round(s*n)/n);return t.set(a,o),o},clear(){t.clear()}}}class GA{constructor({getFn:e=Wt.getFn,fieldNormWeight:t=Wt.fieldNormWeight}={}){this.norm=yB(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Vi(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();Vi(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i=t}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Gi(e)||Zh(e))return;const n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){const n={i:t,$:{}};this.keys.forEach((i,a)=>{const s=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Gi(s)){if(Ro(s)){const o=[];for(let l=0,u=s.length;l<u;l+=1){const c=s[l];if(Gi(c)){if(Vi(c)){if(!Zh(c)){const h={v:c,i:l,n:this.norm.get(c)};o.push(h)}}else if(Gi(c.v)){const h=Vi(c.v)?c.v:Dy(c.v);if(!Zh(h)){const f={v:h,i:c.i,n:this.norm.get(h)};o.push(f)}}}}n.$[a]=o}else if(Vi(s)&&!Zh(s)){const o={v:s,n:this.norm.get(s)};n.$[a]=o}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function Jk(r,e,{getFn:t=Wt.getFn,fieldNormWeight:n=Wt.fieldNormWeight}={}){const i=new GA({getFn:t,fieldNormWeight:n});return i.setKeys(r.map(Xk)),i.setSources(e),i.create(),i}function AB(r,{getFn:e=Wt.getFn,fieldNormWeight:t=Wt.fieldNormWeight}={}){const{keys:n,records:i}=r,a=new GA({getFn:e,fieldNormWeight:t});return a.setKeys(n),a.setIndexRecords(i),a}function bB(r=[],e=Wt.minMatchCharLength){const t=[];let n=-1,i=-1,a=0;for(let s=r.length;a<s;a+=1){const o=r[a];o&&n===-1?n=a:!o&&n!==-1&&(i=a-1,i-n+1>=e&&t.push([n,i]),n=-1)}return r[a-1]&&a-n>=e&&t.push([n,a-1]),t}const vl=32;function wB(r,e,t,{location:n=Wt.location,distance:i=Wt.distance,threshold:a=Wt.threshold,findAllMatches:s=Wt.findAllMatches,minMatchCharLength:o=Wt.minMatchCharLength,includeMatches:l=Wt.includeMatches,ignoreLocation:u=Wt.ignoreLocation}={}){if(e.length>vl)throw new Error(lB(vl));const c=e.length,h=r.length,f=Math.max(0,Math.min(n,h));let d=a,g=f;const v=(G,$)=>{const Y=G/c;if(u)return Y;const X=Math.abs(f-$);return i?Y+X/i:X?1:Y},y=o>1||l,A=y?Array(h):[];let C;for(;(C=r.indexOf(e,g))>-1;){const G=v(0,C);if(d=Math.min(G,d),g=C+c,y){let $=0;for(;$<c;)A[C+$]=1,$+=1}}g=-1;let k=[],T=1,S=c+h;const R=1<<c-1;for(let G=0;G<c;G+=1){let $=0,Y=S;for(;$<Y;)v(G,f+Y)<=d?$=Y:S=Y,Y=Math.floor((S-$)/2+$);S=Y;let X=Math.max(1,f-Y+1);const J=s?h:Math.min(f+Y,h)+c,Q=Array(J+2);Q[J+1]=(1<<G)-1;for(let se=J;se>=X;se-=1){const he=se-1,ye=t[r[he]];if(y&&(A[he]=+!!ye),Q[se]=(Q[se+1]<<1|1)&ye,G&&(Q[se]|=(k[se+1]|k[se])<<1|1|k[se+1]),Q[se]&R&&(T=v(G,he),T<=d)){if(d=T,g=he,g<=f)break;X=Math.max(1,2*f-g)}}if(v(G+1,f)>d)break;k=Q}const B={isMatch:g>=0,score:Math.max(.001,T)};if(y){const G=bB(A,o);G.length?l&&(B.indices=G):B.isMatch=!1}return B}function CB(r){const e={};for(let t=0,n=r.length;t<n;t+=1){const i=r.charAt(t);e[i]=(e[i]||0)|1<<n-t-1}return e}function $A(r){if(r.length<=1)return r;r.sort((t,n)=>t[0]-n[0]||t[1]-n[1]);const e=[r[0]];for(let t=1,n=r.length;t<n;t+=1){const i=e[e.length-1],a=r[t];a[0]<=i[1]+1?i[1]=Math.max(i[1],a[1]):e.push(a)}return e}const Kk={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},xB=new RegExp("["+Object.keys(Kk).join("")+"]","g"),bd=String.prototype.normalize?r=>r.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(xB,e=>Kk[e]):r=>r;class qA{constructor(e,{location:t=Wt.location,threshold:n=Wt.threshold,distance:i=Wt.distance,includeMatches:a=Wt.includeMatches,findAllMatches:s=Wt.findAllMatches,minMatchCharLength:o=Wt.minMatchCharLength,isCaseSensitive:l=Wt.isCaseSensitive,ignoreDiacritics:u=Wt.ignoreDiacritics,ignoreLocation:c=Wt.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:c},e=l?e:e.toLowerCase(),e=u?bd(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const h=(d,g)=>{this.chunks.push({pattern:d,alphabet:CB(d),startIndex:g})},f=this.pattern.length;if(f>vl){let d=0;const g=f%vl,v=f-g;for(;d<v;)h(this.pattern.substr(d,vl),d),d+=vl;if(g){const y=f-vl;h(this.pattern.substr(y),y)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=n?bd(e):e,this.pattern===e){const v={isMatch:!0,score:0};return i&&(v.indices=[[0,e.length-1]]),v}const{location:a,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:u,ignoreLocation:c}=this.options,h=[];let f=0,d=!1;this.chunks.forEach(({pattern:v,alphabet:y,startIndex:A})=>{const{isMatch:C,score:k,indices:T}=wB(e,v,y,{location:a+A,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:u,includeMatches:i,ignoreLocation:c});C&&(d=!0),f+=k,C&&T&&h.push(...T)});const g={isMatch:d,score:d?f/this.chunks.length:1};return d&&i&&(g.indices=$A(h)),g}}class Oo{constructor(e){this.pattern=e}static isMultiMatch(e){return uC(e,this.multiRegex)}static isSingleMatch(e){return uC(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function uC(r,e){const t=r.match(e);return t?t[1]:null}class SB extends Oo{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class EB extends Oo{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class kB extends Oo{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class FB extends Oo{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class TB extends Oo{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class IB extends Oo{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Zk extends Oo{constructor(e,{location:t=Wt.location,threshold:n=Wt.threshold,distance:i=Wt.distance,includeMatches:a=Wt.includeMatches,findAllMatches:s=Wt.findAllMatches,minMatchCharLength:o=Wt.minMatchCharLength,isCaseSensitive:l=Wt.isCaseSensitive,ignoreDiacritics:u=Wt.ignoreDiacritics,ignoreLocation:c=Wt.ignoreLocation}={}){super(e),this._bitapSearch=new qA(e,{location:t,threshold:n,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class eF extends Oo{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n;const i=[],a=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+a,i.push([n,t-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}}const Ry=[SB,eF,kB,FB,IB,TB,EB,Zk],cC=Ry.length,DB="\0",PB="|";function RB(r){const e=[],t=r.length;let n=0;for(;n<t;){for(;n<t&&r[n]===" ";)n++;if(n>=t)break;let i=n;for(;i<t&&r[i]!==" "&&r[i]!=='"';)i++;if(i<t&&r[i]==='"'){for(i++;i<t;){if(r[i]==='"'){const a=i+1;if(a>=t||r[a]===" "){i++;break}if(r[a]==="$"&&(a+1>=t||r[a+1]===" ")){i+=2;break}}i++}e.push(r.substring(n,i)),n=i}else{for(;i<t&&r[i]!==" ";)i++;e.push(r.substring(n,i)),n=i}}return e}function OB(r,e={}){return r.replace(/\\\|/g,DB).split(PB).map(n=>{const i=n.replace(/\u0000/g,"|"),a=RB(i.trim()).filter(o=>o&&!!o.trim()),s=[];for(let o=0,l=a.length;o<l;o+=1){const u=a[o];let c=!1,h=-1;for(;!c&&++h<cC;){const f=Ry[h],d=f.isMultiMatch(u);d&&(s.push(new f(d,e)),c=!0)}if(!c)for(h=-1;++h<cC;){const f=Ry[h],d=f.isSingleMatch(u);if(d){s.push(new f(d,e));break}}}return s})}const BB=new Set([Zk.type,eF.type]);class MB{constructor(e,{isCaseSensitive:t=Wt.isCaseSensitive,ignoreDiacritics:n=Wt.ignoreDiacritics,includeMatches:i=Wt.includeMatches,minMatchCharLength:a=Wt.minMatchCharLength,ignoreLocation:s=Wt.ignoreLocation,findAllMatches:o=Wt.findAllMatches,location:l=Wt.location,threshold:u=Wt.threshold,distance:c=Wt.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:a,findAllMatches:o,ignoreLocation:s,location:l,threshold:u,distance:c},e=t?e:e.toLowerCase(),e=n?bd(e):e,this.pattern=e,this.query=OB(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:a}=this.options;e=i?e:e.toLowerCase(),e=a?bd(e):e;let s=0;const o=[];let l=0,u=!1;for(let c=0,h=t.length;c<h;c+=1){const f=t[c];o.length=0,s=0,u=!1;for(let d=0,g=f.length;d<g;d+=1){const v=f[d],{isMatch:y,indices:A,score:C}=v.search(e);if(y){s+=1,l+=C;const k=v.constructor.type;k.startsWith("inverse")&&(u=!0),n&&(BB.has(k)?o.push(...A):o.push(A))}else{l=0,s=0,o.length=0,u=!1;break}}if(s){const d={isMatch:!0,score:l/s};return u&&(d.hasInverse=!0),n&&(d.indices=$A(o)),d}}return{isMatch:!1,score:1}}}const Oy=[];function WA(...r){Oy.push(...r)}function lg(r,e){for(let t=0,n=Oy.length;t<n;t+=1){const i=Oy[t];if(i.condition(r,e))return new i(r,e)}return new qA(r,e)}const ug={AND:"$and",OR:"$or"},By={PATH:"$path",PATTERN:"$val"},My=r=>!!(r[ug.AND]||r[ug.OR]),_B=r=>!!r[By.PATH],NB=r=>!Ro(r)&&Qk(r)&&!My(r),fC=r=>({[ug.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function tF(r,e,{auto:t=!0}={}){const n=i=>{if(Vi(i)){const l={keyId:null,pattern:i};return t&&(l.searcher=lg(i,e)),l}const a=Object.keys(i),s=_B(i);if(!s&&a.length>1&&!My(i))return n(fC(i));if(NB(i)){const l=s?i[By.PATH]:a[0],u=s?i[By.PATTERN]:i[l];if(!Vi(u))throw new Error(oB(l));const c={keyId:Py(l),pattern:u};return t&&(c.searcher=lg(u,e)),c}const o={children:[],operator:a[0]};return a.forEach(l=>{const u=i[l];Ro(u)&&u.forEach(c=>{o.children.push(n(c))})}),o};return My(r)||(r=fC(r)),n(r)}function _y(r,{ignoreFieldNorm:e=Wt.ignoreFieldNorm}){let t=1;return r.forEach(({key:n,norm:i,score:a})=>{const s=n?n.weight:null;t*=Math.pow(a===0&&s?Number.EPSILON:a,(s||1)*(e?1:i))}),t}function LB(r,{ignoreFieldNorm:e=Wt.ignoreFieldNorm}){r.forEach(t=>{t.score=_y(t.matches,{ignoreFieldNorm:e})})}class UB{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(t[e].score<=t[n].score)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const a=2*e+1,s=2*e+2;if(a<n&&t[a].score>t[i].score&&(i=a),s<n&&t[s].score>t[i].score&&(i=s),i!==e){const o=t[e];t[e]=t[i],t[i]=o}}while(i!==e)}}function VB(r,e){const t=r.matches;e.matches=[],Gi(t)&&t.forEach(n=>{if(!Gi(n.indices)||!n.indices.length)return;const{indices:i,value:a}=n,s={indices:i,value:a};n.key&&(s.key=n.key.src),n.idx>-1&&(s.refIndex=n.idx),e.matches.push(s)})}function zB(r,e){e.score=r.score}function HB(r,e,{includeMatches:t=Wt.includeMatches,includeScore:n=Wt.includeScore}={}){const i=[];return t&&i.push(VB),n&&i.push(zB),r.map(a=>{const{idx:s}=a,o={item:e[s],refIndex:s};return i.length&&i.forEach(l=>{l(a,o)}),o})}const jB=/\b\w+\b/g;function Ny({isCaseSensitive:r=!1,ignoreDiacritics:e=!1}={}){return{tokenize(t){return r||(t=t.toLowerCase()),e&&(t=bd(t)),t.match(jB)||[]}}}function GB(r,e,t){const n=new Map,i=new Map;let a=0;function s(o,l,u,c){const h=t.tokenize(o);if(!h.length)return;a++;const f=new Map;for(const d of h)f.set(d,(f.get(d)||0)+1);for(const[d,g]of f){const v={docIdx:l,keyIdx:u,subIdx:c,tf:g};let y=n.get(d);y||(y=[],n.set(d,y)),y.push(v),i.set(d,(i.get(d)||0)+1)}}for(const o of r){const{i:l,v:u,$:c}=o;if(u!==void 0){s(u,l,-1,-1);continue}if(c)for(let h=0;h<e;h++){const f=c[h];if(f)if(Array.isArray(f))for(const d of f)s(d.v,l,h,d.i??-1);else s(f.v,l,h,-1)}}return{terms:n,fieldCount:a,df:i}}function $B(r,e,t,n){const{i,v:a,$:s}=e;function o(l,u,c){const h=n.tokenize(l);if(!h.length)return;r.fieldCount++;const f=new Map;for(const d of h)f.set(d,(f.get(d)||0)+1);for(const[d,g]of f){const v={docIdx:i,keyIdx:u,subIdx:c,tf:g};let y=r.terms.get(d);y||(y=[],r.terms.set(d,y)),y.push(v),r.df.set(d,(r.df.get(d)||0)+1)}}if(a!==void 0){o(a,-1,-1);return}if(s)for(let l=0;l<t;l++){const u=s[l];if(u)if(Array.isArray(u))for(const c of u)o(c.v,l,c.i??-1);else o(u.v,l,-1)}}function dC(r,e){for(const[t,n]of r.terms){const i=n.filter(s=>s.docIdx!==e),a=n.length-i.length;a>0&&(r.fieldCount-=a,r.df.set(t,(r.df.get(t)||0)-a),i.length===0?(r.terms.delete(t),r.df.delete(t)):r.terms.set(t,i))}}class Bo{constructor(e,t,n){this.options={...Wt,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new fB(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options,n=lg(e,t);return this._lastQuery=e,this._lastSearcher=n,n}setCollection(e,t){if(this._docs=e,t&&!(t instanceof GA))throw new Error(sB);if(this._myIndex=t||Jk(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=Ny({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=GB(this._myIndex.records,this._myIndex.keys.length,n)}}add(e){if(Gi(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){const t=this._myIndex.records[this._myIndex.records.length-1],n=Ny({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});$B(this._invertedIndex,t,this._myIndex.keys.length,n)}}remove(e=()=>!1){const t=[],n=[];for(let i=0,a=this._docs.length;i<a;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),n.push(i));if(n.length){if(this._invertedIndex)for(const i of n)dC(this._invertedIndex,i);for(let i=n.length-1;i>=0;i-=1)this._docs.splice(n[i],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&dC(this._invertedIndex,e);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:a,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;if(Vi(e)&&!e.trim()){let h=this._docs.map((f,d)=>({item:f,refIndex:d}));return Wp(n)&&n>-1&&(h=h.slice(0,n)),h}const u=Wp(n)&&n>0&&Vi(e);let c;if(u){const h=new UB(n);Vi(this._docs[0])?this._searchStringList(e,{heap:h,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:h,ignoreFieldNorm:l}),c=h.extractSorted(o)}else c=Vi(e)?Vi(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),LB(c,{ignoreFieldNorm:l}),s&&c.sort(o),Wp(n)&&n>-1&&(c=c.slice(0,n));return HB(c,this._docs,{includeMatches:i,includeScore:a})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),{records:a}=this._myIndex,s=t?null:[];return a.forEach(({v:o,i:l,n:u})=>{if(!Gi(o))return;const{isMatch:c,score:h,indices:f}=i.searchIn(o);if(c){const d={item:o,idx:l,matches:[{score:h,value:o,norm:u,indices:f}]};t?(d.score=_y(d.matches,{ignoreFieldNorm:n}),t.shouldInsert(d.score)&&t.insert(d)):s.push(d)}}),s}_searchLogical(e){const t=tF(e,this.options),n=(o,l,u)=>{if(!("children"in o)){const{keyId:d,searcher:g}=o;let v;return d===null?(v=[],this._myIndex.keys.forEach((y,A)=>{v.push(...this._findMatches({key:y,value:l[A],searcher:g}))})):v=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:g}),v&&v.length?[{idx:u,item:l,matches:v}]:[]}const{children:c,operator:h}=o,f=[];for(let d=0,g=c.length;d<g;d+=1){const v=c[d],y=n(v,l,u);if(y.length)f.push(...y);else if(h===ug.AND)return[]}return f},i=this._myIndex.records,a=new Map,s=[];return i.forEach(({$:o,i:l})=>{if(Gi(o)){const u=n(t,o,l);u.length&&(a.has(l)||(a.set(l,{idx:l,item:o,matches:[]}),s.push(a.get(l))),u.forEach(({matches:c})=>{a.get(l).matches.push(...c)}))}}),s}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),{keys:a,records:s}=this._myIndex,o=t?null:[];return s.forEach(({$:l,i:u})=>{if(!Gi(l))return;const c=[];let h=!1,f=!1;if(a.forEach((d,g)=>{const v=this._findMatches({key:d,value:l[g],searcher:i});v.length?(c.push(...v),v[0].hasInverse&&(f=!0)):h=!0}),!(f&&h)&&c.length){const d={idx:u,item:l,matches:c};t?(d.score=_y(d.matches,{ignoreFieldNorm:n}),t.shouldInsert(d.score)&&t.insert(d)):o.push(d)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!Gi(t))return[];const i=[];if(Ro(t))t.forEach(({v:a,i:s,n:o})=>{if(!Gi(a))return;const{isMatch:l,score:u,indices:c,hasInverse:h}=n.searchIn(a);l&&i.push({score:u,key:e,value:a,idx:s,norm:o,indices:c,hasInverse:h})});else{const{v:a,n:s}=t,{isMatch:o,score:l,indices:u,hasInverse:c}=n.searchIn(a);o&&i.push({score:l,key:e,value:a,norm:s,indices:u,hasInverse:c})}return i}}class qB{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Ny({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});const n=this.analyzer.tokenize(e),i=t._invertedIndex,{df:a,fieldCount:s}=i;this.termSearchers=[],this.idfWeights=[];for(const o of n){this.termSearchers.push(new qA(o,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const l=a.get(o)||0,u=Math.log(1+(s-l+.5)/(l+.5));this.idfWeights.push(u)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,a=0;for(let l=0;l<this.termSearchers.length;l++){const u=this.termSearchers[l].searchIn(e),c=this.idfWeights[l];i+=c,u.isMatch&&(a++,n+=c*(1-u.score),u.indices&&t.push(...u.indices))}if(a===0)return{isMatch:!1,score:1};const s=i>0?1-n/i:0,o={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(o.indices=$A(t)),o}}Bo.version="7.3.0";Bo.createIndex=Jk;Bo.parseIndex=AB;Bo.config=Wt;Bo.match=function(r,e,t){return lg(r,{...Wt,...t}).searchIn(e)};Bo.parseQuery=tF;WA(MB);WA(qB);Bo.use=function(...r){r.forEach(e=>WA(e))};const wd=["Yellow C","Yellow 012 C","Orange 021 C","Warm Red C","Red 032 C","Rubine Red C","Rhodamine Red C","Purple C","Violet C","Blue 072 C","Reflex Blue C","Process Blue C","Green C","Black C","Yellow 0131 C","Red 0331 C","Magenta 0521 C","Violet 0631 C","Blue 0821 C","Green 0921 C","Black 0961 C","801 C","802 C","803 C","804 C","805 C","806 C","807 C","871 C","872 C","873 C","874 C","875 C","876 C","877 C","Medium Yellow C","Bright Orange C","Bright Red C","Strong Red C","Pink C","Medium Purple C","Dark Blue C","Medium Blue C","Bright Green C","Neutral Black C","100 C","101 C","102 C","103 C","104 C","105 C","7401 C","7402 C","7403 C","7404 C","7405 C","7406 C","7407 C","106 C","107 C","108 C","109 C","110 C","111 C","112 C","113 C","114 C","115 C","116 C","117 C","118 C","119 C","127 C","128 C","129 C","130 C","131 C","132 C","133 C","1205 C","1215 C","1225 C","1235 C","1245 C","1255 C","1265 C","120 C","121 C","122 C","123 C","124 C","125 C","126 C","7548 C","7549 C","7550 C","7551 C","7552 C","7553 C","7554 C","7555 C","7556 C","7557 C","7558 C","7559 C","7560 C","7561 C","134 C","135 C","136 C","137 C","138 C","139 C","140 C","1345 C","1355 C","1365 C","1375 C","1385 C","1395 C","1405 C","141 C","142 C","143 C","144 C","145 C","146 C","147 C","7408 C","7409 C","7410 C","7411 C","7412 C","7413 C","7414 C","7562 C","7563 C","7564 C","7565 C","7566 C","7567 C","7568 C","7569 C","7570 C","7571 C","7572 C","7573 C","7574 C","7575 C","712 C","713 C","714 C","715 C","716 C","717 C","718 C","148 C","149 C","150 C","151 C","152 C","153 C","154 C","155 C","156 C","157 C","158 C","159 C","160 C","161 C","1485 C","1495 C","1505 C","1525 C","1535 C","1545 C","1555 C","1565 C","1575 C","1585 C","1595 C","1605 C","1615 C","162 C","163 C","164 C","165 C","166 C","167 C","168 C","7576 C","7577 C","7578 C","7579 C","7580 C","7581 C","7582 C","1625 C","1635 C","1645 C","1655 C","1665 C","1675 C","1685 C","169 C","170 C","171 C","172 C","173 C","174 C","175 C","7583 C","7584 C","7585 C","7586 C","7587 C","7588 C","7589 C","7590 C","7591 C","7592 C","7593 C","7594 C","7595 C","7596 C","7597 C","7598 C","7599 C","7600 C","7601 C","7602 C","7603 C","7604 C","7605 C","7606 C","7607 C","7608 C","7609 C","7610 C","7611 C","7612 C","7613 C","7614 C","7615 C","7616 C","7617 C","7520 C","7521 C","7522 C","7523 C","7524 C","7525 C","7526 C","489 C","488 C","487 C","486 C","485 C","484 C","483 C","176 C","177 C","178 C","179 C","180 C","181 C","1765 C","1775 C","1785 C","1788 C","1795 C","1805 C","1815 C","1767 C","1777 C","1787 C","1797 C","1807 C","1817 C","7618 C","7619 C","7620 C","7621 C","7622 C","7623 C","7624 C","7625 C","7626 C","7627 C","7628 C","7629 C","7630 C","7631 C","7415 C","7416 C","7417 C","7418 C","7419 C","7420 C","7421 C","182 C","183 C","184 C","185 C","186 C","187 C","188 C","196 C","197 C","198 C","199 C","200 C","201 C","202 C","189 C","190 C","191 C","192 C","193 C","194 C","195 C","1895 C","1905 C","1915 C","1925 C","1935 C","1945 C","1955 C","705 C","706 C","707 C","708 C","709 C","710 C","711 C","698 C","699 C","700 C","701 C","702 C","703 C","704 C","203 C","204 C","205 C","206 C","207 C","208 C","209 C","210 C","211 C","212 C","213 C","214 C","215 C","216 C","7422 C","7423 C","7424 C","7425 C","7426 C","7427 C","7428 C","7632 C","7633 C","7634 C","7635 C","7636 C","7637 C","7638 C","217 C","218 C","219 C","220 C","221 C","222 C","7639 C","7640 C","7641 C","7642 C","7643 C","7644 C","7645 C","223 C","224 C","225 C","226 C","227 C","228 C","229 C","230 C","231 C","232 C","233 C","234 C","235 C","670 C","671 C","672 C","673 C","674 C","675 C","676 C","677 C","678 C","679 C","680 C","681 C","682 C","683 C","684 C","685 C","686 C","687 C","688 C","689 C","690 C","510 C","509 C","508 C","507 C","506 C","505 C","504 C","7429 C","7430 C","7431 C","7432 C","7433 C","7434 C","7435 C","691 C","692 C","693 C","694 C","695 C","696 C","697 C","496 C","495 C","494 C","493 C","492 C","491 C","490 C","503 C","502 C","501 C","500 C","499 C","498 C","497 C","5035 C","5025 C","5015 C","5005 C","4995 C","4985 C","4975 C","236 C","237 C","238 C","239 C","240 C","241 C","242 C","2365 C","2375 C","2385 C","2395 C","2405 C","2415 C","2425 C","243 C","244 C","245 C","246 C","247 C","248 C","249 C","7646 C","7647 C","7648 C","7649 C","7650 C","7651 C","7652 C","250 C","251 C","252 C","253 C","254 C","255 C","517 C","516 C","515 C","514 C","513 C","512 C","511 C","7436 C","7437 C","7438 C","7439 C","7440 C","7441 C","7442 C","2562 C","2572 C","2582 C","2592 C","2602 C","2612 C","2622 C","7653 C","7654 C","7655 C","7656 C","7657 C","7658 C","7659 C","524 C","523 C","522 C","521 C","520 C","519 C","518 C","5245 C","5235 C","5225 C","5215 C","5205 C","5195 C","5185 C","5175 C","5165 C","5155 C","5145 C","5135 C","5125 C","5115 C","531 C","530 C","529 C","528 C","527 C","526 C","525 C","256 C","257 C","258 C","259 C","260 C","261 C","262 C","2563 C","2573 C","2583 C","2593 C","2603 C","2613 C","2623 C","7660 C","7661 C","7662 C","7663 C","7664 C","7665 C","7666 C","2567 C","2577 C","2587 C","2597 C","2607 C","2617 C","2627 C","263 C","264 C","265 C","266 C","267 C","268 C","269 C","2635 C","2645 C","2655 C","2665 C","2685 C","2695 C","270 C","271 C","272 C","273 C","274 C","275 C","276 C","2705 C","2715 C","2725 C","2735 C","2745 C","2755 C","2765 C","7667 C","7668 C","7669 C","7670 C","7671 C","7672 C","7673 C","7443 C","7444 C","7445 C","7446 C","7447 C","7448 C","7449 C","7674 C","7675 C","7676 C","7677 C","7678 C","7679 C","7680 C","663 C","664 C","665 C","666 C","667 C","668 C","669 C","5315 C","5305 C","5295 C","5285 C","5275 C","5265 C","5255 C","538 C","537 C","536 C","535 C","534 C","533 C","532 C","7541 C","7542 C","7543 C","7544 C","7545 C","7546 C","7547 C","552 C","551 C","550 C","549 C","548 C","547 C","546 C","5455 C","5445 C","5435 C","5425 C","5415 C","5405 C","5395 C","642 C","643 C","644 C","645 C","646 C","647 C","648 C","649 C","650 C","651 C","652 C","653 C","654 C","655 C","656 C","657 C","658 C","659 C","660 C","661 C","662 C","7450 C","7451 C","7452 C","7453 C","7454 C","7455 C","7456 C","2706 C","2716 C","2726 C","2736 C","2746 C","2756 C","2766 C","2708 C","2718 C","2728 C","2738 C","2748 C","2758 C","2768 C","2707 C","2717 C","2727 C","2747 C","2757 C","2767 C","277 C","278 C","279 C","280 C","281 C","282 C","283 C","284 C","285 C","286 C","287 C","288 C","289 C","7681 C","7682 C","7683 C","7684 C","7685 C","7686 C","7687 C","545 C","544 C","543 C","542 C","541 C","540 C","539 C","290 C","291 C","292 C","293 C","294 C","295 C","296 C","2905 C","2915 C","2925 C","2935 C","2945 C","2955 C","2965 C","297 C","298 C","299 C","300 C","301 C","302 C","303 C","7688 C","7689 C","7690 C","7691 C","7692 C","7693 C","7694 C","2975 C","2985 C","2995 C","3005 C","3015 C","3025 C","3035 C","7695 C","7696 C","7697 C","7698 C","7699 C","7700 C","7701 C","7457 C","7458 C","7459 C","7460 C","7461 C","7462 C","7463 C","304 C","305 C","306 C","307 C","308 C","309 C","635 C","636 C","637 C","638 C","639 C","640 C","641 C","7702 C","7703 C","7704 C","7705 C","7706 C","7707 C","7708 C","628 C","629 C","630 C","631 C","632 C","633 C","634 C","310 C","311 C","312 C","313 C","314 C","315 C","316 C","3105 C","3115 C","3125 C","3135 C","3145 C","3155 C","3165 C","7709 C","7710 C","7711 C","7712 C","7713 C","7714 C","7715 C","317 C","318 C","319 C","320 C","321 C","322 C","323 C","7464 C","7465 C","7466 C","7467 C","7468 C","7469 C","7470 C","7471 C","7472 C","7473 C","7474 C","7475 C","7476 C","7477 C","5523 C","5513 C","5503 C","5493 C","5483 C","5473 C","5463 C","7716 C","7717 C","7718 C","7719 C","7720 C","7721 C","7722 C","324 C","325 C","326 C","327 C","328 C","329 C","330 C","3242 C","3252 C","3262 C","3272 C","3282 C","3292 C","3302 C","3245 C","3255 C","3265 C","3275 C","3285 C","3295 C","3305 C","3248 C","3258 C","3268 C","3278 C","3288 C","3298 C","3308 C","566 C","565 C","564 C","563 C","562 C","561 C","560 C","573 C","572 C","571 C","570 C","569 C","568 C","567 C","559 C","558 C","557 C","556 C","555 C","554 C","553 C","5595 C","5585 C","5575 C","5565 C","5555 C","5545 C","5535 C","5665 C","5655 C","5645 C","5635 C","5625 C","5615 C","5605 C","5527 C","5517 C","5507 C","5497 C","5487 C","5477 C","5467 C","621 C","622 C","623 C","624 C","625 C","626 C","627 C","331 C","332 C","333 C","334 C","335 C","336 C","337 C","338 C","339 C","340 C","341 C","342 C","343 C","7723 C","7724 C","7725 C","7726 C","7727 C","7728 C","7729 C","3375 C","3385 C","3395 C","3405 C","3415 C","3425 C","3435 C","344 C","345 C","346 C","347 C","348 C","349 C","350 C","351 C","352 C","353 C","354 C","355 C","356 C","357 C","7478 C","7479 C","7480 C","7481 C","7482 C","7483 C","7484 C","7730 C","7731 C","7732 C","7733 C","7734 C","7735 C","7736 C","7737 C","7738 C","7739 C","7740 C","7741 C","7742 C","7743 C","358 C","359 C","360 C","361 C","362 C","363 C","364 C","7485 C","7486 C","7487 C","7488 C","7489 C","7490 C","7491 C","365 C","366 C","367 C","368 C","369 C","370 C","371 C","372 C","373 C","374 C","375 C","376 C","377 C","378 C","580 C","579 C","578 C","577 C","576 C","575 C","574 C","5807 C","5797 C","5787 C","5777 C","5767 C","5757 C","5747 C","5875 C","5865 C","5855 C","5845 C","5835 C","5825 C","5815 C","5803 C","5793 C","5783 C","5773 C","5763 C","5753 C","5743 C","7492 C","7493 C","7494 C","7495 C","7496 C","7497 C","7498 C","7744 C","7745 C","7746 C","7747 C","7748 C","7749 C","7750 C","379 C","380 C","381 C","382 C","383 C","384 C","385 C","386 C","387 C","388 C","389 C","390 C","391 C","392 C","587 C","586 C","585 C","584 C","583 C","582 C","581 C","393 C","394 C","395 C","396 C","397 C","398 C","399 C","3935 C","3945 C","3955 C","3965 C","3975 C","3985 C","3995 C","600 C","601 C","602 C","603 C","604 C","605 C","606 C","607 C","608 C","609 C","610 C","611 C","612 C","613 C","461 C","460 C","459 C","458 C","457 C","456 C","455 C","614 C","615 C","616 C","617 C","618 C","619 C","620 C","7751 C","7752 C","7753 C","7754 C","7755 C","7756 C","7757 C","7758 C","7759 C","7760 C","7761 C","7762 C","7763 C","7764 C","7765 C","7766 C","7767 C","7768 C","7769 C","7770 C","7771 C","4545 C","4535 C","4525 C","4515 C","4505 C","4495 C","4485 C","454 C","453 C","452 C","451 C","450 C","449 C","448 C","7499 C","7500 C","7501 C","7502 C","7503 C","7504 C","7505 C","468 C","467 C","466 C","465 C","464 C","463 C","462 C","7506 C","7507 C","7508 C","7509 C","7510 C","7511 C","7512 C","719 C","720 C","721 C","722 C","723 C","724 C","725 C","475 C","474 C","473 C","472 C","471 C","470 C","469 C","726 C","727 C","728 C","729 C","730 C","731 C","732 C","4685 C","4675 C","4665 C","4655 C","4645 C","4635 C","4625 C","7513 C","7514 C","7515 C","7516 C","7517 C","7518 C","7519 C","4755 C","4745 C","4735 C","4725 C","4715 C","4705 C","4695 C","482 C","481 C","480 C","479 C","478 C","477 C","476 C","7527 C","7528 C","7529 C","7530 C","7531 C","7532 C","7533 C","7534 C","7535 C","7536 C","7537 C","7538 C","7539 C","7540 C","427 C","428 C","429 C","430 C","431 C","432 C","433 C","420 C","421 C","422 C","423 C","424 C","425 C","426 C","441 C","442 C","443 C","444 C","445 C","446 C","447 C","413 C","414 C","415 C","416 C","417 C","418 C","419 C","400 C","401 C","402 C","403 C","404 C","405 C","406 C","407 C","408 C","409 C","410 C","411 C","412 C","434 C","435 C","436 C","437 C","438 C","439 C","440 C","Warm Gray 1 C","Warm Gray 2 C","Warm Gray 3 C","Warm Gray 4 C","Warm Gray 5 C","Warm Gray 6 C","Warm Gray 7 C","Warm Gray 8 C","Warm Gray 9 C","Warm Gray 10 C","Warm Gray 11 C","Cool Gray 1 C","Cool Gray 2 C","Cool Gray 3 C","Cool Gray 4 C","Cool Gray 5 C","Cool Gray 6 C","Cool Gray 7 C","Cool Gray 8 C","Cool Gray 9 C","Cool Gray 10 C","Cool Gray 11 C","Black 2 C","Black 3 C","Black 4 C","Black 5 C","Black 6 C","Black 7 C"],ic=["FEDD00","FFD700","FE5000","F9423A","EF3340","CE0058","E10098","BB29BB","440099","10069F","001489","0085CA","00AB84","2D2926","F2F0A1","FCAEBB","F1B2DC","BF9BDE","74D1EA","9DE7D7","9E978E","009ACE","44D62C","FFE900","FFAA4D","FF7276","FF3EB5","EA27C2","84754E","85714D","866D4B","8B6F4E","87674F","8B634B","8A8D8F","FFD900","FF5E00","F93822","CE0056","D62598","4E008E","00239C","0084CA","00B08B","222223","F6EB61","F7EA48","FCE300","C5A900","AF9800","897A27","F5E1A4","ECD898","EED484","F4DA40","F2CD00","F1C400","CBA052","F9E547","FBE122","FEDB00","FFD100","DAAA00","AA8A00","9C8412","FAE053","FBDD40","FDDA24","FFCD00","C99700","AC8400","897322","F3DD6D","F3D54E","F3D03E","F2A900","CC8A00","A07400","6C571B","F8E08E","FBD872","FFC845","FFB81C","C69214","AD841F","886B25","FBDB65","FDD757","FED141","FFC72C","EAAA00","B58500","9A7611","FFC600","FFB500","D19000","B47E00","73531D","5A4522","4B3D2A","D29F13","B78B20","9F7D23","967126","8F6A2A","7D622E","6C5D34","FDD26E","FFC658","FFBF3F","FFA300","DE7C00","AF6D04","74531C","FDD086","FFC56E","FFB549","FF9E1B","D57800","996017","6E4C1E","F2C75C","F1BE48","F1B434","ED8B00","CF7F00","A76D11","715C2A","F6BE00","F0B323","FEAD77","E6A65D","D38235","DC8633","C16C18","BD9B60","D69A2D","DB8A06","CD7925","AD6433","89532F","775135","D78825","D3832B","C67D30","B67233","A7662B","9E6A38","835D32","FCC89B","FDBE87","FDAA63","F68D2E","EA7600","D45D00","BE4D00","FECB8B","FFC27B","FFB25B","FF8200","E57200","BE6A14","9B5A1A","EFD19F","EFBE7D","ECA154","E87722","CB6015","A1561C","603D20","FFAE62","FF8F1C","FF6900","B94700","94450B","653819","FFB990","FFA06A","FF7F32","FF6A13","D86018","A65523","8B4720","FFBE9F","FF9D6E","FF7F41","FF671F","E35205","BE531C","73381D","DB864E","E07E3C","DC6B2F","DC582A","C05131","864A33","674736","FFA38B","FF8D6D","FF6A39","FC4C02","DC4405","A9431E","833921","FFB3AB","FF8674","FF5C39","FA4616","CF4520","963821","6B3529","C4622D","BA5826","AF5C37","9E5330","924C2E","7B4D35","5C4738","D4B59E","C07D59","B15533","9D432C","7C3A2D","6B3D2E","5C3D31","D14124","BD472A","B33D26","8D3F2B","83412C","7B4931","674230","E4D5D3","E1BBB4","D6938A","C26E60","A4493D","823B34","683431","DDBCB0","CA9A8E","BC8A7E","A37F74","866761","6B4C4C","583D3E","EABEB0","C09C83","B46A55","AB5C57","A45248","9A6A4F","8A391B","ECC3B2","ECBAA8","EAA794","E8927C","DA291C","9A3324","653024","FFB1BB","FF808B","FF585D","E03C31","BE3A34","81312F","FFA3B5","FF8DA1","F8485E","EE2737","D22630","AF272F","7C2529","FCAFC0","FB637E","F4364C","CB333B","A4343A","643335","C66E4E","C04C36","B7312C","AB2328","93272C","8A2A2B","802F2D","E1523D","C63527","A72B2A","9E2A2B","6D3332","633231","572D2D","E6BAA8","E56A54","E04E39","CD545B","B04A5A","9B2242","651D32","FABBCB","FC9BB3","F65275","E4002B","C8102E","A6192E","76232F","ECC7CD","E89CAE","DF4661","D50032","BA0C2F","9D2235","862633","F8A3BC","F67599","EF426F","E40046","BF0D3E","9B2743","782F40","F5B6CD","F59BBB","EF4A81","E0004D","C5003E","A6093D","8A1538","F5DADF","F7CED7","F9B5C4","F890A5","EF6079","E03E52","CB2C30","F2D4D7","F4C3CC","F2ACB9","E68699","D25B73","B83A4B","9E2A2F","ECB3CB","E782A9","E0457B","CE0037","A50034","861F41","6F263D","F99FC9","F57EB6","F04E98","E31C79","CE0F69","AC145A","7D2248","F4CDD4","E06287","E24585","B52555","A4123F","971B2F","6A2C3E","D6C9CA","C4A4A7","C16784","C63663","BC204B","912F46","7E2D40","EABEDB","E56DB1","DA1884","A50050","910048","6C1D45","936D73","934054","8E2C48","732E4A","672E45","582D40","502B3A","EF95CF","EB6FBD","DF1995","D0006F","AA0061","890C58","672146","F4A6D7","F277C6","E93CAC","C6007E","A20067","840B55","EAD3E2","E6BCD8","DFA0C9","D986BA","C6579A","AE2573","960051","E5CEDB","E3C8D8","DEBED2","C996B6","B06C96","994878","7C2855","E4C6D4","DCB6C9","D0A1BA","BE84A3","A76389","893B67","612141","EBBECB","E8B3C3","E4A9BB","D592AA","84344E","6F2C3F","572932","E2BCCB","DCA9BF","C9809E","B55C80","A73A64","9B3259","872651","E9CDD0","E4BEC3","D7A3AB","C48490","B46B7A","984856","893C47","F2C6CF","F1BDC8","E9A2B2","DC8699","8F3237","7F3035","5D2A2C","E9C4C7","E5BAC1","DAA5AD","C6858F","7A3E3A","6A3735","512F2E","DFC2C3","DBB7BB","CCA1A6","B07C83","9C6169","874B52","3F2021","F1A7DC","EC86D0","E45DBF","DB3EB1","C5299B","AF1685","80225F","EFBAE1","E277CD","D539B5","C800A1","B0008E","9E007E","830065","EAB8E4","E59BDC","DD7FD3","C724B1","BB16A3","A51890","80276C","A56E87","A83D72","991E66","8A1B61","722257","6A2A5B","5E2751","E7BAE4","DD9CDF","C964CF","AD1AAC","981D97","72246C","EBC6DF","E6BEDD","E2ACD7","D48BC8","93328E","833177","612C51","EEDAEA","CCAED0","D59ED7","B288B9","A277A6","9F5CC0","963CBD","D7A9E3","C98BDB","AC4FC6","9B26B6","87189D","772583","653165","948794","A2789C","A15A95","8E3A80","6E2B62","6A3460","5D3754","D5C2D8","C9B1D0","BA9CC5","A57FB2","642F6C","59315F","4B3048","DBCDD3","D0BEC7","C6B0BC","AF95A6","86647A","66435A","4A3041","D8C8D1","D3C0CD","BFA5B8","9B7793","7E5475","693C5E","512A44","DFC8E7","D7B9E4","CAA2DD","B580D1","8031A7","702F8A","572C5F","D6BFDD","C6A1CF","8C4799","6D2077","642667","5D285F","51284F","CBA3D8","B884CB","A05EB5","84329B","702082","671E75","5F2167","9991A4","8D6E97","7A4183","6B3077","653279","5E366E","5C4E63","C1A0DA","A77BCA","8246AF","5C068C","500778","470A68","3C1053","D7C6E6","C1A7E2","9063CD","753BBD","5F259F","582C83","512D6D","C5B4E3","AD96DC","9678D3","7D55C7","330072","2E1A47","B4B5DF","9595D2","7474C1","24135F","211551","201747","221C35","A7A4E0","8B84D7","685BC7","2E008B","280071","250E62","201547","6E7CA0","686E9F","615E9B","565294","514689","4C4184","535486","DDDAE8","B6B8DC","A7A2C3","8986CA","5D4777","4B384C","41273B","878CB4","7C7FAB","7566A0","6F5091","68478D","563D82","523178","E5E1E6","E0DBE3","C6BCD0","A192B2","7C6992","614B79","3F2A56","D8D7DF","C6C4D2","B3B0C4","8D89A5","595478","403A60","1E1A34","C5CFDA","BBC7D6","A2B2C8","8E9FBC","1B365D","1F2A44","1C1F2A","D9E1E2","A4BCC2","98A4AE","768692","425563","253746","131E29","B9D3DC","A3C7D2","8DB9CA","6BA4B8","003D4C","00313C","072B31","BFCED6","B7C9D3","A6BBC8","7A99AC","5B7F95","4F758B","081F2C","D1DDE6","C6D6E3","9BB8D3","7DA1C4","5E8AB4","236192","002E5D","DBE2E9","CED9E5","A7BCD6","7D9BC1","326295","003A70","002554","DDE5ED","C8D8EB","B1C9E8","7BA4DB","407EC9","003594","001A70","BDC5DB","89ABE3","8094DD","7BA6DE","5F8FB4","3A5DAE","606EB2","CBD3EB","9FAEE5","485CC7","1E22AA","171C8F","151F6D","141B4D","B8CCEA","5C88DA","0047BB","06038D","001871","001E62","071D49","C3D7EE","A7C6ED","307FE2","001A72","001E60","13294B","ABCAE9","8BB8E8","418FDE","012169","00205B","041E42","92C1E9","6CACE4","0072CE","0033A0","003087","002D72","0C2340","94A9CB","6787B7","426DA9","385E9D","2C5697","1D4F91","1D428A","C6DAE7","BDD6E6","A4C8E1","7BAFD4","003C71","003057","00263A","B9D9EB","9BCBEB","69B3E7","003DA5","002F6C","002855","041C2C","8DC8E8","62B5E5","009CDE","0057B8","004C97","003865","00263E","71C5E8","41B6E6","00A3E0","005EB8","004B87","003B5C","002A3A","4698CB","298FC2","0076A8","006298","005587","004976","01426A","99D6EA","5BC2E7","00A9E0","0077C8","00629B","004F71","003E51","7BA7BC","6399AE","4E87A0","41748D","34657F","165C7D","005776","BBDDE6","71B2C9","4298B5","0086BF","007DBA","00558C","002B49","9ADBE8","59CBE8","00B5E2","006BA6","00587C","003B49","A4DBE8","8BD3E6","4EC3E0","00AFD7","0095C8","0082BA","0067A0","48A9C5","009CBD","0085AD","007096","006A8E","00617F","005670","B8DDE1","9BD3DD","77C5D5","3EB1C8","0093B2","007396","005F83","6AD1E3","05C3DE","00A9CE","0092BC","007FA3","00677F","004851","68D2DF","00C1D5","00AEC7","008EAA","00778B","006272","004F59","63B1BC","00A7B5","0097A9","00859B","007D8A","007680","006269","B1E4E3","88DBDF","2DCCD3","009CA6","008C95","007377","005F61","A0D1CA","40C1AC","00B0B9","00A3AD","007398","005F86","005A70","7EDDD3","5CB8B2","279989","007681","487A7B","0D5257","244C5A","B6CFD0","ABC7CA","94B7BB","7FA9AE","4F868E","115E67","07272D","00968F","00857D","007672","006D68","00635B","005E5D","005151","9CDBD9","64CCC9","00B2A9","008675","007367","00685E","00534C","71DBD4","2AD2C9","00BFB3","00A499","008578","00594F","004C45","7CE0D3","2CD5C4","00C7B1","00B398","009681","007864","004E42","6DCDB8","49C5B1","00AB8E","009B77","008264","006A52","034638","B9DCD2","A1D6CA","86C8BC","6BBBAE","006F62","00594C","1D3C34","B5E3D8","A5DFD3","98DBCE","6BCABA","00816D","006C5B","173F35","ADCAB8","9ABEAA","85B09A","6FA287","28724F","205C40","284734","BFCEC2","A7BDB1","92ACA0","7F9C90","5C7F71","43695B","183028","BAC5B9","B0BDB0","A3B2A4","94A596","708573","5E7461","22372B","BCC9C5","B1C0BC","9DB0AC","829995","5D7975","3E5D58","18332F","D1E0D7","B7CDC2","9AB9AD","789F90","507F70","285C4D","13322B","A7E6D7","8CE2D0","3CDBC0","009775","007B5F","00664F","8FD6BD","6ECEB2","00B388","00965E","007A53","006747","115740","50A684","00966C","008755","007B4B","006F44","006845","005844","7AE1BF","47D7AC","00C389","00AF66","007749","006341","154734","A0DAB3","91D6AC","71CC98","009A44","00843D","046A38","2C5234","A2E4B8","8FE2B0","80E0A7","00B140","009639","007A33","215732","9BE3BF","26D07C","00BF6F","00B74F","009F4D","275D38","00573F","4B9560","228848","007A3E","007041","286140","36573B","395542","6BA539","48A23F","319B42","3A913F","44883E","4A773C","44693D","ADDC91","A1D884","6CC24A","43B02A","509E2F","4C8C2B","4A7729","D0DEBB","BCE194","8EDD65","78D64B","74AA50","719949","79863C","C2E189","B7DD79","A4D65E","78BE20","64A70B","658D1B","546223","D4EB8E","CDEA80","C5E86C","97D700","84BD00","7A9A01","59621D","C4D6A4","BCD19B","B7CE95","A9C47F","789D4A","67823A","4E5B31","D0D1AB","C6C89B","BABD8B","A2A569","8A8D4A","6D712E","3D441E","D2CE9E","CBC793","C0BB87","AFA96E","A09958","89813D","555025","C3C6A8","B3B995","A3AA83","899064","737B4C","5E6738","3E4827","BFCC80","BBC592","9CAF88","8F993E","76881D","7A7256","5B6236","BABC16","ABAD23","999B30","888D30","7C8034","727337","656635","E2E868","DBE442","CEDC00","C4D600","A8AD00","949300","787121","E9EC6B","E3E935","E0E721","D0DF00","B5BD00","9A9500","827A04","E3E48D","E0E27C","DBDE70","D2D755","B7BF10","8E8C13","625D20","F0EC74","EDE939","ECE81A","E1E000","BFB800","ADA400","A09200","F3EA5D","F3E500","EFDF00","EEDC00","BBA600","9A8700","685C20","F1EB9C","F0E991","F0E87B","EDE04B","EADA24","E1CD00","CFB500","EBE49A","E9E186","E6DE77","E1D555","D7C826","C4B000","B39B00","E9DF97","E4D77E","DECD63","D9C756","B89D18","A28E2A","695B24","DCD59A","D6CF8D","D0C883","C0B561","AC9F3C","9F912A","8A7B19","CAB64B","CFB023","C1A01E","A08629","897630","736635","675E33","D4C304","C4B200","91852C","747136","5D6439","585C3B","535435","BBB323","B4A91F","AA9D2E","8F7E35","716135","635939","4E4934","D5CB9F","CFC493","C5B783","B3A369","998542","8C7732","614F25","CAC7A7","BFBB98","B0AA7E","9B945F","594A25","524727","4A412A","F1E6B2","DFD1A7","D9C89E","CEB888","A89968","94795D","816040","DDCBA4","D3BC8D","C6AA76","B9975B","8B5B29","744F28","5C462B","EFDBB2","FCD299","E1B87F","D6A461","C6893F","B77729","A6631B","EDC8A3","E7B78A","DDA46F","C88242","B36924","934D11","7D3F16","F3CFB3","F1C6A7","F0BF9B","E59E6D","B86125","A45A2A","693F23","E0C09F","D9B48F","CDA077","B58150","9E652E","774212","623412","E0C6AD","DCBFA6","CDA788","BF9474","AD7C59","946037","4F2C1D","E1B7A7","D5A286","C58B68","99552B","85431E","6D4F47","5E4B3C","D7C4B7","CDB5A7","C0A392","AE8A79","956C58","7C4D3A","5B3427","DBC8B6","D3BBA8","C6A992","AA8066","703F2A","623B2A","4E3629","D6D2C4","C5B9AC","B7A99A","A39382","7A6855","63513D","473729","D1CCBD","B7B09C","A69F88","A7ACA2","949A90","8E9089","4B4F54","D0D3D4","C1C6C8","A2AAAD","7C878E","5B6770","333F48","1D252D","C7C9C7","B2B4B2","9EA2A2","898D8D","707372","54585A","25282A","BEC6C4","A2ACAB","919D9D","717C7D","505759","3F4444","373A36","BABBB1","A8A99E","919388","7E7F74","65665C","51534A","212322","C4BFB6","AFA9A0","9D968D","8C857B","776E64","696158","C4BCB7","B2A8A2","978C87","857874","746661","5E514D","382F2D","D0C4C5","C1B2B6","AB989D","7B6469","584446","453536","382E2C","D7D2CB","CBC4BC","BFB8AF","B6ADA5","ACA39A","A59C94","968C83","8C8279","83786F","796E65","6E6259","D9D9D6","D0D0CE","C8C9C7","BBBCBC","B1B3B3","A7A8AA","97999B","888B8D","75787B","63666A","53565A","332F21","212721","31261D","3E2B2E","101820","3D3935"],w0=ic.map(r=>[parseInt(r.substring(0,2),16),parseInt(r.substring(2,4),16),parseInt(r.substring(4,6),16)]);function WB(r){const e=wd.indexOf(r);return e>=0?ic[e]:""}function rF(r){const e=ic.indexOf(r);return e>=0?wd[e]:""}function QB(r,e=64){const t=[],n=[],i=rF(r);i&&t.push({pms:i,hex:r,distance:0});const a=parseInt(r.substring(0,2),16),s=parseInt(r.substring(2,4),16),o=parseInt(r.substring(4,6),16);let l,u,c;for(let h=0;h<ic.length;h++){l=w0[h][0],u=w0[h][1],c=w0[h][2];const f=Math.sqrt(Math.pow(a-l,2)+Math.pow(s-u,2)+Math.pow(o-c,2));n.push(f)}for(let h=0;h<n.length;h++)n[h]<=e&&!t.some(f=>f.pms===wd[h])&&t.push({pms:wd[h],hex:ic[h],distance:n[h]});return t.sort((h,f)=>h.distance-f.distance)}const YB=wd.map((r,e)=>({pms:r,hex:ic[e]})),XB=new Bo(YB,{keys:["pms"]});function JB(r,e){return XB.search(r,e?{limit:e}:void 0)}let pf=null;function nF(r){if(r.startsWith("#"))return hC(r);if(!document)throw new Error("browserColorToHex is only supported on browsers");if(pf||(pf=document.createElement("canvas").getContext("2d")),!pf)throw new Error("Failed to create canvas context required to convert colors");pf.fillStyle=r;const e=hC(pf.fillStyle);return e||console.error(`Unknown browser color ${r}`),e}function hC(r){const e=r.substring(1).toUpperCase();return e.length===6?e:e.length===3?`${e[0]}${e[0]}${e[1]}${e[1]}${e[2]}${e[2]}`:""}const ep=r=>{const e=iF(r.spotColor);return e?`${r.browserValue} ${e}`:r.browserValue},iF=r=>{if(!r)return"";if(r.profileName.includes("/")&&r.profileName.includes(".icc")){const e=r.profileName.replace(/\s/g,"-"),t=e.lastIndexOf("/");return`icc-named-color(${e.slice(t+1).slice(0,-4)}, ${r.namedColor})`}return`icc-named-color(${r.profileName}, ${r.namedColor})`},Ly=r=>{const e=r.split(/[ ](?=[^)]*?(?:\(|$))/);if(e.length===0)return{browserValue:"#000000"};if(e.length===1)return{browserValue:e[0]};const t=e[1].match(/\(([^)]+)\)/gm);if(!t)throw new Error("Unhandled state of color value in SVG");const n=t[0].replace(/[() ]/g,"").split(",");return{browserValue:e[0],spotColor:{profileName:n[0],namedColor:n[1]}}},KB=["altGlyph","circle","ellipse","path","polygon","polyline","rect","text","textPath","tref","tspan"],ZB=["fill","stroke"],ac=(r,e)=>{e(r),r.children.length>0&&Array.from(r.children).forEach(t=>ac(t,e))},aF=(r,e)=>{const t=e(r);if(t)return t;const n=r.parentElement;if(n)return aF(n,e)},e3=(r,e)=>{try{return r.matches(e)}catch{return r.classList.contains(e.substring(1))}},jg=(r,e=!1)=>{!e&&r.setAttribute("preserveAspectRatio","none");const t=[];ac(r,n=>{if(n.tagName==="script"){n.remove();return}if(n.tagName==="style"){try{Wk.parse(n.innerHTML).stylesheet?.rules.forEach(s=>{t.push(s)}),n.remove()}catch(a){console.error(a)}return}const i=n.attributes.getNamedItem("style")?.value?.trim();if(i){const a=[];i.split(";").forEach(o=>{const l=o.trim();if(l){const[u,c]=l.split(":"),h=u.toLowerCase();ZB.indexOf(h)>-1?n.setAttribute(h,c.trim()):a.push(l)}}),a.length>0?n.setAttribute("style",a.join(";")):n.removeAttribute("style")}}),ac(r,n=>{t.forEach(i=>{i.selectors?.forEach(a=>{e3(n,a)&&i.declarations?.forEach(s=>{s.property&&s.value&&n.setAttribute(s.property,s.value)})})})})},t3=r=>{const e=/pt|pc|mm|cm|in/gm,t=r.getAttribute("viewBox"),n=r.getAttribute("width"),i=r.getAttribute("height");if(!t)throw new Error("viewBox not specified on SVG!");n&&r.setAttribute("width",n.replace(e,"")),i&&r.setAttribute("height",i.replace(e,""))},sF=r=>os().parseFromString(r,"image/svg+xml").firstElementChild,r3=(r,e,t)=>{r.setAttribute("height",`${t}px`),r.setAttribute("width",`${e}px`)},oF=(r,e,t)=>{ac(r,n=>{const i=n.attributes.getNamedItem("fill");i&&i.value!=="none"&&n.classList.forEach(s=>{if(s.startsWith("spiff-fill")){const o=e[s.replace("spiff-fill-","")];if(o)n.setAttribute("fill",t?ep(o):o.browserValue);else{const l=e[s];l&&n.setAttribute("fill",t?ep(l):l.browserValue)}}});const a=n.attributes.getNamedItem("stroke");a&&a.value!=="none"&&n.classList.forEach(s=>{if(s.startsWith("spiff-stroke")){const o=e[s.replace("spiff-stroke-","")];if(o)n.setAttribute("stroke",t?ep(o):o.browserValue);else{const l=e[s];l&&n.setAttribute("fill",t?ep(l):l.browserValue)}}})})},lF=r=>Po().serializeToString(r),QA=(r,e,t,n,i)=>{const a=sF(r);if(!a)throw new Error("Failed to read SVG.");return r3(a,e,t),oF(a,n,i),lF(a)},Gg=(r,e,t)=>{const n=sF(r);if(!n)throw new Error("Failed to read SVG.");return oF(n,e,t),lF(n)},n3=r=>{const e=/<svg.*<\/svg>/s,t=r.match(e)||[],n=t?.length>0?t[0]:"";return os().parseFromString(n,"image/svg+xml")},Oa=async r=>{const t=n3(r).firstElementChild;if(!t)throw new Error("Failed to read SVG.");jg(t);const n={};ac(t,s=>{if(KB.includes(s.tagName)&&!s.attributes.getNamedItem("fill")){let u="black";const c=s.parentElement;if(c){const h=aF(c,f=>{const g=f.style.fill;if(g)return g;const v=f.getAttribute("fill");if(v)return v});h&&(u=h)}s.setAttribute("fill",u)}const o=s.attributes.getNamedItem("fill");if(o&&o.value!=="none"&&!o.value.startsWith("url(")){const u=Ly(o.value),c=u.browserValue.replace(/\W/g,""),h=`spiff-fill-${c}`;s.setAttribute("fill",u.browserValue),s.classList.add(h),n[c]=u}const l=s.attributes.getNamedItem("stroke");if(l&&l.value!=="none"&&!l.value.startsWith("url(")){const u=Ly(l.value),c=u.browserValue.replace(/\W/g,""),h=`spiff-stroke-${c}`;s.classList.add(h),s.setAttribute("stroke",u.browserValue),n[c]=u}});const a=Po().serializeToString(t);return{colors:n,svg:a}},i3=Fe`
159
+ `);s=~Be?ie.length-Be:s+ie.length}function l(){var ie={line:a,column:s};return function(de){return de.position=new u(ie),A(),de}}function u(ie){this.start=ie,this.end={line:a,column:s},this.source=i.source}u.prototype.content=n;var c=[];function h(ie){var de=new Error(i.source+":"+a+":"+s+": "+ie);if(de.reason=ie,de.filename=i.source,de.line=a,de.column=s,de.source=n,i.silent)c.push(de);else throw de}function f(){var ie=v();return{type:"stylesheet",stylesheet:{source:i.source,rules:ie,parsingErrors:c}}}function d(){return y(/^{\s*/)}function g(){return y(/^}/)}function v(){var ie,de=[];for(A(),C(de);n.length&&n.charAt(0)!="}"&&(ie=Te()||K());)ie!==!1&&(de.push(ie),C(de));return de}function y(ie){var de=ie.exec(n);if(de){var Be=de[0];return o(Be),n=n.slice(Be.length),de}}function A(){y(/^\s*/)}function C(ie){var de;for(ie=ie||[];de=k();)de!==!1&&ie.push(de);return ie}function k(){var ie=l();if(!(n.charAt(0)!="/"||n.charAt(1)!="*")){for(var de=2;n.charAt(de)!=""&&(n.charAt(de)!="*"||n.charAt(de+1)!="/");)++de;if(de+=2,n.charAt(de-1)==="")return h("End of comment missing");var Be=n.slice(2,de-2);return s+=2,o(Be),n=n.slice(de),s+=2,ie({type:"comment",comment:Be})}}function T(){var ie=y(/^([^{]+)/);if(ie)return e(ie[0]).replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*\/+/g,"").replace(/"(?:\\"|[^"])*"|'(?:\\'|[^'])*'/g,function(de){return de.replace(/,/g,"‌")}).split(/\s*(?![^(]*\)),\s*/).map(function(de){return de.replace(/\u200C/g,",")})}function S(){var ie=l(),de=y(/^(\*?[-#\/\*\\\w]+(\[[0-9a-z_-]+\])?)\s*/);if(de){if(de=e(de[0]),!y(/^:\s*/))return h("property missing ':'");var Be=y(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/),Ee=ie({type:"declaration",property:de.replace(r,""),value:Be?e(Be[0]).replace(r,""):""});return y(/^[;\s]*/),Ee}}function R(){var ie=[];if(!d())return h("missing '{'");C(ie);for(var de;de=S();)de!==!1&&(ie.push(de),C(ie));return g()?ie:h("missing '}'")}function B(){for(var ie,de=[],Be=l();ie=y(/^((\d+\.\d+|\.\d+|\d+)%?|[a-z]+)\s*/);)de.push(ie[1]),y(/^,\s*/);if(de.length)return Be({type:"keyframe",values:de,declarations:R()})}function G(){var ie=l(),Be=y(/^@([-\w]+)?keyframes\s*/);if(Be){var de=Be[1],Be=y(/^([-\w]+)\s*/);if(!Be)return h("@keyframes missing name");var Ee=Be[1];if(!d())return h("@keyframes missing '{'");for(var ze,je=C();ze=B();)je.push(ze),je=je.concat(C());return g()?ie({type:"keyframes",name:Ee,vendor:de,keyframes:je}):h("@keyframes missing '}'")}}function $(){var ie=l(),de=y(/^@supports *([^{]+)/);if(de){var Be=e(de[1]);if(!d())return h("@supports missing '{'");var Ee=C().concat(v());return g()?ie({type:"supports",supports:Be,rules:Ee}):h("@supports missing '}'")}}function Y(){var ie=l(),de=y(/^@host\s*/);if(de){if(!d())return h("@host missing '{'");var Be=C().concat(v());return g()?ie({type:"host",rules:Be}):h("@host missing '}'")}}function X(){var ie=l(),de=y(/^@media *([^{]+)/);if(de){var Be=e(de[1]);if(!d())return h("@media missing '{'");var Ee=C().concat(v());return g()?ie({type:"media",media:Be,rules:Ee}):h("@media missing '}'")}}function J(){var ie=l(),de=y(/^@custom-media\s+(--[^\s]+)\s*([^{;]+);/);if(de)return ie({type:"custom-media",name:e(de[1]),media:e(de[2])})}function Q(){var ie=l(),de=y(/^@page */);if(de){var Be=T()||[];if(!d())return h("@page missing '{'");for(var Ee=C(),ze;ze=S();)Ee.push(ze),Ee=Ee.concat(C());return g()?ie({type:"page",selectors:Be,declarations:Ee}):h("@page missing '}'")}}function oe(){var ie=l(),de=y(/^@([-\w]+)?document *([^{]+)/);if(de){var Be=e(de[1]),Ee=e(de[2]);if(!d())return h("@document missing '{'");var ze=C().concat(v());return g()?ie({type:"document",document:Ee,vendor:Be,rules:ze}):h("@document missing '}'")}}function se(){var ie=l(),de=y(/^@font-face\s*/);if(de){if(!d())return h("@font-face missing '{'");for(var Be=C(),Ee;Ee=S();)Be.push(Ee),Be=Be.concat(C());return g()?ie({type:"font-face",declarations:Be}):h("@font-face missing '}'")}}var he=Oe("import"),ye=Oe("charset"),Ue=Oe("namespace");function Oe(ie){var de=new RegExp("^@"+ie+"\\s*([^;]+);");return function(){var Be=l(),Ee=y(de);if(Ee){var ze={type:ie};return ze[ie]=Ee[1].trim(),Be(ze)}}}function Te(){if(n[0]=="@")return G()||X()||J()||$()||he()||ye()||Ue()||oe()||Q()||Y()||se()}function K(){var ie=l(),de=T();return de?(C(),ie({type:"rule",selectors:de,declarations:R()})):h("selector missing")}return t(f())};function e(n){return n?n.replace(/^\s+|\s+$/g,""):""}function t(n,i){var a=n&&typeof n.type=="string",s=a?n:i;for(var o in n){var l=n[o];Array.isArray(l)?l.forEach(function(u){t(u,s)}):l&&typeof l=="object"&&t(l,s)}return a&&Object.defineProperty(n,"parent",{configurable:!0,writable:!0,enumerable:!1,value:i||null}),n}return b0}var sC;function rB(){return sC||(sC=1,A0.parse=tB()),A0}var Wk=rB();function Ro(r){return Array.isArray?Array.isArray(r):Yk(r)==="[object Array]"}function nB(r){if(typeof r=="string")return r;if(typeof r=="bigint")return r.toString();const e=r+"";return e=="0"&&1/r==-1/0?"-0":e}function Dy(r){return r==null?"":nB(r)}function Vi(r){return typeof r=="string"}function Wp(r){return typeof r=="number"}function iB(r){return r===!0||r===!1||aB(r)&&Yk(r)=="[object Boolean]"}function Qk(r){return typeof r=="object"}function aB(r){return Qk(r)&&r!==null}function Gi(r){return r!=null}function Zh(r){return!r.trim().length}function Yk(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}const sB="Incorrect 'index' type",oB=r=>`Invalid value for key ${r}`,lB=r=>`Pattern length exceeds max of ${r}.`,uB=r=>`Missing ${r} property in key`,cB=r=>`Property 'weight' in key '${r}' must be a positive integer`,oC=Object.prototype.hasOwnProperty;class fB{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(n=>{const i=Xk(n);this._keys.push(i),this._keyMap[i.id]=i,t+=i.weight}),this._keys.forEach(n=>{n.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Xk(r){let e=null,t=null,n=null,i=1,a=null;if(Vi(r)||Ro(r))n=r,e=lC(r),t=Py(r);else{if(!oC.call(r,"name"))throw new Error(uB("name"));const s=r.name;if(n=s,oC.call(r,"weight")&&(i=r.weight,i<=0))throw new Error(cB(s));e=lC(s),t=Py(s),a=r.getFn}return{path:e,id:t,weight:i,src:n,getFn:a}}function lC(r){return Ro(r)?r:r.split(".")}function Py(r){return Ro(r)?r.join("."):r}function dB(r,e){const t=[];let n=!1;const i=(a,s,o,l)=>{if(Gi(a))if(!s[o])t.push(l!==void 0?{v:a,i:l}:a);else{const u=s[o],c=a[u];if(!Gi(c))return;if(o===s.length-1&&(Vi(c)||Wp(c)||iB(c)||typeof c=="bigint"))t.push(l!==void 0?{v:Dy(c),i:l}:Dy(c));else if(Ro(c)){n=!0;for(let h=0,f=c.length;h<f;h+=1)i(c[h],s,o+1,h)}else s.length&&i(c,s,o+1,l)}};return i(r,Vi(e)?e.split("."):e,0),n?t:t[0]}const hB={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},pB={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(r,e)=>r.score===e.score?r.idx<e.idx?-1:1:r.score<e.score?-1:1},gB={location:0,threshold:.6,distance:100},mB={useExtendedSearch:!1,useTokenSearch:!1,getFn:dB,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1},Wt=Object.freeze({...pB,...hB,...gB,...mB}),vB=/[^ ]+/g;function yB(r=1,e=3){const t=new Map,n=Math.pow(10,e);return{get(i){const a=i.match(vB).length;if(t.has(a))return t.get(a);const s=1/Math.pow(a,.5*r),o=parseFloat(Math.round(s*n)/n);return t.set(a,o),o},clear(){t.clear()}}}class GA{constructor({getFn:e=Wt.getFn,fieldNormWeight:t=Wt.fieldNormWeight}={}){this.norm=yB(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((t,n)=>{this._keysMap[t.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Vi(this.docs[0])?this.docs.forEach((e,t)=>{this._addString(e,t)}):this.docs.forEach((e,t)=>{this._addObject(e,t)}),this.norm.clear())}add(e){const t=this.size();Vi(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,n=this.size();t<n;t+=1)this.records[t].i-=1}removeAll(e){for(let t=e.length-1;t>=0;t-=1)this.records.splice(e[t],1);for(let t=0,n=this.records.length;t<n;t+=1)this.records[t].i=t}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_addString(e,t){if(!Gi(e)||Zh(e))return;const n={v:e,i:t,n:this.norm.get(e)};this.records.push(n)}_addObject(e,t){const n={i:t,$:{}};this.keys.forEach((i,a)=>{const s=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Gi(s)){if(Ro(s)){const o=[];for(let l=0,u=s.length;l<u;l+=1){const c=s[l];if(Gi(c)){if(Vi(c)){if(!Zh(c)){const h={v:c,i:l,n:this.norm.get(c)};o.push(h)}}else if(Gi(c.v)){const h=Vi(c.v)?c.v:Dy(c.v);if(!Zh(h)){const f={v:h,i:c.i,n:this.norm.get(h)};o.push(f)}}}}n.$[a]=o}else if(Vi(s)&&!Zh(s)){const o={v:s,n:this.norm.get(s)};n.$[a]=o}}}),this.records.push(n)}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}}function Jk(r,e,{getFn:t=Wt.getFn,fieldNormWeight:n=Wt.fieldNormWeight}={}){const i=new GA({getFn:t,fieldNormWeight:n});return i.setKeys(r.map(Xk)),i.setSources(e),i.create(),i}function AB(r,{getFn:e=Wt.getFn,fieldNormWeight:t=Wt.fieldNormWeight}={}){const{keys:n,records:i}=r,a=new GA({getFn:e,fieldNormWeight:t});return a.setKeys(n),a.setIndexRecords(i),a}function bB(r=[],e=Wt.minMatchCharLength){const t=[];let n=-1,i=-1,a=0;for(let s=r.length;a<s;a+=1){const o=r[a];o&&n===-1?n=a:!o&&n!==-1&&(i=a-1,i-n+1>=e&&t.push([n,i]),n=-1)}return r[a-1]&&a-n>=e&&t.push([n,a-1]),t}const vl=32;function wB(r,e,t,{location:n=Wt.location,distance:i=Wt.distance,threshold:a=Wt.threshold,findAllMatches:s=Wt.findAllMatches,minMatchCharLength:o=Wt.minMatchCharLength,includeMatches:l=Wt.includeMatches,ignoreLocation:u=Wt.ignoreLocation}={}){if(e.length>vl)throw new Error(lB(vl));const c=e.length,h=r.length,f=Math.max(0,Math.min(n,h));let d=a,g=f;const v=(G,$)=>{const Y=G/c;if(u)return Y;const X=Math.abs(f-$);return i?Y+X/i:X?1:Y},y=o>1||l,A=y?Array(h):[];let C;for(;(C=r.indexOf(e,g))>-1;){const G=v(0,C);if(d=Math.min(G,d),g=C+c,y){let $=0;for(;$<c;)A[C+$]=1,$+=1}}g=-1;let k=[],T=1,S=c+h;const R=1<<c-1;for(let G=0;G<c;G+=1){let $=0,Y=S;for(;$<Y;)v(G,f+Y)<=d?$=Y:S=Y,Y=Math.floor((S-$)/2+$);S=Y;let X=Math.max(1,f-Y+1);const J=s?h:Math.min(f+Y,h)+c,Q=Array(J+2);Q[J+1]=(1<<G)-1;for(let se=J;se>=X;se-=1){const he=se-1,ye=t[r[he]];if(y&&(A[he]=+!!ye),Q[se]=(Q[se+1]<<1|1)&ye,G&&(Q[se]|=(k[se+1]|k[se])<<1|1|k[se+1]),Q[se]&R&&(T=v(G,he),T<=d)){if(d=T,g=he,g<=f)break;X=Math.max(1,2*f-g)}}if(v(G+1,f)>d)break;k=Q}const B={isMatch:g>=0,score:Math.max(.001,T)};if(y){const G=bB(A,o);G.length?l&&(B.indices=G):B.isMatch=!1}return B}function CB(r){const e={};for(let t=0,n=r.length;t<n;t+=1){const i=r.charAt(t);e[i]=(e[i]||0)|1<<n-t-1}return e}function $A(r){if(r.length<=1)return r;r.sort((t,n)=>t[0]-n[0]||t[1]-n[1]);const e=[r[0]];for(let t=1,n=r.length;t<n;t+=1){const i=e[e.length-1],a=r[t];a[0]<=i[1]+1?i[1]=Math.max(i[1],a[1]):e.push(a)}return e}const Kk={ł:"l",Ł:"L",đ:"d",Đ:"D",ø:"o",Ø:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",ß:"ss"},xB=new RegExp("["+Object.keys(Kk).join("")+"]","g"),bd=String.prototype.normalize?r=>r.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(xB,e=>Kk[e]):r=>r;class qA{constructor(e,{location:t=Wt.location,threshold:n=Wt.threshold,distance:i=Wt.distance,includeMatches:a=Wt.includeMatches,findAllMatches:s=Wt.findAllMatches,minMatchCharLength:o=Wt.minMatchCharLength,isCaseSensitive:l=Wt.isCaseSensitive,ignoreDiacritics:u=Wt.ignoreDiacritics,ignoreLocation:c=Wt.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:c},e=l?e:e.toLowerCase(),e=u?bd(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const h=(d,g)=>{this.chunks.push({pattern:d,alphabet:CB(d),startIndex:g})},f=this.pattern.length;if(f>vl){let d=0;const g=f%vl,v=f-g;for(;d<v;)h(this.pattern.substr(d,vl),d),d+=vl;if(g){const y=f-vl;h(this.pattern.substr(y),y)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i}=this.options;if(e=t?e:e.toLowerCase(),e=n?bd(e):e,this.pattern===e){const v={isMatch:!0,score:0};return i&&(v.indices=[[0,e.length-1]]),v}const{location:a,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:u,ignoreLocation:c}=this.options,h=[];let f=0,d=!1;this.chunks.forEach(({pattern:v,alphabet:y,startIndex:A})=>{const{isMatch:C,score:k,indices:T}=wB(e,v,y,{location:a+A,distance:s,threshold:o,findAllMatches:l,minMatchCharLength:u,includeMatches:i,ignoreLocation:c});C&&(d=!0),f+=k,C&&T&&h.push(...T)});const g={isMatch:d,score:d?f/this.chunks.length:1};return d&&i&&(g.indices=$A(h)),g}}class Oo{constructor(e){this.pattern=e}static isMultiMatch(e){return uC(e,this.multiRegex)}static isSingleMatch(e){return uC(e,this.singleRegex)}search(e){return{isMatch:!1,score:1}}}function uC(r,e){const t=r.match(e);return t?t[1]:null}class SB extends Oo{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class EB extends Oo{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class kB extends Oo{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}}class FB extends Oo{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class TB extends Oo{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class IB extends Oo{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}}class Zk extends Oo{constructor(e,{location:t=Wt.location,threshold:n=Wt.threshold,distance:i=Wt.distance,includeMatches:a=Wt.includeMatches,findAllMatches:s=Wt.findAllMatches,minMatchCharLength:o=Wt.minMatchCharLength,isCaseSensitive:l=Wt.isCaseSensitive,ignoreDiacritics:u=Wt.ignoreDiacritics,ignoreLocation:c=Wt.ignoreLocation}={}){super(e),this._bitapSearch=new qA(e,{location:t,threshold:n,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:o,isCaseSensitive:l,ignoreDiacritics:u,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class eF extends Oo{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t=0,n;const i=[],a=this.pattern.length;for(;(n=e.indexOf(this.pattern,t))>-1;)t=n+a,i.push([n,t-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}}const Ry=[SB,eF,kB,FB,IB,TB,EB,Zk],cC=Ry.length,DB="\0",PB="|";function RB(r){const e=[],t=r.length;let n=0;for(;n<t;){for(;n<t&&r[n]===" ";)n++;if(n>=t)break;let i=n;for(;i<t&&r[i]!==" "&&r[i]!=='"';)i++;if(i<t&&r[i]==='"'){for(i++;i<t;){if(r[i]==='"'){const a=i+1;if(a>=t||r[a]===" "){i++;break}if(r[a]==="$"&&(a+1>=t||r[a+1]===" ")){i+=2;break}}i++}e.push(r.substring(n,i)),n=i}else{for(;i<t&&r[i]!==" ";)i++;e.push(r.substring(n,i)),n=i}}return e}function OB(r,e={}){return r.replace(/\\\|/g,DB).split(PB).map(n=>{const i=n.replace(/\u0000/g,"|"),a=RB(i.trim()).filter(o=>o&&!!o.trim()),s=[];for(let o=0,l=a.length;o<l;o+=1){const u=a[o];let c=!1,h=-1;for(;!c&&++h<cC;){const f=Ry[h],d=f.isMultiMatch(u);d&&(s.push(new f(d,e)),c=!0)}if(!c)for(h=-1;++h<cC;){const f=Ry[h],d=f.isSingleMatch(u);if(d){s.push(new f(d,e));break}}}return s})}const BB=new Set([Zk.type,eF.type]);class MB{constructor(e,{isCaseSensitive:t=Wt.isCaseSensitive,ignoreDiacritics:n=Wt.ignoreDiacritics,includeMatches:i=Wt.includeMatches,minMatchCharLength:a=Wt.minMatchCharLength,ignoreLocation:s=Wt.ignoreLocation,findAllMatches:o=Wt.findAllMatches,location:l=Wt.location,threshold:u=Wt.threshold,distance:c=Wt.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:n,includeMatches:i,minMatchCharLength:a,findAllMatches:o,ignoreLocation:s,location:l,threshold:u,distance:c},e=t?e:e.toLowerCase(),e=n?bd(e):e,this.pattern=e,this.query=OB(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:i,ignoreDiacritics:a}=this.options;e=i?e:e.toLowerCase(),e=a?bd(e):e;let s=0;const o=[];let l=0,u=!1;for(let c=0,h=t.length;c<h;c+=1){const f=t[c];o.length=0,s=0,u=!1;for(let d=0,g=f.length;d<g;d+=1){const v=f[d],{isMatch:y,indices:A,score:C}=v.search(e);if(y){s+=1,l+=C;const k=v.constructor.type;k.startsWith("inverse")&&(u=!0),n&&(BB.has(k)?o.push(...A):o.push(A))}else{l=0,s=0,o.length=0,u=!1;break}}if(s){const d={isMatch:!0,score:l/s};return u&&(d.hasInverse=!0),n&&(d.indices=$A(o)),d}}return{isMatch:!1,score:1}}}const Oy=[];function WA(...r){Oy.push(...r)}function lg(r,e){for(let t=0,n=Oy.length;t<n;t+=1){const i=Oy[t];if(i.condition(r,e))return new i(r,e)}return new qA(r,e)}const ug={AND:"$and",OR:"$or"},By={PATH:"$path",PATTERN:"$val"},My=r=>!!(r[ug.AND]||r[ug.OR]),_B=r=>!!r[By.PATH],NB=r=>!Ro(r)&&Qk(r)&&!My(r),fC=r=>({[ug.AND]:Object.keys(r).map(e=>({[e]:r[e]}))});function tF(r,e,{auto:t=!0}={}){const n=i=>{if(Vi(i)){const l={keyId:null,pattern:i};return t&&(l.searcher=lg(i,e)),l}const a=Object.keys(i),s=_B(i);if(!s&&a.length>1&&!My(i))return n(fC(i));if(NB(i)){const l=s?i[By.PATH]:a[0],u=s?i[By.PATTERN]:i[l];if(!Vi(u))throw new Error(oB(l));const c={keyId:Py(l),pattern:u};return t&&(c.searcher=lg(u,e)),c}const o={children:[],operator:a[0]};return a.forEach(l=>{const u=i[l];Ro(u)&&u.forEach(c=>{o.children.push(n(c))})}),o};return My(r)||(r=fC(r)),n(r)}function _y(r,{ignoreFieldNorm:e=Wt.ignoreFieldNorm}){let t=1;return r.forEach(({key:n,norm:i,score:a})=>{const s=n?n.weight:null;t*=Math.pow(a===0&&s?Number.EPSILON:a,(s||1)*(e?1:i))}),t}function LB(r,{ignoreFieldNorm:e=Wt.ignoreFieldNorm}){r.forEach(t=>{t.score=_y(t.matches,{ignoreFieldNorm:e})})}class UB{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){const t=this.heap;for(;e>0;){const n=e-1>>1;if(t[e].score<=t[n].score)break;const i=t[e];t[e]=t[n],t[n]=i,e=n}}_sinkDown(e){const t=this.heap,n=t.length;let i=e;do{e=i;const a=2*e+1,s=2*e+2;if(a<n&&t[a].score>t[i].score&&(i=a),s<n&&t[s].score>t[i].score&&(i=s),i!==e){const o=t[e];t[e]=t[i],t[i]=o}}while(i!==e)}}function VB(r,e){const t=r.matches;e.matches=[],Gi(t)&&t.forEach(n=>{if(!Gi(n.indices)||!n.indices.length)return;const{indices:i,value:a}=n,s={indices:i,value:a};n.key&&(s.key=n.key.src),n.idx>-1&&(s.refIndex=n.idx),e.matches.push(s)})}function zB(r,e){e.score=r.score}function HB(r,e,{includeMatches:t=Wt.includeMatches,includeScore:n=Wt.includeScore}={}){const i=[];return t&&i.push(VB),n&&i.push(zB),r.map(a=>{const{idx:s}=a,o={item:e[s],refIndex:s};return i.length&&i.forEach(l=>{l(a,o)}),o})}const jB=/\b\w+\b/g;function Ny({isCaseSensitive:r=!1,ignoreDiacritics:e=!1}={}){return{tokenize(t){return r||(t=t.toLowerCase()),e&&(t=bd(t)),t.match(jB)||[]}}}function GB(r,e,t){const n=new Map,i=new Map;let a=0;function s(o,l,u,c){const h=t.tokenize(o);if(!h.length)return;a++;const f=new Map;for(const d of h)f.set(d,(f.get(d)||0)+1);for(const[d,g]of f){const v={docIdx:l,keyIdx:u,subIdx:c,tf:g};let y=n.get(d);y||(y=[],n.set(d,y)),y.push(v),i.set(d,(i.get(d)||0)+1)}}for(const o of r){const{i:l,v:u,$:c}=o;if(u!==void 0){s(u,l,-1,-1);continue}if(c)for(let h=0;h<e;h++){const f=c[h];if(f)if(Array.isArray(f))for(const d of f)s(d.v,l,h,d.i??-1);else s(f.v,l,h,-1)}}return{terms:n,fieldCount:a,df:i}}function $B(r,e,t,n){const{i,v:a,$:s}=e;function o(l,u,c){const h=n.tokenize(l);if(!h.length)return;r.fieldCount++;const f=new Map;for(const d of h)f.set(d,(f.get(d)||0)+1);for(const[d,g]of f){const v={docIdx:i,keyIdx:u,subIdx:c,tf:g};let y=r.terms.get(d);y||(y=[],r.terms.set(d,y)),y.push(v),r.df.set(d,(r.df.get(d)||0)+1)}}if(a!==void 0){o(a,-1,-1);return}if(s)for(let l=0;l<t;l++){const u=s[l];if(u)if(Array.isArray(u))for(const c of u)o(c.v,l,c.i??-1);else o(u.v,l,-1)}}function dC(r,e){for(const[t,n]of r.terms){const i=n.filter(s=>s.docIdx!==e),a=n.length-i.length;a>0&&(r.fieldCount-=a,r.df.set(t,(r.df.get(t)||0)-a),i.length===0?(r.terms.delete(t),r.df.delete(t)):r.terms.set(t,i))}}class Bo{constructor(e,t,n){this.options={...Wt,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new fB(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;const t=this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options,n=lg(e,t);return this._lastQuery=e,this._lastSearcher=n,n}setCollection(e,t){if(this._docs=e,t&&!(t instanceof GA))throw new Error(sB);if(this._myIndex=t||Jk(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=Ny({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});this._invertedIndex=GB(this._myIndex.records,this._myIndex.keys.length,n)}}add(e){if(Gi(e)&&(this._docs.push(e),this._myIndex.add(e),this._invertedIndex)){const t=this._myIndex.records[this._myIndex.records.length-1],n=Ny({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics});$B(this._invertedIndex,t,this._myIndex.keys.length,n)}}remove(e=()=>!1){const t=[],n=[];for(let i=0,a=this._docs.length;i<a;i+=1)e(this._docs[i],i)&&(t.push(this._docs[i]),n.push(i));if(n.length){if(this._invertedIndex)for(const i of n)dC(this._invertedIndex,i);for(let i=n.length-1;i>=0;i-=1)this._docs.splice(n[i],1);this._myIndex.removeAll(n)}return t}removeAt(e){this._invertedIndex&&dC(this._invertedIndex,e);const t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),t}getIndex(){return this._myIndex}search(e,t){const{limit:n=-1}=t||{},{includeMatches:i,includeScore:a,shouldSort:s,sortFn:o,ignoreFieldNorm:l}=this.options;if(Vi(e)&&!e.trim()){let h=this._docs.map((f,d)=>({item:f,refIndex:d}));return Wp(n)&&n>-1&&(h=h.slice(0,n)),h}const u=Wp(n)&&n>0&&Vi(e);let c;if(u){const h=new UB(n);Vi(this._docs[0])?this._searchStringList(e,{heap:h,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:h,ignoreFieldNorm:l}),c=h.extractSorted(o)}else c=Vi(e)?Vi(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),LB(c,{ignoreFieldNorm:l}),s&&c.sort(o),Wp(n)&&n>-1&&(c=c.slice(0,n));return HB(c,this._docs,{includeMatches:i,includeScore:a})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),{records:a}=this._myIndex,s=t?null:[];return a.forEach(({v:o,i:l,n:u})=>{if(!Gi(o))return;const{isMatch:c,score:h,indices:f}=i.searchIn(o);if(c){const d={item:o,idx:l,matches:[{score:h,value:o,norm:u,indices:f}]};t?(d.score=_y(d.matches,{ignoreFieldNorm:n}),t.shouldInsert(d.score)&&t.insert(d)):s.push(d)}}),s}_searchLogical(e){const t=tF(e,this.options),n=(o,l,u)=>{if(!("children"in o)){const{keyId:d,searcher:g}=o;let v;return d===null?(v=[],this._myIndex.keys.forEach((y,A)=>{v.push(...this._findMatches({key:y,value:l[A],searcher:g}))})):v=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:g}),v&&v.length?[{idx:u,item:l,matches:v}]:[]}const{children:c,operator:h}=o,f=[];for(let d=0,g=c.length;d<g;d+=1){const v=c[d],y=n(v,l,u);if(y.length)f.push(...y);else if(h===ug.AND)return[]}return f},i=this._myIndex.records,a=new Map,s=[];return i.forEach(({$:o,i:l})=>{if(Gi(o)){const u=n(t,o,l);u.length&&(a.has(l)||(a.set(l,{idx:l,item:o,matches:[]}),s.push(a.get(l))),u.forEach(({matches:c})=>{a.get(l).matches.push(...c)}))}}),s}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){const i=this._getSearcher(e),{keys:a,records:s}=this._myIndex,o=t?null:[];return s.forEach(({$:l,i:u})=>{if(!Gi(l))return;const c=[];let h=!1,f=!1;if(a.forEach((d,g)=>{const v=this._findMatches({key:d,value:l[g],searcher:i});v.length?(c.push(...v),v[0].hasInverse&&(f=!0)):h=!0}),!(f&&h)&&c.length){const d={idx:u,item:l,matches:c};t?(d.score=_y(d.matches,{ignoreFieldNorm:n}),t.shouldInsert(d.score)&&t.insert(d)):o.push(d)}}),o}_findMatches({key:e,value:t,searcher:n}){if(!Gi(t))return[];const i=[];if(Ro(t))t.forEach(({v:a,i:s,n:o})=>{if(!Gi(a))return;const{isMatch:l,score:u,indices:c,hasInverse:h}=n.searchIn(a);l&&i.push({score:u,key:e,value:a,idx:s,norm:o,indices:c,hasInverse:h})});else{const{v:a,n:s}=t,{isMatch:o,score:l,indices:u,hasInverse:c}=n.searchIn(a);o&&i.push({score:l,key:e,value:a,norm:s,indices:u,hasInverse:c})}return i}}class qB{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Ny({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics});const n=this.analyzer.tokenize(e),i=t._invertedIndex,{df:a,fieldCount:s}=i;this.termSearchers=[],this.idfWeights=[];for(const o of n){this.termSearchers.push(new qA(o,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const l=a.get(o)||0,u=Math.log(1+(s-l+.5)/(l+.5));this.idfWeights.push(u)}}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let n=0,i=0,a=0;for(let l=0;l<this.termSearchers.length;l++){const u=this.termSearchers[l].searchIn(e),c=this.idfWeights[l];i+=c,u.isMatch&&(a++,n+=c*(1-u.score),u.indices&&t.push(...u.indices))}if(a===0)return{isMatch:!1,score:1};const s=i>0?1-n/i:0,o={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(o.indices=$A(t)),o}}Bo.version="7.3.0";Bo.createIndex=Jk;Bo.parseIndex=AB;Bo.config=Wt;Bo.match=function(r,e,t){return lg(r,{...Wt,...t}).searchIn(e)};Bo.parseQuery=tF;WA(MB);WA(qB);Bo.use=function(...r){r.forEach(e=>WA(e))};const wd=["Yellow C","Yellow 012 C","Orange 021 C","Warm Red C","Red 032 C","Rubine Red C","Rhodamine Red C","Purple C","Violet C","Blue 072 C","Reflex Blue C","Process Blue C","Green C","Black C","Yellow 0131 C","Red 0331 C","Magenta 0521 C","Violet 0631 C","Blue 0821 C","Green 0921 C","Black 0961 C","801 C","802 C","803 C","804 C","805 C","806 C","807 C","871 C","872 C","873 C","874 C","875 C","876 C","877 C","Medium Yellow C","Bright Orange C","Bright Red C","Strong Red C","Pink C","Medium Purple C","Dark Blue C","Medium Blue C","Bright Green C","Neutral Black C","100 C","101 C","102 C","103 C","104 C","105 C","7401 C","7402 C","7403 C","7404 C","7405 C","7406 C","7407 C","106 C","107 C","108 C","109 C","110 C","111 C","112 C","113 C","114 C","115 C","116 C","117 C","118 C","119 C","127 C","128 C","129 C","130 C","131 C","132 C","133 C","1205 C","1215 C","1225 C","1235 C","1245 C","1255 C","1265 C","120 C","121 C","122 C","123 C","124 C","125 C","126 C","7548 C","7549 C","7550 C","7551 C","7552 C","7553 C","7554 C","7555 C","7556 C","7557 C","7558 C","7559 C","7560 C","7561 C","134 C","135 C","136 C","137 C","138 C","139 C","140 C","1345 C","1355 C","1365 C","1375 C","1385 C","1395 C","1405 C","141 C","142 C","143 C","144 C","145 C","146 C","147 C","7408 C","7409 C","7410 C","7411 C","7412 C","7413 C","7414 C","7562 C","7563 C","7564 C","7565 C","7566 C","7567 C","7568 C","7569 C","7570 C","7571 C","7572 C","7573 C","7574 C","7575 C","712 C","713 C","714 C","715 C","716 C","717 C","718 C","148 C","149 C","150 C","151 C","152 C","153 C","154 C","155 C","156 C","157 C","158 C","159 C","160 C","161 C","1485 C","1495 C","1505 C","1525 C","1535 C","1545 C","1555 C","1565 C","1575 C","1585 C","1595 C","1605 C","1615 C","162 C","163 C","164 C","165 C","166 C","167 C","168 C","7576 C","7577 C","7578 C","7579 C","7580 C","7581 C","7582 C","1625 C","1635 C","1645 C","1655 C","1665 C","1675 C","1685 C","169 C","170 C","171 C","172 C","173 C","174 C","175 C","7583 C","7584 C","7585 C","7586 C","7587 C","7588 C","7589 C","7590 C","7591 C","7592 C","7593 C","7594 C","7595 C","7596 C","7597 C","7598 C","7599 C","7600 C","7601 C","7602 C","7603 C","7604 C","7605 C","7606 C","7607 C","7608 C","7609 C","7610 C","7611 C","7612 C","7613 C","7614 C","7615 C","7616 C","7617 C","7520 C","7521 C","7522 C","7523 C","7524 C","7525 C","7526 C","489 C","488 C","487 C","486 C","485 C","484 C","483 C","176 C","177 C","178 C","179 C","180 C","181 C","1765 C","1775 C","1785 C","1788 C","1795 C","1805 C","1815 C","1767 C","1777 C","1787 C","1797 C","1807 C","1817 C","7618 C","7619 C","7620 C","7621 C","7622 C","7623 C","7624 C","7625 C","7626 C","7627 C","7628 C","7629 C","7630 C","7631 C","7415 C","7416 C","7417 C","7418 C","7419 C","7420 C","7421 C","182 C","183 C","184 C","185 C","186 C","187 C","188 C","196 C","197 C","198 C","199 C","200 C","201 C","202 C","189 C","190 C","191 C","192 C","193 C","194 C","195 C","1895 C","1905 C","1915 C","1925 C","1935 C","1945 C","1955 C","705 C","706 C","707 C","708 C","709 C","710 C","711 C","698 C","699 C","700 C","701 C","702 C","703 C","704 C","203 C","204 C","205 C","206 C","207 C","208 C","209 C","210 C","211 C","212 C","213 C","214 C","215 C","216 C","7422 C","7423 C","7424 C","7425 C","7426 C","7427 C","7428 C","7632 C","7633 C","7634 C","7635 C","7636 C","7637 C","7638 C","217 C","218 C","219 C","220 C","221 C","222 C","7639 C","7640 C","7641 C","7642 C","7643 C","7644 C","7645 C","223 C","224 C","225 C","226 C","227 C","228 C","229 C","230 C","231 C","232 C","233 C","234 C","235 C","670 C","671 C","672 C","673 C","674 C","675 C","676 C","677 C","678 C","679 C","680 C","681 C","682 C","683 C","684 C","685 C","686 C","687 C","688 C","689 C","690 C","510 C","509 C","508 C","507 C","506 C","505 C","504 C","7429 C","7430 C","7431 C","7432 C","7433 C","7434 C","7435 C","691 C","692 C","693 C","694 C","695 C","696 C","697 C","496 C","495 C","494 C","493 C","492 C","491 C","490 C","503 C","502 C","501 C","500 C","499 C","498 C","497 C","5035 C","5025 C","5015 C","5005 C","4995 C","4985 C","4975 C","236 C","237 C","238 C","239 C","240 C","241 C","242 C","2365 C","2375 C","2385 C","2395 C","2405 C","2415 C","2425 C","243 C","244 C","245 C","246 C","247 C","248 C","249 C","7646 C","7647 C","7648 C","7649 C","7650 C","7651 C","7652 C","250 C","251 C","252 C","253 C","254 C","255 C","517 C","516 C","515 C","514 C","513 C","512 C","511 C","7436 C","7437 C","7438 C","7439 C","7440 C","7441 C","7442 C","2562 C","2572 C","2582 C","2592 C","2602 C","2612 C","2622 C","7653 C","7654 C","7655 C","7656 C","7657 C","7658 C","7659 C","524 C","523 C","522 C","521 C","520 C","519 C","518 C","5245 C","5235 C","5225 C","5215 C","5205 C","5195 C","5185 C","5175 C","5165 C","5155 C","5145 C","5135 C","5125 C","5115 C","531 C","530 C","529 C","528 C","527 C","526 C","525 C","256 C","257 C","258 C","259 C","260 C","261 C","262 C","2563 C","2573 C","2583 C","2593 C","2603 C","2613 C","2623 C","7660 C","7661 C","7662 C","7663 C","7664 C","7665 C","7666 C","2567 C","2577 C","2587 C","2597 C","2607 C","2617 C","2627 C","263 C","264 C","265 C","266 C","267 C","268 C","269 C","2635 C","2645 C","2655 C","2665 C","2685 C","2695 C","270 C","271 C","272 C","273 C","274 C","275 C","276 C","2705 C","2715 C","2725 C","2735 C","2745 C","2755 C","2765 C","7667 C","7668 C","7669 C","7670 C","7671 C","7672 C","7673 C","7443 C","7444 C","7445 C","7446 C","7447 C","7448 C","7449 C","7674 C","7675 C","7676 C","7677 C","7678 C","7679 C","7680 C","663 C","664 C","665 C","666 C","667 C","668 C","669 C","5315 C","5305 C","5295 C","5285 C","5275 C","5265 C","5255 C","538 C","537 C","536 C","535 C","534 C","533 C","532 C","7541 C","7542 C","7543 C","7544 C","7545 C","7546 C","7547 C","552 C","551 C","550 C","549 C","548 C","547 C","546 C","5455 C","5445 C","5435 C","5425 C","5415 C","5405 C","5395 C","642 C","643 C","644 C","645 C","646 C","647 C","648 C","649 C","650 C","651 C","652 C","653 C","654 C","655 C","656 C","657 C","658 C","659 C","660 C","661 C","662 C","7450 C","7451 C","7452 C","7453 C","7454 C","7455 C","7456 C","2706 C","2716 C","2726 C","2736 C","2746 C","2756 C","2766 C","2708 C","2718 C","2728 C","2738 C","2748 C","2758 C","2768 C","2707 C","2717 C","2727 C","2747 C","2757 C","2767 C","277 C","278 C","279 C","280 C","281 C","282 C","283 C","284 C","285 C","286 C","287 C","288 C","289 C","7681 C","7682 C","7683 C","7684 C","7685 C","7686 C","7687 C","545 C","544 C","543 C","542 C","541 C","540 C","539 C","290 C","291 C","292 C","293 C","294 C","295 C","296 C","2905 C","2915 C","2925 C","2935 C","2945 C","2955 C","2965 C","297 C","298 C","299 C","300 C","301 C","302 C","303 C","7688 C","7689 C","7690 C","7691 C","7692 C","7693 C","7694 C","2975 C","2985 C","2995 C","3005 C","3015 C","3025 C","3035 C","7695 C","7696 C","7697 C","7698 C","7699 C","7700 C","7701 C","7457 C","7458 C","7459 C","7460 C","7461 C","7462 C","7463 C","304 C","305 C","306 C","307 C","308 C","309 C","635 C","636 C","637 C","638 C","639 C","640 C","641 C","7702 C","7703 C","7704 C","7705 C","7706 C","7707 C","7708 C","628 C","629 C","630 C","631 C","632 C","633 C","634 C","310 C","311 C","312 C","313 C","314 C","315 C","316 C","3105 C","3115 C","3125 C","3135 C","3145 C","3155 C","3165 C","7709 C","7710 C","7711 C","7712 C","7713 C","7714 C","7715 C","317 C","318 C","319 C","320 C","321 C","322 C","323 C","7464 C","7465 C","7466 C","7467 C","7468 C","7469 C","7470 C","7471 C","7472 C","7473 C","7474 C","7475 C","7476 C","7477 C","5523 C","5513 C","5503 C","5493 C","5483 C","5473 C","5463 C","7716 C","7717 C","7718 C","7719 C","7720 C","7721 C","7722 C","324 C","325 C","326 C","327 C","328 C","329 C","330 C","3242 C","3252 C","3262 C","3272 C","3282 C","3292 C","3302 C","3245 C","3255 C","3265 C","3275 C","3285 C","3295 C","3305 C","3248 C","3258 C","3268 C","3278 C","3288 C","3298 C","3308 C","566 C","565 C","564 C","563 C","562 C","561 C","560 C","573 C","572 C","571 C","570 C","569 C","568 C","567 C","559 C","558 C","557 C","556 C","555 C","554 C","553 C","5595 C","5585 C","5575 C","5565 C","5555 C","5545 C","5535 C","5665 C","5655 C","5645 C","5635 C","5625 C","5615 C","5605 C","5527 C","5517 C","5507 C","5497 C","5487 C","5477 C","5467 C","621 C","622 C","623 C","624 C","625 C","626 C","627 C","331 C","332 C","333 C","334 C","335 C","336 C","337 C","338 C","339 C","340 C","341 C","342 C","343 C","7723 C","7724 C","7725 C","7726 C","7727 C","7728 C","7729 C","3375 C","3385 C","3395 C","3405 C","3415 C","3425 C","3435 C","344 C","345 C","346 C","347 C","348 C","349 C","350 C","351 C","352 C","353 C","354 C","355 C","356 C","357 C","7478 C","7479 C","7480 C","7481 C","7482 C","7483 C","7484 C","7730 C","7731 C","7732 C","7733 C","7734 C","7735 C","7736 C","7737 C","7738 C","7739 C","7740 C","7741 C","7742 C","7743 C","358 C","359 C","360 C","361 C","362 C","363 C","364 C","7485 C","7486 C","7487 C","7488 C","7489 C","7490 C","7491 C","365 C","366 C","367 C","368 C","369 C","370 C","371 C","372 C","373 C","374 C","375 C","376 C","377 C","378 C","580 C","579 C","578 C","577 C","576 C","575 C","574 C","5807 C","5797 C","5787 C","5777 C","5767 C","5757 C","5747 C","5875 C","5865 C","5855 C","5845 C","5835 C","5825 C","5815 C","5803 C","5793 C","5783 C","5773 C","5763 C","5753 C","5743 C","7492 C","7493 C","7494 C","7495 C","7496 C","7497 C","7498 C","7744 C","7745 C","7746 C","7747 C","7748 C","7749 C","7750 C","379 C","380 C","381 C","382 C","383 C","384 C","385 C","386 C","387 C","388 C","389 C","390 C","391 C","392 C","587 C","586 C","585 C","584 C","583 C","582 C","581 C","393 C","394 C","395 C","396 C","397 C","398 C","399 C","3935 C","3945 C","3955 C","3965 C","3975 C","3985 C","3995 C","600 C","601 C","602 C","603 C","604 C","605 C","606 C","607 C","608 C","609 C","610 C","611 C","612 C","613 C","461 C","460 C","459 C","458 C","457 C","456 C","455 C","614 C","615 C","616 C","617 C","618 C","619 C","620 C","7751 C","7752 C","7753 C","7754 C","7755 C","7756 C","7757 C","7758 C","7759 C","7760 C","7761 C","7762 C","7763 C","7764 C","7765 C","7766 C","7767 C","7768 C","7769 C","7770 C","7771 C","4545 C","4535 C","4525 C","4515 C","4505 C","4495 C","4485 C","454 C","453 C","452 C","451 C","450 C","449 C","448 C","7499 C","7500 C","7501 C","7502 C","7503 C","7504 C","7505 C","468 C","467 C","466 C","465 C","464 C","463 C","462 C","7506 C","7507 C","7508 C","7509 C","7510 C","7511 C","7512 C","719 C","720 C","721 C","722 C","723 C","724 C","725 C","475 C","474 C","473 C","472 C","471 C","470 C","469 C","726 C","727 C","728 C","729 C","730 C","731 C","732 C","4685 C","4675 C","4665 C","4655 C","4645 C","4635 C","4625 C","7513 C","7514 C","7515 C","7516 C","7517 C","7518 C","7519 C","4755 C","4745 C","4735 C","4725 C","4715 C","4705 C","4695 C","482 C","481 C","480 C","479 C","478 C","477 C","476 C","7527 C","7528 C","7529 C","7530 C","7531 C","7532 C","7533 C","7534 C","7535 C","7536 C","7537 C","7538 C","7539 C","7540 C","427 C","428 C","429 C","430 C","431 C","432 C","433 C","420 C","421 C","422 C","423 C","424 C","425 C","426 C","441 C","442 C","443 C","444 C","445 C","446 C","447 C","413 C","414 C","415 C","416 C","417 C","418 C","419 C","400 C","401 C","402 C","403 C","404 C","405 C","406 C","407 C","408 C","409 C","410 C","411 C","412 C","434 C","435 C","436 C","437 C","438 C","439 C","440 C","Warm Gray 1 C","Warm Gray 2 C","Warm Gray 3 C","Warm Gray 4 C","Warm Gray 5 C","Warm Gray 6 C","Warm Gray 7 C","Warm Gray 8 C","Warm Gray 9 C","Warm Gray 10 C","Warm Gray 11 C","Cool Gray 1 C","Cool Gray 2 C","Cool Gray 3 C","Cool Gray 4 C","Cool Gray 5 C","Cool Gray 6 C","Cool Gray 7 C","Cool Gray 8 C","Cool Gray 9 C","Cool Gray 10 C","Cool Gray 11 C","Black 2 C","Black 3 C","Black 4 C","Black 5 C","Black 6 C","Black 7 C"],ic=["FEDD00","FFD700","FE5000","F9423A","EF3340","CE0058","E10098","BB29BB","440099","10069F","001489","0085CA","00AB84","2D2926","F2F0A1","FCAEBB","F1B2DC","BF9BDE","74D1EA","9DE7D7","9E978E","009ACE","44D62C","FFE900","FFAA4D","FF7276","FF3EB5","EA27C2","84754E","85714D","866D4B","8B6F4E","87674F","8B634B","8A8D8F","FFD900","FF5E00","F93822","CE0056","D62598","4E008E","00239C","0084CA","00B08B","222223","F6EB61","F7EA48","FCE300","C5A900","AF9800","897A27","F5E1A4","ECD898","EED484","F4DA40","F2CD00","F1C400","CBA052","F9E547","FBE122","FEDB00","FFD100","DAAA00","AA8A00","9C8412","FAE053","FBDD40","FDDA24","FFCD00","C99700","AC8400","897322","F3DD6D","F3D54E","F3D03E","F2A900","CC8A00","A07400","6C571B","F8E08E","FBD872","FFC845","FFB81C","C69214","AD841F","886B25","FBDB65","FDD757","FED141","FFC72C","EAAA00","B58500","9A7611","FFC600","FFB500","D19000","B47E00","73531D","5A4522","4B3D2A","D29F13","B78B20","9F7D23","967126","8F6A2A","7D622E","6C5D34","FDD26E","FFC658","FFBF3F","FFA300","DE7C00","AF6D04","74531C","FDD086","FFC56E","FFB549","FF9E1B","D57800","996017","6E4C1E","F2C75C","F1BE48","F1B434","ED8B00","CF7F00","A76D11","715C2A","F6BE00","F0B323","FEAD77","E6A65D","D38235","DC8633","C16C18","BD9B60","D69A2D","DB8A06","CD7925","AD6433","89532F","775135","D78825","D3832B","C67D30","B67233","A7662B","9E6A38","835D32","FCC89B","FDBE87","FDAA63","F68D2E","EA7600","D45D00","BE4D00","FECB8B","FFC27B","FFB25B","FF8200","E57200","BE6A14","9B5A1A","EFD19F","EFBE7D","ECA154","E87722","CB6015","A1561C","603D20","FFAE62","FF8F1C","FF6900","B94700","94450B","653819","FFB990","FFA06A","FF7F32","FF6A13","D86018","A65523","8B4720","FFBE9F","FF9D6E","FF7F41","FF671F","E35205","BE531C","73381D","DB864E","E07E3C","DC6B2F","DC582A","C05131","864A33","674736","FFA38B","FF8D6D","FF6A39","FC4C02","DC4405","A9431E","833921","FFB3AB","FF8674","FF5C39","FA4616","CF4520","963821","6B3529","C4622D","BA5826","AF5C37","9E5330","924C2E","7B4D35","5C4738","D4B59E","C07D59","B15533","9D432C","7C3A2D","6B3D2E","5C3D31","D14124","BD472A","B33D26","8D3F2B","83412C","7B4931","674230","E4D5D3","E1BBB4","D6938A","C26E60","A4493D","823B34","683431","DDBCB0","CA9A8E","BC8A7E","A37F74","866761","6B4C4C","583D3E","EABEB0","C09C83","B46A55","AB5C57","A45248","9A6A4F","8A391B","ECC3B2","ECBAA8","EAA794","E8927C","DA291C","9A3324","653024","FFB1BB","FF808B","FF585D","E03C31","BE3A34","81312F","FFA3B5","FF8DA1","F8485E","EE2737","D22630","AF272F","7C2529","FCAFC0","FB637E","F4364C","CB333B","A4343A","643335","C66E4E","C04C36","B7312C","AB2328","93272C","8A2A2B","802F2D","E1523D","C63527","A72B2A","9E2A2B","6D3332","633231","572D2D","E6BAA8","E56A54","E04E39","CD545B","B04A5A","9B2242","651D32","FABBCB","FC9BB3","F65275","E4002B","C8102E","A6192E","76232F","ECC7CD","E89CAE","DF4661","D50032","BA0C2F","9D2235","862633","F8A3BC","F67599","EF426F","E40046","BF0D3E","9B2743","782F40","F5B6CD","F59BBB","EF4A81","E0004D","C5003E","A6093D","8A1538","F5DADF","F7CED7","F9B5C4","F890A5","EF6079","E03E52","CB2C30","F2D4D7","F4C3CC","F2ACB9","E68699","D25B73","B83A4B","9E2A2F","ECB3CB","E782A9","E0457B","CE0037","A50034","861F41","6F263D","F99FC9","F57EB6","F04E98","E31C79","CE0F69","AC145A","7D2248","F4CDD4","E06287","E24585","B52555","A4123F","971B2F","6A2C3E","D6C9CA","C4A4A7","C16784","C63663","BC204B","912F46","7E2D40","EABEDB","E56DB1","DA1884","A50050","910048","6C1D45","936D73","934054","8E2C48","732E4A","672E45","582D40","502B3A","EF95CF","EB6FBD","DF1995","D0006F","AA0061","890C58","672146","F4A6D7","F277C6","E93CAC","C6007E","A20067","840B55","EAD3E2","E6BCD8","DFA0C9","D986BA","C6579A","AE2573","960051","E5CEDB","E3C8D8","DEBED2","C996B6","B06C96","994878","7C2855","E4C6D4","DCB6C9","D0A1BA","BE84A3","A76389","893B67","612141","EBBECB","E8B3C3","E4A9BB","D592AA","84344E","6F2C3F","572932","E2BCCB","DCA9BF","C9809E","B55C80","A73A64","9B3259","872651","E9CDD0","E4BEC3","D7A3AB","C48490","B46B7A","984856","893C47","F2C6CF","F1BDC8","E9A2B2","DC8699","8F3237","7F3035","5D2A2C","E9C4C7","E5BAC1","DAA5AD","C6858F","7A3E3A","6A3735","512F2E","DFC2C3","DBB7BB","CCA1A6","B07C83","9C6169","874B52","3F2021","F1A7DC","EC86D0","E45DBF","DB3EB1","C5299B","AF1685","80225F","EFBAE1","E277CD","D539B5","C800A1","B0008E","9E007E","830065","EAB8E4","E59BDC","DD7FD3","C724B1","BB16A3","A51890","80276C","A56E87","A83D72","991E66","8A1B61","722257","6A2A5B","5E2751","E7BAE4","DD9CDF","C964CF","AD1AAC","981D97","72246C","EBC6DF","E6BEDD","E2ACD7","D48BC8","93328E","833177","612C51","EEDAEA","CCAED0","D59ED7","B288B9","A277A6","9F5CC0","963CBD","D7A9E3","C98BDB","AC4FC6","9B26B6","87189D","772583","653165","948794","A2789C","A15A95","8E3A80","6E2B62","6A3460","5D3754","D5C2D8","C9B1D0","BA9CC5","A57FB2","642F6C","59315F","4B3048","DBCDD3","D0BEC7","C6B0BC","AF95A6","86647A","66435A","4A3041","D8C8D1","D3C0CD","BFA5B8","9B7793","7E5475","693C5E","512A44","DFC8E7","D7B9E4","CAA2DD","B580D1","8031A7","702F8A","572C5F","D6BFDD","C6A1CF","8C4799","6D2077","642667","5D285F","51284F","CBA3D8","B884CB","A05EB5","84329B","702082","671E75","5F2167","9991A4","8D6E97","7A4183","6B3077","653279","5E366E","5C4E63","C1A0DA","A77BCA","8246AF","5C068C","500778","470A68","3C1053","D7C6E6","C1A7E2","9063CD","753BBD","5F259F","582C83","512D6D","C5B4E3","AD96DC","9678D3","7D55C7","330072","2E1A47","B4B5DF","9595D2","7474C1","24135F","211551","201747","221C35","A7A4E0","8B84D7","685BC7","2E008B","280071","250E62","201547","6E7CA0","686E9F","615E9B","565294","514689","4C4184","535486","DDDAE8","B6B8DC","A7A2C3","8986CA","5D4777","4B384C","41273B","878CB4","7C7FAB","7566A0","6F5091","68478D","563D82","523178","E5E1E6","E0DBE3","C6BCD0","A192B2","7C6992","614B79","3F2A56","D8D7DF","C6C4D2","B3B0C4","8D89A5","595478","403A60","1E1A34","C5CFDA","BBC7D6","A2B2C8","8E9FBC","1B365D","1F2A44","1C1F2A","D9E1E2","A4BCC2","98A4AE","768692","425563","253746","131E29","B9D3DC","A3C7D2","8DB9CA","6BA4B8","003D4C","00313C","072B31","BFCED6","B7C9D3","A6BBC8","7A99AC","5B7F95","4F758B","081F2C","D1DDE6","C6D6E3","9BB8D3","7DA1C4","5E8AB4","236192","002E5D","DBE2E9","CED9E5","A7BCD6","7D9BC1","326295","003A70","002554","DDE5ED","C8D8EB","B1C9E8","7BA4DB","407EC9","003594","001A70","BDC5DB","89ABE3","8094DD","7BA6DE","5F8FB4","3A5DAE","606EB2","CBD3EB","9FAEE5","485CC7","1E22AA","171C8F","151F6D","141B4D","B8CCEA","5C88DA","0047BB","06038D","001871","001E62","071D49","C3D7EE","A7C6ED","307FE2","001A72","001E60","13294B","ABCAE9","8BB8E8","418FDE","012169","00205B","041E42","92C1E9","6CACE4","0072CE","0033A0","003087","002D72","0C2340","94A9CB","6787B7","426DA9","385E9D","2C5697","1D4F91","1D428A","C6DAE7","BDD6E6","A4C8E1","7BAFD4","003C71","003057","00263A","B9D9EB","9BCBEB","69B3E7","003DA5","002F6C","002855","041C2C","8DC8E8","62B5E5","009CDE","0057B8","004C97","003865","00263E","71C5E8","41B6E6","00A3E0","005EB8","004B87","003B5C","002A3A","4698CB","298FC2","0076A8","006298","005587","004976","01426A","99D6EA","5BC2E7","00A9E0","0077C8","00629B","004F71","003E51","7BA7BC","6399AE","4E87A0","41748D","34657F","165C7D","005776","BBDDE6","71B2C9","4298B5","0086BF","007DBA","00558C","002B49","9ADBE8","59CBE8","00B5E2","006BA6","00587C","003B49","A4DBE8","8BD3E6","4EC3E0","00AFD7","0095C8","0082BA","0067A0","48A9C5","009CBD","0085AD","007096","006A8E","00617F","005670","B8DDE1","9BD3DD","77C5D5","3EB1C8","0093B2","007396","005F83","6AD1E3","05C3DE","00A9CE","0092BC","007FA3","00677F","004851","68D2DF","00C1D5","00AEC7","008EAA","00778B","006272","004F59","63B1BC","00A7B5","0097A9","00859B","007D8A","007680","006269","B1E4E3","88DBDF","2DCCD3","009CA6","008C95","007377","005F61","A0D1CA","40C1AC","00B0B9","00A3AD","007398","005F86","005A70","7EDDD3","5CB8B2","279989","007681","487A7B","0D5257","244C5A","B6CFD0","ABC7CA","94B7BB","7FA9AE","4F868E","115E67","07272D","00968F","00857D","007672","006D68","00635B","005E5D","005151","9CDBD9","64CCC9","00B2A9","008675","007367","00685E","00534C","71DBD4","2AD2C9","00BFB3","00A499","008578","00594F","004C45","7CE0D3","2CD5C4","00C7B1","00B398","009681","007864","004E42","6DCDB8","49C5B1","00AB8E","009B77","008264","006A52","034638","B9DCD2","A1D6CA","86C8BC","6BBBAE","006F62","00594C","1D3C34","B5E3D8","A5DFD3","98DBCE","6BCABA","00816D","006C5B","173F35","ADCAB8","9ABEAA","85B09A","6FA287","28724F","205C40","284734","BFCEC2","A7BDB1","92ACA0","7F9C90","5C7F71","43695B","183028","BAC5B9","B0BDB0","A3B2A4","94A596","708573","5E7461","22372B","BCC9C5","B1C0BC","9DB0AC","829995","5D7975","3E5D58","18332F","D1E0D7","B7CDC2","9AB9AD","789F90","507F70","285C4D","13322B","A7E6D7","8CE2D0","3CDBC0","009775","007B5F","00664F","8FD6BD","6ECEB2","00B388","00965E","007A53","006747","115740","50A684","00966C","008755","007B4B","006F44","006845","005844","7AE1BF","47D7AC","00C389","00AF66","007749","006341","154734","A0DAB3","91D6AC","71CC98","009A44","00843D","046A38","2C5234","A2E4B8","8FE2B0","80E0A7","00B140","009639","007A33","215732","9BE3BF","26D07C","00BF6F","00B74F","009F4D","275D38","00573F","4B9560","228848","007A3E","007041","286140","36573B","395542","6BA539","48A23F","319B42","3A913F","44883E","4A773C","44693D","ADDC91","A1D884","6CC24A","43B02A","509E2F","4C8C2B","4A7729","D0DEBB","BCE194","8EDD65","78D64B","74AA50","719949","79863C","C2E189","B7DD79","A4D65E","78BE20","64A70B","658D1B","546223","D4EB8E","CDEA80","C5E86C","97D700","84BD00","7A9A01","59621D","C4D6A4","BCD19B","B7CE95","A9C47F","789D4A","67823A","4E5B31","D0D1AB","C6C89B","BABD8B","A2A569","8A8D4A","6D712E","3D441E","D2CE9E","CBC793","C0BB87","AFA96E","A09958","89813D","555025","C3C6A8","B3B995","A3AA83","899064","737B4C","5E6738","3E4827","BFCC80","BBC592","9CAF88","8F993E","76881D","7A7256","5B6236","BABC16","ABAD23","999B30","888D30","7C8034","727337","656635","E2E868","DBE442","CEDC00","C4D600","A8AD00","949300","787121","E9EC6B","E3E935","E0E721","D0DF00","B5BD00","9A9500","827A04","E3E48D","E0E27C","DBDE70","D2D755","B7BF10","8E8C13","625D20","F0EC74","EDE939","ECE81A","E1E000","BFB800","ADA400","A09200","F3EA5D","F3E500","EFDF00","EEDC00","BBA600","9A8700","685C20","F1EB9C","F0E991","F0E87B","EDE04B","EADA24","E1CD00","CFB500","EBE49A","E9E186","E6DE77","E1D555","D7C826","C4B000","B39B00","E9DF97","E4D77E","DECD63","D9C756","B89D18","A28E2A","695B24","DCD59A","D6CF8D","D0C883","C0B561","AC9F3C","9F912A","8A7B19","CAB64B","CFB023","C1A01E","A08629","897630","736635","675E33","D4C304","C4B200","91852C","747136","5D6439","585C3B","535435","BBB323","B4A91F","AA9D2E","8F7E35","716135","635939","4E4934","D5CB9F","CFC493","C5B783","B3A369","998542","8C7732","614F25","CAC7A7","BFBB98","B0AA7E","9B945F","594A25","524727","4A412A","F1E6B2","DFD1A7","D9C89E","CEB888","A89968","94795D","816040","DDCBA4","D3BC8D","C6AA76","B9975B","8B5B29","744F28","5C462B","EFDBB2","FCD299","E1B87F","D6A461","C6893F","B77729","A6631B","EDC8A3","E7B78A","DDA46F","C88242","B36924","934D11","7D3F16","F3CFB3","F1C6A7","F0BF9B","E59E6D","B86125","A45A2A","693F23","E0C09F","D9B48F","CDA077","B58150","9E652E","774212","623412","E0C6AD","DCBFA6","CDA788","BF9474","AD7C59","946037","4F2C1D","E1B7A7","D5A286","C58B68","99552B","85431E","6D4F47","5E4B3C","D7C4B7","CDB5A7","C0A392","AE8A79","956C58","7C4D3A","5B3427","DBC8B6","D3BBA8","C6A992","AA8066","703F2A","623B2A","4E3629","D6D2C4","C5B9AC","B7A99A","A39382","7A6855","63513D","473729","D1CCBD","B7B09C","A69F88","A7ACA2","949A90","8E9089","4B4F54","D0D3D4","C1C6C8","A2AAAD","7C878E","5B6770","333F48","1D252D","C7C9C7","B2B4B2","9EA2A2","898D8D","707372","54585A","25282A","BEC6C4","A2ACAB","919D9D","717C7D","505759","3F4444","373A36","BABBB1","A8A99E","919388","7E7F74","65665C","51534A","212322","C4BFB6","AFA9A0","9D968D","8C857B","776E64","696158","C4BCB7","B2A8A2","978C87","857874","746661","5E514D","382F2D","D0C4C5","C1B2B6","AB989D","7B6469","584446","453536","382E2C","D7D2CB","CBC4BC","BFB8AF","B6ADA5","ACA39A","A59C94","968C83","8C8279","83786F","796E65","6E6259","D9D9D6","D0D0CE","C8C9C7","BBBCBC","B1B3B3","A7A8AA","97999B","888B8D","75787B","63666A","53565A","332F21","212721","31261D","3E2B2E","101820","3D3935"],w0=ic.map(r=>[parseInt(r.substring(0,2),16),parseInt(r.substring(2,4),16),parseInt(r.substring(4,6),16)]);function WB(r){const e=wd.indexOf(r);return e>=0?ic[e]:""}function rF(r){const e=ic.indexOf(r);return e>=0?wd[e]:""}function QB(r,e=64){const t=[],n=[],i=rF(r);i&&t.push({pms:i,hex:r,distance:0});const a=parseInt(r.substring(0,2),16),s=parseInt(r.substring(2,4),16),o=parseInt(r.substring(4,6),16);let l,u,c;for(let h=0;h<ic.length;h++){l=w0[h][0],u=w0[h][1],c=w0[h][2];const f=Math.sqrt(Math.pow(a-l,2)+Math.pow(s-u,2)+Math.pow(o-c,2));n.push(f)}for(let h=0;h<n.length;h++)n[h]<=e&&!t.some(f=>f.pms===wd[h])&&t.push({pms:wd[h],hex:ic[h],distance:n[h]});return t.sort((h,f)=>h.distance-f.distance)}const YB=wd.map((r,e)=>({pms:r,hex:ic[e]})),XB=new Bo(YB,{keys:["pms"]});function JB(r,e){return XB.search(r,e?{limit:e}:void 0)}let pf=null;function nF(r){if(r.startsWith("#"))return hC(r);if(!document)throw new Error("browserColorToHex is only supported on browsers");if(pf||(pf=document.createElement("canvas").getContext("2d")),!pf)throw new Error("Failed to create canvas context required to convert colors");pf.fillStyle=r;const e=hC(pf.fillStyle);return e||console.error(`Unknown browser color ${r}`),e}function hC(r){const e=r.substring(1).toUpperCase();return e.length===6?e:e.length===3?`${e[0]}${e[0]}${e[1]}${e[1]}${e[2]}${e[2]}`:""}const ep=r=>{const e=iF(r.spotColor);return e?`${r.browserValue} ${e}`:r.browserValue},iF=r=>{if(!r)return"";if(r.profileName.includes("/")&&r.profileName.includes(".icc")){const e=r.profileName.replace(/\s/g,"-"),t=e.lastIndexOf("/");return`icc-named-color(${e.slice(t+1).slice(0,-4)}, ${r.namedColor})`}return`icc-named-color(${r.profileName}, ${r.namedColor})`},Ly=r=>{const e=r.split(/[ ](?=[^)]*?(?:\(|$))/);if(e.length===0)return{browserValue:"#000000"};if(e.length===1)return{browserValue:e[0]};const t=e[1].match(/\(([^)]+)\)/gm);if(!t)throw new Error("Unhandled state of color value in SVG");const n=t[0].replace(/[() ]/g,"").split(",");return{browserValue:e[0],spotColor:{profileName:n[0],namedColor:n[1]}}},KB=["altGlyph","circle","ellipse","path","polygon","polyline","rect","text","textPath","tref","tspan"],ZB=["fill","stroke"],ac=(r,e)=>{e(r),r.children.length>0&&Array.from(r.children).forEach(t=>ac(t,e))},aF=(r,e)=>{const t=e(r);if(t)return t;const n=r.parentElement;if(n)return aF(n,e)},e3=(r,e)=>{try{return r.matches(e)}catch{return r.classList.contains(e.substring(1))}},jg=(r,e=!1)=>{!e&&r.setAttribute("preserveAspectRatio","none");const t=[];ac(r,n=>{if(n.tagName==="script"){n.remove();return}if(n.tagName==="style"){try{Wk.parse(n.innerHTML).stylesheet?.rules.forEach(s=>{t.push(s)}),n.remove()}catch(a){console.error(a)}return}const i=n.attributes.getNamedItem("style")?.value?.trim();if(i){const a=[];i.split(";").forEach(o=>{const l=o.trim();if(l){const[u,c]=l.split(":"),h=u.toLowerCase();ZB.indexOf(h)>-1?n.setAttribute(h,c.trim()):a.push(l)}}),a.length>0?n.setAttribute("style",a.join(";")):n.removeAttribute("style")}}),ac(r,n=>{t.forEach(i=>{i.selectors?.forEach(a=>{e3(n,a)&&i.declarations?.forEach(s=>{s.property&&s.value&&n.setAttribute(s.property,s.value)})})})})},t3=r=>{const e=/pt|pc|mm|cm|in/gm,t=r.getAttribute("viewBox"),n=r.getAttribute("width"),i=r.getAttribute("height");if(!t)throw new Error("viewBox not specified on SVG!");n&&r.setAttribute("width",n.replace(e,"")),i&&r.setAttribute("height",i.replace(e,""))},sF=r=>os().parseFromString(r,"image/svg+xml").firstElementChild,r3=(r,e,t)=>{r.setAttribute("height",`${t}px`),r.setAttribute("width",`${e}px`)},oF=(r,e,t)=>{ac(r,n=>{const i=n.attributes.getNamedItem("fill");i&&i.value!=="none"&&n.classList.forEach(s=>{if(s.startsWith("spiff-fill")){const o=e[s.replace("spiff-fill-","")];if(o)n.setAttribute("fill",t?ep(o):o.browserValue);else{const l=e[s];l&&n.setAttribute("fill",t?ep(l):l.browserValue)}}});const a=n.attributes.getNamedItem("stroke");a&&a.value!=="none"&&n.classList.forEach(s=>{if(s.startsWith("spiff-stroke")){const o=e[s.replace("spiff-stroke-","")];if(o)n.setAttribute("stroke",t?ep(o):o.browserValue);else{const l=e[s];l&&n.setAttribute("fill",t?ep(l):l.browserValue)}}})})},lF=r=>Po().serializeToString(r),QA=(r,e,t,n,i)=>{const a=sF(r);if(!a)throw new Error("Failed to read SVG.");return r3(a,e,t),oF(a,n,i),lF(a)},Gg=(r,e,t)=>{const n=sF(r);if(!n)throw new Error("Failed to read SVG.");return oF(n,e,t),lF(n)},n3=r=>{const e=/<svg.*<\/svg>/s,t=r.match(e)||[],n=t?.length>0?t[0]:"";return os().parseFromString(n,"image/svg+xml")},Oa=async r=>{const t=n3(r).firstElementChild;if(!t)throw new Error("Failed to read SVG.");jg(t);const n={};ac(t,s=>{if(KB.includes(s.tagName)&&!s.attributes.getNamedItem("fill")){let u="black";const c=s.parentElement;if(c){const h=aF(c,f=>{const g=f.style.fill;if(g)return g;const v=f.getAttribute("fill");if(v)return v});h&&(u=h)}s.setAttribute("fill",u)}const o=s.attributes.getNamedItem("fill");if(o&&o.value!=="none"&&!o.value.startsWith("url(")){const u=Ly(o.value),c=u.browserValue.replace(/\W/g,""),h=`spiff-fill-${c}`;s.setAttribute("fill",u.browserValue),s.classList.add(h),n[c]=u}const l=s.attributes.getNamedItem("stroke");if(l&&l.value!=="none"&&!l.value.startsWith("url(")){const u=Ly(l.value),c=u.browserValue.replace(/\W/g,""),h=`spiff-stroke-${c}`;s.classList.add(h),s.setAttribute("stroke",u.browserValue),n[c]=u}});const a=Po().serializeToString(t);return{colors:n,svg:a}},i3=ke`
160
160
  fragment AssetMetadataFields on Asset {
161
161
  metadata {
162
162
  key
163
163
  value
164
164
  }
165
165
  }
166
- `,a3=Fe`
166
+ `,a3=ke`
167
167
  fragment AssetVersionsFields on Asset {
168
168
  versions {
169
169
  name
170
170
  link
171
171
  }
172
172
  }
173
- `,$d=(r,e)=>Fe`
173
+ `,$d=(r,e)=>ke`
174
174
  ${r&&i3||""}
175
175
  ${e&&a3||""}
176
176
  fragment AssetFields on Asset {
@@ -212,7 +212,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
212
212
  ${r&&"...AssetMetadataFields"||""}
213
213
 
214
214
  }
215
- `,uF=Fe`
215
+ `,uF=ke`
216
216
  fragment MaterialFields on Material {
217
217
  id
218
218
  name
@@ -259,14 +259,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
259
259
  fileLink
260
260
  }
261
261
  }
262
- `,s3=Fe`
262
+ `,s3=ke`
263
263
  ${uF}
264
264
  query GetMaterials($ids: [String]) {
265
265
  materials(id: $ids) {
266
266
  ...MaterialFields
267
267
  }
268
268
  }
269
- `,o3=Fe`
269
+ `,o3=ke`
270
270
  mutation CreateAsset($name: String!, $type: String!, $mimeType: String!, $anonymous: Boolean, $temporary: Boolean) {
271
271
  assetCreate(name: $name, type: $type, mimeType: $mimeType, anonymous: $anonymous, temporary: $temporary) {
272
272
  uploadUrl
@@ -280,35 +280,35 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
280
280
  }
281
281
  }
282
282
  }
283
- `,l3=Fe`
283
+ `,l3=ke`
284
284
  ${$d(!1,!1)}
285
285
  mutation RemoveBackgroundFromAsset($key: String!) {
286
286
  assetRemoveBackground(key: $key) {
287
287
  ...AssetFields
288
288
  }
289
289
  }
290
- `,u3=Fe`
290
+ `,u3=ke`
291
291
  ${$d(!1,!1)}
292
292
  mutation VectorizeAsset($key: String!, $options: AssetVectorizeOptions) {
293
293
  assetVectorize(key: $key, options: $options) {
294
294
  ...AssetFields
295
295
  }
296
296
  }
297
- `,cg=async(r,e=!0)=>(await $e.getShadowGraphqlClient().query({query:Fe`
297
+ `,cg=async(r,e=!0)=>(await $e.getShadowGraphqlClient().query({query:ke`
298
298
  ${$d(!1,e)}
299
299
  query GetAssets($keys: [String]!) {
300
300
  assets(keys: $keys) {
301
301
  ...AssetFields
302
302
  }
303
303
  }
304
- `,errorPolicy:"all",fetchPolicy:"no-cache",variables:{keys:r}})).data.assets,c3=async r=>(await $e.getShadowGraphqlClient().query({query:s3,errorPolicy:"all",variables:{ids:r}})).data.materials,f3=async(r,e,t,n,i)=>(await $e.getShadowGraphqlClient().mutate({mutation:o3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{name:r,type:e,mimeType:t,anonymous:n,temporary:i}})).data?.assetCreate;class d3{constructor(){this.cache=new Map,this.bgrmProcessCache=new Map,this.materialCache=new Map,this.loadImageAsFileInfo=async e=>{const t=await e.arrayBuffer(),n=await Gd(t),i=(a,s)=>{const o=atob(a.split(",")[1]),l=[];for(let u=0;u<o.length;u++)l.push(o.charCodeAt(u));return new Blob([new Uint8Array(l)],{type:s})};return{name:e.name.substring(e.name.lastIndexOf("/")+1),blob:i(n.dataUrl,e.type)}}}async getLocalOrFromServer(e){if(this.cache.has(e)){const i=this.cache.get(e);if(!i)throw new nn("Failed to get asset from cache!");return i}const n=(async()=>(await cg([e]))[0])();return this.cache.set(e,n),n}async getFromServer(e){const n=(async()=>(await cg([e]))[0])();return this.cache.set(e,n),n}keyFromURL(e){let t;try{t=new URL(e).pathname}catch{t=void 0}return t!==void 0&&t.startsWith("/")&&(t=t.replace("/","")),t?.split("?")[0]}cacheAsset(e){if(!e.key)throw new nn("Asset has no key!");this.cache.has(e.key)||this.cache.set(e.key,Promise.resolve(e))}cacheMaterial(e){if(!e.id)throw new nn("Material has no id!");this.materialCache.has(e.id)||this.materialCache.set(e.id,Promise.resolve(e))}async getMaterialLocalOrFromServer(e){if(this.materialCache.has(e))return this.materialCache.get(e);const n=(async()=>(await c3([e]))[0])();return this.materialCache.set(e,n),n}async uploadAssetWithProgress(e,t,n,i,a){const s=await this.dispatchCreateAssetRequest(e,t,i,a);if(!s)throw new Error("Failed to create asset.");return await new Promise((o,l)=>{const u=new XMLHttpRequest;u.open("PUT",s.assetResponse.uploadUrl,!0),u.setRequestHeader("Content-Type",s.mimeType),u.setRequestHeader("Cache-Control","public,max-age=31536000,immutable"),u.upload.onprogress=c=>{c.lengthComputable&&n(c.loaded*100/c.total)},u.onload=()=>{const c=s.assetResponse.asset;Ds.add(s.assetResponse.asset),o(c)},u.onerror=l,this.postProcessFileUpload(e,s.mimeType).then(c=>u.send(c.blob)).catch(l)}),this.cacheAsset(s.assetResponse.asset),s.assetResponse.asset}async uploadAsset(e,t,n,i){return this.uploadAssetWithProgress(e,t,()=>{},n,i)}async uploadFile(e,t){const i=this.isRaster(e)?yd.Image:yd.Illustration,a=await this.loadImageAsFileInfo(e);return await this.uploadAssetWithProgress(a,i,t,!0)}async removeBackgroundFromAsset(e){const t=e.key;if(this.bgrmProcessCache.has(t))return this.bgrmProcessCache.get(t);if(Wn.has(mf,t)){const a=this.getLocalOrFromServer(Wn.get(mf,t));return this.bgrmProcessCache.set(t,a),a}const i=(async()=>{const a=await $e.getShadowGraphqlClient().mutate({mutation:l3,fetchPolicy:"no-cache",errorPolicy:"all",variables:{key:t}});if(this.bgrmProcessCache.delete(t),!a.data?.assetRemoveBackground?.key)throw new Error("Failed to remove background from image");return Ds.add(a.data.assetRemoveBackground),Wn.add(mf,t,a.data.assetRemoveBackground.key),this.cache.set(a.data.assetRemoveBackground.key,Promise.resolve(a.data.assetRemoveBackground)),a.data.assetRemoveBackground})();return this.bgrmProcessCache.set(t,i),i}async vectorizeAsset(e,t=void 0){const n=e.key;if(this.bgrmProcessCache.has(n))return this.bgrmProcessCache.get(n);if(Wn.has(vf,n)){const s=this.getLocalOrFromServer(Wn.get(vf,n));return this.bgrmProcessCache.set(n,s),s}const a=(async()=>{const s=await $e.getShadowGraphqlClient().mutate({mutation:u3,fetchPolicy:"no-cache",errorPolicy:"all",variables:{key:n,options:{maxColorCount:t}}});if(this.bgrmProcessCache.delete(n),!s.data?.assetVectorize?.key)throw new Error("Failed to vectorize image");return Ds.add(s.data.assetVectorize),Wn.add(vf,n,s.data.assetVectorize.key),this.cache.set(s.data.assetVectorize.key,Promise.resolve(s.data.assetVectorize)),s.data.assetVectorize})();return this.bgrmProcessCache.set(n,a),a}removePersistedAsset(e){Ds.remove(e),Wn.delete(mf,e),Wn.delete(vf,e),Wn.deleteForTransformedKey(mf,e),Wn.deleteForTransformedKey(vf,e)}getPersistedAssets(){return Ds.list()}registerPersistedAssetListener(e){Ds.addCallback(e)}unRegisterPersistedAssetListener(e){Ds.removeCallback(e)}isRaster(e){return!(e.type==="image/svg+xml"||e.type==="application/pdf"||e.type==="application/postscript")}async postProcessFileUpload(e,t){if(t==="image/svg+xml"){const n=await e.blob.text(),s=new window.DOMParser().parseFromString(n,"image/svg+xml").documentElement;if(!s)throw new wl("Failed to read SVG.");t3(s);const l=Po().serializeToString(s);return{name:e.name,blob:new Blob([l],{type:"image/svg+xml"})}}return e}async dispatchCreateAssetRequest(e,t,n,i){const a=e.blob.type?e.blob.type:this.guessMIME(e.name),s=await f3(e.name,t,a,n,i);if(s)return{assetResponse:s,mimeType:a}}guessMIME(e){const t=e.split(".").pop();switch(t){case"glb":return"model/gltf-binary";case"ttf":return"font/ttf";case"mkv":return"video/x-matroska";default:throw new nn("Unexpected mimetype: "+t)}}}const gf="persistentAssets",Ps=class Ps{static add(e){if(!e.fileLink){console.error("Failed to find cdn link on asset, cannot persist!");return}const t=new Map;t.set(e.key||"",e.fileLink);const n=xr.getMap(gf);n&&n.forEach((i,a)=>{t.set(a,i)}),xr.setMap(gf,t),Ps.executeCallbacks()}static remove(e){const t=xr.getMap(gf);if(!t)return;const n=Array.from(t.entries()).find(i=>i[0]===e);n&&(t.delete(n[0]),xr.setMap(gf,t),Ps.executeCallbacks())}static list(){const e=xr.getMap(gf);return e?Array.from(e.entries()).map(t=>({assetKey:t[0],src:t[1]})):[]}static addCallback(e){Ps.callbacks.push(e)}static removeCallback(e){Ps.callbacks=Ps.callbacks.filter(t=>t!==e)}static executeCallbacks(){Ps.callbacks.forEach(e=>e())}};Ps.callbacks=[];let Ds=Ps;const mf="bgrmPersistentAssets",vf="vectorizePersistentAssets";class Wn{static has(e,t){return Wn.getMap(e).has(t)}static get(e,t){return Wn.getMap(e).get(t)}static keys(e){return Wn.getMap(e).keys()}static values(e){return Wn.getMap(e).values()}static add(e,t,n){const i=Wn.getMap(e);i.set(t,n),Wn.setMap(e,i)}static delete(e,t){const n=Wn.getMap(e);n.delete(t),Wn.setMap(e,n)}static deleteForTransformedKey(e,t){const n=Wn.getMap(e),i=Array.from(n.keys()).find(a=>n.get(a)===t);i&&(n.delete(i),Wn.setMap(e,n))}static getMap(e){return xr.getMap(e)||new Map}static setMap(e,t){xr.setMap(e,t)}}const Qn=new d3;class h3{constructor(){this.cache={},this.disabled=!1}get(e){if(this.disabled)return;const t=JSON.stringify(e);return this.cache[t]}set(e,t){if(this.disabled)return t;const n=JSON.stringify(e);return this.cache[n]=t,t}disable(e){this.disabled=e}}const Cd=new h3,$g=(r,e=512,t,n)=>{const i=typeof r=="string"?r:r.fileLink;if(!i)return;const a=i.includes("?")?"&":"?",s=[`w=${e}`,`h=${e}`];return n!==void 0&&s.push(`q=${n}`),t&&s.push(`format=${t}`),`${i}${a}${s.join("&")}`},p3=Fe`
304
+ `,errorPolicy:"all",fetchPolicy:"no-cache",variables:{keys:r}})).data.assets,c3=async r=>(await $e.getShadowGraphqlClient().query({query:s3,errorPolicy:"all",variables:{ids:r}})).data.materials,f3=async(r,e,t,n,i)=>(await $e.getShadowGraphqlClient().mutate({mutation:o3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{name:r,type:e,mimeType:t,anonymous:n,temporary:i}})).data?.assetCreate;class d3{constructor(){this.cache=new Map,this.bgrmProcessCache=new Map,this.materialCache=new Map,this.loadImageAsFileInfo=async e=>{const t=await e.arrayBuffer(),n=await Gd(t),i=(a,s)=>{const o=atob(a.split(",")[1]),l=[];for(let u=0;u<o.length;u++)l.push(o.charCodeAt(u));return new Blob([new Uint8Array(l)],{type:s})};return{name:e.name.substring(e.name.lastIndexOf("/")+1),blob:i(n.dataUrl,e.type)}}}async getLocalOrFromServer(e){if(this.cache.has(e)){const i=this.cache.get(e);if(!i)throw new nn("Failed to get asset from cache!");return i}const n=(async()=>(await cg([e]))[0])();return this.cache.set(e,n),n}async getFromServer(e){const n=(async()=>(await cg([e]))[0])();return this.cache.set(e,n),n}keyFromURL(e){let t;try{t=new URL(e).pathname}catch{t=void 0}return t!==void 0&&t.startsWith("/")&&(t=t.replace("/","")),t?.split("?")[0]}cacheAsset(e){if(!e.key)throw new nn("Asset has no key!");this.cache.has(e.key)||this.cache.set(e.key,Promise.resolve(e))}cacheMaterial(e){if(!e.id)throw new nn("Material has no id!");this.materialCache.has(e.id)||this.materialCache.set(e.id,Promise.resolve(e))}async getMaterialLocalOrFromServer(e){if(this.materialCache.has(e))return this.materialCache.get(e);const n=(async()=>(await c3([e]))[0])();return this.materialCache.set(e,n),n}async uploadAssetWithProgress(e,t,n,i,a){const s=await this.dispatchCreateAssetRequest(e,t,i,a);if(!s)throw new Error("Failed to create asset.");return await new Promise((o,l)=>{const u=new XMLHttpRequest;u.open("PUT",s.assetResponse.uploadUrl,!0),u.setRequestHeader("Content-Type",s.mimeType),u.setRequestHeader("Cache-Control","public,max-age=31536000,immutable"),u.upload.onprogress=c=>{c.lengthComputable&&n(c.loaded*100/c.total)},u.onload=()=>{const c=s.assetResponse.asset;Ds.add(s.assetResponse.asset),o(c)},u.onerror=l,this.postProcessFileUpload(e,s.mimeType).then(c=>u.send(c.blob)).catch(l)}),this.cacheAsset(s.assetResponse.asset),s.assetResponse.asset}async uploadAsset(e,t,n,i){return this.uploadAssetWithProgress(e,t,()=>{},n,i)}async uploadFile(e,t){const i=this.isRaster(e)?yd.Image:yd.Illustration,a=await this.loadImageAsFileInfo(e);return await this.uploadAssetWithProgress(a,i,t,!0)}async removeBackgroundFromAsset(e){const t=e.key;if(this.bgrmProcessCache.has(t))return this.bgrmProcessCache.get(t);if(Wn.has(mf,t)){const a=this.getLocalOrFromServer(Wn.get(mf,t));return this.bgrmProcessCache.set(t,a),a}const i=(async()=>{const a=await $e.getShadowGraphqlClient().mutate({mutation:l3,fetchPolicy:"no-cache",errorPolicy:"all",variables:{key:t}});if(this.bgrmProcessCache.delete(t),!a.data?.assetRemoveBackground?.key)throw new Error("Failed to remove background from image");return Ds.add(a.data.assetRemoveBackground),Wn.add(mf,t,a.data.assetRemoveBackground.key),this.cache.set(a.data.assetRemoveBackground.key,Promise.resolve(a.data.assetRemoveBackground)),a.data.assetRemoveBackground})();return this.bgrmProcessCache.set(t,i),i}async vectorizeAsset(e,t=void 0){const n=e.key;if(this.bgrmProcessCache.has(n))return this.bgrmProcessCache.get(n);if(Wn.has(vf,n)){const s=this.getLocalOrFromServer(Wn.get(vf,n));return this.bgrmProcessCache.set(n,s),s}const a=(async()=>{const s=await $e.getShadowGraphqlClient().mutate({mutation:u3,fetchPolicy:"no-cache",errorPolicy:"all",variables:{key:n,options:{maxColorCount:t}}});if(this.bgrmProcessCache.delete(n),!s.data?.assetVectorize?.key)throw new Error("Failed to vectorize image");return Ds.add(s.data.assetVectorize),Wn.add(vf,n,s.data.assetVectorize.key),this.cache.set(s.data.assetVectorize.key,Promise.resolve(s.data.assetVectorize)),s.data.assetVectorize})();return this.bgrmProcessCache.set(n,a),a}removePersistedAsset(e){Ds.remove(e),Wn.delete(mf,e),Wn.delete(vf,e),Wn.deleteForTransformedKey(mf,e),Wn.deleteForTransformedKey(vf,e)}getPersistedAssets(){return Ds.list()}registerPersistedAssetListener(e){Ds.addCallback(e)}unRegisterPersistedAssetListener(e){Ds.removeCallback(e)}isRaster(e){return!(e.type==="image/svg+xml"||e.type==="application/pdf"||e.type==="application/postscript")}async postProcessFileUpload(e,t){if(t==="image/svg+xml"){const n=await e.blob.text(),s=new window.DOMParser().parseFromString(n,"image/svg+xml").documentElement;if(!s)throw new wl("Failed to read SVG.");t3(s);const l=Po().serializeToString(s);return{name:e.name,blob:new Blob([l],{type:"image/svg+xml"})}}return e}async dispatchCreateAssetRequest(e,t,n,i){const a=e.blob.type?e.blob.type:this.guessMIME(e.name),s=await f3(e.name,t,a,n,i);if(s)return{assetResponse:s,mimeType:a}}guessMIME(e){const t=e.split(".").pop();switch(t){case"glb":return"model/gltf-binary";case"ttf":return"font/ttf";case"mkv":return"video/x-matroska";default:throw new nn("Unexpected mimetype: "+t)}}}const gf="persistentAssets",Ps=class Ps{static add(e){if(!e.fileLink){console.error("Failed to find cdn link on asset, cannot persist!");return}const t=new Map;t.set(e.key||"",e.fileLink);const n=xr.getMap(gf);n&&n.forEach((i,a)=>{t.set(a,i)}),xr.setMap(gf,t),Ps.executeCallbacks()}static remove(e){const t=xr.getMap(gf);if(!t)return;const n=Array.from(t.entries()).find(i=>i[0]===e);n&&(t.delete(n[0]),xr.setMap(gf,t),Ps.executeCallbacks())}static list(){const e=xr.getMap(gf);return e?Array.from(e.entries()).map(t=>({assetKey:t[0],src:t[1]})):[]}static addCallback(e){Ps.callbacks.push(e)}static removeCallback(e){Ps.callbacks=Ps.callbacks.filter(t=>t!==e)}static executeCallbacks(){Ps.callbacks.forEach(e=>e())}};Ps.callbacks=[];let Ds=Ps;const mf="bgrmPersistentAssets",vf="vectorizePersistentAssets";class Wn{static has(e,t){return Wn.getMap(e).has(t)}static get(e,t){return Wn.getMap(e).get(t)}static keys(e){return Wn.getMap(e).keys()}static values(e){return Wn.getMap(e).values()}static add(e,t,n){const i=Wn.getMap(e);i.set(t,n),Wn.setMap(e,i)}static delete(e,t){const n=Wn.getMap(e);n.delete(t),Wn.setMap(e,n)}static deleteForTransformedKey(e,t){const n=Wn.getMap(e),i=Array.from(n.keys()).find(a=>n.get(a)===t);i&&(n.delete(i),Wn.setMap(e,n))}static getMap(e){return xr.getMap(e)||new Map}static setMap(e,t){xr.setMap(e,t)}}const Qn=new d3;class h3{constructor(){this.cache={},this.disabled=!1}get(e){if(this.disabled)return;const t=JSON.stringify(e);return this.cache[t]}set(e,t){if(this.disabled)return t;const n=JSON.stringify(e);return this.cache[n]=t,t}disable(e){this.disabled=e}}const Cd=new h3,$g=(r,e=512,t,n)=>{const i=typeof r=="string"?r:r.fileLink;if(!i)return;const a=i.includes("?")?"&":"?",s=[`w=${e}`,`h=${e}`];return n!==void 0&&s.push(`q=${n}`),t&&s.push(`format=${t}`),`${i}${a}${s.join("&")}`},p3=ke`
305
305
  fragment OptionMinimalFields on Option {
306
306
  id
307
307
  defaultVariant {
308
308
  id
309
309
  }
310
310
  }
311
- `,g3=Fe`
311
+ `,g3=ke`
312
312
  fragment OptionFields on Option {
313
313
  id
314
314
  name
@@ -346,7 +346,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
346
346
  ...AssetFields
347
347
  }
348
348
  }
349
- `,m3=Fe`
349
+ `,m3=ke`
350
350
  query GetTagsMany($ids: [String!]!) {
351
351
  tagsMany(entityIds: $ids) {
352
352
  id
@@ -354,7 +354,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
354
354
  name
355
355
  }
356
356
  }
357
- `,v3=async r=>{const e=await $e.getShadowGraphqlClient().query({query:Fe`
357
+ `,v3=async r=>{const e=await $e.getShadowGraphqlClient().query({query:ke`
358
358
  ${$d(!1,!1)}
359
359
  ${uF}
360
360
  ${g3}
@@ -363,7 +363,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
363
363
  ...OptionFields
364
364
  }
365
365
  }
366
- `,errorPolicy:"all",variables:{ids:r}});return e.data.options.forEach(t=>{t.colorProfile&&Qn.cacheAsset(t.colorProfile),t.variants?.forEach(n=>{n.asset&&Qn.cacheAsset(n.asset),n.thumbnail&&Qn.cacheAsset(n.thumbnail),n.material&&Qn.cacheMaterial(n.material)})}),e.data.options},y3=async(r,e)=>(await e).find(n=>n.id===r),C0=async r=>{const e=new Map(r.map(i=>[i,Cd.get({id:i})])),t=r.filter(i=>e.get(i)===void 0);if(t.length>0){const i=v3(t);t.forEach(a=>e.set(a,Cd.set({id:a},y3(a,i))))}return(await Promise.all(r.map(i=>e.get(i)))).filter(i=>i!==void 0)},pC=r=>{if(!(!r||!r.fileLink))return $g(r,512,"webp")},gC=(r,e,t)=>{if(r.length===1)return r[0];if(t){const n=r.find(i=>i.id===t);if(n)return n}if(e.defaultVariant!==void 0)return r.find(n=>n.id===e.defaultVariant?.id)};class A3{constructor(){this.getDefaultVariant=async(e,t)=>{const n=e?.variants;if(n)return gC(n,e,t);const a=(await this.getOption(e.id))?.variants;if(a)return gC(a,e,t)},this.getTagsForAssets=async e=>{const t=e?.map(s=>s.asset?.key)||[],n=e?.map(s=>s.material?.id)||[],i=[...t,...n].filter(s=>!!s);return i.length===0?[]:(await $e.getShadowGraphqlClient().query({query:m3,errorPolicy:"all",variables:{ids:i}})).data.tagsMany}}async getOption(e){return e?(await C0([e]))[0]:void 0}async getOptions(e){return C0(e)}async getOptionForStep(e){return this.ensureFullOption(e.option)}async ensureFullOption(e){return e?.variants?e:e?.id?(await C0([e.id]))[0]:void 0}async getAssetTileImageForVariant(e){const t=pC(e.thumbnail)??pC(e.asset);return t||(e.material?e.material.id:"")}}const ft=new A3,cF=Fe`
366
+ `,errorPolicy:"all",variables:{ids:r}});return e.data.options.forEach(t=>{t.colorProfile&&Qn.cacheAsset(t.colorProfile),t.variants?.forEach(n=>{n.asset&&Qn.cacheAsset(n.asset),n.thumbnail&&Qn.cacheAsset(n.thumbnail),n.material&&Qn.cacheMaterial(n.material)})}),e.data.options},y3=async(r,e)=>(await e).find(n=>n.id===r),C0=async r=>{const e=new Map(r.map(i=>[i,Cd.get({id:i})])),t=r.filter(i=>e.get(i)===void 0);if(t.length>0){const i=v3(t);t.forEach(a=>e.set(a,Cd.set({id:a},y3(a,i))))}return(await Promise.all(r.map(i=>e.get(i)))).filter(i=>i!==void 0)},pC=r=>{if(!(!r||!r.fileLink))return $g(r,512,"webp")},gC=(r,e,t)=>{if(r.length===1)return r[0];if(t){const n=r.find(i=>i.id===t);if(n)return n}if(e.defaultVariant!==void 0)return r.find(n=>n.id===e.defaultVariant?.id)};class A3{constructor(){this.getDefaultVariant=async(e,t)=>{const n=e?.variants;if(n)return gC(n,e,t);const a=(await this.getOption(e.id))?.variants;if(a)return gC(a,e,t)},this.getTagsForAssets=async e=>{const t=e?.map(s=>s.asset?.key)||[],n=e?.map(s=>s.material?.id)||[],i=[...t,...n].filter(s=>!!s);return i.length===0?[]:(await $e.getShadowGraphqlClient().query({query:m3,errorPolicy:"all",variables:{ids:i}})).data.tagsMany}}async getOption(e){return e?(await C0([e]))[0]:void 0}async getOptions(e){return C0(e)}async getOptionForStep(e){return this.ensureFullOption(e.option)}async ensureFullOption(e){return e?.variants?e:e?.id?(await C0([e.id]))[0]:void 0}async getAssetTileImageForVariant(e){const t=pC(e.thumbnail)??pC(e.asset);return t||(e.material?e.material.id:"")}}const ft=new A3,cF=ke`
367
367
  fragment ActiveIntegrationFields on Integration {
368
368
  id
369
369
  logo
@@ -383,7 +383,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
383
383
  beta
384
384
  }
385
385
  }
386
- `,qg=Fe`
386
+ `,qg=ke`
387
387
  fragment AdditionalIntegrationProductFields on IntegrationProduct {
388
388
  id
389
389
  product {
@@ -401,7 +401,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
401
401
  preloadImageUrl
402
402
  }
403
403
  }
404
- `,fF=Fe`
404
+ `,fF=ke`
405
405
  fragment RecipientFields on Recipient {
406
406
  id
407
407
  firstName
@@ -422,7 +422,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
422
422
  customField5
423
423
  conversionConfigurationId
424
424
  }
425
- `,qd=Fe`
425
+ `,qd=ke`
426
426
  fragment ConversionConfigurationFields on ConversionConfiguration {
427
427
  id
428
428
  partnerId
@@ -451,7 +451,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
451
451
  }
452
452
  }
453
453
  }
454
- `,b3=Fe`
454
+ `,b3=ke`
455
455
  ${fF}
456
456
  mutation CreateTransactions(
457
457
  $inputs: [TransactionCreateInput]!
@@ -480,7 +480,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
480
480
  integrationProductId
481
481
  }
482
482
  }
483
- `,dF=Fe`
483
+ `,dF=ke`
484
484
  fragment StakeholderFields on Stakeholder {
485
485
  id
486
486
  type
@@ -488,7 +488,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
488
488
  authorizationNote
489
489
  authorizationStatus
490
490
  }
491
- `,hF=Fe`
491
+ `,hF=ke`
492
492
  fragment TransactionShareActionFields on TransactionShareAction {
493
493
  id
494
494
  title
@@ -497,7 +497,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
497
497
  precedence
498
498
  url
499
499
  }
500
- `,pF=Fe`
500
+ `,pF=ke`
501
501
  ${qg}
502
502
  ${qd}
503
503
  ${cF}
@@ -585,7 +585,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
585
585
  }
586
586
  }
587
587
  }
588
- `,w3=Fe`
588
+ `,w3=ke`
589
589
  ${dF}
590
590
  ${hF}
591
591
  ${fF}
@@ -637,32 +637,32 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
637
637
  integrationProductId
638
638
  }
639
639
  }
640
- `,C3=Fe`
640
+ `,C3=ke`
641
641
  mutation UpdateTransactionWorkflowState($id: String!, $workflowState: String!) {
642
642
  transactionUpdate(id: $id, workflowState: $workflowState) {
643
643
  id
644
644
  }
645
645
  }
646
- `,x3=Fe`
646
+ `,x3=ke`
647
647
  mutation UpdateTransactionQuantity($id: String!, $quantity: Int) {
648
648
  transactionUpdate(id: $id, quantity: $quantity) {
649
649
  id
650
650
  }
651
651
  }
652
- `,S3=Fe`
652
+ `,S3=ke`
653
653
  mutation UpdateTransactionWorkflow($id: String!, $workflowId: String!) {
654
654
  transactionUpdate(id: $id, workflowId: $workflowId) {
655
655
  id
656
656
  }
657
657
  }
658
- `,E3=Fe`
658
+ `,E3=ke`
659
659
  ${qd}
660
660
  query ReadConversionConfigurationQuery($id: String!) {
661
661
  conversionConfiguration(id: $id) {
662
662
  ...ConversionConfigurationFields
663
663
  }
664
664
  }
665
- `,k3=Fe`
665
+ `,k3=ke`
666
666
  ${qd}
667
667
  query ReadTransactionForDesignCreation($id: String!) {
668
668
  transactions(ids: [$id]) {
@@ -721,7 +721,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
721
721
  workflowViewerReadOnlyLink
722
722
  }
723
723
  }
724
- `,F3=Fe`
724
+ `,F3=ke`
725
725
  ${hF}
726
726
  query ReadTransactionForShareActions($id: String!) {
727
727
  transactions(ids: [$id]) {
@@ -732,11 +732,11 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
732
732
  }
733
733
  }
734
734
  }
735
- `,T3=Fe`
735
+ `,T3=ke`
736
736
  query ConfirmWorkflowStates($transactions: [TransactionConfirmInput!]!) {
737
737
  transactionConfirmWorkflowStates(transactions: $transactions)
738
738
  }
739
- `,gF=r=>Fe`
739
+ `,gF=r=>ke`
740
740
  ${qg}
741
741
  fragment IntegrationProductFields on IntegrationProduct {
742
742
  id
@@ -815,14 +815,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
815
815
  `:""}
816
816
  }
817
817
  }
818
- `,I3=r=>Fe`
818
+ `,I3=r=>ke`
819
819
  ${gF(r)}
820
820
  query GetIntegrationProducts($ids: [String!]!) {
821
821
  integrationProducts(ids: $ids) {
822
822
  ...IntegrationProductFields
823
823
  }
824
824
  }
825
- `,D3=r=>Fe`
825
+ `,D3=r=>ke`
826
826
  ${gF(r)}
827
827
  query GetIntegrationProductFromExternalIds($externalIntegrationId: String!, $externalProductId: String!) {
828
828
  integrationProductFromExternalIds(
@@ -832,7 +832,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
832
832
  ...IntegrationProductFields
833
833
  }
834
834
  }
835
- `,P3=Fe`
835
+ `,P3=ke`
836
836
  ${dF}
837
837
  query ReadTransactionForStakeholders($id: String!) {
838
838
  transactions(ids: [$id]) {
@@ -844,11 +844,11 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
844
844
  }
845
845
  }
846
846
  }
847
- `,R3=Fe`
847
+ `,R3=ke`
848
848
  mutation FinalizeUpdateTransaction($transactionId: String!) {
849
849
  transactionFinalizeUpdate(transactionId: $transactionId)
850
850
  }
851
- `,O3=Fe`
851
+ `,O3=ke`
852
852
  fragment RegionFields on Region {
853
853
  width
854
854
  top
@@ -866,7 +866,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
866
866
  height
867
867
  }
868
868
  }
869
- `,B3=Fe`
869
+ `,B3=ke`
870
870
  fragment LookAtAnimationFields on LookAtAnimation {
871
871
  latDeg
872
872
  lonDeg
@@ -877,7 +877,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
877
877
  z
878
878
  }
879
879
  }
880
- `,M3=Fe`
880
+ `,M3=ke`
881
881
  fragment RenderingPipelineConfigurationFields on RenderingPipelineConfiguration {
882
882
  antiAliasing {
883
883
  samples
@@ -961,14 +961,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
961
961
  weight
962
962
  }
963
963
  }
964
- `,_3=Fe`
964
+ `,_3=ke`
965
965
  fragment ModelAnimationFields on ModelAnimation {
966
966
  from
967
967
  to
968
968
  loop
969
969
  name
970
970
  }
971
- `,N3=r=>Fe`
971
+ `,N3=r=>ke`
972
972
  ${$d(r,!1)}
973
973
  ${p3}
974
974
  ${O3}
@@ -1374,7 +1374,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
1374
1374
  }
1375
1375
  }
1376
1376
  }
1377
- `,Wg=Fe`
1377
+ `,Wg=ke`
1378
1378
  ${qd}
1379
1379
  fragment MarketplaceThemeInstallConfigurationFields on MarketplaceThemeInstallConfiguration {
1380
1380
  id
@@ -1442,14 +1442,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
1442
1442
  }
1443
1443
  }
1444
1444
  }
1445
- `,L3=Fe`
1445
+ `,L3=ke`
1446
1446
  ${Wg}
1447
1447
  query GetMarketplaceThemeInstallConfiguration($themeConfigurationId: String!, $themeInstallId: String!) {
1448
1448
  marketplaceThemeInstallConfiguration(id: $themeConfigurationId, themeInstallId: $themeInstallId, raw: false) {
1449
1449
  ...MarketplaceThemeInstallConfigurationFields
1450
1450
  }
1451
1451
  }
1452
- `,U3=Fe`
1452
+ `,U3=ke`
1453
1453
  ${cF}
1454
1454
  ${Wg}
1455
1455
  query GetCurrentIntegration($themeConfigurationId: String) {
@@ -1462,7 +1462,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
1462
1462
  ...ActiveIntegrationFields
1463
1463
  }
1464
1464
  }
1465
- `,V3=Fe`
1465
+ `,V3=ke`
1466
1466
  ${Wg}
1467
1467
  query ReadTransactionForMarketplaceTheme($id: String!) {
1468
1468
  transactions(ids: [$id]) {
@@ -1471,7 +1471,7 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
1471
1471
  }
1472
1472
  }
1473
1473
  }
1474
- `,z3=Fe`
1474
+ `,z3=ke`
1475
1475
  ${Wg}
1476
1476
  query ReadBundleForMarketplaceTheme($id: String!) {
1477
1477
  bundles(ids: [$id]) {
@@ -1480,14 +1480,14 @@ this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${P.byteLength}`),P.tiff&&
1480
1480
  }
1481
1481
  }
1482
1482
  }
1483
- `,H3=Fe`
1483
+ `,H3=ke`
1484
1484
  mutation CreateOrder($orderItems: [OrderItemInput]!) {
1485
1485
  orderCreate(orderItems: $orderItems, paid: false, generateInternalId: true) {
1486
1486
  id
1487
1487
  internalId
1488
1488
  }
1489
1489
  }
1490
- `,j3=Fe`
1490
+ `,j3=ke`
1491
1491
  query CurrencyConversion($from: String!, $to: String!) {
1492
1492
  currencyConversion(from: $from, to: $to) {
1493
1493
  rateFrom
@@ -1647,7 +1647,7 @@ Minimum version required to store current data is: `+X+`.
1647
1647
  />
1648
1648
  </svg>
1649
1649
  `,d={"spiff-fill-shape":{browserValue:s.color||"#000000"}},g=Ar();return new ai({colors:d,id:g,svg:h,type:Zt.Illustration,y:u.top,x:u.left,rotation:u.rotation,width:u.width,height:u.height,layer:u.layer,layerIndex:u.layerIndex,immutable:u.immutable},c)},l=n.data.regions;try{return l.map(o)}catch(u){return console.error(u),[]}},bU=async(r,e,t)=>{const n=[],a=e.type===Je.ProductOverlay?t||e.data.asset?.fileLink||"":e.data.asset?.fileLink||"",o=a.endsWith(".jpeg")||a.endsWith(".jpg")||a.endsWith(".png")?Zt.Image:(a.endsWith(".svg"),Zt.Illustration),l=e.data.regions;if(o==="image")try{l.forEach(u=>{const c=r.find(f=>f.panelId===u.panelId);if(!c)throw new Ai(u);const h={id:Ar(),src:a,type:o,y:u.top,x:u.left,width:u.width,height:u.height,layer:u.layer,layerIndex:u.layerIndex,productOverlay:e.type===Je.ProductOverlay?!0:void 0,scaleX:1,scaleY:1,rotation:u.rotation,excludeFromExport:e.data.excludeFromPrint,preserveAspectRatio:"none"};n.push(new ai(h,c))})}catch(u){console.error(u)}else{const u=await ia(a,!0),c=h=>{const f=/<svg.*?<\/svg>/s,d=h.match(f)||[],g=d?.length>0?d[0]:"",A=os().parseFromString(g,"image/svg+xml").firstElementChild;if(!A)throw new wl("Failed to read SVG.");return jg(A),Po().serializeToString(A)};l.forEach(h=>{const f=r.find(g=>g.panelId===h.panelId);if(!f)throw new Ai(h);const d={id:Ar(),src:a,asset_key:a,svg:c(u),colors:{},type:o,y:h.top,x:h.left,width:h.width,height:h.height,layer:h.layer,layerIndex:h.layerIndex,scaleX:1,scaleY:1,rotation:h.rotation,productOverlay:e.type===Je.ProductOverlay?!0:void 0,excludeFromExport:e.data.excludeFromPrint};n.push(new ai(d,f))})}return n},wU=async(r,e,t,n)=>{const i=[],a=t.data,s=30,o=y=>y.vertical?"center":y.textAlign||"center",l=async()=>{const y=await ft.getOptionForStep(n);if(!y)return;const A=y.variants?.find(k=>k.id===a.fontVariantId)||await ft.getDefaultVariant(y,n.overrideDefaultVariantId);if(!A||!A.asset)return;e[n.stepName]={selectedVariants:[A]};const C=A.asset.fileLink;if(C)return C},c=await(async()=>{const y=await l();if(!y)return;const A=await Ml(y);return{assetUrl:y,name:A.names.fullName.en}})(),h=(n.data.replaceableText?n.data.replaceableText.replace("{{}}",a.text):a.text)||"",f=yg(h,{vertical:n.data.vertical,uppercase:n.data.uppercase}),d=async y=>{const A=y.colorOption;return A?(await ft.getDefaultVariant(A))?.color:void 0},g=a.color||await d(n.data),v=n.data.regions;for(const y of v){const A=r.find(k=>k.panelId===y.panelId);if(!A)continue;const C={stepName:t.name,id:Ar(),align:o(n.data),curved:n.data.curved,fill:a.color||g||"#000000",fontData:c,fontSize:n.data.size||s,height:y.height,layer:y.layer,layerIndex:y.layerIndex,paths:n.data.paths,rotation:y.rotation,text:f,type:Zt.Textbox,vertical:n.data.vertical,verticalAlign:n.data.verticalAlign||"middle",width:y.width,x:y.left,y:y.top};if(c){const[k,T]=ad(n.data.size||s,c,y,[yg(f,{vertical:n.data.vertical,uppercase:n.data.uppercase})],{size:n.data.size,minSize:n.data.minSize,maxSize:n.data.maxSize});i.push(new ai({...C,fontSize:k,text:C.curved?C.text:(T||[]).join(`
1650
- `)},A))}else i.push(new ai(C,A))}return i},aI=async(r,e,t,n)=>{const i=[],a={};for(const s of r){const o=e.steps.find(l=>l.stepName===s.name);if(o)switch(o.type){case Je.DigitalContent:i.push(...await pU(t,s,o));break;case Je.Frame:case Je.Photo:i.push(...await gU(t,a,s,o));break;case Je.Illustration:i.push(...await mU(t,a,s,o));break;case Je.Module:i.push(...await vU(t,s,o));break;case Je.Picture:i.push(...await yU(t,a,s,o));break;case Je.Shape:i.push(...await AU(t,a,s,o));break;case Je.Text:i.push(...await wU(t,a,s,o));break}}for(const s of e.steps)s.type!==Je.SilentIllustration&&s.type!==Je.ProductOverlay||await fo(s,a)&&i.push(...await bU(t,s,n));return i};class CU{constructor(e){this.handleCompleteRender=null;const t=new Map;e.forEach(n=>t.set(n.id,new EU(n.id,n.name,this,{width:n.width,height:n.height},this.getWorkflowManager.bind(this)))),this.layouts=t}setCompleteRenderCallback(e){this.handleCompleteRender=e,e(Array.from(this.layouts.values()))}onCompleteRender(){this.handleCompleteRender&&this.handleCompleteRender(Array.from(this.layouts.values()))}getAll(){return this.layouts}setWorkflowManager(e){this.workflowManager=e}getWorkflowManager(){return this.workflowManager}}const xU=()=>new Promise((r,e)=>{try{const n=Eo().getContext("webgl2");r(!!n)}catch{r(!1)}}),SU=xU();class EU{constructor(e,t,n,i,a){this.hasSetStaticContext=!1,this.interactiveDirty=!1,this.staticCtxDirty=!1,this.lastRequestedRenderArguments=void 0,this.lastCompletedStaticRender=void 0,this.renderQueue=new Xg(2),this.id=e,this.name=t,this.service=n,this.panelSize=i,this.getWorkflowManager=a}getID(){return this.id}getName(){return this.name}getPanelSize(){return this.panelSize}getStaticContext(){return this.textureCtx}setStaticContext(e){this.textureCtx=e,this.lastRequestedRenderArguments&&this.render(this.lastRequestedRenderArguments)}getStaticContextDirty(){return this.staticCtxDirty}setStaticContextDirty(e){this.staticCtxDirty=e}getInteractiveCanvasDirty(){return this.interactiveDirty}setInteractiveCanvasDirty(e){this.interactiveDirty=e}markLastCompletedStaticRender(){this.lastCompletedStaticRender=Date.now(),this.service.onCompleteRender()}getLastCompletedStaticRender(){return this.lastCompletedStaticRender}async render(e){const t=vo(e);this.lastRequestedRenderArguments=t;const n=this.getStaticContext();if(!n){this.markLastCompletedStaticRender(),this.setStaticContextDirty(!1);return}this.renderQueue.enqueue(new kU(this.getID(),n,await SU,()=>{this.markLastCompletedStaticRender(),this.setStaticContextDirty(!0)},t,this.getWorkflowManager))}}class kU extends Yg{constructor(e,t,n,i,a,s){super(),this.layoutId=e,this.ctx=t,this.nonPOTSupport=n,this.onRender=i,this.layouts=a,this.getWorkflowManager=s}getDynamicTextureResolution(){return this.getIsMobile()||!this.offscreenRenderingSupported()?{width:1024,height:1024}:{width:2048,height:2048}}getIsMobile(){return window.innerWidth<=480}offscreenRenderingSupported(){return navigator.userAgent.includes("SamsungBrowser")?!1:!!window.Worker&&!!window.OffscreenCanvas}resizeFit(e,t=4096){const n=t/e.width,i=t/e.height,a=Math.min(n,i);return a>1?e:{width:e.width*a,height:e.height*a}}async execute(){const e=this.layouts.find(g=>g.layoutState.layout.id===this.layoutId);if(!e)return;const t=e.layoutState.elements||[],n=e.layoutState.layout.width,i=e.layoutState.layout.height,a=n===1||i===1?{width:1,height:1}:this.getDynamicTextureResolution(),s=a.width,o=a.height;let l,u;if(this.nonPOTSupport){const g=s/o;n/i<g?(l=s,u=i*(s/n)):(l=n*(o/i),u=o);const y=this.resizeFit({width:l,height:u});l=y.width,u=y.height}else l=a.width,u=a.height;const c=this.getWorkflowManager?.()?.getTemplatingContext(),h=Zg(e.layoutState.layout,t,{renderingConfiguration:{purpose:rc.ThreeD,templatingContext:c}}),f=Hk(h),d=await co.from(this.ctx,f,{anonymousCrossOrigin:!0,ignoreDimensions:!this.nonPOTSupport,ignoreAnimation:!0,ignoreClear:!0,ignoreMouse:!0,enableRedraw:!1,createCanvas:Eo,createImage:jd,DOMParser:jA(),fetch});d.resize(l,u),await d.render(),this.onRender()}}const FU=(r,e)=>{const t=[];return r.forEach(n=>{const i=e.steps.find(a=>a.stepName===n.stepName);i?.type===Je.Text&&n.stepAspectType==="Text"&&t.push({name:i.stepName,data:{text:n.value}})}),t},TU=async(r,e,t,n)=>{let i={serializableWorkflow:{steps:[]},layouts:{}};i=new Rn(t.map(l=>new y1(l))).apply(i);const s=await aI(r,e,t,n);return new Rn(s).apply(i)},em=Fe`
1650
+ `)},A))}else i.push(new ai(C,A))}return i},aI=async(r,e,t,n)=>{const i=[],a={};for(const s of r){const o=e.steps.find(l=>l.stepName===s.name);if(o)switch(o.type){case Je.DigitalContent:i.push(...await pU(t,s,o));break;case Je.Frame:case Je.Photo:i.push(...await gU(t,a,s,o));break;case Je.Illustration:i.push(...await mU(t,a,s,o));break;case Je.Module:i.push(...await vU(t,s,o));break;case Je.Picture:i.push(...await yU(t,a,s,o));break;case Je.Shape:i.push(...await AU(t,a,s,o));break;case Je.Text:i.push(...await wU(t,a,s,o));break}}for(const s of e.steps)s.type!==Je.SilentIllustration&&s.type!==Je.ProductOverlay||await fo(s,a)&&i.push(...await bU(t,s,n));return i};class CU{constructor(e){this.handleCompleteRender=null;const t=new Map;e.forEach(n=>t.set(n.id,new EU(n.id,n.name,this,{width:n.width,height:n.height},this.getWorkflowManager.bind(this)))),this.layouts=t}setCompleteRenderCallback(e){this.handleCompleteRender=e,e(Array.from(this.layouts.values()))}onCompleteRender(){this.handleCompleteRender&&this.handleCompleteRender(Array.from(this.layouts.values()))}getAll(){return this.layouts}setWorkflowManager(e){this.workflowManager=e}getWorkflowManager(){return this.workflowManager}}const xU=()=>new Promise((r,e)=>{try{const n=Eo().getContext("webgl2");r(!!n)}catch{r(!1)}}),SU=xU();class EU{constructor(e,t,n,i,a){this.hasSetStaticContext=!1,this.interactiveDirty=!1,this.staticCtxDirty=!1,this.lastRequestedRenderArguments=void 0,this.lastCompletedStaticRender=void 0,this.renderQueue=new Xg(2),this.id=e,this.name=t,this.service=n,this.panelSize=i,this.getWorkflowManager=a}getID(){return this.id}getName(){return this.name}getPanelSize(){return this.panelSize}getStaticContext(){return this.textureCtx}setStaticContext(e){this.textureCtx=e,this.lastRequestedRenderArguments&&this.render(this.lastRequestedRenderArguments)}getStaticContextDirty(){return this.staticCtxDirty}setStaticContextDirty(e){this.staticCtxDirty=e}getInteractiveCanvasDirty(){return this.interactiveDirty}setInteractiveCanvasDirty(e){this.interactiveDirty=e}markLastCompletedStaticRender(){this.lastCompletedStaticRender=Date.now(),this.service.onCompleteRender()}getLastCompletedStaticRender(){return this.lastCompletedStaticRender}async render(e){const t=vo(e);this.lastRequestedRenderArguments=t;const n=this.getStaticContext();if(!n){this.markLastCompletedStaticRender(),this.setStaticContextDirty(!1);return}this.renderQueue.enqueue(new kU(this.getID(),n,await SU,()=>{this.markLastCompletedStaticRender(),this.setStaticContextDirty(!0)},t,this.getWorkflowManager))}}class kU extends Yg{constructor(e,t,n,i,a,s){super(),this.layoutId=e,this.ctx=t,this.nonPOTSupport=n,this.onRender=i,this.layouts=a,this.getWorkflowManager=s}getDynamicTextureResolution(){return this.getIsMobile()||!this.offscreenRenderingSupported()?{width:1024,height:1024}:{width:2048,height:2048}}getIsMobile(){return window.innerWidth<=480}offscreenRenderingSupported(){return navigator.userAgent.includes("SamsungBrowser")?!1:!!window.Worker&&!!window.OffscreenCanvas}resizeFit(e,t=4096){const n=t/e.width,i=t/e.height,a=Math.min(n,i);return a>1?e:{width:e.width*a,height:e.height*a}}async execute(){const e=this.layouts.find(g=>g.layoutState.layout.id===this.layoutId);if(!e)return;const t=e.layoutState.elements||[],n=e.layoutState.layout.width,i=e.layoutState.layout.height,a=n===1||i===1?{width:1,height:1}:this.getDynamicTextureResolution(),s=a.width,o=a.height;let l,u;if(this.nonPOTSupport){const g=s/o;n/i<g?(l=s,u=i*(s/n)):(l=n*(o/i),u=o);const y=this.resizeFit({width:l,height:u});l=y.width,u=y.height}else l=a.width,u=a.height;const c=this.getWorkflowManager?.()?.getTemplatingContext(),h=Zg(e.layoutState.layout,t,{renderingConfiguration:{purpose:rc.ThreeD,templatingContext:c}}),f=Hk(h),d=await co.from(this.ctx,f,{anonymousCrossOrigin:!0,ignoreDimensions:!this.nonPOTSupport,ignoreAnimation:!0,ignoreClear:!0,ignoreMouse:!0,enableRedraw:!1,createCanvas:Eo,createImage:jd,DOMParser:jA(),fetch});d.resize(l,u),await d.render(),this.onRender()}}const FU=(r,e)=>{const t=[];return r.forEach(n=>{const i=e.steps.find(a=>a.stepName===n.stepName);i?.type===Je.Text&&n.stepAspectType==="Text"&&t.push({name:i.stepName,data:{text:n.value}})}),t},TU=async(r,e,t,n)=>{let i={serializableWorkflow:{steps:[]},layouts:{}};i=new Rn(t.map(l=>new y1(l))).apply(i);const s=await aI(r,e,t,n);return new Rn(s).apply(i)},em=ke`
1651
1651
  fragment GlobalPropertyStateAspectFields on GlobalPropertyStateAspect {
1652
1652
  name
1653
1653
  value
@@ -1670,7 +1670,7 @@ Minimum version required to store current data is: `+X+`.
1670
1670
  }
1671
1671
  }
1672
1672
  }
1673
- `,IU=Fe`
1673
+ `,IU=ke`
1674
1674
  ${em}
1675
1675
  mutation CreateGlobalPropertyState($bundleId: String!) {
1676
1676
  globalPropertyStateCreate(bundleId: $bundleId) {
@@ -1680,7 +1680,7 @@ Minimum version required to store current data is: `+X+`.
1680
1680
  }
1681
1681
  }
1682
1682
  }
1683
- `,DU=Fe`
1683
+ `,DU=ke`
1684
1684
  ${em}
1685
1685
  mutation UpdateGlobalPropertyState($id: String!, $aspects: [GlobalPropertyStateAspectInput]!) {
1686
1686
  globalPropertyStateUpdate(id: $id, aspects: $aspects) {
@@ -1690,7 +1690,7 @@ Minimum version required to store current data is: `+X+`.
1690
1690
  }
1691
1691
  }
1692
1692
  }
1693
- `,PU=Fe`
1693
+ `,PU=ke`
1694
1694
  ${em}
1695
1695
  query GetGlobalPropertyState($bundleId: String!) {
1696
1696
  globalPropertyState(bundleId: $bundleId) {
@@ -1700,7 +1700,7 @@ Minimum version required to store current data is: `+X+`.
1700
1700
  }
1701
1701
  }
1702
1702
  }
1703
- `,RU=async r=>(await $e.getShadowGraphqlClient().query({query:PU,fetchPolicy:"cache-first",errorPolicy:"all",variables:{bundleId:r}})).data.globalPropertyState,OU=r=>Fe`
1703
+ `,RU=async r=>(await $e.getShadowGraphqlClient().query({query:PU,fetchPolicy:"cache-first",errorPolicy:"all",variables:{bundleId:r}})).data.globalPropertyState,OU=r=>ke`
1704
1704
  ${qg}
1705
1705
  fragment ProductFields on Product {
1706
1706
  id
@@ -1745,7 +1745,7 @@ Minimum version required to store current data is: `+X+`.
1745
1745
  name
1746
1746
  }
1747
1747
  }
1748
- `,k1=r=>Fe`
1748
+ `,k1=r=>ke`
1749
1749
  ${OU(r)}
1750
1750
  fragment ProductCollectionProductFields on ProductCollectionProduct {
1751
1751
  id
@@ -1755,7 +1755,7 @@ Minimum version required to store current data is: `+X+`.
1755
1755
  ...ProductFields
1756
1756
  }
1757
1757
  }
1758
- `,tm=(r,e=!1)=>Fe`
1758
+ `,tm=(r,e=!1)=>ke`
1759
1759
  ${r?k1(e):""}
1760
1760
  fragment ProductCollectionFields on ProductCollection {
1761
1761
  id
@@ -1805,7 +1805,7 @@ Minimum version required to store current data is: `+X+`.
1805
1805
  }
1806
1806
  ${r?"productCollectionProducts { ...ProductCollectionProductFields }":""}
1807
1807
  }
1808
- `,sI=Fe`
1808
+ `,sI=ke`
1809
1809
  fragment BundleBaseFields on Bundle {
1810
1810
  id
1811
1811
  dispatchDate
@@ -1827,7 +1827,7 @@ Minimum version required to store current data is: `+X+`.
1827
1827
  workflowViewerLink
1828
1828
  workflowViewerAmendLink
1829
1829
  }
1830
- `,BU=r=>Fe`
1830
+ `,BU=r=>ke`
1831
1831
  ${em}
1832
1832
  ${tm(r)}
1833
1833
  ${sI}
@@ -1862,7 +1862,7 @@ Minimum version required to store current data is: `+X+`.
1862
1862
  }
1863
1863
  }
1864
1864
  }
1865
- `,dE=Fe`
1865
+ `,dE=ke`
1866
1866
  query GetBundleStakeholders($id: String!) {
1867
1867
  bundles(ids: [$id]) {
1868
1868
  id
@@ -1907,7 +1907,7 @@ Minimum version required to store current data is: `+X+`.
1907
1907
  }
1908
1908
  }
1909
1909
  }
1910
- `,MU=Fe`
1910
+ `,MU=ke`
1911
1911
  query GetBundlesForCustomer($id: String!) {
1912
1912
  customers(ids: [$id]) {
1913
1913
  bundleStakeholders {
@@ -1936,7 +1936,7 @@ Minimum version required to store current data is: `+X+`.
1936
1936
  }
1937
1937
  }
1938
1938
  }
1939
- `,_U=Fe`
1939
+ `,_U=ke`
1940
1940
  ${k1(!1)}
1941
1941
  query GetProductCollectionProducts($id: String!, $productIds: [String!]) {
1942
1942
  productCollections(ids: [$id], productIds: $productIds) {
@@ -1946,7 +1946,7 @@ Minimum version required to store current data is: `+X+`.
1946
1946
  }
1947
1947
  }
1948
1948
  }
1949
- `,NU=Fe`
1949
+ `,NU=ke`
1950
1950
  query GetProductCollectionForFilteredProducts(
1951
1951
  $id: String!
1952
1952
  $filters: ProductCollectionProductFilterInput
@@ -1969,7 +1969,7 @@ Minimum version required to store current data is: `+X+`.
1969
1969
  }
1970
1970
  }
1971
1971
  }
1972
- `,LU=Fe`
1972
+ `,LU=ke`
1973
1973
  ${k1(!0)}
1974
1974
  query GetProductCollectionForProductsFeed(
1975
1975
  $id: String!
@@ -2001,7 +2001,7 @@ Minimum version required to store current data is: `+X+`.
2001
2001
  }
2002
2002
  }
2003
2003
  }
2004
- `,UU=r=>Fe`
2004
+ `,UU=r=>ke`
2005
2005
  ${tm(r)}
2006
2006
  mutation CreateBundle(
2007
2007
  $collectionId: String
@@ -2030,7 +2030,7 @@ Minimum version required to store current data is: `+X+`.
2030
2030
  }
2031
2031
  }
2032
2032
  }
2033
- `,VU=()=>Fe`
2033
+ `,VU=()=>ke`
2034
2034
  mutation DuplicateBundle(
2035
2035
  $id: String!
2036
2036
  $template: Boolean
@@ -2052,7 +2052,7 @@ Minimum version required to store current data is: `+X+`.
2052
2052
  }
2053
2053
  }
2054
2054
  }
2055
- `,Rp=Fe`
2055
+ `,Rp=ke`
2056
2056
  mutation UpdateBundle(
2057
2057
  $id: String!
2058
2058
  $name: String
@@ -2072,19 +2072,19 @@ Minimum version required to store current data is: `+X+`.
2072
2072
  id
2073
2073
  }
2074
2074
  }
2075
- `,zU=Fe`
2075
+ `,zU=ke`
2076
2076
  mutation BundleAddTransaction($id: String!, $transactionId: String!) {
2077
2077
  bundleAddTransaction(id: $id, transactionId: $transactionId) {
2078
2078
  id
2079
2079
  }
2080
2080
  }
2081
- `,HU=Fe`
2081
+ `,HU=ke`
2082
2082
  mutation BundleAddTransactions($id: String!, $transactionIds: [String!]!, $transactionOwnerIds: [String!]) {
2083
2083
  bundleAddTransactions(id: $id, transactionIds: $transactionIds, transactionOwnerIds: $transactionOwnerIds) {
2084
2084
  id
2085
2085
  }
2086
2086
  }
2087
- `,jU=Fe`
2087
+ `,jU=ke`
2088
2088
  mutation BundleRemoveTransaction(
2089
2089
  $id: String!
2090
2090
  $transactionId: String!
@@ -2099,7 +2099,7 @@ Minimum version required to store current data is: `+X+`.
2099
2099
  id
2100
2100
  }
2101
2101
  }
2102
- `,GU=Fe`
2102
+ `,GU=ke`
2103
2103
  mutation BundleRemoveTransactions(
2104
2104
  $id: String!
2105
2105
  $transactionIds: [String!]!
@@ -2114,7 +2114,7 @@ Minimum version required to store current data is: `+X+`.
2114
2114
  id
2115
2115
  }
2116
2116
  }
2117
- `,$U=Fe`
2117
+ `,$U=ke`
2118
2118
  mutation BundleAddStakeholder($id: String!, $details: CustomerDetailsInput!, $type: String!) {
2119
2119
  bundleAddStakeholder(id: $id, details: $details, type: $type) {
2120
2120
  id
@@ -2134,13 +2134,13 @@ Minimum version required to store current data is: `+X+`.
2134
2134
  }
2135
2135
  }
2136
2136
  }
2137
- `,qU=Fe`
2137
+ `,qU=ke`
2138
2138
  mutation BundleAddStakeholder($id: String!, $emailAddress: String!) {
2139
2139
  bundleRemoveStakeholder(id: $id, emailAddress: $emailAddress) {
2140
2140
  id
2141
2141
  }
2142
2142
  }
2143
- `,WU=Fe`
2143
+ `,WU=ke`
2144
2144
  mutation BundleUpdateStakeholders($id: String!, $input: [BundleStakeholderInput!]!) {
2145
2145
  bundleUpdateStakeholders(id: $id, input: $input) {
2146
2146
  id
@@ -2160,13 +2160,13 @@ Minimum version required to store current data is: `+X+`.
2160
2160
  }
2161
2161
  }
2162
2162
  }
2163
- `,QU=Fe`
2163
+ `,QU=ke`
2164
2164
  mutation BundleUpdateTransactionOrder($id: String!, $transactionIds: [String!]!) {
2165
2165
  bundleUpdateTransactionOrder(id: $id, transactionIds: $transactionIds) {
2166
2166
  id
2167
2167
  }
2168
2168
  }
2169
- `,YU=r=>Fe`
2169
+ `,YU=r=>ke`
2170
2170
  ${tm(r)}
2171
2171
  mutation BundleAssignProductCollection($id: String!, $productCollectionId: String!) {
2172
2172
  bundleAssignProductCollection(id: $id, collectionId: $productCollectionId) {
@@ -2176,13 +2176,13 @@ Minimum version required to store current data is: `+X+`.
2176
2176
  }
2177
2177
  }
2178
2178
  }
2179
- `,XU=Fe`
2179
+ `,XU=ke`
2180
2180
  mutation AssignGlobalPropertyConfiguration($bundleId: String!, $globalPropertyConfigurationId: String!) {
2181
2181
  bundleUpdate(id: $bundleId, globalPropertyConfigurationId: $globalPropertyConfigurationId) {
2182
2182
  id
2183
2183
  }
2184
2184
  }
2185
- `,JU=r=>Fe`
2185
+ `,JU=r=>ke`
2186
2186
  ${sI}
2187
2187
  query CustomerBundlesFeed($id: String!, $limit: Int!, $offset: Int!, $template: Boolean, $templateStatus: BundleTemplateStatus, $ordered: Boolean) {
2188
2188
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: $template, templateStatus: $templateStatus, ordered: $ordered) {
@@ -2208,27 +2208,27 @@ Minimum version required to store current data is: `+X+`.
2208
2208
  total
2209
2209
  }
2210
2210
  }
2211
- `,KU=Fe`
2211
+ `,KU=ke`
2212
2212
  mutation FinalizeUpdateBundle($bundleId: String!) {
2213
2213
  bundleFinalizeUpdate(bundleId: $bundleId)
2214
2214
  }
2215
- `,ZU=Fe`
2215
+ `,ZU=ke`
2216
2216
  mutation ApproveBundle($id: String!, $note: String, $stakeholderId: String) {
2217
2217
  bundleApprove(id: $id, note: $note, stakeholderId: $stakeholderId)
2218
2218
  }
2219
- `,e9=Fe`
2219
+ `,e9=ke`
2220
2220
  mutation RejectBundle($id: String!, $note: String, $stakeholderId: String) {
2221
2221
  bundleReject(id: $id, note: $note, stakeholderId: $stakeholderId)
2222
2222
  }
2223
- `,t9=Fe`
2223
+ `,t9=ke`
2224
2224
  mutation ApproveTransaction($id: String!, $note: String) {
2225
2225
  transactionApprove(id: $id, note: $note)
2226
2226
  }
2227
- `,r9=Fe`
2227
+ `,r9=ke`
2228
2228
  mutation RejectTransaction($id: String!, $note: String) {
2229
2229
  transactionReject(id: $id, note: $note)
2230
2230
  }
2231
- `,n9=Fe`
2231
+ `,n9=ke`
2232
2232
  mutation CreateRecipient(
2233
2233
  $firstName: String
2234
2234
  $lastName: String
@@ -2270,7 +2270,7 @@ Minimum version required to store current data is: `+X+`.
2270
2270
  id
2271
2271
  }
2272
2272
  }
2273
- `,i9=Fe`
2273
+ `,i9=ke`
2274
2274
  mutation UpdateRecipient(
2275
2275
  $id: String!
2276
2276
  $firstName: String
@@ -2316,17 +2316,17 @@ Minimum version required to store current data is: `+X+`.
2316
2316
  id
2317
2317
  }
2318
2318
  }
2319
- `,a9=Fe`
2319
+ `,a9=ke`
2320
2320
  mutation AtttachRecipient($id: String!, $recipientId: String!) {
2321
2321
  transactionAttachRecipient(id: $id, recipientId: $recipientId) {
2322
2322
  id
2323
2323
  }
2324
2324
  }
2325
- `,s9=Fe`
2325
+ `,s9=ke`
2326
2326
  mutation DeleteBundle($id: String!) {
2327
2327
  bundleDelete(id: $id)
2328
2328
  }
2329
- `,o9=Fe`
2329
+ `,o9=ke`
2330
2330
  query FindBundleForTransactions($ids: [String!]!) {
2331
2331
  transactions(ids: $ids) {
2332
2332
  id
@@ -2335,7 +2335,13 @@ Minimum version required to store current data is: `+X+`.
2335
2335
  }
2336
2336
  }
2337
2337
  }
2338
- `,l9=(r,e)=>e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}):e,u9=r=>{for(const e of Object.values(r.layouts).map(t=>t.elements).flat())e.type==="illustration"&&(delete e.cachedObjectURL,e.src&&delete e.svg),e.type==="frame"&&delete e.pattern?.svg;return oI(r,"__typename"),r},oI=(r,e)=>{if(!(typeof r!="object"||r===null))for(const t in r)t===e?delete r[t]:oI(r[t],e)};var ih=(r=>(r.Error="Error",r.Warning="Warning",r.Info="Info",r))(ih||{});const c9=1e3;class hE extends Yg{constructor(e){super(),this.update=e}async execute(){await this.update(),await new Promise(e=>{window.setTimeout(()=>{e()},c9)})}}const f9=r=>r.sort((e,t)=>e.index-t.index).map(e=>({id:Ar(),panelId:e.name,name:e.name,title:e.title,index:e.index,createdAt:new Date,updatedAt:new Date,transparentBackground:e.transparentBackground,height:e.height,width:e.width,previewRegion:e.previewRegion,useEditableArea:e.useEditableArea,editableArea:e.editableArea})),d9=(r,e)=>{const t=r.workflowState,n=t?JSON.parse(t):void 0;return n?Object.values(n.layouts).map(i=>i.layout):f9(e.panels)},fd=class fd{constructor(e,t,n,i,a,s=!1,o,l=!1,u=!1,c=!1){this.workflowStatePromiseQueue=new Xg(1),this.initialized=!1,this.readOnly=!1,this.isReloadedTransaction=!1,this.singleVariantsRenderable=!1,this.stepTags={},this.setWorkflow=async f=>{this.confirmedDesign=!1,this.editedSteps={},this.informationResults=[],this.mandatorySteps={},this.pendingUpdates=[],this.selectionCost=0,this.stepSpecificServices={},this.pollers=[],this.allScenes=[],this.stepElements={},this.stepInitialised={},this.stepMetadata={},this.stepSelections={},this.storage={},this.validationErrors={steps:new Map},this.currentAdjustingStepId="",this.reloadedState?this.layouts=Object.values(this.reloadedState.layouts||{}).map(g=>g.layout):f?this.layouts=d9(this.experience.getTransaction(),f):this.layouts=[],this.commandContext.initialize(this.layouts,this.reloadedState),this.renderableContextService=new CU(this.layouts),this.renderableContextService.setWorkflowManager(this),f.steps.forEach(g=>{this.stepTags[g.stepName]=g.tags??[]});const d=this.previewService;this.ejectFromPreviewService(),this.initializationPromise=this.initializeDefaultWorkflowState(f),this.initializationPromise.then(()=>{this.initialized=!0}),this.initializationPromise.catch(g=>{throw this.initialized=!1,new Error(g)}),this.initializationPromise.finally(()=>this.commandContext.registerStateCallback(()=>{this.updateStateWithServer(),this.renderLayouts()})),d&&await this.injectIntoPreviewService(d,!0)},this.renderLayouts=()=>{if(!this.previewService)return;const f=this.getCommandContext().getAllLayouts(),d=this.getLayoutPreviewService()?.getAll();if(d)for(const[,g]of d)g.render(f)},this.experience=e,this.client=t,this.updateTransaction=n,this.graphQlClient=i,this.reloadedState=a,this.readOnly=s,this.singleVariantsRenderable=u,this.commandContext=new zT,this.confirmCallbacks=[],this.editedCallbacks=[],this.elementsCallbacks=[],this.informationResultCallbacks=[],this.initCallbacks=[],this.mandatoryCallbacks=[],this.makingAdjustmentsCallback=[],this.metadataCallbacks=[],this.selectionCallbacks=[],this.stepSpecificStorageCallbacks={},this.storageCallbacks=[],this.validationCallbacks=[],this.recipientCallbacks=[],this.modelContainer=o,this.confirmedDesign=!1,this.editedSteps={},this.informationResults=[],this.mandatorySteps={},this.pendingUpdates=[],this.selectionCost=0,this.stepSpecificServices={},this.pollers=[],this.allScenes=[],this.stepElements={},this.stepInitialised={},this.stepMetadata={},this.stepSelections={},this.storage={},this.validationErrors={steps:new Map},this.currentAdjustingStepId="",this.isReloadedTransaction=l,c&&(this.workflowStatePromiseQueue.enabled=!1);const h=this.experience.getWorkflow();h&&this.setWorkflow(h)}getTemplatingContext(){const e=this.experience.getTransaction().recipient,t={recipient:e};return this.recipientConversionConfiguration?.requestedDataItems?.forEach(n=>{const i=n.uniqueIdentifier??n.title??"";n.type===td.FirstName?t[i]=e?.firstName:n.type===td.LastName?t[i]=e?.lastName:n.type===td.Custom&&(n.customFieldIndex===1?t[i]=e?.customField1:n.customFieldIndex===2?t[i]=e?.customField2:n.customFieldIndex===3?t[i]=e?.customField3:n.customFieldIndex===4?t[i]=e?.customField4:n.customFieldIndex===5&&(t[i]=e?.customField5),n.option&&(t[i]=n.option.variants?.find(a=>a.id===t[i])?.name))}),t}async updateRecipient(e,t,n,i,a,s,o,l,u,c,h,f,d,g,v,y,A,C){const k=this.experience.getTransaction();if(k.recipient?.id)this.experience.getTransaction().recipient={id:k.recipient.id,firstName:e??k.recipient.firstName,lastName:t??k.recipient.lastName,address:n??k.recipient.address,suburb:i??k.recipient.suburb,state:a??k.recipient.state,email:s??k.recipient.email,postalCode:o??k.recipient.postalCode,country:l??k.recipient.country,mobile:u??k.recipient.mobile,company:c??k.recipient.company,apartment:h??k.recipient.apartment,customField1:f??k.recipient.customField1,customField2:d??k.recipient.customField2,customField3:g??k.recipient.customField3,customField4:v??k.recipient.customField4,customField5:y??k.recipient.customField5,conversionConfigurationId:A||k.recipient.conversionConfigurationId},this.experience.callEvent(xg.RecipientChanged),await this.graphQlClient().mutate({mutation:i9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:k.recipient.id,firstName:e||k.recipient.firstName,lastName:t||k.recipient.lastName,address:n||k.recipient.address,suburb:i||k.recipient.suburb,state:a||k.recipient.state,email:s||k.recipient.email,postalCode:o||k.recipient.postalCode,country:l||k.recipient.country,mobile:u||k.recipient.mobile,company:c||k.recipient.company,apartment:h||k.recipient.apartment,customField1:f||k.recipient.customField1,customField2:d||k.recipient.customField2,customField3:g||k.recipient.customField3,customField4:v||k.recipient.customField4,customField5:y||k.recipient.customField5,conversionConfigurationId:A||k.recipient.conversionConfigurationId,prevalidated:C}});else{const T=await this.graphQlClient().mutate({mutation:n9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{firstName:e,lastName:t,address:n,suburb:i,state:a,email:s,postalCode:o,country:l,mobile:u,company:c,apartment:h,customField1:f,customField2:d,customField3:g,customField4:v,customField5:y,conversionConfigurationId:A}});k.recipient={id:T?.data?.recipientCreate?.id,firstName:e,lastName:t,address:n,suburb:i,state:a,email:s,postalCode:o,country:l,mobile:u,company:c,apartment:h,customField1:f,customField2:d,customField3:g,customField4:v,customField5:y,conversionConfigurationId:A},this.experience.callEvent(xg.RecipientChanged),await this.graphQlClient().mutate({mutation:a9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id,recipientId:T.data?.recipientCreate?.id},context:{transactionOwnerId:this.experience.getTransaction().transactionOwnerId}})}await this.fetchConversionConfiguration(),this.recipientCallbacks.forEach(T=>T(this.experience.getTransaction().recipient))}async fetchConversionConfiguration(){const e=this.experience.getTransaction().recipient;if(e?.conversionConfigurationId&&!this.recipientConversionConfiguration){const t=fd.configurationPromiseMap.get(e.conversionConfigurationId);if(t)this.recipientConversionConfiguration=await t;else{const i=(async()=>(await this.graphQlClient().query({query:E3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:e.conversionConfigurationId}})).data.conversionConfiguration)();fd.configurationPromiseMap.set(e.conversionConfigurationId,i),this.recipientConversionConfiguration=await i}}}async initializeDefaultWorkflowState(e){const t=()=>{const c=e.finalizeStepConfig;if(!c)return;const h=c.lookAtAnimation,f=c.modelAnimation;h&&this.previewService?.executeCameraAnimation(h),f&&this.modelContainer?.executeAnimation(f)};this.reloadedState&&this.reloadedState.serializableWorkflow.steps.forEach(c=>{this.storage[c.stepName]=c.storage||{}});const n=await this.getInitialOptionIds(this.reloadedState?.serializableWorkflow?.steps.reduce((c,h)=>(h.selectedVariants?.length&&(c[h.stepName]={selectedVariants:h.selectedVariants.map(f=>({id:f.id}))}),c),{})),i=ft.getOptions(Array.from(n)),a=this.fetchConversionConfiguration();await Promise.all([i,a]),this.allScenes=VC(e);const o=(await Is(this.allScenes,this.stepSelections)).map(c=>c.silentSteps).flat(),{stepElements:l,commands:u}=await this.stepElementsForIntroducedSilentSteps(o,!!this.reloadedState);this.commandContext.apply(new Rn(u),!0),this.stepElements={...this.stepElements,...l},await this.ensureStepsAreLoaded(),this.isReloadedTransaction||this.updateStateWithServer(),this.renderLayouts(),this.reloadedState&&t()}getWorkflowExperience(){return this.experience}getClient(){return this.client}setWorkflowStateSyncEnabled(e){this.workflowStatePromiseQueue.enabled=e}getInitializationPromise(){return this.initializationPromise}isInitialized(){return this.initialized}async getInitialOptionIds(e){const t=new Set,n=this.experience.getWorkflow();if(!n)return t;const i=VC(n),a={...e};let s=-1;for(;;){const u=(await Is(i,a)).flatMap(c=>c.renderableSteps);if(u.length===s)break;s=u.length;for(const c of u){if(a[c.stepName])continue;const h=c.option?.defaultVariant?.id;h&&(a[c.stepName]={selectedVariants:[{id:h}]})}}return(await Is(i,a)).flatMap(l=>l.renderableSteps).forEach(l=>{l.option?.id&&!l.option?.variants&&t.add(l.option.id)}),t}addConfirmCallback(e){e(this.confirmedDesign),this.confirmCallbacks.push(e)}addEditedCallback(e){e(this.editedSteps),this.editedCallbacks.push(e)}addElementsCallback(e){e(this.stepElements),this.elementsCallbacks.push(e)}addInformationResultCallback(e){e(this.informationResults),this.informationResultCallbacks.push(e)}addInitCallback(e){e(this.stepInitialised),this.initCallbacks.push(e)}addMandatoryCallback(e){e(this.mandatorySteps),this.mandatoryCallbacks.push(e)}addMetadataCallback(e){e(this.stepMetadata),this.metadataCallbacks.push(e)}async addSelectionCallback(e){e({selectionCost:this.selectionCost,selections:this.stepSelections,traversableScenes:await this.traversableScenes()}),this.selectionCallbacks.push(e)}addStepSpecificStorageCallback(e,t){Object.keys(this.storage).includes(t)||(this.storage[t]={}),e(this.storage[t]),Object.keys(this.stepSpecificStorageCallbacks).includes(t)||(this.stepSpecificStorageCallbacks[t]=[]),this.stepSpecificStorageCallbacks[t].push(e)}addStorageCallback(e){e(this.storage),this.storageCallbacks.push(e)}addMakingAdjustmentsCallback(e){e(this.currentAdjustingStepId),this.makingAdjustmentsCallback.push(e)}addPoller(e){this.pollers.push(e)}addValidationCallback(e){this.validationCallbacks.push(e),e(this.validationErrors)}addRecipientCallback(e){this.recipientCallbacks.push(e),e(this.experience.getTransaction().recipient)}removeRecipientCallback(e){this.recipientCallbacks=this.recipientCallbacks.filter(t=>t!==e)}getLayouts(){return this.layouts}getAllLayoutData(){return this.commandContext.getAllLayouts().map(e=>e.layoutState)}getLayoutPreviewService(){return this.renderableContextService}getInformationResults(){return this.informationResults}getPreviewService(){return this.previewService}getCommandContext(){return this.commandContext}getRegionElements(e){return this.stepElements[e]||[]}getStepSpecificServices(e){return this.stepSpecificServices[e]}getTransactionCustomer(){return this.ownerCustomer}setTransactionCustomer(e){this.ownerCustomer=e}setTransactionCustomerDetails(e){this.ownerCustomer={...this.ownerCustomer,emailAddress:e.email}}getModelContainer(){return this.modelContainer}setModelContainer(e){(!e||this.previewService&&this.previewService.getAllModels().includes(e))&&(this.modelContainer=e,e&&e.metadata&&e.metadata instanceof Map&&this.modelContainer.metadata.set("workflowManager",this))}getCommandDispatcher(){return e=>this.commandContext.apply(e,!this.initialized)}getWorkflowSelections(){const e={};return this.experience.getWorkflow()?.steps.forEach(t=>{const n=this.stepSelections[t.stepName];n&&n.selectedVariants&&n.selectedVariants.length>0&&(e[t.stepName]={selections:n.selectedVariants})}),e}getStepSelections(){return this.stepSelections}markStepsAsInitialised(e){const t={...this.stepInitialised};e.forEach(n=>{t[n]=!0}),this.stepInitialised=t,this.onInitChange()}getUpdatesPending(){return this.pendingUpdates.length>0}markUpdateCompleted(e){this.pendingUpdates=this.pendingUpdates.filter(t=>t!==e)}markUpdatePending(){const e=Ar();return this.pendingUpdates=[...this.pendingUpdates,e],e}setEditedStatus(e,t){this.editedSteps={...this.editedSteps,[e]:t},this.onEditedChange()}setInformationResults(e){this.informationResults=[...e],this.onInformationResultChange()}setCurrentAdjustingStepId(e){this.currentAdjustingStepId=e,this.onMakingAdjustmentsChange()}setMandatoryFulfilled(e,t){this.mandatorySteps[e]!==t&&(this.mandatorySteps={...this.mandatorySteps,[e]:t},this.onMandatoryChange())}async getMandatoryUnfulfilledSteps(){return(await Is(this.allScenes,this.stepSelections)).flatMap(a=>a.renderableSteps).filter(a=>a.mandatory).filter(a=>!this.mandatorySteps[a.stepName]).map(a=>a.stepName)}setStepError(e,t,n){let i=!1;if(!this.validationErrors.steps.has(e)&&n)i=!0,this.validationErrors.steps.set(e,new Map([[t,n]]));else if(this.validationErrors.steps.has(e)){const a=this.validationErrors.steps.get(e);n&&n!==a.get(t)?(i=!0,a.set(t,n)):n||(i=!0,a.delete(t),a.size===0&&this.validationErrors.steps.delete(e))}i&&this.onValidationChange()}getStepErrors(e){return this.validationErrors.steps.get(e)}getValidationErrors(){return this.validationErrors}toggleDesignConfirmed(){this.confirmedDesign=!this.confirmedDesign,this.onConfirmChange()}toggleMakingAdjustmentsCallback(e){e(this.mandatorySteps),this.mandatoryCallbacks.push(e)}async injectIntoPreviewService(e,t){if(this.modelContainer)throw new Error("You must eject from the preview service before injecting again.");this.previewService=e;const n=this.experience.getProduct();if(!n?.modelUrl||!this.previewService)return;const i=e.loadModel({model:n.modelUrl,contextService:this.getLayoutPreviewService()},{refocusCamera:t});this.setModelContainer(i),(await Is(this.allScenes,this.stepSelections)).filter(o=>o).map(o=>o.renderableSteps).flat().filter(o=>o.type===Je.Model||o.type===Je.Material).forEach(o=>{if(!o.option?.id){console.error(`Failed to read option id from step: ${o.stepName}`);return}const l=this.stepSelections[o.stepName]?.selectedVariants||[];if(l.length===0)return;const u=l[0];if(o.type===Je.Model){if(!this.modelContainer)throw new nn("We should always have a model container when injecting a preview!");const c=u.asset?.fileLink;if(!c){console.error(`Failed to read model url from variant: ${u.id} for step: ${o.stepName}`);return}const h=o.data;this.modelContainer.applyModelVariant(o.stepName,{model:c,contextService:this.getLayoutPreviewService()},h.replaceProductModel||!1)}else{const c=u.material;if(!c){console.error(`Failed to read material from variant: ${u.id} for step: ${o.stepName}`);return}o.data.targetMaterials.forEach(f=>{if(!this.modelContainer)throw new nn("We should always have a model container when injecting a preview!");this.modelContainer.applyMaterialVariant(f,o.option.id,c)})}}),await i.getInitializationPromise(),this.renderLayouts()}ejectFromPreviewService(){if(this.modelContainer){if(!this.modelContainer.dispose)throw new Error("This feature is not supported in the current preview service.");this.modelContainer.dispose(),this.modelContainer=void 0}this.previewService=void 0}updateStorage(e,t){const n={...this.storage,[e]:{...this.storage[e],...t}};if(!xd(n,this.storage)){this.storage=n;const i=new SS(this.constructSerializableWorkflow());this.commandContext.apply(i,!0),this.onStepSpecificStorageChange(e),this.onStorageChange()}}constructSerializableWorkflow(){const e=[];return this.allScenes.forEach(t=>{t.renderableSteps.forEach(n=>{const i={stepName:n.stepName};i.storage=this.storage[n.stepName],i.selectedVariants=this.stepSelections[n.stepName]?.selectedVariants?.map(a=>({id:a.id,priceModifier:a.priceModifier})),e.push(i)})}),{steps:e}}updateStateWithServer(){if(this.readOnly)return;const e=this.serialize();this.workflowStatePromiseQueue.enqueue(new hE(async()=>{await new Promise(t=>{setTimeout(()=>{t()},1)}),await this.updateTransaction({variables:{id:this.experience.getTransaction().id,workflowState:e}})}))}async updateStateWithServerImmediate(){if(this.readOnly)return;const e=this.serialize();return new hE(async()=>{await this.updateTransaction({variables:{id:this.experience.getTransaction().id,workflowState:e}})}).execute()}serialize(){const e=this.getCommandContext().getState();if(!e)throw new nn("Attempted to serialize state before it was initialized.");const t=vo(e.transaction),n=u9(t);return JSON.stringify(n,l9,void 0)}async getStateHash(){const e=this.getCommandContext().getState(),n=Object.values(e?.transaction.layouts||{}).map(s=>s.modificationID??"").sort().join(""),a=new TextEncoder().encode(n);if(typeof window<"u"&&window.crypto&&window.crypto.subtle&&window.crypto.subtle.digest){const s=await window.crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(s)).map(u=>u.toString(16).padStart(2,"0")).join("")}try{return(await import("crypto")).createHash("sha256").update(n,"utf8").digest("hex")}catch{throw new Error("Unable to compute SHA-256 hash: no suitable crypto implementation available.")}}async outstandingRequestsPromise(){return this.workflowStatePromiseQueue.finalize()}updateMetadata(e,t){this.stepMetadata={...this.stepMetadata,[e]:{...this.stepMetadata[e],...t}},this.onMetadataChange()}removeElements(e){const t=(n,i)=>Object.keys(n).reduce((a,s)=>{const o=[...n[s]||[]];return i.forEach(l=>{const u=o.findIndex(c=>c.id===l.id);u>-1&&o.splice(u,1)}),a[s]=o,a},{});this.stepElements=t(this.stepElements,e)}async getInvalidCanvasRegions(){let e=[];for(const t of this.experience.getWorkflow()?.steps||[])if(!await fo(t,this.stepSelections)&&this.stepElements[t.stepName])for(const n of this.stepElements[t.stepName])e.push(n);return e}async getInvalidModelVariants(){let e=[];for(const t of this.experience.getWorkflow()?.steps||[])t.type===Je.Model&&!await fo(t,this.stepSelections)&&e.push(t.stepName);return e}async stepElementsForIntroducedSilentSteps(e,t){const n=this.experience.getProduct();if(!n)return Promise.resolve({stepElements:{},commands:[]});const i=async(u,c,h)=>{if(u.type===Je.SilentIllustration){const f=await new ES(u,c).trigger();return{step:u,results:f}}else if(u.type===Je.ProductOverlay){const f=await new ES(u,c,h).trigger();return{step:u,results:f}}return Promise.reject("Unknown silent step. This is a bug")},a=e.filter(u=>!this.stepInitialised[u.stepName]),s={stepElements:{},commands:[]},o=[];for(const u of a)this.markStepsAsInitialised([u.stepName]),t||o.push(i(u,this.layouts,n));const l=await Promise.all(o);for(const u of l)s.stepElements[u.step.stepName]=u.results.map(c=>c.regionElement),s.commands=[...s.commands,...u.results.map(c=>c.command)];return s}getStepStorage(e){return this.storage[e]}getMetadata(e){return this.stepMetadata[e]}getWorkflowMetadata(){return this.stepMetadata}getStepTags(e){return this.stepTags[e]||[]}getSerializedStep(e,t){return t.find(n=>n.stepName===e)}async updateTransactionShareActions(){const e=await this.client.getShareActionsForTransaction(this.experience.getTransaction().id);this.experience.getTransaction().transactionShareActions=e}async updateTransactionStakeholders(){const e=await $e.getShadowGraphqlClient().query({query:P3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id}});!e?.data?.transactions||e.data.transactions.length!==1?(this.experience.getTransaction().currentStakeholder=void 0,this.experience.getTransaction().stakeholders=void 0):(this.experience.getTransaction().stakeholders=e.data.transactions[0].stakeholders,this.experience.getTransaction().currentStakeholder=e.data.transactions[0].currentStakeholder)}async approveTransaction(e){await $e.getShadowGraphqlClient().mutate({mutation:t9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id,note:e}})}async rejectTransaction(e){await $e.getShadowGraphqlClient().mutate({mutation:r9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id,note:e}})}async reset(){this.stepElements={},this.stepInitialised={},this.stepMetadata={},this.stepSelections={},this.storage={},await this.ensureStepsAreLoaded()}async setSelectionsAndElements(e,t,n,i){const a=this.experience.getWorkflow();if(!a)throw new Error("Attempted to set selections when no workflow is set!");const s=this.stepSelections;this.stepSelections={...this.stepSelections,[e]:{selectedVariants:t}},this.selectionCost=Object.values(this.stepSelections).reduce((R,B)=>R+B.selectedVariants.map(G=>G.priceModifier||0).reduce((G,$)=>G+$,0),0);for(const R of a.steps)await fo(R,this.stepSelections)||(this.stepInitialised[R.stepName]=!1,delete this.stepMetadata[R.stepName],delete this.stepSelections[R.stepName],delete this.storage[R.stepName]);const o=this.allScenes,l=await Is(o,s),u=await Is(o,this.stepSelections),c=l.map(R=>R.silentSteps).flat(),f=u.map(R=>R.silentSteps).flat().filter(R=>!c.some(B=>B.stepName===R.stepName));for(const R of c)await fo(R,this.stepSelections)||(this.stepInitialised[R.stepName]=!1);const d=await this.getInvalidCanvasRegions(),{stepElements:g,commands:v}=await this.stepElementsForIntroducedSilentSteps(f,!1);this.stepElements={...this.stepElements,...g,[e]:n},this.removeElements(d);const y=a.steps.find(R=>R.stepName===e);y?.type===Je.Frame&&this.getWorkflowExperience().getStepById(y.stepName)?.frameService?.setTargetElements(n.map(B=>B.id));const A=d.map(R=>new _l(R.id)),C=new SS(this.constructSerializableWorkflow()),k=[...v,...A,C];k.length>0&&this.commandContext.apply(new Rn(k),!0),await this.ensureStepsAreLoaded(),this.onElementsChange();const T=await this.getInvalidModelVariants(),S=this.modelContainer;if(S){const R=T.map(B=>S.applyModelVariant(B,{contextService:this.getLayoutPreviewService()},!1));await Promise.all(R)}await this.onSelectionChange(),y?.type!==Je.Frame&&y?.type!==Je.Text&&this.setMandatoryFulfilled(e,!0),i&&await i()}async ensureStepsAreLoaded(){const t=(await Is(this.allScenes,this.stepSelections)).map(l=>l.renderableSteps),n=[],i=t.flat();for(const l of i)if(!this.stepInitialised[l.stepName])switch(this.stepInitialised[l.stepName]=!0,l.type){case Je.DigitalContent:n.push(b1.init(l,this,this.reloadedState));break;case Je.Frame:n.push(lo.init(l,this,this.reloadedState));break;case Je.Illustration:n.push(id.init(l,this,this.reloadedState));break;case Je.Material:n.push(w1.init(l,this,this.reloadedState));break;case Je.Model:n.push(C1.init(l,this,this.reloadedState));break;case Je.Module:this.stepSpecificServices[l.stepName]={module:await iI(l.data.module)},n.push(x1.init(l,this,this.reloadedState));break;case Je.Picture:n.push(S1.init(l,this,this.reloadedState));break;case Je.Question:n.push(E1.init(l,this,this.reloadedState));break;case Je.Shape:n.push(Vu.init(l,this,this.reloadedState));break;case Je.Text:n.push(ui.init(l,this,this.reloadedState));break}const a=(await Promise.allSettled(n)).map(l=>{if(l.status==="rejected")throw new Error(`Step initialization failed: ${l.reason}`);return l.value}),s=a.flatMap(l=>l?.command?[l.command]:[]),o=a.flatMap(l=>l?.followup?[l.followup]:[]);s&&s.length>0&&this.commandContext.apply(new Rn(s),!0);for(const l of o)await l();o.length>0&&await this.ensureStepsAreLoaded(),this.onInitChange()}onConfirmChange(){this.confirmCallbacks.forEach(e=>e(this.confirmedDesign))}onEditedChange(){this.editedCallbacks.forEach(e=>e(this.editedSteps))}onElementsChange(){this.elementsCallbacks.forEach(e=>e(this.stepElements))}onInformationResultChange(){this.informationResultCallbacks.forEach(e=>e(this.informationResults))}onInitChange(){this.initCallbacks.forEach(e=>e(this.stepInitialised))}onMakingAdjustmentsChange(){this.makingAdjustmentsCallback.forEach(e=>{e(this.currentAdjustingStepId)})}onMandatoryChange(){this.mandatoryCallbacks.forEach(e=>e(this.mandatorySteps))}onMetadataChange(){this.metadataCallbacks.forEach(e=>{e(this.stepMetadata)})}async onSelectionChange(){const e=await this.traversableScenes();for(const t of this.selectionCallbacks)t({selectionCost:this.selectionCost,selections:this.stepSelections,traversableScenes:e})}onStepSpecificStorageChange(e){Object.keys(this.stepSpecificStorageCallbacks).includes(e)||(this.stepSpecificStorageCallbacks[e]=[]),this.stepSpecificStorageCallbacks[e].forEach(t=>t(this.storage[e]))}onStorageChange(){this.storageCallbacks.forEach(e=>e(this.storage))}onValidationChange(){this.validationCallbacks.forEach(e=>e(this.validationErrors))}traversableScenes(){return p_(this.allScenes,this.stepSelections,this.singleVariantsRenderable)}};fd.configurationPromiseMap=new Map;let sA=fd;class Da{constructor(e){this.variantData=e}getType(){return this.variantData.asset?.type}getId(){return this.variantData.id}getName(){return this.variantData.name}getPriceFormatted(e,t){return this.variantData.priceModifier.toLocaleString(e||"en-US",{style:"currency",currency:"USD",...t})}getPrice(){return this.variantData.priceModifier}getAsset(){return this.variantData.asset?.fileLink}getAssetResource(){return this.variantData.asset}getThumbnail(e=256,t){const n=this.variantData.thumbnail;if(!(!n||!n.fileLink))return $g(n,e,"webp",t)}getColor(){return this.variantData.color}isDefault(){return!!this.variantData.default}getResource(){return this.variantData}isEnabled(){return this.variantData.enabled}getCategory(){return this.variantData.category}}const dd=class dd{constructor(e,t,n){this.manager=e,this.step=t,this.tags=n}setUpdateState(e){dd.updateState.set(`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`,e)}getUpdateState(){return!!dd.updateState.get(`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`)}getCurrentVariant(){const n=this.manager.getWorkflowSelections()[this.step.stepName]?.selections[0];if(n)return new Da(n)}async getAvailableVariants(){return(await this.getAllVariants()).filter(t=>t.isEnabled())||[]}async getAllVariants(){if(!this.step.option?.id)return[];if(this.step.option.variants)return(this.step.option.variants||[]).map(t=>new Da(t))||[];const e=await ft.getOption(this.step.option?.id);if(!e)throw new Error("Option not found, cannot fetch variants.");return(e.variants||[]).map(t=>new Da(t))||[]}getId(){return this.step.stepName}getName(){return this.step.stepTitle}getHelpText(){return this.step.helpText}getType(){return this.step.type}getRaw(){return this.step}getTags(){return this.tags}hasTag(e){return this.tags.includes(e)||!1}getMandatory(){return this.step.mandatory||!1}getOverrideGlobalPropertyConfiguration(e){return(this.manager.getStepStorage(this.step.stepName)?.overrideGlobalConfigurations??{})[e.toString()]??!1}setOverrideGlobalPropertyConfiguration(e,t){const n=this.manager.getStepStorage(this.step.stepName)?.overrideGlobalConfigurations??{};this.manager.updateStorage(this.step.stepName,{overrideGlobalConfigurations:{...n,[e.toString()]:t}})}getGlobalPropertyAspects(e){return this.step.globalPropertyAspectConfigurations?.filter(t=>t.globalPropertyConfigurationId===e&&t.aspectName).map(t=>t.aspectName)??[]}executeAnimations(e){const t=this.manager.getPreviewService(),n=this.manager.getModelContainer(),i=this.step.data.modelAnimation,a=this.step.data.lookAtAnimation;t?a&&t.executeCameraAnimation(a):console.warn("No preview service available, cannot execute camera animations."),n?i&&n.executeAnimation(i,e):console.warn("No model container available, cannot execute model animations.")}};dd.updateState=new Map;let Wi=dd;class lI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(e){if(!this.getUpdateState()&&this.getCurrentVariant()!==e)return id.selectVariant(this.step,e.getResource(),this.manager.getRegionElements(this.step.stepName)||[],t=>this.setUpdateState(t),this.manager)}getColors(){const e=this.manager.getRegionElements(this.step.stepName)||[];if(e.length===0)return;const n=Nn(e[0].id,this.manager.getAllLayoutData()).colors,a=this.getCurrentVariant()?.getAssetResource()?.assetConfiguration,s=a?.defaultColorVariants||[];if(s.length!==0){const o={};return s.forEach(l=>{const u=a.channelNumbers.find(c=>c.number===l.channelNumber);if(u){const c=u.id.replace(/\W/g,"");o[l.channelNumber]={browserValue:n[c]?.browserValue||""}}}),o}try{return n}catch(o){console.error(o)}}setColor(e,t,n){const i=new Map,s=this.getCurrentVariant()?.getAssetResource()?.assetConfiguration;return(s?.defaultColorVariants||[]).length!==0?s.channelNumbers.forEach(l=>{if(l.number.toString()===e){const u=l.id.replace(/\W/g,"");n?i.set(u,{browserValue:t,pmsValue:n}):i.set(u,t)}}):n?i.set(e,{browserValue:t,pmsValue:n}):i.set(e,t),id.changeColors(this.step,this.manager.getRegionElements(this.step.stepName),this.manager,i)}async getColorOption(){return await ft.ensureFullOption(this.step.data.colorOption)}getAvailableColors(){return this.step.data.colorPickerEnabled?id.availableColors(this.step,this.manager):Promise.resolve([])}isColorPickerEnabled(){return this.step.data.colorPickerEnabled??!1}isPMSPickerEnabled(){return this.step.data.pmsPickerEnabled??!1}isVariantSearchEnabled(){return this.step.data.enableVariantSearch??!1}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class uI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){return w1.selectVariant(this.step,e.getResource(),this.manager,t=>this.setUpdateState(t))}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class cI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){return C1.selectVariant(this.step,e.getResource(),this.manager,t=>this.setUpdateState(t))}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class fI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){return S1.selectVariant(this.step,e.getResource(),this.manager,t=>this.setUpdateState(t))}isVariantSearchEnabled(){return this.step.data.enableVariantSearch??!1}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class dI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(e){if(!e.getId())throw new Error("Unable to select variant with a null ID");await E1.selectVariant(this.step,e.getId(),this.manager)}async getDisplayType(){return this.step.data.displayType?this.step.data.displayType:(await ft.getOptionForStep(this.step))?.displayType}}class hI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){const t=e.getResource();return Vu.selectVariant(this.step,{fill:t.color,stroke:t.color,variant:t},this.manager.getRegionElements(this.step.stepName)||[],this.manager)}setColor(e){return Vu.selectVariant(this.step,e,this.manager.getRegionElements(this.step.stepName)||[],this.manager)}getColors(){return Vu.availableColours(this.step)}setCustomColor(e){return this.getCurrentVariant()?.getColor()!=="#custom"&&console.warn(`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`),Vu.setCustomColor(e,this.step,this.manager)}getCustomColor(){this.getCurrentVariant()?.getColor()!=="#custom"&&console.warn(`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`);const e=this.manager.getStepStorage(this.step.stepName)?.colour;if(!e)throw new Error(`Color not available on step ${this.step.stepName}. Set a default on the workflow to fix this.`);return e}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class pI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(e){await ui.selectVariant(this.step,e.getResource(),this.manager,t=>{if(t)this.manager.setInformationResults([...this.manager.getInformationResults(),{message:t,messageType:ih.Error,stepID:this.step.stepName}]);else{const n=this.manager.getInformationResults().filter(i=>i.stepID!==this.step.stepName);this.manager.setInformationResults(n)}},()=>{})}async getAvailableFillColors(){return this.step.data.colorPickerEnabled?ui.availableFillColors(this.step):[]}async setFillColor(e){const t=this.manager.getRegionElements(this.step.stepName);await ui.changeFillColor(this.step,e,t,this.manager)}getFillColor(){return this.manager.getStepStorage(this.step.stepName)?.color||"#000000"}getAvailableFillImages(){return ui.availableFillImages(this.step)}async setFillImage(e){const t=this.manager.getRegionElements(this.step.stepName);await ui.changeFillImage(this.step,e,t,this.manager)}getFillImage(){return this.manager.getStepStorage(this.step.stepName)?.fillImage}getAlignment(){return ui.findLayoutElements(this.manager,this.step)?.[0].align}setAlignment(e){const t=this.manager.getRegionElements(this.step.stepName);ui.changeAlignment(this.step,e,t,this.manager)}setFullTextCustomization(e){const t=this.manager.getStepStorage(this.step.stepName)?.inputText||"",n=this.step.data.replaceableText!==void 0?this.step.data.replaceableText.replace("{{}}",t):t,i=e?n:this.step.data.defaultText;return this.manager.updateStorage(this.step.stepName,{customiseAllText:e,text:i,defaultCleared:!1}),this.setText(i)}setText(e){const t={input:e,helperData:{}},n=ui.findLayoutElements(this.manager,this.step),i=ui.filterUnsupportedCharacters(e,n[0]?.fontData),a=Wu(i,this.manager).length,s=!!this.step.data&&!!this.step.data.maxLength&&a>this.step.data.maxLength;s||(t.input=i);const o=n.length<=0,l=o?{inputText:i,text:i}:{inputText:i};this.manager.updateStorage(this.step.stepName,l);const u=this.manager.getStepStorage(this.step.stepName),c=ui.getProcessedInput(i,this.step.data,u?.customiseAllText??!1);if(o)s||this.manager.updateMetadata(this.step.stepName,{text:c});else{const{command:h,errorData:f,helperData:d}=ui.updateInputText(i,n,this.step,this.manager);h&&this.manager.getCommandDispatcher()(h),t.helperData=d,t.errorData=f,!s&&!f&&this.manager.updateMetadata(this.step.stepName,{text:c})}return t}getText(){const e=this.step.data.defaultText,t=this.manager.getStepStorage(this.step.stepName);return e&&t?.defaultCleared!==void 0&&!t?.defaultCleared?e:this.manager.getStepStorage(this.step.stepName)?.text||""}isReplaceable(){return this.step.data.userCanReplaceText}newLinesSupported(){return this.step.data.allowNewlines||!1}clearDefaultTextIfNecessary(){if(!this.manager.getStepStorage(this.step.stepName)?.defaultCleared&&this.step.data.deleteDefaultOnFocus){const t=this.setText("");this.manager.updateStorage(this.step.stepName,{defaultCleared:!0,inputText:""});const n=ui.findLayoutElements(this.manager,this.step);return ui.updateInputText("",n,this.step,this.manager),t}}hasColorPicker(){return this.step.data.colorPickerEnabled}getRegions(){return this.step.data.regions}getCharacterLimit(){return this.step.data.maxLength}getCharactersRemaining(){const e=this.step.data.maxLength;if(e===void 0)return;const t=Wu(this.getText(),this.manager);return e-t.length}setCustomColor(e){throw new Error("Custom color support is not yet available on text. Check back soon.")}getCustomColor(){throw new Error("Custom color support is not yet available on text. Check back soon.")}async getAvailableStrokeColors(){return this.step.data.strokeEnabled?ui.availableStrokeColors(this.step):[]}getStrokeColor(){return this.manager.getStepStorage(this.step.stepName)?.strokeColor?.browserValue||"#000000"}async setStrokeColor(e){const t=this.manager.getRegionElements(this.step.stepName);await ui.changeStrokeColor(this.step,e,t,this.manager)}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class gI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(){}getContent(){return this.step.data.content}}class mI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(){}getPreviewURL(){return this.manager.getStepStorage(this.step.stepName)?.videoUrl||""}async selectVideo(e){return b1.regenerateQRCode(this.manager.getRegionElements(this.step.stepName),e.key,this.manager,this.step)}}class vI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(){console.info("Text Modules don't support variants.")}getCharactersRemaining(){const e=this.step.data.maxLength;if(e===void 0)return;const t=Wu(this.getText(),this.manager);return e-t.length}getCharacterLimit(){return this.step.data.maxLength}getText(){return this.manager.getStepStorage(this.step.stepName)?.text||""}setText(e){x1.changeText(this.step,e,this.manager,t=>{if(t){const n=[...this.manager.getInformationResults(),{message:t,messageType:ih.Error,stepID:this.step.stepName}];this.manager.setInformationResults(n)}else{const n=this.manager.getInformationResults().filter(i=>i.stepID!==this.step.stepName);this.manager.setInformationResults(n)}})}}class Op{static get(e,t){switch(t.type){case Je.DigitalContent:return new mI(e,t,e.getStepTags(t.stepName));case Je.Information:return new gI(e,t,e.getStepTags(t.stepName));case Je.Question:return new dI(e,t,e.getStepTags(t.stepName));case Je.Text:return new pI(e,t,e.getStepTags(t.stepName));case Je.Illustration:return new lI(e,t,e.getStepTags(t.stepName));case Je.Picture:return new fI(e,t,e.getStepTags(t.stepName));case Je.Shape:return new hI(e,t,e.getStepTags(t.stepName));case Je.Material:return new uI(e,t,e.getStepTags(t.stepName));case Je.Model:return new cI(e,t,e.getStepTags(t.stepName));case Je.Frame:return new zD(e,t,e.getStepTags(t.stepName));case Je.Module:return new vI(e,t,e.getStepTags(t.stepName));default:throw new nn(`Step type ${t.type} not yet supported in Core SDK`)}}}var Rv,pE;function h9(){if(pE)return Rv;pE=1;var r=1/0,e=9007199254740991,t=17976931348623157e292,n=NaN,i="[object Function]",a="[object GeneratorFunction]",s="[object Symbol]",o=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,h=/^(?:0|[1-9]\d*)$/,f=parseInt,d=Object.prototype,g=d.toString,v=Math.ceil,y=Math.max;function A(se,he,ye){var Ue=-1,Oe=se.length;he<0&&(he=-he>Oe?0:Oe+he),ye=ye>Oe?Oe:ye,ye<0&&(ye+=Oe),Oe=he>ye?0:ye-he>>>0,he>>>=0;for(var Te=Array(Oe);++Ue<Oe;)Te[Ue]=se[Ue+he];return Te}function C(se,he){return he=he??e,!!he&&(typeof se=="number"||h.test(se))&&se>-1&&se%1==0&&se<he}function k(se,he,ye){if(!$(ye))return!1;var Ue=typeof he;return(Ue=="number"?R(ye)&&C(he,ye.length):Ue=="string"&&he in ye)?S(ye[he],se):!1}function T(se,he,ye){(ye?k(se,he,ye):he===void 0)?he=1:he=y(Q(he),0);var Ue=se?se.length:0;if(!Ue||he<1)return[];for(var Oe=0,Te=0,K=Array(v(Ue/he));Oe<Ue;)K[Te++]=A(se,Oe,Oe+=he);return K}function S(se,he){return se===he||se!==se&&he!==he}function R(se){return se!=null&&G(se.length)&&!B(se)}function B(se){var he=$(se)?g.call(se):"";return he==i||he==a}function G(se){return typeof se=="number"&&se>-1&&se%1==0&&se<=e}function $(se){var he=typeof se;return!!se&&(he=="object"||he=="function")}function Y(se){return!!se&&typeof se=="object"}function X(se){return typeof se=="symbol"||Y(se)&&g.call(se)==s}function J(se){if(!se)return se===0?se:0;if(se=oe(se),se===r||se===-r){var he=se<0?-1:1;return he*t}return se===se?se:0}function Q(se){var he=J(se),ye=he%1;return he===he?ye?he-ye:he:0}function oe(se){if(typeof se=="number")return se;if(X(se))return n;if($(se)){var he=typeof se.valueOf=="function"?se.valueOf():se;se=$(he)?he+"":he}if(typeof se!="string")return se===0?se:+se;se=se.replace(o,"");var ye=u.test(se);return ye||c.test(se)?f(se.slice(2),ye?2:8):l.test(se)?n:+se}return Rv=T,Rv}var p9=h9();const oA=zs(p9),g9=Fe`
2338
+ `,l9=ke`
2339
+ mutation EmailBundleShareLink($bundleId: String!, $email: String!, $firstName: String, $lastName: String) {
2340
+ bundleEmailSharePageLink(bundleId: $bundleId, email: $email, firstName: $firstName, lastName: $lastName) {
2341
+ id
2342
+ }
2343
+ }
2344
+ `,u9=(r,e)=>e&&typeof e=="object"&&!Array.isArray(e)?Object.keys(e).sort().reduce((t,n)=>(t[n]=e[n],t),{}):e,c9=r=>{for(const e of Object.values(r.layouts).map(t=>t.elements).flat())e.type==="illustration"&&(delete e.cachedObjectURL,e.src&&delete e.svg),e.type==="frame"&&delete e.pattern?.svg;return oI(r,"__typename"),r},oI=(r,e)=>{if(!(typeof r!="object"||r===null))for(const t in r)t===e?delete r[t]:oI(r[t],e)};var ih=(r=>(r.Error="Error",r.Warning="Warning",r.Info="Info",r))(ih||{});const f9=1e3;class hE extends Yg{constructor(e){super(),this.update=e}async execute(){await this.update(),await new Promise(e=>{window.setTimeout(()=>{e()},f9)})}}const d9=r=>r.sort((e,t)=>e.index-t.index).map(e=>({id:Ar(),panelId:e.name,name:e.name,title:e.title,index:e.index,createdAt:new Date,updatedAt:new Date,transparentBackground:e.transparentBackground,height:e.height,width:e.width,previewRegion:e.previewRegion,useEditableArea:e.useEditableArea,editableArea:e.editableArea})),h9=(r,e)=>{const t=r.workflowState,n=t?JSON.parse(t):void 0;return n?Object.values(n.layouts).map(i=>i.layout):d9(e.panels)},fd=class fd{constructor(e,t,n,i,a,s=!1,o,l=!1,u=!1,c=!1){this.workflowStatePromiseQueue=new Xg(1),this.initialized=!1,this.readOnly=!1,this.isReloadedTransaction=!1,this.singleVariantsRenderable=!1,this.stepTags={},this.setWorkflow=async f=>{this.confirmedDesign=!1,this.editedSteps={},this.informationResults=[],this.mandatorySteps={},this.pendingUpdates=[],this.selectionCost=0,this.stepSpecificServices={},this.pollers=[],this.allScenes=[],this.stepElements={},this.stepInitialised={},this.stepMetadata={},this.stepSelections={},this.storage={},this.validationErrors={steps:new Map},this.currentAdjustingStepId="",this.reloadedState?this.layouts=Object.values(this.reloadedState.layouts||{}).map(g=>g.layout):f?this.layouts=h9(this.experience.getTransaction(),f):this.layouts=[],this.commandContext.initialize(this.layouts,this.reloadedState),this.renderableContextService=new CU(this.layouts),this.renderableContextService.setWorkflowManager(this),f.steps.forEach(g=>{this.stepTags[g.stepName]=g.tags??[]});const d=this.previewService;this.ejectFromPreviewService(),this.initializationPromise=this.initializeDefaultWorkflowState(f),this.initializationPromise.then(()=>{this.initialized=!0}),this.initializationPromise.catch(g=>{throw this.initialized=!1,new Error(g)}),this.initializationPromise.finally(()=>this.commandContext.registerStateCallback(()=>{this.updateStateWithServer(),this.renderLayouts()})),d&&await this.injectIntoPreviewService(d,!0)},this.renderLayouts=()=>{if(!this.previewService)return;const f=this.getCommandContext().getAllLayouts(),d=this.getLayoutPreviewService()?.getAll();if(d)for(const[,g]of d)g.render(f)},this.experience=e,this.client=t,this.updateTransaction=n,this.graphQlClient=i,this.reloadedState=a,this.readOnly=s,this.singleVariantsRenderable=u,this.commandContext=new zT,this.confirmCallbacks=[],this.editedCallbacks=[],this.elementsCallbacks=[],this.informationResultCallbacks=[],this.initCallbacks=[],this.mandatoryCallbacks=[],this.makingAdjustmentsCallback=[],this.metadataCallbacks=[],this.selectionCallbacks=[],this.stepSpecificStorageCallbacks={},this.storageCallbacks=[],this.validationCallbacks=[],this.recipientCallbacks=[],this.modelContainer=o,this.confirmedDesign=!1,this.editedSteps={},this.informationResults=[],this.mandatorySteps={},this.pendingUpdates=[],this.selectionCost=0,this.stepSpecificServices={},this.pollers=[],this.allScenes=[],this.stepElements={},this.stepInitialised={},this.stepMetadata={},this.stepSelections={},this.storage={},this.validationErrors={steps:new Map},this.currentAdjustingStepId="",this.isReloadedTransaction=l,c&&(this.workflowStatePromiseQueue.enabled=!1);const h=this.experience.getWorkflow();h&&this.setWorkflow(h)}getTemplatingContext(){const e=this.experience.getTransaction().recipient,t={recipient:e};return this.recipientConversionConfiguration?.requestedDataItems?.forEach(n=>{const i=n.uniqueIdentifier??n.title??"";n.type===td.FirstName?t[i]=e?.firstName:n.type===td.LastName?t[i]=e?.lastName:n.type===td.Custom&&(n.customFieldIndex===1?t[i]=e?.customField1:n.customFieldIndex===2?t[i]=e?.customField2:n.customFieldIndex===3?t[i]=e?.customField3:n.customFieldIndex===4?t[i]=e?.customField4:n.customFieldIndex===5&&(t[i]=e?.customField5),n.option&&(t[i]=n.option.variants?.find(a=>a.id===t[i])?.name))}),t}async updateRecipient(e,t,n,i,a,s,o,l,u,c,h,f,d,g,v,y,A,C){const k=this.experience.getTransaction();if(k.recipient?.id)this.experience.getTransaction().recipient={id:k.recipient.id,firstName:e??k.recipient.firstName,lastName:t??k.recipient.lastName,address:n??k.recipient.address,suburb:i??k.recipient.suburb,state:a??k.recipient.state,email:s??k.recipient.email,postalCode:o??k.recipient.postalCode,country:l??k.recipient.country,mobile:u??k.recipient.mobile,company:c??k.recipient.company,apartment:h??k.recipient.apartment,customField1:f??k.recipient.customField1,customField2:d??k.recipient.customField2,customField3:g??k.recipient.customField3,customField4:v??k.recipient.customField4,customField5:y??k.recipient.customField5,conversionConfigurationId:A||k.recipient.conversionConfigurationId},this.experience.callEvent(xg.RecipientChanged),await this.graphQlClient().mutate({mutation:i9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:k.recipient.id,firstName:e||k.recipient.firstName,lastName:t||k.recipient.lastName,address:n||k.recipient.address,suburb:i||k.recipient.suburb,state:a||k.recipient.state,email:s||k.recipient.email,postalCode:o||k.recipient.postalCode,country:l||k.recipient.country,mobile:u||k.recipient.mobile,company:c||k.recipient.company,apartment:h||k.recipient.apartment,customField1:f||k.recipient.customField1,customField2:d||k.recipient.customField2,customField3:g||k.recipient.customField3,customField4:v||k.recipient.customField4,customField5:y||k.recipient.customField5,conversionConfigurationId:A||k.recipient.conversionConfigurationId,prevalidated:C}});else{const T=await this.graphQlClient().mutate({mutation:n9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{firstName:e,lastName:t,address:n,suburb:i,state:a,email:s,postalCode:o,country:l,mobile:u,company:c,apartment:h,customField1:f,customField2:d,customField3:g,customField4:v,customField5:y,conversionConfigurationId:A}});k.recipient={id:T?.data?.recipientCreate?.id,firstName:e,lastName:t,address:n,suburb:i,state:a,email:s,postalCode:o,country:l,mobile:u,company:c,apartment:h,customField1:f,customField2:d,customField3:g,customField4:v,customField5:y,conversionConfigurationId:A},this.experience.callEvent(xg.RecipientChanged),await this.graphQlClient().mutate({mutation:a9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id,recipientId:T.data?.recipientCreate?.id},context:{transactionOwnerId:this.experience.getTransaction().transactionOwnerId}})}await this.fetchConversionConfiguration(),this.recipientCallbacks.forEach(T=>T(this.experience.getTransaction().recipient))}async fetchConversionConfiguration(){const e=this.experience.getTransaction().recipient;if(e?.conversionConfigurationId&&!this.recipientConversionConfiguration){const t=fd.configurationPromiseMap.get(e.conversionConfigurationId);if(t)this.recipientConversionConfiguration=await t;else{const i=(async()=>(await this.graphQlClient().query({query:E3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:e.conversionConfigurationId}})).data.conversionConfiguration)();fd.configurationPromiseMap.set(e.conversionConfigurationId,i),this.recipientConversionConfiguration=await i}}}async initializeDefaultWorkflowState(e){const t=()=>{const c=e.finalizeStepConfig;if(!c)return;const h=c.lookAtAnimation,f=c.modelAnimation;h&&this.previewService?.executeCameraAnimation(h),f&&this.modelContainer?.executeAnimation(f)};this.reloadedState&&this.reloadedState.serializableWorkflow.steps.forEach(c=>{this.storage[c.stepName]=c.storage||{}});const n=await this.getInitialOptionIds(this.reloadedState?.serializableWorkflow?.steps.reduce((c,h)=>(h.selectedVariants?.length&&(c[h.stepName]={selectedVariants:h.selectedVariants.map(f=>({id:f.id}))}),c),{})),i=ft.getOptions(Array.from(n)),a=this.fetchConversionConfiguration();await Promise.all([i,a]),this.allScenes=VC(e);const o=(await Is(this.allScenes,this.stepSelections)).map(c=>c.silentSteps).flat(),{stepElements:l,commands:u}=await this.stepElementsForIntroducedSilentSteps(o,!!this.reloadedState);this.commandContext.apply(new Rn(u),!0),this.stepElements={...this.stepElements,...l},await this.ensureStepsAreLoaded(),this.isReloadedTransaction||this.updateStateWithServer(),this.renderLayouts(),this.reloadedState&&t()}getWorkflowExperience(){return this.experience}getClient(){return this.client}setWorkflowStateSyncEnabled(e){this.workflowStatePromiseQueue.enabled=e}getInitializationPromise(){return this.initializationPromise}isInitialized(){return this.initialized}async getInitialOptionIds(e){const t=new Set,n=this.experience.getWorkflow();if(!n)return t;const i=VC(n),a={...e};let s=-1;for(;;){const u=(await Is(i,a)).flatMap(c=>c.renderableSteps);if(u.length===s)break;s=u.length;for(const c of u){if(a[c.stepName])continue;const h=c.option?.defaultVariant?.id;h&&(a[c.stepName]={selectedVariants:[{id:h}]})}}return(await Is(i,a)).flatMap(l=>l.renderableSteps).forEach(l=>{l.option?.id&&!l.option?.variants&&t.add(l.option.id)}),t}addConfirmCallback(e){e(this.confirmedDesign),this.confirmCallbacks.push(e)}addEditedCallback(e){e(this.editedSteps),this.editedCallbacks.push(e)}addElementsCallback(e){e(this.stepElements),this.elementsCallbacks.push(e)}addInformationResultCallback(e){e(this.informationResults),this.informationResultCallbacks.push(e)}addInitCallback(e){e(this.stepInitialised),this.initCallbacks.push(e)}addMandatoryCallback(e){e(this.mandatorySteps),this.mandatoryCallbacks.push(e)}addMetadataCallback(e){e(this.stepMetadata),this.metadataCallbacks.push(e)}async addSelectionCallback(e){e({selectionCost:this.selectionCost,selections:this.stepSelections,traversableScenes:await this.traversableScenes()}),this.selectionCallbacks.push(e)}addStepSpecificStorageCallback(e,t){Object.keys(this.storage).includes(t)||(this.storage[t]={}),e(this.storage[t]),Object.keys(this.stepSpecificStorageCallbacks).includes(t)||(this.stepSpecificStorageCallbacks[t]=[]),this.stepSpecificStorageCallbacks[t].push(e)}addStorageCallback(e){e(this.storage),this.storageCallbacks.push(e)}addMakingAdjustmentsCallback(e){e(this.currentAdjustingStepId),this.makingAdjustmentsCallback.push(e)}addPoller(e){this.pollers.push(e)}addValidationCallback(e){this.validationCallbacks.push(e),e(this.validationErrors)}addRecipientCallback(e){this.recipientCallbacks.push(e),e(this.experience.getTransaction().recipient)}removeRecipientCallback(e){this.recipientCallbacks=this.recipientCallbacks.filter(t=>t!==e)}getLayouts(){return this.layouts}getAllLayoutData(){return this.commandContext.getAllLayouts().map(e=>e.layoutState)}getLayoutPreviewService(){return this.renderableContextService}getInformationResults(){return this.informationResults}getPreviewService(){return this.previewService}getCommandContext(){return this.commandContext}getRegionElements(e){return this.stepElements[e]||[]}getStepSpecificServices(e){return this.stepSpecificServices[e]}getTransactionCustomer(){return this.ownerCustomer}setTransactionCustomer(e){this.ownerCustomer=e}setTransactionCustomerDetails(e){this.ownerCustomer={...this.ownerCustomer,emailAddress:e.email}}getModelContainer(){return this.modelContainer}setModelContainer(e){(!e||this.previewService&&this.previewService.getAllModels().includes(e))&&(this.modelContainer=e,e&&e.metadata&&e.metadata instanceof Map&&this.modelContainer.metadata.set("workflowManager",this))}getCommandDispatcher(){return e=>this.commandContext.apply(e,!this.initialized)}getWorkflowSelections(){const e={};return this.experience.getWorkflow()?.steps.forEach(t=>{const n=this.stepSelections[t.stepName];n&&n.selectedVariants&&n.selectedVariants.length>0&&(e[t.stepName]={selections:n.selectedVariants})}),e}getStepSelections(){return this.stepSelections}markStepsAsInitialised(e){const t={...this.stepInitialised};e.forEach(n=>{t[n]=!0}),this.stepInitialised=t,this.onInitChange()}getUpdatesPending(){return this.pendingUpdates.length>0}markUpdateCompleted(e){this.pendingUpdates=this.pendingUpdates.filter(t=>t!==e)}markUpdatePending(){const e=Ar();return this.pendingUpdates=[...this.pendingUpdates,e],e}setEditedStatus(e,t){this.editedSteps={...this.editedSteps,[e]:t},this.onEditedChange()}setInformationResults(e){this.informationResults=[...e],this.onInformationResultChange()}setCurrentAdjustingStepId(e){this.currentAdjustingStepId=e,this.onMakingAdjustmentsChange()}setMandatoryFulfilled(e,t){this.mandatorySteps[e]!==t&&(this.mandatorySteps={...this.mandatorySteps,[e]:t},this.onMandatoryChange())}async getMandatoryUnfulfilledSteps(){return(await Is(this.allScenes,this.stepSelections)).flatMap(a=>a.renderableSteps).filter(a=>a.mandatory).filter(a=>!this.mandatorySteps[a.stepName]).map(a=>a.stepName)}setStepError(e,t,n){let i=!1;if(!this.validationErrors.steps.has(e)&&n)i=!0,this.validationErrors.steps.set(e,new Map([[t,n]]));else if(this.validationErrors.steps.has(e)){const a=this.validationErrors.steps.get(e);n&&n!==a.get(t)?(i=!0,a.set(t,n)):n||(i=!0,a.delete(t),a.size===0&&this.validationErrors.steps.delete(e))}i&&this.onValidationChange()}getStepErrors(e){return this.validationErrors.steps.get(e)}getValidationErrors(){return this.validationErrors}toggleDesignConfirmed(){this.confirmedDesign=!this.confirmedDesign,this.onConfirmChange()}toggleMakingAdjustmentsCallback(e){e(this.mandatorySteps),this.mandatoryCallbacks.push(e)}async injectIntoPreviewService(e,t){if(this.modelContainer)throw new Error("You must eject from the preview service before injecting again.");this.previewService=e;const n=this.experience.getProduct();if(!n?.modelUrl||!this.previewService)return;const i=e.loadModel({model:n.modelUrl,contextService:this.getLayoutPreviewService()},{refocusCamera:t});this.setModelContainer(i),(await Is(this.allScenes,this.stepSelections)).filter(o=>o).map(o=>o.renderableSteps).flat().filter(o=>o.type===Je.Model||o.type===Je.Material).forEach(o=>{if(!o.option?.id){console.error(`Failed to read option id from step: ${o.stepName}`);return}const l=this.stepSelections[o.stepName]?.selectedVariants||[];if(l.length===0)return;const u=l[0];if(o.type===Je.Model){if(!this.modelContainer)throw new nn("We should always have a model container when injecting a preview!");const c=u.asset?.fileLink;if(!c){console.error(`Failed to read model url from variant: ${u.id} for step: ${o.stepName}`);return}const h=o.data;this.modelContainer.applyModelVariant(o.stepName,{model:c,contextService:this.getLayoutPreviewService()},h.replaceProductModel||!1)}else{const c=u.material;if(!c){console.error(`Failed to read material from variant: ${u.id} for step: ${o.stepName}`);return}o.data.targetMaterials.forEach(f=>{if(!this.modelContainer)throw new nn("We should always have a model container when injecting a preview!");this.modelContainer.applyMaterialVariant(f,o.option.id,c)})}}),await i.getInitializationPromise(),this.renderLayouts()}ejectFromPreviewService(){if(this.modelContainer){if(!this.modelContainer.dispose)throw new Error("This feature is not supported in the current preview service.");this.modelContainer.dispose(),this.modelContainer=void 0}this.previewService=void 0}updateStorage(e,t){const n={...this.storage,[e]:{...this.storage[e],...t}};if(!xd(n,this.storage)){this.storage=n;const i=new SS(this.constructSerializableWorkflow());this.commandContext.apply(i,!0),this.onStepSpecificStorageChange(e),this.onStorageChange()}}constructSerializableWorkflow(){const e=[];return this.allScenes.forEach(t=>{t.renderableSteps.forEach(n=>{const i={stepName:n.stepName};i.storage=this.storage[n.stepName],i.selectedVariants=this.stepSelections[n.stepName]?.selectedVariants?.map(a=>({id:a.id,priceModifier:a.priceModifier})),e.push(i)})}),{steps:e}}updateStateWithServer(){if(this.readOnly)return;const e=this.serialize();this.workflowStatePromiseQueue.enqueue(new hE(async()=>{await new Promise(t=>{setTimeout(()=>{t()},1)}),await this.updateTransaction({variables:{id:this.experience.getTransaction().id,workflowState:e}})}))}async updateStateWithServerImmediate(){if(this.readOnly)return;const e=this.serialize();return new hE(async()=>{await this.updateTransaction({variables:{id:this.experience.getTransaction().id,workflowState:e}})}).execute()}serialize(){const e=this.getCommandContext().getState();if(!e)throw new nn("Attempted to serialize state before it was initialized.");const t=vo(e.transaction),n=c9(t);return JSON.stringify(n,u9,void 0)}async getStateHash(){const e=this.getCommandContext().getState(),n=Object.values(e?.transaction.layouts||{}).map(s=>s.modificationID??"").sort().join(""),a=new TextEncoder().encode(n);if(typeof window<"u"&&window.crypto&&window.crypto.subtle&&window.crypto.subtle.digest){const s=await window.crypto.subtle.digest("SHA-256",a);return Array.from(new Uint8Array(s)).map(u=>u.toString(16).padStart(2,"0")).join("")}try{return(await import("crypto")).createHash("sha256").update(n,"utf8").digest("hex")}catch{throw new Error("Unable to compute SHA-256 hash: no suitable crypto implementation available.")}}async outstandingRequestsPromise(){return this.workflowStatePromiseQueue.finalize()}updateMetadata(e,t){this.stepMetadata={...this.stepMetadata,[e]:{...this.stepMetadata[e],...t}},this.onMetadataChange()}removeElements(e){const t=(n,i)=>Object.keys(n).reduce((a,s)=>{const o=[...n[s]||[]];return i.forEach(l=>{const u=o.findIndex(c=>c.id===l.id);u>-1&&o.splice(u,1)}),a[s]=o,a},{});this.stepElements=t(this.stepElements,e)}async getInvalidCanvasRegions(){let e=[];for(const t of this.experience.getWorkflow()?.steps||[])if(!await fo(t,this.stepSelections)&&this.stepElements[t.stepName])for(const n of this.stepElements[t.stepName])e.push(n);return e}async getInvalidModelVariants(){let e=[];for(const t of this.experience.getWorkflow()?.steps||[])t.type===Je.Model&&!await fo(t,this.stepSelections)&&e.push(t.stepName);return e}async stepElementsForIntroducedSilentSteps(e,t){const n=this.experience.getProduct();if(!n)return Promise.resolve({stepElements:{},commands:[]});const i=async(u,c,h)=>{if(u.type===Je.SilentIllustration){const f=await new ES(u,c).trigger();return{step:u,results:f}}else if(u.type===Je.ProductOverlay){const f=await new ES(u,c,h).trigger();return{step:u,results:f}}return Promise.reject("Unknown silent step. This is a bug")},a=e.filter(u=>!this.stepInitialised[u.stepName]),s={stepElements:{},commands:[]},o=[];for(const u of a)this.markStepsAsInitialised([u.stepName]),t||o.push(i(u,this.layouts,n));const l=await Promise.all(o);for(const u of l)s.stepElements[u.step.stepName]=u.results.map(c=>c.regionElement),s.commands=[...s.commands,...u.results.map(c=>c.command)];return s}getStepStorage(e){return this.storage[e]}getMetadata(e){return this.stepMetadata[e]}getWorkflowMetadata(){return this.stepMetadata}getStepTags(e){return this.stepTags[e]||[]}getSerializedStep(e,t){return t.find(n=>n.stepName===e)}async updateTransactionShareActions(){const e=await this.client.getShareActionsForTransaction(this.experience.getTransaction().id);this.experience.getTransaction().transactionShareActions=e}async updateTransactionStakeholders(){const e=await $e.getShadowGraphqlClient().query({query:P3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id}});!e?.data?.transactions||e.data.transactions.length!==1?(this.experience.getTransaction().currentStakeholder=void 0,this.experience.getTransaction().stakeholders=void 0):(this.experience.getTransaction().stakeholders=e.data.transactions[0].stakeholders,this.experience.getTransaction().currentStakeholder=e.data.transactions[0].currentStakeholder)}async approveTransaction(e){await $e.getShadowGraphqlClient().mutate({mutation:t9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id,note:e}})}async rejectTransaction(e){await $e.getShadowGraphqlClient().mutate({mutation:r9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.experience.getTransaction().id,note:e}})}async reset(){this.stepElements={},this.stepInitialised={},this.stepMetadata={},this.stepSelections={},this.storage={},await this.ensureStepsAreLoaded()}async setSelectionsAndElements(e,t,n,i){const a=this.experience.getWorkflow();if(!a)throw new Error("Attempted to set selections when no workflow is set!");const s=this.stepSelections;this.stepSelections={...this.stepSelections,[e]:{selectedVariants:t}},this.selectionCost=Object.values(this.stepSelections).reduce((R,B)=>R+B.selectedVariants.map(G=>G.priceModifier||0).reduce((G,$)=>G+$,0),0);for(const R of a.steps)await fo(R,this.stepSelections)||(this.stepInitialised[R.stepName]=!1,delete this.stepMetadata[R.stepName],delete this.stepSelections[R.stepName],delete this.storage[R.stepName]);const o=this.allScenes,l=await Is(o,s),u=await Is(o,this.stepSelections),c=l.map(R=>R.silentSteps).flat(),f=u.map(R=>R.silentSteps).flat().filter(R=>!c.some(B=>B.stepName===R.stepName));for(const R of c)await fo(R,this.stepSelections)||(this.stepInitialised[R.stepName]=!1);const d=await this.getInvalidCanvasRegions(),{stepElements:g,commands:v}=await this.stepElementsForIntroducedSilentSteps(f,!1);this.stepElements={...this.stepElements,...g,[e]:n},this.removeElements(d);const y=a.steps.find(R=>R.stepName===e);y?.type===Je.Frame&&this.getWorkflowExperience().getStepById(y.stepName)?.frameService?.setTargetElements(n.map(B=>B.id));const A=d.map(R=>new _l(R.id)),C=new SS(this.constructSerializableWorkflow()),k=[...v,...A,C];k.length>0&&this.commandContext.apply(new Rn(k),!0),await this.ensureStepsAreLoaded(),this.onElementsChange();const T=await this.getInvalidModelVariants(),S=this.modelContainer;if(S){const R=T.map(B=>S.applyModelVariant(B,{contextService:this.getLayoutPreviewService()},!1));await Promise.all(R)}await this.onSelectionChange(),y?.type!==Je.Frame&&y?.type!==Je.Text&&this.setMandatoryFulfilled(e,!0),i&&await i()}async ensureStepsAreLoaded(){const t=(await Is(this.allScenes,this.stepSelections)).map(l=>l.renderableSteps),n=[],i=t.flat();for(const l of i)if(!this.stepInitialised[l.stepName])switch(this.stepInitialised[l.stepName]=!0,l.type){case Je.DigitalContent:n.push(b1.init(l,this,this.reloadedState));break;case Je.Frame:n.push(lo.init(l,this,this.reloadedState));break;case Je.Illustration:n.push(id.init(l,this,this.reloadedState));break;case Je.Material:n.push(w1.init(l,this,this.reloadedState));break;case Je.Model:n.push(C1.init(l,this,this.reloadedState));break;case Je.Module:this.stepSpecificServices[l.stepName]={module:await iI(l.data.module)},n.push(x1.init(l,this,this.reloadedState));break;case Je.Picture:n.push(S1.init(l,this,this.reloadedState));break;case Je.Question:n.push(E1.init(l,this,this.reloadedState));break;case Je.Shape:n.push(Vu.init(l,this,this.reloadedState));break;case Je.Text:n.push(ui.init(l,this,this.reloadedState));break}const a=(await Promise.allSettled(n)).map(l=>{if(l.status==="rejected")throw new Error(`Step initialization failed: ${l.reason}`);return l.value}),s=a.flatMap(l=>l?.command?[l.command]:[]),o=a.flatMap(l=>l?.followup?[l.followup]:[]);s&&s.length>0&&this.commandContext.apply(new Rn(s),!0);for(const l of o)await l();o.length>0&&await this.ensureStepsAreLoaded(),this.onInitChange()}onConfirmChange(){this.confirmCallbacks.forEach(e=>e(this.confirmedDesign))}onEditedChange(){this.editedCallbacks.forEach(e=>e(this.editedSteps))}onElementsChange(){this.elementsCallbacks.forEach(e=>e(this.stepElements))}onInformationResultChange(){this.informationResultCallbacks.forEach(e=>e(this.informationResults))}onInitChange(){this.initCallbacks.forEach(e=>e(this.stepInitialised))}onMakingAdjustmentsChange(){this.makingAdjustmentsCallback.forEach(e=>{e(this.currentAdjustingStepId)})}onMandatoryChange(){this.mandatoryCallbacks.forEach(e=>e(this.mandatorySteps))}onMetadataChange(){this.metadataCallbacks.forEach(e=>{e(this.stepMetadata)})}async onSelectionChange(){const e=await this.traversableScenes();for(const t of this.selectionCallbacks)t({selectionCost:this.selectionCost,selections:this.stepSelections,traversableScenes:e})}onStepSpecificStorageChange(e){Object.keys(this.stepSpecificStorageCallbacks).includes(e)||(this.stepSpecificStorageCallbacks[e]=[]),this.stepSpecificStorageCallbacks[e].forEach(t=>t(this.storage[e]))}onStorageChange(){this.storageCallbacks.forEach(e=>e(this.storage))}onValidationChange(){this.validationCallbacks.forEach(e=>e(this.validationErrors))}traversableScenes(){return p_(this.allScenes,this.stepSelections,this.singleVariantsRenderable)}};fd.configurationPromiseMap=new Map;let sA=fd;class Da{constructor(e){this.variantData=e}getType(){return this.variantData.asset?.type}getId(){return this.variantData.id}getName(){return this.variantData.name}getPriceFormatted(e,t){return this.variantData.priceModifier.toLocaleString(e||"en-US",{style:"currency",currency:"USD",...t})}getPrice(){return this.variantData.priceModifier}getAsset(){return this.variantData.asset?.fileLink}getAssetResource(){return this.variantData.asset}getThumbnail(e=256,t){const n=this.variantData.thumbnail;if(!(!n||!n.fileLink))return $g(n,e,"webp",t)}getColor(){return this.variantData.color}isDefault(){return!!this.variantData.default}getResource(){return this.variantData}isEnabled(){return this.variantData.enabled}getCategory(){return this.variantData.category}}const dd=class dd{constructor(e,t,n){this.manager=e,this.step=t,this.tags=n}setUpdateState(e){dd.updateState.set(`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`,e)}getUpdateState(){return!!dd.updateState.get(`${this.step.stepName}-${this.manager.getWorkflowExperience().getTransaction().id}`)}getCurrentVariant(){const n=this.manager.getWorkflowSelections()[this.step.stepName]?.selections[0];if(n)return new Da(n)}async getAvailableVariants(){return(await this.getAllVariants()).filter(t=>t.isEnabled())||[]}async getAllVariants(){if(!this.step.option?.id)return[];if(this.step.option.variants)return(this.step.option.variants||[]).map(t=>new Da(t))||[];const e=await ft.getOption(this.step.option?.id);if(!e)throw new Error("Option not found, cannot fetch variants.");return(e.variants||[]).map(t=>new Da(t))||[]}getId(){return this.step.stepName}getName(){return this.step.stepTitle}getHelpText(){return this.step.helpText}getType(){return this.step.type}getRaw(){return this.step}getTags(){return this.tags}hasTag(e){return this.tags.includes(e)||!1}getMandatory(){return this.step.mandatory||!1}getOverrideGlobalPropertyConfiguration(e){return(this.manager.getStepStorage(this.step.stepName)?.overrideGlobalConfigurations??{})[e.toString()]??!1}setOverrideGlobalPropertyConfiguration(e,t){const n=this.manager.getStepStorage(this.step.stepName)?.overrideGlobalConfigurations??{};this.manager.updateStorage(this.step.stepName,{overrideGlobalConfigurations:{...n,[e.toString()]:t}})}getGlobalPropertyAspects(e){return this.step.globalPropertyAspectConfigurations?.filter(t=>t.globalPropertyConfigurationId===e&&t.aspectName).map(t=>t.aspectName)??[]}executeAnimations(e){const t=this.manager.getPreviewService(),n=this.manager.getModelContainer(),i=this.step.data.modelAnimation,a=this.step.data.lookAtAnimation;t?a&&t.executeCameraAnimation(a):console.warn("No preview service available, cannot execute camera animations."),n?i&&n.executeAnimation(i,e):console.warn("No model container available, cannot execute model animations.")}};dd.updateState=new Map;let Wi=dd;class lI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(e){if(!this.getUpdateState()&&this.getCurrentVariant()!==e)return id.selectVariant(this.step,e.getResource(),this.manager.getRegionElements(this.step.stepName)||[],t=>this.setUpdateState(t),this.manager)}getColors(){const e=this.manager.getRegionElements(this.step.stepName)||[];if(e.length===0)return;const n=Nn(e[0].id,this.manager.getAllLayoutData()).colors,a=this.getCurrentVariant()?.getAssetResource()?.assetConfiguration,s=a?.defaultColorVariants||[];if(s.length!==0){const o={};return s.forEach(l=>{const u=a.channelNumbers.find(c=>c.number===l.channelNumber);if(u){const c=u.id.replace(/\W/g,"");o[l.channelNumber]={browserValue:n[c]?.browserValue||""}}}),o}try{return n}catch(o){console.error(o)}}setColor(e,t,n){const i=new Map,s=this.getCurrentVariant()?.getAssetResource()?.assetConfiguration;return(s?.defaultColorVariants||[]).length!==0?s.channelNumbers.forEach(l=>{if(l.number.toString()===e){const u=l.id.replace(/\W/g,"");n?i.set(u,{browserValue:t,pmsValue:n}):i.set(u,t)}}):n?i.set(e,{browserValue:t,pmsValue:n}):i.set(e,t),id.changeColors(this.step,this.manager.getRegionElements(this.step.stepName),this.manager,i)}async getColorOption(){return await ft.ensureFullOption(this.step.data.colorOption)}getAvailableColors(){return this.step.data.colorPickerEnabled?id.availableColors(this.step,this.manager):Promise.resolve([])}isColorPickerEnabled(){return this.step.data.colorPickerEnabled??!1}isPMSPickerEnabled(){return this.step.data.pmsPickerEnabled??!1}isVariantSearchEnabled(){return this.step.data.enableVariantSearch??!1}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class uI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){return w1.selectVariant(this.step,e.getResource(),this.manager,t=>this.setUpdateState(t))}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class cI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){return C1.selectVariant(this.step,e.getResource(),this.manager,t=>this.setUpdateState(t))}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class fI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){return S1.selectVariant(this.step,e.getResource(),this.manager,t=>this.setUpdateState(t))}isVariantSearchEnabled(){return this.step.data.enableVariantSearch??!1}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class dI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(e){if(!e.getId())throw new Error("Unable to select variant with a null ID");await E1.selectVariant(this.step,e.getId(),this.manager)}async getDisplayType(){return this.step.data.displayType?this.step.data.displayType:(await ft.getOptionForStep(this.step))?.displayType}}class hI extends Wi{constructor(e,t,n){super(e,t,n)}selectVariant(e){const t=e.getResource();return Vu.selectVariant(this.step,{fill:t.color,stroke:t.color,variant:t},this.manager.getRegionElements(this.step.stepName)||[],this.manager)}setColor(e){return Vu.selectVariant(this.step,e,this.manager.getRegionElements(this.step.stepName)||[],this.manager)}getColors(){return Vu.availableColours(this.step)}setCustomColor(e){return this.getCurrentVariant()?.getColor()!=="#custom"&&console.warn(`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`),Vu.setCustomColor(e,this.step,this.manager)}getCustomColor(){this.getCurrentVariant()?.getColor()!=="#custom"&&console.warn(`setting custom color for step ${this.step.stepName} but color is ${this.getCurrentVariant()?.getColor()}`);const e=this.manager.getStepStorage(this.step.stepName)?.colour;if(!e)throw new Error(`Color not available on step ${this.step.stepName}. Set a default on the workflow to fix this.`);return e}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class pI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(e){await ui.selectVariant(this.step,e.getResource(),this.manager,t=>{if(t)this.manager.setInformationResults([...this.manager.getInformationResults(),{message:t,messageType:ih.Error,stepID:this.step.stepName}]);else{const n=this.manager.getInformationResults().filter(i=>i.stepID!==this.step.stepName);this.manager.setInformationResults(n)}},()=>{})}async getAvailableFillColors(){return this.step.data.colorPickerEnabled?ui.availableFillColors(this.step):[]}async setFillColor(e){const t=this.manager.getRegionElements(this.step.stepName);await ui.changeFillColor(this.step,e,t,this.manager)}getFillColor(){return this.manager.getStepStorage(this.step.stepName)?.color||"#000000"}getAvailableFillImages(){return ui.availableFillImages(this.step)}async setFillImage(e){const t=this.manager.getRegionElements(this.step.stepName);await ui.changeFillImage(this.step,e,t,this.manager)}getFillImage(){return this.manager.getStepStorage(this.step.stepName)?.fillImage}getAlignment(){return ui.findLayoutElements(this.manager,this.step)?.[0].align}setAlignment(e){const t=this.manager.getRegionElements(this.step.stepName);ui.changeAlignment(this.step,e,t,this.manager)}setFullTextCustomization(e){const t=this.manager.getStepStorage(this.step.stepName)?.inputText||"",n=this.step.data.replaceableText!==void 0?this.step.data.replaceableText.replace("{{}}",t):t,i=e?n:this.step.data.defaultText;return this.manager.updateStorage(this.step.stepName,{customiseAllText:e,text:i,defaultCleared:!1}),this.setText(i)}setText(e){const t={input:e,helperData:{}},n=ui.findLayoutElements(this.manager,this.step),i=ui.filterUnsupportedCharacters(e,n[0]?.fontData),a=Wu(i,this.manager).length,s=!!this.step.data&&!!this.step.data.maxLength&&a>this.step.data.maxLength;s||(t.input=i);const o=n.length<=0,l=o?{inputText:i,text:i}:{inputText:i};this.manager.updateStorage(this.step.stepName,l);const u=this.manager.getStepStorage(this.step.stepName),c=ui.getProcessedInput(i,this.step.data,u?.customiseAllText??!1);if(o)s||this.manager.updateMetadata(this.step.stepName,{text:c});else{const{command:h,errorData:f,helperData:d}=ui.updateInputText(i,n,this.step,this.manager);h&&this.manager.getCommandDispatcher()(h),t.helperData=d,t.errorData=f,!s&&!f&&this.manager.updateMetadata(this.step.stepName,{text:c})}return t}getText(){const e=this.step.data.defaultText,t=this.manager.getStepStorage(this.step.stepName);return e&&t?.defaultCleared!==void 0&&!t?.defaultCleared?e:this.manager.getStepStorage(this.step.stepName)?.text||""}isReplaceable(){return this.step.data.userCanReplaceText}newLinesSupported(){return this.step.data.allowNewlines||!1}clearDefaultTextIfNecessary(){if(!this.manager.getStepStorage(this.step.stepName)?.defaultCleared&&this.step.data.deleteDefaultOnFocus){const t=this.setText("");this.manager.updateStorage(this.step.stepName,{defaultCleared:!0,inputText:""});const n=ui.findLayoutElements(this.manager,this.step);return ui.updateInputText("",n,this.step,this.manager),t}}hasColorPicker(){return this.step.data.colorPickerEnabled}getRegions(){return this.step.data.regions}getCharacterLimit(){return this.step.data.maxLength}getCharactersRemaining(){const e=this.step.data.maxLength;if(e===void 0)return;const t=Wu(this.getText(),this.manager);return e-t.length}setCustomColor(e){throw new Error("Custom color support is not yet available on text. Check back soon.")}getCustomColor(){throw new Error("Custom color support is not yet available on text. Check back soon.")}async getAvailableStrokeColors(){return this.step.data.strokeEnabled?ui.availableStrokeColors(this.step):[]}getStrokeColor(){return this.manager.getStepStorage(this.step.stepName)?.strokeColor?.browserValue||"#000000"}async setStrokeColor(e){const t=this.manager.getRegionElements(this.step.stepName);await ui.changeStrokeColor(this.step,e,t,this.manager)}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}class gI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(){}getContent(){return this.step.data.content}}class mI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(){}getPreviewURL(){return this.manager.getStepStorage(this.step.stepName)?.videoUrl||""}async selectVideo(e){return b1.regenerateQRCode(this.manager.getRegionElements(this.step.stepName),e.key,this.manager,this.step)}}class vI extends Wi{constructor(e,t,n){super(e,t,n)}async selectVariant(){console.info("Text Modules don't support variants.")}getCharactersRemaining(){const e=this.step.data.maxLength;if(e===void 0)return;const t=Wu(this.getText(),this.manager);return e-t.length}getCharacterLimit(){return this.step.data.maxLength}getText(){return this.manager.getStepStorage(this.step.stepName)?.text||""}setText(e){x1.changeText(this.step,e,this.manager,t=>{if(t){const n=[...this.manager.getInformationResults(),{message:t,messageType:ih.Error,stepID:this.step.stepName}];this.manager.setInformationResults(n)}else{const n=this.manager.getInformationResults().filter(i=>i.stepID!==this.step.stepName);this.manager.setInformationResults(n)}})}}class Op{static get(e,t){switch(t.type){case Je.DigitalContent:return new mI(e,t,e.getStepTags(t.stepName));case Je.Information:return new gI(e,t,e.getStepTags(t.stepName));case Je.Question:return new dI(e,t,e.getStepTags(t.stepName));case Je.Text:return new pI(e,t,e.getStepTags(t.stepName));case Je.Illustration:return new lI(e,t,e.getStepTags(t.stepName));case Je.Picture:return new fI(e,t,e.getStepTags(t.stepName));case Je.Shape:return new hI(e,t,e.getStepTags(t.stepName));case Je.Material:return new uI(e,t,e.getStepTags(t.stepName));case Je.Model:return new cI(e,t,e.getStepTags(t.stepName));case Je.Frame:return new zD(e,t,e.getStepTags(t.stepName));case Je.Module:return new vI(e,t,e.getStepTags(t.stepName));default:throw new nn(`Step type ${t.type} not yet supported in Core SDK`)}}}var Rv,pE;function p9(){if(pE)return Rv;pE=1;var r=1/0,e=9007199254740991,t=17976931348623157e292,n=NaN,i="[object Function]",a="[object GeneratorFunction]",s="[object Symbol]",o=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,h=/^(?:0|[1-9]\d*)$/,f=parseInt,d=Object.prototype,g=d.toString,v=Math.ceil,y=Math.max;function A(se,he,ye){var Ue=-1,Oe=se.length;he<0&&(he=-he>Oe?0:Oe+he),ye=ye>Oe?Oe:ye,ye<0&&(ye+=Oe),Oe=he>ye?0:ye-he>>>0,he>>>=0;for(var Te=Array(Oe);++Ue<Oe;)Te[Ue]=se[Ue+he];return Te}function C(se,he){return he=he??e,!!he&&(typeof se=="number"||h.test(se))&&se>-1&&se%1==0&&se<he}function k(se,he,ye){if(!$(ye))return!1;var Ue=typeof he;return(Ue=="number"?R(ye)&&C(he,ye.length):Ue=="string"&&he in ye)?S(ye[he],se):!1}function T(se,he,ye){(ye?k(se,he,ye):he===void 0)?he=1:he=y(Q(he),0);var Ue=se?se.length:0;if(!Ue||he<1)return[];for(var Oe=0,Te=0,K=Array(v(Ue/he));Oe<Ue;)K[Te++]=A(se,Oe,Oe+=he);return K}function S(se,he){return se===he||se!==se&&he!==he}function R(se){return se!=null&&G(se.length)&&!B(se)}function B(se){var he=$(se)?g.call(se):"";return he==i||he==a}function G(se){return typeof se=="number"&&se>-1&&se%1==0&&se<=e}function $(se){var he=typeof se;return!!se&&(he=="object"||he=="function")}function Y(se){return!!se&&typeof se=="object"}function X(se){return typeof se=="symbol"||Y(se)&&g.call(se)==s}function J(se){if(!se)return se===0?se:0;if(se=oe(se),se===r||se===-r){var he=se<0?-1:1;return he*t}return se===se?se:0}function Q(se){var he=J(se),ye=he%1;return he===he?ye?he-ye:he:0}function oe(se){if(typeof se=="number")return se;if(X(se))return n;if($(se)){var he=typeof se.valueOf=="function"?se.valueOf():se;se=$(he)?he+"":he}if(typeof se!="string")return se===0?se:+se;se=se.replace(o,"");var ye=u.test(se);return ye||c.test(se)?f(se.slice(2),ye?2:8):l.test(se)?n:+se}return Rv=T,Rv}var g9=p9();const oA=zs(g9),m9=ke`
2339
2345
  fragment CreateDesignTransaction on Transaction {
2340
2346
  id
2341
2347
  designName
@@ -2360,8 +2366,8 @@ Minimum version required to store current data is: `+X+`.
2360
2366
  externalProductVariantId
2361
2367
  }
2362
2368
  }
2363
- `,m9=Fe`
2364
- ${g9}
2369
+ `,v9=ke`
2370
+ ${m9}
2365
2371
  mutation CreateDesigns($inputs: [DesignCreateInput]!) {
2366
2372
  designCreateMany(inputs: $inputs) {
2367
2373
  id
@@ -2374,7 +2380,7 @@ Minimum version required to store current data is: `+X+`.
2374
2380
  }
2375
2381
  }
2376
2382
  }
2377
- `;function Cg(r){const e=JSON.parse(atob(r.split(".")[1])).exp;return Math.floor(new Date().getTime()/1e3)>=e}const v9=async(r,e)=>{const t={};try{if(e){const i=await e.loggedInBearerToken();t.Authorization=`Bearer ${i}`}else throw new Error}catch{const s=Object.entries(localStorage).find(([l,u])=>l.startsWith("CognitoIdentityServiceProvider")&&l.endsWith("idToken"))?.[0]||"",o=localStorage.getItem(s);o&&!Cg(o)&&(t.Authorization=`Bearer ${o}`)}return await e.getBetaEnabled()&&(t["X-Spiff-Beta"]="true"),(await $e.getShadowGraphqlClient().mutate({mutation:m9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{inputs:r.map(i=>({name:i.name,layouts:i.layouts,workflowId:i.workflowId,transactionId:i.transactionId,previewImage:i.previewImage,useThreeDimPreview:i.useThreeDimPreview,metadata:i.metadata,selectedVariants:i.selectedVariants}))},context:{headers:t}})).data?.designCreateMany},gE=(r,e,t)=>{const n=a=>{const s={};if(a.type==="Frame"){const o=r[a.stepName],l=a.data;if(!o||!o.image||l.hideImageInCart&&t)return s;s[`${a.stepTitle} image`]=o.image}if(a.type==="Illustration"){const o=r[a.stepName],l=a.data;if(!o||l.hideColorsInCart&&t||!o.colors)return s;if(o.colors.length>0){const u=o.colors.join(", ").toUpperCase();s[`${a.stepTitle} colors`]=u}}if(a.type==="Module"){const o=r[a.stepName],l=a.data;if(!o||o.text===void 0||o.text===null||l.hideTextInCart&&t)return s;s[`${a.stepTitle} text`]=o.text}if(a.type==="Text"){const o=r[a.stepName];if(!o)return s;const l=a.data;(!l.hideTextInCart||!t&&o.text!==void 0&&o.text!==null)&&(s[`${a.stepTitle} text`]=o.text),o.color&&(!l.hideColorInCart||!t)&&(s[`${a.stepTitle} color`]=o.color),o.strokeColor&&(!l.hideStrokeInCart||!t)&&(s[`${a.stepTitle} stroke`]=o.strokeColor)}return s},i={};return e.steps.forEach(a=>{Object.assign(i,n(a))}),i},y9=(r,e,t,n)=>{const i={};let a={};n&&(a=n);const o=e.steps.map(l=>l.stepTitle).filter((l,u,c)=>c.indexOf(l)==u);for(const l of o){if(Object.keys(r).includes(l)){const u=r[l],c=e.steps.find(h=>h.stepTitle===l);i[`${c?.stepTitle} selection`]={value:u[0].name,priceModifier:u[0].priceModifier}}for(const u of Object.keys(a))[`${l} color`,`${l} colors`,`${l} text`,`${l} image`].includes(u)&&(i[u]={value:a[u],priceModifier:0})}return i},A9=(r,e,t,n,i,a,s,o)=>{const l=e.basePrice||0,u=r.priceModifierTotal||0,c=y9(n,t,void 0,a),f=(xr.getMap("transactionOwnerIds")||new Map).get(r.id),d={additionalExternalProductId:r.integrationProduct?.additionalExternalProductId,additionalExternalVariantId:r.integrationProduct?.additionalExternalVariantId,baseCost:l,designExternalVariants:r.designExternalVariants,designProductId:r.externalDesignProductId,designProductVariantId:r.externalDesignProductVariantId,event:"onComplete",exportedData:c,externalCartProductId:r.externalCartProductId,externalCartProductVariantId:r.externalCartProductVariantId,lineItemImageUrl:s||"",optionsCost:u,processExecutionId:o,quantity:r.quantity,transactionId:r.id,transactionOwnerId:f,weight:e.weight,workflowViewerLink:r.workflowViewerLink||"",workflowViewerReadOnlyLink:r.workflowViewerReadOnlyLink||""};return a&&(d.metadata=a),n&&(d.selectedVariants=n),i&&(d.sku=i),d},b9=async(r,e,t,n,i,a,s,o,l,u)=>{u&&(console.warn("State mismatch detected. Uploading known state explicitly"),console.warn("State Object:",JSON.stringify(n())),await r.updateStateWithServerImmediate(n),console.log("Server state is undefined @ Workflow completion"));const c=r.getPreviewService(),h=e?.finalizeStepConfig?.lookAtAnimation,f=c&&e.showModelOnFinishStep&&!!h,d=l&&gE(l,e,!0),g=l&&gE(l,e,!1),v=async R=>{const B={};let G=0;if(Object.keys(a).length>0)for(const $ of Object.keys(a)){const Y=a[$],X=e.steps.find(J=>J.stepName===$);for(let J=0;J<Y.selections.length;++J){const Q=Y.selections[J];if(X){const oe=await ft.getOptionForStep(X);if(!R||oe&&(oe.variants||[]).length>1&&!X.data.hideSelectionInCart&&!X.data.hideSelectionsInCart){const se=X.stepTitle;B[se]?B[se].push({id:Q.id||"",name:Q.name,priceModifier:Q.priceModifier}):B[se]=[{id:Q.id||"",name:Q.name,priceModifier:Q.priceModifier}]}}G+=Q.priceModifier}}return[B,G]},[y]=await v(!0),A=Object.fromEntries(Object.keys(y).map(R=>[R,y[R].map(B=>B.id)])),[C]=await v(!1),k=Object.fromEntries(Object.keys(C).map(R=>[R,C[R].map(B=>B.id)]));let T=await o(f,i.id);if(T){const R=await(await Pa(T)).blob();T=(await Qn.uploadAsset({name:`${i.id}-preview-image.png`,blob:R},yd.Image,!0,!1)).fileLink}return{designDetails:(()=>{const R={name:s,layouts:t.map(B=>({index:B.index,panelId:B.panelId})),workflowId:e.id,transactionId:i.id,useThreeDimPreview:!!f,previewImage:T};if(g){const B=[];for(const[G,$]of Object.entries(g))B.push({key:G,value:$});R.metadata=B}if(A){const B=[];for(const[G,$]of Object.entries(k))B.push({key:G,ids:$});R.selectedVariants=B}return R})(),cartSelectionsWithPrices:y,cartMetadata:d}},yI=async(r,e)=>{await Promise.all(r.map(async o=>{await o.workflowManager.outstandingRequestsPromise()}));const n=await(async()=>{const o=$e.getShadowGraphqlClient(),l=await Promise.all(r.map(async f=>({id:f.transaction.id,hash:await f.workflowManager.getStateHash()}))),c=oA(l,100),h=[];for(const f of c){const d=await o.query({query:T3,variables:{transactions:f},fetchPolicy:"no-cache",errorPolicy:"all"});if(d.errors&&d.errors.length>0)return l.map(g=>g.id);h.push(...d.data?.transactionConfirmWorkflowStates??[])}return h})(),i=await Promise.all(r.map(async o=>await b9(o.workflowManager,o.workflow,o.layouts,o.getReducerState,o.transaction,o.workflowSelections,o.designName,e??(()=>Promise.resolve(void 0)),o.workflowMetadata,n.includes(o.transaction.id)))),a=r[0].workflowManager.getClient(),s=await v9(i.map(o=>o.designDetails),a);if(!s)throw new Error("Failed to create designs");return s.map((o,l)=>{const u=r[l],c=i[l],h=o.transaction;return A9(h,u.product,u.workflow,c.cartSelectionsWithPrices,o.sku,c.cartMetadata,h.previewImageLink,o.processExecution?.id)})};class w9{constructor(){this.localPersistenceKey="designTransactions",this.storageMethod="Local",this.designSavedListeners=[]}attachSaveListener(e){this.designSavedListeners.push(e)}detachSaveListener(e){this.designSavedListeners=this.designSavedListeners.filter(t=>t!==e)}async getSavedDesigns(){if(this.storageMethod==="Local"){const e=xr.get(this.localPersistenceKey);return e?JSON.parse(e):[]}throw new nn("Unexpected storage method requested")}async getSavedDesignByTransaction(e){return(await this.getSavedDesigns()).find(n=>n.transactionId===e)}async addDesign(e){const n=(await this.getSavedDesigns()).filter(i=>i.transactionId!==e.transactionId);n.unshift(e),await this.setDesigns(n),this.designSavedListeners.forEach(i=>i(e))}async renameDesign(e,t){const n=await this.getSavedDesigns(),i=n.find(a=>a.transactionId===e);if(!i)throw new Error(`No saved design for transaction ${e}.`);i.title=t,await this.setDesigns(n)}async removeDesign(e){const t=await this.getSavedDesigns();await this.setDesigns(t.filter(n=>n.transactionId!==e))}async setDesigns(e){if(this.storageMethod==="Local"){xr.set(this.localPersistenceKey,JSON.stringify(e));return}throw new nn("Unexpected storage method requested")}}const Zp=new w9;var Ov,mE;function C9(){if(mE)return Ov;mE=1;var r="Expected a function",e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt,l=typeof di=="object"&&di&&di.Object===Object&&di,u=typeof self=="object"&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),h=Object.prototype,f=h.toString,d=Math.max,g=Math.min,v=function(){return c.Date.now()};function y(S,R,B){var G,$,Y,X,J,Q,oe=0,se=!1,he=!1,ye=!0;if(typeof S!="function")throw new TypeError(r);R=T(R)||0,A(B)&&(se=!!B.leading,he="maxWait"in B,Y=he?d(T(B.maxWait)||0,R):Y,ye="trailing"in B?!!B.trailing:ye);function Ue(je){var qe=G,Ge=$;return G=$=void 0,oe=je,X=S.apply(Ge,qe),X}function Oe(je){return oe=je,J=setTimeout(ie,R),se?Ue(je):X}function Te(je){var qe=je-Q,Ge=je-oe,bt=R-qe;return he?g(bt,Y-Ge):bt}function K(je){var qe=je-Q,Ge=je-oe;return Q===void 0||qe>=R||qe<0||he&&Ge>=Y}function ie(){var je=v();if(K(je))return de(je);J=setTimeout(ie,Te(je))}function de(je){return J=void 0,ye&&G?Ue(je):(G=$=void 0,X)}function Be(){J!==void 0&&clearTimeout(J),oe=0,G=Q=$=J=void 0}function Ee(){return J===void 0?X:de(v())}function ze(){var je=v(),qe=K(je);if(G=arguments,$=this,Q=je,qe){if(J===void 0)return Oe(Q);if(he)return J=setTimeout(ie,R),Ue(Q)}return J===void 0&&(J=setTimeout(ie,R)),X}return ze.cancel=Be,ze.flush=Ee,ze}function A(S){var R=typeof S;return!!S&&(R=="object"||R=="function")}function C(S){return!!S&&typeof S=="object"}function k(S){return typeof S=="symbol"||C(S)&&f.call(S)==t}function T(S){if(typeof S=="number")return S;if(k(S))return e;if(A(S)){var R=typeof S.valueOf=="function"?S.valueOf():S;S=A(R)?R+"":R}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var B=a.test(S);return B||s.test(S)?o(S.slice(2),B?2:8):i.test(S)?e:+S}return Ov=y,Ov}var x9=C9();const AI=zs(x9),S9=Fe`
2383
+ `;function Cg(r){const e=JSON.parse(atob(r.split(".")[1])).exp;return Math.floor(new Date().getTime()/1e3)>=e}const y9=async(r,e)=>{const t={};try{if(e){const i=await e.loggedInBearerToken();t.Authorization=`Bearer ${i}`}else throw new Error}catch{const s=Object.entries(localStorage).find(([l,u])=>l.startsWith("CognitoIdentityServiceProvider")&&l.endsWith("idToken"))?.[0]||"",o=localStorage.getItem(s);o&&!Cg(o)&&(t.Authorization=`Bearer ${o}`)}return await e.getBetaEnabled()&&(t["X-Spiff-Beta"]="true"),(await $e.getShadowGraphqlClient().mutate({mutation:v9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{inputs:r.map(i=>({name:i.name,layouts:i.layouts,workflowId:i.workflowId,transactionId:i.transactionId,previewImage:i.previewImage,useThreeDimPreview:i.useThreeDimPreview,metadata:i.metadata,selectedVariants:i.selectedVariants}))},context:{headers:t}})).data?.designCreateMany},gE=(r,e,t)=>{const n=a=>{const s={};if(a.type==="Frame"){const o=r[a.stepName],l=a.data;if(!o||!o.image||l.hideImageInCart&&t)return s;s[`${a.stepTitle} image`]=o.image}if(a.type==="Illustration"){const o=r[a.stepName],l=a.data;if(!o||l.hideColorsInCart&&t||!o.colors)return s;if(o.colors.length>0){const u=o.colors.join(", ").toUpperCase();s[`${a.stepTitle} colors`]=u}}if(a.type==="Module"){const o=r[a.stepName],l=a.data;if(!o||o.text===void 0||o.text===null||l.hideTextInCart&&t)return s;s[`${a.stepTitle} text`]=o.text}if(a.type==="Text"){const o=r[a.stepName];if(!o)return s;const l=a.data;(!l.hideTextInCart||!t&&o.text!==void 0&&o.text!==null)&&(s[`${a.stepTitle} text`]=o.text),o.color&&(!l.hideColorInCart||!t)&&(s[`${a.stepTitle} color`]=o.color),o.strokeColor&&(!l.hideStrokeInCart||!t)&&(s[`${a.stepTitle} stroke`]=o.strokeColor)}return s},i={};return e.steps.forEach(a=>{Object.assign(i,n(a))}),i},A9=(r,e,t,n)=>{const i={};let a={};n&&(a=n);const o=e.steps.map(l=>l.stepTitle).filter((l,u,c)=>c.indexOf(l)==u);for(const l of o){if(Object.keys(r).includes(l)){const u=r[l],c=e.steps.find(h=>h.stepTitle===l);i[`${c?.stepTitle} selection`]={value:u[0].name,priceModifier:u[0].priceModifier}}for(const u of Object.keys(a))[`${l} color`,`${l} colors`,`${l} text`,`${l} image`].includes(u)&&(i[u]={value:a[u],priceModifier:0})}return i},b9=(r,e,t,n,i,a,s,o)=>{const l=e.basePrice||0,u=r.priceModifierTotal||0,c=A9(n,t,void 0,a),f=(xr.getMap("transactionOwnerIds")||new Map).get(r.id),d={additionalExternalProductId:r.integrationProduct?.additionalExternalProductId,additionalExternalVariantId:r.integrationProduct?.additionalExternalVariantId,baseCost:l,designExternalVariants:r.designExternalVariants,designProductId:r.externalDesignProductId,designProductVariantId:r.externalDesignProductVariantId,event:"onComplete",exportedData:c,externalCartProductId:r.externalCartProductId,externalCartProductVariantId:r.externalCartProductVariantId,lineItemImageUrl:s||"",optionsCost:u,processExecutionId:o,quantity:r.quantity,transactionId:r.id,transactionOwnerId:f,weight:e.weight,workflowViewerLink:r.workflowViewerLink||"",workflowViewerReadOnlyLink:r.workflowViewerReadOnlyLink||""};return a&&(d.metadata=a),n&&(d.selectedVariants=n),i&&(d.sku=i),d},w9=async(r,e,t,n,i,a,s,o,l,u)=>{u&&(console.warn("State mismatch detected. Uploading known state explicitly"),console.warn("State Object:",JSON.stringify(n())),await r.updateStateWithServerImmediate(n),console.log("Server state is undefined @ Workflow completion"));const c=r.getPreviewService(),h=e?.finalizeStepConfig?.lookAtAnimation,f=c&&e.showModelOnFinishStep&&!!h,d=l&&gE(l,e,!0),g=l&&gE(l,e,!1),v=async R=>{const B={};let G=0;if(Object.keys(a).length>0)for(const $ of Object.keys(a)){const Y=a[$],X=e.steps.find(J=>J.stepName===$);for(let J=0;J<Y.selections.length;++J){const Q=Y.selections[J];if(X){const oe=await ft.getOptionForStep(X);if(!R||oe&&(oe.variants||[]).length>1&&!X.data.hideSelectionInCart&&!X.data.hideSelectionsInCart){const se=X.stepTitle;B[se]?B[se].push({id:Q.id||"",name:Q.name,priceModifier:Q.priceModifier}):B[se]=[{id:Q.id||"",name:Q.name,priceModifier:Q.priceModifier}]}}G+=Q.priceModifier}}return[B,G]},[y]=await v(!0),A=Object.fromEntries(Object.keys(y).map(R=>[R,y[R].map(B=>B.id)])),[C]=await v(!1),k=Object.fromEntries(Object.keys(C).map(R=>[R,C[R].map(B=>B.id)]));let T=await o(f,i.id);if(T){const R=await(await Pa(T)).blob();T=(await Qn.uploadAsset({name:`${i.id}-preview-image.png`,blob:R},yd.Image,!0,!1)).fileLink}return{designDetails:(()=>{const R={name:s,layouts:t.map(B=>({index:B.index,panelId:B.panelId})),workflowId:e.id,transactionId:i.id,useThreeDimPreview:!!f,previewImage:T};if(g){const B=[];for(const[G,$]of Object.entries(g))B.push({key:G,value:$});R.metadata=B}if(A){const B=[];for(const[G,$]of Object.entries(k))B.push({key:G,ids:$});R.selectedVariants=B}return R})(),cartSelectionsWithPrices:y,cartMetadata:d}},yI=async(r,e)=>{await Promise.all(r.map(async o=>{await o.workflowManager.outstandingRequestsPromise()}));const n=await(async()=>{const o=$e.getShadowGraphqlClient(),l=await Promise.all(r.map(async f=>({id:f.transaction.id,hash:await f.workflowManager.getStateHash()}))),c=oA(l,100),h=[];for(const f of c){const d=await o.query({query:T3,variables:{transactions:f},fetchPolicy:"no-cache",errorPolicy:"all"});if(d.errors&&d.errors.length>0)return l.map(g=>g.id);h.push(...d.data?.transactionConfirmWorkflowStates??[])}return h})(),i=await Promise.all(r.map(async o=>await w9(o.workflowManager,o.workflow,o.layouts,o.getReducerState,o.transaction,o.workflowSelections,o.designName,e??(()=>Promise.resolve(void 0)),o.workflowMetadata,n.includes(o.transaction.id)))),a=r[0].workflowManager.getClient(),s=await y9(i.map(o=>o.designDetails),a);if(!s)throw new Error("Failed to create designs");return s.map((o,l)=>{const u=r[l],c=i[l],h=o.transaction;return b9(h,u.product,u.workflow,c.cartSelectionsWithPrices,o.sku,c.cartMetadata,h.previewImageLink,o.processExecution?.id)})};class C9{constructor(){this.localPersistenceKey="designTransactions",this.storageMethod="Local",this.designSavedListeners=[]}attachSaveListener(e){this.designSavedListeners.push(e)}detachSaveListener(e){this.designSavedListeners=this.designSavedListeners.filter(t=>t!==e)}async getSavedDesigns(){if(this.storageMethod==="Local"){const e=xr.get(this.localPersistenceKey);return e?JSON.parse(e):[]}throw new nn("Unexpected storage method requested")}async getSavedDesignByTransaction(e){return(await this.getSavedDesigns()).find(n=>n.transactionId===e)}async addDesign(e){const n=(await this.getSavedDesigns()).filter(i=>i.transactionId!==e.transactionId);n.unshift(e),await this.setDesigns(n),this.designSavedListeners.forEach(i=>i(e))}async renameDesign(e,t){const n=await this.getSavedDesigns(),i=n.find(a=>a.transactionId===e);if(!i)throw new Error(`No saved design for transaction ${e}.`);i.title=t,await this.setDesigns(n)}async removeDesign(e){const t=await this.getSavedDesigns();await this.setDesigns(t.filter(n=>n.transactionId!==e))}async setDesigns(e){if(this.storageMethod==="Local"){xr.set(this.localPersistenceKey,JSON.stringify(e));return}throw new nn("Unexpected storage method requested")}}const Zp=new C9;var Ov,mE;function x9(){if(mE)return Ov;mE=1;var r="Expected a function",e=NaN,t="[object Symbol]",n=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt,l=typeof di=="object"&&di&&di.Object===Object&&di,u=typeof self=="object"&&self&&self.Object===Object&&self,c=l||u||Function("return this")(),h=Object.prototype,f=h.toString,d=Math.max,g=Math.min,v=function(){return c.Date.now()};function y(S,R,B){var G,$,Y,X,J,Q,oe=0,se=!1,he=!1,ye=!0;if(typeof S!="function")throw new TypeError(r);R=T(R)||0,A(B)&&(se=!!B.leading,he="maxWait"in B,Y=he?d(T(B.maxWait)||0,R):Y,ye="trailing"in B?!!B.trailing:ye);function Ue(je){var qe=G,Ge=$;return G=$=void 0,oe=je,X=S.apply(Ge,qe),X}function Oe(je){return oe=je,J=setTimeout(ie,R),se?Ue(je):X}function Te(je){var qe=je-Q,Ge=je-oe,bt=R-qe;return he?g(bt,Y-Ge):bt}function K(je){var qe=je-Q,Ge=je-oe;return Q===void 0||qe>=R||qe<0||he&&Ge>=Y}function ie(){var je=v();if(K(je))return de(je);J=setTimeout(ie,Te(je))}function de(je){return J=void 0,ye&&G?Ue(je):(G=$=void 0,X)}function Be(){J!==void 0&&clearTimeout(J),oe=0,G=Q=$=J=void 0}function Ee(){return J===void 0?X:de(v())}function ze(){var je=v(),qe=K(je);if(G=arguments,$=this,Q=je,qe){if(J===void 0)return Oe(Q);if(he)return J=setTimeout(ie,R),Ue(Q)}return J===void 0&&(J=setTimeout(ie,R)),X}return ze.cancel=Be,ze.flush=Ee,ze}function A(S){var R=typeof S;return!!S&&(R=="object"||R=="function")}function C(S){return!!S&&typeof S=="object"}function k(S){return typeof S=="symbol"||C(S)&&f.call(S)==t}function T(S){if(typeof S=="number")return S;if(k(S))return e;if(A(S)){var R=typeof S.valueOf=="function"?S.valueOf():S;S=A(R)?R+"":R}if(typeof S!="string")return S===0?S:+S;S=S.replace(n,"");var B=a.test(S);return B||s.test(S)?o(S.slice(2),B?2:8):i.test(S)?e:+S}return Ov=y,Ov}var S9=x9();const AI=zs(S9),E9=ke`
2378
2384
  mutation AddTransactionStakeholder($id: String!, $type: String!, $details: CustomerDetailsInput!) {
2379
2385
  transactionAddStakeholder(id: $id, details: $details, type: $type) {
2380
2386
  id
@@ -2388,7 +2394,7 @@ Minimum version required to store current data is: `+X+`.
2388
2394
  }
2389
2395
  }
2390
2396
  }
2391
- `,E9=Fe`
2397
+ `,k9=ke`
2392
2398
  mutation AddAddressToTransaction(
2393
2399
  $transactionId: String!
2394
2400
  $streetAddress: String
@@ -2410,13 +2416,13 @@ Minimum version required to store current data is: `+X+`.
2410
2416
  id
2411
2417
  }
2412
2418
  }
2413
- `,k9=Fe`
2419
+ `,F9=ke`
2414
2420
  mutation AddOrganizationToTransaction($transactionId: String!, $organizationName: String!) {
2415
2421
  organizationAttachToTransaction(transactionId: $transactionId, organizationName: $organizationName) {
2416
2422
  id
2417
2423
  }
2418
2424
  }
2419
- `,vE=Fe`
2425
+ `,vE=ke`
2420
2426
  ${qg}
2421
2427
  ${qd}
2422
2428
  mutation TransactionUpdateIntegrationProduct($id: String!, $integrationProductId: String) {
@@ -2500,7 +2506,7 @@ Minimum version required to store current data is: `+X+`.
2500
2506
  }
2501
2507
  }
2502
2508
  }
2503
- `;var xg=(r=>(r.PriceBreakChanged="PriceBreakChanged",r.ProductChanged="ProductChanged",r.QuantityChanged="QuantityChanged",r.RecipientChanged="RecipientChanged",r.SelectionChanged="SelectionChanged",r))(xg||{});class bI{constructor(e,t){this.cachedStepHandles=new Map,this.profanityList=[],this.currentPriceBreak=1,this.renderableScenes=[],this.renderableSceneCallbacks=[],this.eventCallbacks=new Map,this.debouncedSavedDesignUpdate=AI(async()=>{await Zp.getSavedDesignByTransaction(this.getTransaction().id)&&this.save()},2500),this.getCanvasObjectURLAsync=async n=>new Promise((i,a)=>{try{n.toBlob(s=>{if(s){const o=URL.createObjectURL(s);i(o)}})}catch(s){a(s)}}),this.client=e,this.transaction=t.transaction,this.workflow=t.workflow,this.profanityList=this.transaction.product?.profanities?.map(n=>n.word)||[],this.isReadOnly=t.transaction.isOrdered||!!t.readOnly,this.graphQlClient=t.graphQlClient,this.workflowManager=new sA(this,e,n=>{try{this.debouncedSavedDesignUpdate()}catch{console.error("Failed to update saved design details.")}return t.stateMutationFunc(n)},t.graphQlClient,t.reloadedState,t.readOnly,t.modelContainer,t.isReloadedTransaction,t.singleVariantsRenderable,t.delayWorkflowStateSync),this.workflowManager.addSelectionCallback(n=>{const i=n.traversableScenes.map(a=>{const s=a.renderableSteps.map(o=>o.stepName);return{id:a.name,title:a.title,renderableSteps:s,workflowScene:a}});this.renderableScenes=i,this.renderableSceneCallbacks.forEach(a=>a(i)),this.callEvent("SelectionChanged")}),this.currentPriceBreak=this.priceBreakToBeApplied()}getTransaction(){return this.transaction}getProduct(){return this.transaction.product}getProfanityList(){return this.profanityList}async setProduct(e){this.workflow=void 0;const t=await this.graphQlClient().mutate({mutation:vE,variables:{id:this.getTransaction().id,integrationProductId:e}}),n=t.data?.transactionUpdateIntegrationProduct.product;if(!n)throw new nn("Failed to set product. No product returned from server.");if(!this.bundle)throw new nn("Cannot set product on experience that is not part of a bundle.");this.transaction.product={...this.transaction.product,...t.data?.transactionUpdateIntegrationProduct.product},this.transaction.integrationProduct={...this.transaction.integrationProduct,...t.data?.transactionUpdateIntegrationProduct.integrationProduct},this.transaction.workflowState=void 0,this.currentPriceBreak=this.priceBreakToBeApplied(),this.callEvent("ProductChanged");const i=(await this.bundle.getProductCollection().fetchProducts()).find(a=>a.getId()===n.id);try{const a=i?.getDefaultWorkflow();if(a){const s=await BD(a.getId());await this.setWorkflow(s),console.log("Setting Product - Workflow set to default for product.")}}catch{console.log("Setting Product - No default workflow available, must be set manually.")}}async clearProduct(){if(!this.bundle)throw new nn("Cannot clear product on experience that is not part of a bundle.");this.workflow=void 0,this.transaction.workflowState=void 0,this.transaction.product=void 0,this.transaction.integrationProduct=void 0,this.currentPriceBreak=this.priceBreakToBeApplied(),this.callEvent("ProductChanged"),await this.graphQlClient().mutate({mutation:vE,variables:{id:this.getTransaction().id}})}getWorkflow(){return this.workflow}async setWorkflow(e){return this.workflow=e,await this.graphQlClient().mutate({mutation:S3,variables:{id:this.getTransaction().id,workflowId:e.id}}),this.workflowManager.setWorkflow(e)}async attachAddress(e,t,n,i,a,s){await this.graphQlClient().mutate({mutation:E9,variables:{transactionId:this.getTransaction().id,streetAddress:e||void 0,apartment:t||void 0,city:n||void 0,country:i||void 0,state:a||void 0,postCode:s||void 0}})}async attachOrganization(e){await this.graphQlClient().mutate({mutation:k9,variables:{transactionId:this.getTransaction().id,organizationName:e}})}getBundle(){return this.bundle}setBundle(e){this.bundle=e}getClient(){return this.client}getIsReadOnly(){return this.isReadOnly}getCommandContext(){return this.workflowManager.getCommandContext()}getWorkflowManager(){return this.workflowManager}async createPreviewImage(e,t){const n=this.getWorkflow(),i=n?.finalizeStepConfig?.lookAtAnimation;if(!n)throw new Error("Failed to generate cart preview image! No workflow is set.");if(e){if(!i)throw new Error("Failed to generate cart preview image! No camera orientation configured.");return await this.workflowManager.getPreviewService()?.renderSceneScreenshot(t??512,i)||""}let a=2048;t&&t<=2048&&(a=t);const s=Eo(a,a),o=this.workflowManager.getCommandContext().getAllLayouts(),l=n.defaultPreviewPanelIndex||0,u=n.panels[l],c=o.find(k=>k.layoutState?.layout.panelId===u?.name)||o[0],h=c.layoutState.layout.previewRegion?{x:c.layoutState.layout.previewRegion.left,y:c.layoutState.layout.previewRegion.top,width:c.layoutState.layout.previewRegion.width,height:c.layoutState.layout.previewRegion.height}:{x:0,y:0,width:c.layoutState.layout.width,height:c.layoutState.layout.height},f=this.workflowManager.getCommandContext().getLayoutById(c.layoutState.layout.id),d=s.getContext("2d");if(!d)throw new Ug("Failed to obtain 2D context for preview image creation");const g=this.workflowManager.getTemplatingContext(),v=Zg(f.layoutState.layout,f.layoutState.elements,{renderingConfiguration:{purpose:rc.Print,region:{left:h.x,top:h.y,width:h.width,height:h.height},templatingContext:g}}),y=Hk(v);await(await co.from(d,y,{anonymousCrossOrigin:!0,ignoreDimensions:!1,createCanvas:Eo,createImage:jd,DOMParser:jA(),fetch})).render();const C=await this.getCanvasObjectURLAsync(s);return s.toDataURL(C)}getStepById(e){const t=this.getWorkflow()?.steps.find(a=>a.stepName===e);if(!t||!this.stepHasHandle(t))return;const n=this.cachedStepHandles.get(t.stepName);if(n)return n;const i=Op.get(this.getWorkflowManager(),t);return this.cachedStepHandles.set(t.stepName,i),i}getSteps(){return this.getScenes().flatMap(e=>this.getStepsByScene(e))}async getStepsConditionallyActive(){const e=this.getScenes();return(await Promise.all(e.map(async n=>{const i=this.getStepsByScene(n),a=await Promise.all(i.map(s=>fo(s.getRaw(),this.getWorkflowManager().getStepSelections())));return i.filter((s,o)=>a[o])}))).flat()}getScenes(){return(this.getWorkflow()?.stepGroups||[]).map(t=>({id:t.id,name:t.name,stepIds:t.stepNames}))}getSelectionPriceSubunits(e){const t=this.getWorkflowManager().getWorkflowSelections();let n=0;return Object.values(t).forEach(i=>{n+=i.selections.reduce((a,s)=>a+(s.priceModifier||0),0)}),this.getPriceSubUnitsAfterPriceBreaks(n,e)}getBasePriceSubunits(e,t){const n=this.getPriceSubUnitsAfterPriceBreaks(this.getProduct()?.basePrice||0,t);if(e){const i=this.getAdditionalProductPriceSubunits(t)||0;return n+i}return n}getAdditionalProductPriceSubunits(e){const t=this.getTransaction().integrationProduct;if(t?.additionalIntegrationProduct?.product){const n=t.additionalIntegrationProduct.product.basePrice||0;return this.getPriceSubUnitsAfterPriceBreaks(n,e)}}getTotalPriceSubunits(e){return this.getBasePriceSubunits(!1,e)+this.getSelectionPriceSubunits(e)}getPriceSubUnitsAfterPriceBreaks(e,t){const n=t?1:this.priceBreakToBeApplied(),i=e*n;return Math.ceil(i)}priceBreakToBeApplied(){const e=(this.getProduct()?.priceBreaks||[]).sort((i,a)=>-(i.minQty-a.minQty)),n=[...this.getMatchingExperiencesFromBundle(),this].reduce((i,a)=>i+a.getQuantity(),0);for(const i of e)if(i.minQty<=n)return i.percentage;return 1}checkForPriceBreakChanges(){const e=this.priceBreakToBeApplied();this.currentPriceBreak!==e&&(this.updatePriceBreak(e),this.getMatchingExperiencesFromBundle().forEach(t=>t.updatePriceBreak(e)))}getMatchingExperiencesFromBundle(){return(this.bundle?.getWorkflowExperiences()||[]).filter(e=>{const t=e.getTransaction().id,n=this.getTransaction().id,i=e.getProduct()?.id,a=this.getProduct()?.id;return t!==n&&i===a})}updatePriceBreak(e){this.currentPriceBreak=e,this.callEvent("PriceBreakChanged")}async copySelectionsViaGlobalConfiguration(e,t,n){const i=await e.getGlobalProperties(),a=n?.map(u=>u.getId()),s=this.getSteps().filter(u=>a===void 0||a.includes(u.getId())),o=t.getSteps(),l=u=>i.find(c=>c.getRawProperty().name===u.aspectName);s.forEach(u=>{const c=new Set,h=u.getRaw().globalPropertyAspectConfigurations;h!==void 0&&(h.forEach(f=>c.add(JSON.stringify(f))),o.forEach(f=>{const d=f.getRaw().globalPropertyAspectConfigurations;d!==void 0&&d.forEach(g=>{const v=l(g),y=c.has(JSON.stringify(g));if(y&&v?.getType()==="Option"){const A=f.getCurrentVariant();if(!A)return;u.selectVariant(A),c.delete(JSON.stringify(g))}else if(y&&v?.getType()==="Text"){const A=f.getText();u.setText(A),c.delete(JSON.stringify(g))}})}))})}getStepByName(e){const t=this.getWorkflow()?.steps.find(n=>n.stepTitle===e);if(!(!t||!this.stepHasHandle(t)))return Op.get(this.getWorkflowManager(),t)}getStepsByType(e){return this.getWorkflow()?.steps.filter(t=>t.type===e).map(t=>Op.get(this.getWorkflowManager(),t))||[]}getStepsByScene(e){const t=this.getWorkflow();if(!t?.stepGroups.find(i=>i.name===e.name))throw new Error("Given scene is not present on workflow! Be careful when persisting scenes that you only use them with the relevant workflow.");return e.stepIds.map(i=>t.steps.find(a=>a.stepName===i)).filter(i=>!!i&&this.stepHasHandle(i)).map(i=>Op.get(this.getWorkflowManager(),i))}async attachCustomerDetails(e){return this.assignCustomerDetails({emailAddress:e.email})}async assignCustomerDetails(e){const n=(await this.graphQlClient().mutate({mutation:S9,variables:{id:this.getTransaction().id,details:e,type:"Owner"}})).data?.transactionAddStakeholder?.stakeholders?.find(i=>i.customer?.emailAddress===e.emailAddress);if(n?.customer){this.getWorkflowManager().setTransactionCustomer(n.customer);const i=xr.getMap("transactionCustomerIds")||new Map;i.set(this.getTransaction().id,n.customer.id),xr.setMap("transactionCustomerIds",i)}}attachRenderableSceneListener(e){this.renderableSceneCallbacks.push(e),e(this.renderableScenes)}detachRenderableSceneListener(e){this.renderableSceneCallbacks=this.renderableSceneCallbacks.filter(t=>t!==e)}async save(e){const t=this.getProduct(),n=this.getWorkflow(),i=this.getCommandContext().getState();if(!t)throw new nn("Product undefined!");if(!n)throw new nn("Workflow undefined!");if(!i)throw new nn("State undefined!");const s={title:await(async()=>{if(e)return e;const o=this.getTransaction().id,u=(await Zp.getSavedDesigns()).find(c=>c.transactionId===o)?.title;return u||"My design"})(),thumbnail:await this.createPreviewImage(!1,256),transactionId:this.getTransaction().id,productId:t.id,integrationProductId:this.getTransaction().integrationProduct.id,workflowName:n.name,workflowId:n.id,lastEdited:new Date};return await Zp.addDesign(s),s}async copy(){const e=vo(this.getCommandContext().getState());if(!e)throw new nn("Internal state is undefined! Cannot copy experience!");const t=JSON.stringify(e.transaction),n=this.getWorkflow();if(!n)throw new nn("Workflow is undefined! Cannot copy experience!");const i=this.getTransaction().integrationProduct?.id;if(!i)throw new nn("Integration product id is undefined!");return await this.getClient().getWorkflowExperience({type:"integration",integrationProductId:i,workflowId:n.id,workflowState:t})}async onDesignFinished(e=!0){const t=this.getTransaction(),n=this.getProduct(),i=this.getWorkflow();if(!n)throw new nn("Product undefined! Cannot finish an experience without a product.");if(!i)throw new nn("Workflow undefined! Cannot finish an experience without a workflow.");if(t.isOrdered)return{event:"",exportedData:{},lineItemImageUrl:"",optionsCost:0,transactionId:t.id,workflowViewerLink:"",workflowViewerReadOnlyLink:""};const a=await yI([{workflowManager:this.workflowManager,workflow:i,layouts:this.workflowManager.getLayouts(),getReducerState:()=>this.workflowManager.getCommandContext().getState(),product:n,transaction:t,workflowSelections:this.workflowManager.getWorkflowSelections(),workflowMetadata:this.workflowManager.getWorkflowMetadata(),designName:i.name}],s=>e?this.createPreviewImage(s,1024):Promise.resolve(void 0));return t.completed&&await this.graphQlClient().mutate({mutation:R3,variables:{transactionId:t.id}}),a[0]}stepHasHandle(e){return e.type!==Je.SilentIllustration&&e.type!==Je.ProductOverlay}async getExportedStepData(){const e=this.getWorkflow(),t=this.getWorkflowManager().getWorkflowMetadata(),n=this.getWorkflowManager().getWorkflowSelections(),i=[];for(const a of e?.steps||[]){const s=a.stepName,o=t[s],l=n[s]?.selections[0],u={stepId:s,title:a.stepTitle,properties:[]};if(l&&await T9(a,n)&&u.properties.push({type:"selection",value:l.name,priceModifier:l.priceModifier}),!o){i.push(u);continue}switch(a.type){case Je.Frame:{const c=a.data,h=o;h.image&&c.displayImageOnFinishStep&&u.properties.push({type:"image",value:h.image,priceModifier:0})}break;case Je.Illustration:{const c=a.data,h=o;if(h&&h.colors&&h.colors.length>0&&c.displayColorsOnFinishStep){const f=h.colors.join(", ").toUpperCase();u.properties.push({type:"color",value:f,priceModifier:0})}}break;case Je.Module:{const c=a.data,h=o;h&&h.text&&c.displayTextOnFinishStep&&u.properties.push({type:"text",value:h.text,priceModifier:0})}break;case Je.Text:{const c=a.data,h=o;h&&h.text&&c.displayTextOnFinishStep&&u.properties.push({type:"text",value:h.text,priceModifier:0}),h&&h.color&&c.displayColorOnFinishStep&&u.properties.push({type:"color",value:h.color,priceModifier:0})}}i.push(u)}return i.filter(a=>a.properties&&a.properties.length>0)}getQuantity(){return this.getTransaction().quantity||1}async setQuantity(e){if(e<1)throw new RangeError("WorkflowExperience quantity must be greater than zero.");if(this.isReadOnly)throw new Error("Cannot update quantity on a read-only WorkflowExperience");this.getTransaction().quantity=e,this.callEvent("QuantityChanged"),this.checkForPriceBreakChanges();const t=this.getTransaction();await this.graphQlClient().mutate({mutation:x3,variables:{id:t.id,quantity:e}})}addEventListener(e,t){const n=this.eventCallbacks.get(e)||[];n.push(t),this.eventCallbacks.set(e,n)}removeEventListener(e,t){const n=this.eventCallbacks.get(e)||[];this.eventCallbacks.set(e,n.filter(i=>i!==t))}callEvent(e){(this.eventCallbacks.get(e)||[]).forEach(t=>t(this))}}const F9=r=>{if([Je.Question,Je.Frame,Je.Illustration,Je.Material,Je.Model,Je.Picture,Je.Shape,Je.Text].includes(r.type)){const t=r.data;return!!t.displaySelectionOnFinishStep||!!t.displaySelectionsOnFinishStep}return!1},T9=async(r,e)=>{if(!F9(r))return!1;const t=await ft.getOptionForStep(r);if(t&&(t.variants||[]).length>1){const n=e[r.stepName];return!!(n&&n.selections.length>0)}return!1};class I9{constructor(e){this.handleCache={},this.bundle=e}async getHandle(e){if(this.handleCache[e.name])return this.handleCache[e.name];const t=await this.createHandle(e);return this.handleCache[e.name]=t,t}async getHandles(){if(!this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration)return[];await this.bundle.getGlobalPropertyStateManager().getInitializationPromise();const e=this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration;return e?Promise.all(e.aspects.map(t=>this.getHandle(t))):[]}applyConditionsFromState(e,t){return t?e.filter(n=>this.aspectConditionsSatisfied(n.getRawProperty(),t)):e}aspectConditionsSatisfied(e,t){return!e.conditions||e.conditions.length===0?!0:(e.conditionMode===Pk.AND?Array.prototype.every.bind(e.conditions):Array.prototype.some.bind(e.conditions))(i=>{const a=t.aspects.find(s=>s.name===i.targetAspectName);return a?i.requiredVariantSelections.some(s=>s===a.value):!1})}async createHandle(e){switch(e.type){case zn.FileUpload:return new wI(this.bundle,e).initialize();case zn.ColorOption:return new lA(this.bundle,e,e.entityId?await ft.getOption(e.entityId):void 0);case zn.Option:{const t=e.entityId?await ft.getOption(e.entityId):void 0;return t?.type==="Color"?new lA(this.bundle,e,t):new F1(this.bundle,e,t)}case zn.Text:return new CI(this.bundle,e);default:throw new Error("Unhandled Global Property Aspect Type")}}}class rm{constructor(e,t){this.bundle=e,this.property=t}getName(){return this.property.name}getTitle(){return this.property.title}getDescription(){return this.property.description}getType(){return this.property.type}getRawProperty(){return this.property}isMandatory(){return!!this.property.mandatory}isMandatoryFulfilled(){return!this.property.mandatory||!!this.bundle.getGlobalPropertyStateManager().getAspectMandatoryFulfilled(this.property.name)}isSilent(){return!!this.property.silent||this.bundle.getGlobalPropertyStateManager().getAspectHidden(this.property.name)}async getSharedSteps(e){const t=e??this.bundle.getWorkflowExperiences();return(await Promise.all(t.map(a=>a.getStepsConditionallyActive()))).map(a=>a.filter(s=>s.getOverrideGlobalPropertyConfiguration(this.property.type)?!1:s.getRaw().globalPropertyAspectConfigurations?.some(o=>o.globalPropertyConfigurationId===this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration?.id&&o.aspectName===this.property.name))).flat()}getStateValue(){return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name)}}class wI extends rm{constructor(e,t){super(e,t)}async initialize(){return this.property.data?.fileUpload?.colorOptionId&&(this.colorOption=await ft.getOption(this.property.data?.fileUpload?.colorOptionId)),await this.loadImageData(),this}async loadImageData(){const e=await this.getImage();if(e?.fileLink)if(e?.fileLink.endsWith(".svg")){const t=await ia(e?.fileLink),n=await m1(e?.fileLink),i=n.width,a=n.height,s=await Oa(t);this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach(u=>{s.colors[u.key]={browserValue:u.browserValue,pmsValue:u.pmsValue}});const l={src:e?.fileLink,width:i,height:a,aspect:i/a,svg:s.svg,colors:s.colors};Bs.set(e?.fileLink,l),this.imageData=l}else this.imageData=void 0}async selectImage(e){const t=this.bundle.getGlobalPropertyStateManager();await Promise.all([t.setAspect(this.property.name,e.key,{...t.getAspectStorage(this.property.name)||{},originalAssetKey:e.key,backgroundRemovedAssetKey:void 0,vectorizedAssetKey:void 0,useOriginalAsset:void 0},void 0),this.applyImageSelection(e),this.loadImageData()])}async canUseAdvancedImageManipulation(){return this.bundle.getClient().canUseAddon(Ng.AdvancedImageManipulation)}async removeBackgroundFromImage(e=!0){if(!await this.canUseAdvancedImageManipulation())throw new Error("The current Integration does not have access to the Advanced Image Manipulation addon. Please call canUseAdvancedImageManipulation to ensure you disable this feature when appropriate.");const t=await this.getOriginalImage();if(!t)throw new Error("You must supply an image selection before attempting to remove the background.");const n=this.bundle.getGlobalPropertyStateManager(),i=await Qn.removeBackgroundFromAsset(t),s={...n.getAspectStorage(this.property.name),backgroundRemovedAssetKey:i.key,useOriginalAsset:!e},l=[e?n.setAspect(this.property.name,i.key,s):n.setAspectStorage(this.property.name,s)];return e&&(l.push(this.applyImageSelection(i,void 0,!1,!1)),l.push(this.loadImageData())),await Promise.all(l),this.updateSharedStepStorage(s),i}async vectorizeImage(e=!0){if(!await this.canUseAdvancedImageManipulation())throw new Error("The current Integration does not have access to the Advanced Image Manipulation addon. Please call canUseAdvancedImageManipulation to ensure you disable this feature when appropriate.");const t=await this.getOriginalImage();if(!t)throw new Error("You must supply an image selection before attempting to vectorize the image.");const n=this.bundle.getGlobalPropertyStateManager(),i=await Qn.vectorizeAsset(t),s={...n.getAspectStorage(this.property.name),vectorizedAssetKey:i.key,useOriginalAsset:!e},l=[e?n.setAspect(this.property.name,i.key,s):n.setAspectStorage(this.property.name,s)];return e&&(l.push(this.applyImageSelection(i,void 0,!1,!1)),l.push(this.loadImageData())),await Promise.all(l),this.updateSharedStepStorage(s),i}hasImage(){return!!this.getStateValue()}async getImage(){const e=this.getStateValue();if(e)return Qn.getLocalOrFromServer(e)}async getImageWithColors(){return await this.loadImageData(),this.imageData?.svg?Hg(Gg(this.imageData.svg,this.imageData.colors??{},!1)):this.imageData?.src}async getOriginalImage(){const e=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);if(e?.originalAssetKey)return Qn.getLocalOrFromServer(e.originalAssetKey)}async getBackgroundRemovedImage(){const e=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);if(e?.backgroundRemovedAssetKey)return Qn.getLocalOrFromServer(e.backgroundRemovedAssetKey)}getUseOriginalImage(){return this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.useOriginalAsset??!1}async setUseOriginalImage(e){const t=await this.getOriginalImage();if(!t)throw new Error("You must select an image before calling setUseOriginalImage");const n=this.bundle.getGlobalPropertyStateManager(),i=n.getAspectStorage(this.property.name);if(i?.useOriginalAsset===e)return;const a={...i,useOriginalAsset:e},s=e?i?.originalAssetKey:i?.backgroundRemovedAssetKey,o=[n.setAspect(this.property.name,s||"",a)];if(e)o.push(this.applyImageSelection(t,void 0,!1,!1));else{const l=async()=>{const u=await this.getBackgroundRemovedImage();if(!u)throw new Error("You must call removeBackgroundFromImage before attempting to use that version of the image.");this.applyImageSelection(u,void 0,!1,!1)};o.push(l())}o.push(this.loadImageData()),await Promise.all(o),this.updateSharedStepStorage(a)}async applyGlobalState(e){const t=this.getStateValue();if(!t)return;const n=await Qn.getLocalOrFromServer(t);if(!n)return;await this.applyImageSelection(n,e,!1,!0);const i=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);if(i){if(this.updateSharedStepStorage({...i}),i.colors){const a=new Map(i.colors.map(s=>[s.key,{browserValue:s.browserValue,pmsValue:s.pmsValue}])??[]);await Promise.all((await this.getSharedSteps(e)).map(async s=>{await s.changeColors(a)}))}}else this.updateSharedStepStorage({originalAssetKey:t}),await this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name,{originalAssetKey:t})}getAvailableColors(){return this.property.data?.fileUpload?.colorPickerEnabled?this.colorOption?.variants?.map(e=>({fill:e.color,stroke:e.color,variant:e,pmsValue:e.name}))??[]:[]}getCurrentColors(){return this.imageData?.colors}isColorPickerEnabled(){return this.property.data?.fileUpload?.colorPickerEnabled??!1}isPmsPickerEnabled(){return this.property.data?.fileUpload?.pmsPickerEnabled??!1}async getOriginalColors(){return this.imageData?.svg?(await Oa(this.imageData.svg)).colors:void 0}async changeColors(e){if(!this.imageData?.svg)return;const t=this.getSharedSteps(),n=new Map(Object.entries(e));await Promise.all((await t).map(async a=>{await a.changeColors(n)}));const i=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name,{...i,colors:Object.entries(e).map(([a,s])=>({key:a,browserValue:s.browserValue,pmsValue:s.pmsValue}))}),await this.loadImageData()])}async applyImageSelection(e,t,n=!0,i=!0){const s=(await this.getSharedSteps(t)).map(o=>{const l=o;if(l.getFrameService())return l.selectImage(e,n,i)});await Promise.all(s)}updateSharedStepStorage(e){this.bundle.getWorkflowExperiences().forEach(n=>n.getSteps().forEach(i=>{if(i.getOverrideGlobalPropertyConfiguration(this.property.type))return;i.getRaw().globalPropertyAspectConfigurations?.some(s=>s.globalPropertyConfigurationId===this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration?.id&&s.aspectName===this.property.name)&&n.getWorkflowManager().updateStorage(i.getId(),{framePatternData:{originalAssetKey:e.originalAssetKey,backgroundRemovedAssetKey:e.backgroundRemovedAssetKey,useOriginalAsset:e.useOriginalAsset}})}))}}class CI extends rm{constructor(e,t){super(e,t)}isTemplatingEnabled(){return this.property.data?.text?.templatingEnabled||!1}getText(){const e=this.getStateValue();return e||""}async setText(e){await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,e,void 0,void 0),this.applyTextSelection(e)])}async applyGlobalState(e){const t=this.getStateValue();if(!t)return Promise.resolve();await this.applyTextSelection(t,e)}async applyTextSelection(e,t){const i=(await this.getSharedSteps(t)).map(a=>{a.setText(e)});await Promise.all(i)}}class F1 extends rm{constructor(e,t,n){super(e,t),this.optionResource=n}async ensureOptionLoaded(){if(this.optionResource?.variants)return this.optionResource;if(!this.property.entityId)return this.optionResource;const e=await ft.getOption(this.property.entityId);return e&&(this.optionResource=e),this.optionResource}async initDefaultVariant(){await this.ensureOptionLoaded();const e=this.optionResource?.variants?.find(t=>t.id===this.optionResource?.defaultVariant?.id);e&&await this.selectVariant(new Da(e))}getCurrentVariant(){if(!this.optionResource)return;const e=this.getStateValue();if(e){const t=this.optionResource.variants?.find(n=>n.id===e);return t?new Da(t):void 0}else{const t=this.optionResource.variants?.find(n=>n.id===this.optionResource?.defaultVariant?.id);return t?new Da(t):void 0}}async getAvailableVariants(){return await this.ensureOptionLoaded(),(this.optionResource?.variants?.filter(t=>t.enabled)||[]).map(t=>new Da(t))}async getAllVariants(){return await this.ensureOptionLoaded(),(this.optionResource?.variants||[]).map(t=>new Da(t))}async selectVariant(e,t){await this.applyVariantSelection(e),await this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,e.getId(),void 0,t)}async applyGlobalState(e){const t=this.getStateValue();if(!t)return;await this.ensureOptionLoaded();const n=this.optionResource?.variants?.find(i=>i.id===t);if(n)return this.applyVariantSelection(new Da(n),e)}async applyVariantSelection(e,t){const i=(await this.getSharedSteps(t)).map(a=>a.selectVariant(e));await Promise.all(i)}}class lA extends F1{constructor(e,t,n){super(e,t,n)}async selectVariant(e,t){await this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,e.getId(),void 0,t),await this.applyColorVariant(e,void 0,t)}async applyGlobalState(e){const t=this.getStateValue();if(!t)return;await this.ensureOptionLoaded();const n=this.optionResource?.variants?.find(a=>a.id===t);if(!n)return;await this.applyColorVariant(new Da(n),e);const i=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.customColor;i&&await this.setCustomColor(i)}async applyColorVariant(e,t,n){const a=(await this.getSharedSteps(t)).map(s=>{switch(s.getType()){case Je.Shape:return s.selectVariant(e);case Je.Text:return s.setFillColor({fill:e.getColor(),stroke:e.getColor(),variant:e.getResource()});case Je.Illustration:return s.setColor(n?.toString()||"",e.getColor()||"")}});await Promise.all(a)}async setCustomColor(e){const t=this.getCurrentVariant()?.getColor();t&&t.toLowerCase()==="#custom"&&(await this.getSharedSteps()).forEach(i=>i.setCustomColor(e)),this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name,{customColor:e})}getCustomColor(){return this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.customColor||this.getCurrentVariant()?.getColor()||"#ffffff"}}const D9=(r,e,t)=>{const n=r.getWorkflowExperiences(),i=r.getGlobalPropertyConfiguration();return i?n.flatMap(s=>s.getSteps()).filter(s=>s.getGlobalPropertyAspects(i.id).includes(e)&&s.getType()===t):[]},xI=(r,e)=>{const n=D9(r,e,Je.Illustration).map(i=>{if(!i.getCurrentVariant()?.getAssetResource()?.assetConfiguration)return 0;const s=i.getColors();return s?Object.getOwnPropertyNames(s).length:0});return Math.max(...n)};var qf={exports:{}};qf.exports;var yE;function P9(){return yE||(yE=1,(function(r,e){var t=200,n="Expected a function",i="__lodash_hash_undefined__",a=500,s=1,o=2,l=4,u=800,c=16,h=9007199254740991,f="[object Arguments]",d="[object Array]",g="[object AsyncFunction]",v="[object Boolean]",y="[object Date]",A="[object Error]",C="[object Function]",k="[object GeneratorFunction]",T="[object Map]",S="[object Number]",R="[object Null]",B="[object Object]",G="[object Promise]",$="[object Proxy]",Y="[object RegExp]",X="[object Set]",J="[object String]",Q="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",he="[object ArrayBuffer]",ye="[object DataView]",Ue="[object Float32Array]",Oe="[object Float64Array]",Te="[object Int8Array]",K="[object Int16Array]",ie="[object Int32Array]",de="[object Uint8Array]",Be="[object Uint8ClampedArray]",Ee="[object Uint16Array]",ze="[object Uint32Array]",je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qe=/^\w*$/,Ge=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bt=/[\\^$.*+?()[\]{}|]/g,rr=/\\(\\)?/g,Pr=/\w*$/,$t=/^\[object .+?Constructor\]$/,ar=/^(?:0|[1-9]\d*)$/,St={};St[Ue]=St[Oe]=St[Te]=St[K]=St[ie]=St[de]=St[Be]=St[Ee]=St[ze]=!0,St[f]=St[d]=St[he]=St[v]=St[ye]=St[y]=St[A]=St[C]=St[T]=St[S]=St[B]=St[Y]=St[X]=St[J]=St[se]=!1;var st={};st[f]=st[d]=st[he]=st[ye]=st[v]=st[y]=st[Ue]=st[Oe]=st[Te]=st[K]=st[ie]=st[T]=st[S]=st[B]=st[Y]=st[X]=st[J]=st[Q]=st[de]=st[Be]=st[Ee]=st[ze]=!0,st[A]=st[C]=st[se]=!1;var Qr=typeof di=="object"&&di&&di.Object===Object&&di,Sr=typeof self=="object"&&self&&self.Object===Object&&self,gr=Qr||Sr||Function("return this")(),nr=e&&!e.nodeType&&e,fr=nr&&!0&&r&&!r.nodeType&&r,Yt=fr&&fr.exports===nr,Xt=Yt&&Qr.process,mt=(function(){try{var L=fr&&fr.require&&fr.require("util").types;return L||Xt&&Xt.binding&&Xt.binding("util")}catch{}})(),wr=mt&&mt.isMap,an=mt&&mt.isSet,_r=mt&&mt.isTypedArray;function ir(L,re,le){switch(le.length){case 0:return L.call(re);case 1:return L.call(re,le[0]);case 2:return L.call(re,le[0],le[1]);case 3:return L.call(re,le[0],le[1],le[2])}return L.apply(re,le)}function Yr(L,re){for(var le=-1,Ve=L==null?0:L.length;++le<Ve&&re(L[le],le,L)!==!1;);return L}function kr(L,re){for(var le=-1,Ve=L==null?0:L.length,pt=0,_t=[];++le<Ve;){var Wr=L[le];re(Wr,le,L)&&(_t[pt++]=Wr)}return _t}function Zr(L,re){for(var le=-1,Ve=L==null?0:L.length,pt=Array(Ve);++le<Ve;)pt[le]=re(L[le],le,L);return pt}function Vr(L,re){for(var le=-1,Ve=re.length,pt=L.length;++le<Ve;)L[pt+le]=re[le];return L}function pn(L,re){for(var le=-1,Ve=Array(L);++le<L;)Ve[le]=re(le);return Ve}function gn(L){return function(re){return L(re)}}function Fr(L,re){return L?.[re]}function zr(L,re){return function(le){return L(re(le))}}var en=Array.prototype,Hr=Function.prototype,zt=Object.prototype,sr=gr["__core-js_shared__"],Er=Hr.toString,tt=zt.hasOwnProperty,Nr=(function(){var L=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return L?"Symbol(src)_1."+L:""})(),Xr=zt.toString,Se=Er.call(Object),P=RegExp("^"+Er.call(tt).replace(bt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=Yt?gr.Buffer:void 0,Z=gr.Symbol,ue=gr.Uint8Array;U&&U.allocUnsafe;var Ie=zr(Object.getPrototypeOf,Object),We=zt.propertyIsEnumerable,wt=en.splice,It=Z?Z.isConcatSpreadable:void 0,Nt=Z?Z.toStringTag:void 0,or=(function(){try{var L=Ut(Object,"defineProperty");return L({},"",{}),L}catch{}})(),Lt=Object.getOwnPropertySymbols,ee=U?U.isBuffer:void 0,De=Math.max,Qe=Date.now,Ye=Ut(gr,"DataView"),Ct=Ut(gr,"Map"),dt=Ut(gr,"Promise"),Dt=Ut(gr,"Set"),Et=Ut(gr,"WeakMap"),hr=Ut(Object,"create"),er=pi(Ye),dr=pi(Ct),Ht=pi(dt),On=pi(Dt),Tn=pi(Et),mr=Z?Z.prototype:void 0,Cr=mr?mr.valueOf:void 0,bn=mr?mr.toString:void 0;function Rr(L){var re=-1,le=L==null?0:L.length;for(this.clear();++re<le;){var Ve=L[re];this.set(Ve[0],Ve[1])}}function jn(){this.__data__=hr?hr(null):{},this.size=0}function wn(L){var re=this.has(L)&&delete this.__data__[L];return this.size-=re?1:0,re}function jr(L){var re=this.__data__;if(hr){var le=re[L];return le===i?void 0:le}return tt.call(re,L)?re[L]:void 0}function Cn(L){var re=this.__data__;return hr?re[L]!==void 0:tt.call(re,L)}function cn(L,re){var le=this.__data__;return this.size+=this.has(L)?0:1,le[L]=hr&&re===void 0?i:re,this}Rr.prototype.clear=jn,Rr.prototype.delete=wn,Rr.prototype.get=jr,Rr.prototype.has=Cn,Rr.prototype.set=cn;function tn(L){var re=-1,le=L==null?0:L.length;for(this.clear();++re<le;){var Ve=L[re];this.set(Ve[0],Ve[1])}}function Jn(){this.__data__=[],this.size=0}function si(L){var re=this.__data__,le=Jt(re,L);if(le<0)return!1;var Ve=re.length-1;return le==Ve?re.pop():wt.call(re,le,1),--this.size,!0}function xn(L){var re=this.__data__,le=Jt(re,L);return le<0?void 0:re[le][1]}function mn(L){return Jt(this.__data__,L)>-1}function sn(L,re){var le=this.__data__,Ve=Jt(le,L);return Ve<0?(++this.size,le.push([L,re])):le[Ve][1]=re,this}tn.prototype.clear=Jn,tn.prototype.delete=si,tn.prototype.get=xn,tn.prototype.has=mn,tn.prototype.set=sn;function rn(L){var re=-1,le=L==null?0:L.length;for(this.clear();++re<le;){var Ve=L[re];this.set(Ve[0],Ve[1])}}function Lr(){this.size=0,this.__data__={hash:new Rr,map:new(Ct||tn),string:new Rr}}function on(L){var re=jt(this,L).delete(L);return this.size-=re?1:0,re}function E(L){return jt(this,L).get(L)}function O(L){return jt(this,L).has(L)}function z(L,re){var le=jt(this,L),Ve=le.size;return le.set(L,re),this.size+=le.size==Ve?0:1,this}rn.prototype.clear=Lr,rn.prototype.delete=on,rn.prototype.get=E,rn.prototype.has=O,rn.prototype.set=z;function q(L){var re=this.__data__=new tn(L);this.size=re.size}function pe(){this.__data__=new tn,this.size=0}function ce(L){var re=this.__data__,le=re.delete(L);return this.size=re.size,le}function xe(L){return this.__data__.get(L)}function _e(L){return this.__data__.has(L)}function rt(L,re){var le=this.__data__;if(le instanceof tn){var Ve=le.__data__;if(!Ct||Ve.length<t-1)return Ve.push([L,re]),this.size=++le.size,this;le=this.__data__=new rn(Ve)}return le.set(L,re),this.size=le.size,this}q.prototype.clear=pe,q.prototype.delete=ce,q.prototype.get=xe,q.prototype.has=_e,q.prototype.set=rt;function lt(L,re){var le=ki(L),Ve=!le&&us(L),pt=!le&&!Ve&&cs(L),_t=!le&&!Ve&&!pt&&Ae(L),Wr=le||Ve||pt||_t,Vn=Wr?pn(L.length,String):[],oi=Vn.length;for(var Hi in L)Wr&&(Hi=="length"||pt&&(Hi=="offset"||Hi=="parent")||_t&&(Hi=="buffer"||Hi=="byteLength"||Hi=="byteOffset")||Xe(Hi,oi))||Vn.push(Hi);return Vn}function nt(L,re,le){var Ve=L[re];(!(tt.call(L,re)&&ls(Ve,le))||le===void 0&&!(re in L))&&vr(L,re,le)}function Jt(L,re){for(var le=L.length;le--;)if(ls(L[le][0],re))return le;return-1}function vr(L,re,le){re=="__proto__"&&or?or(L,re,{configurable:!0,enumerable:!0,value:le,writable:!0}):L[re]=le}function Gr(L,re,le,Ve,pt,_t){var Wr;if(le&&(Wr=pt?le(L,Ve,pt,_t):le(L)),Wr!==void 0)return Wr;if(!fa(L))return L;var Vn=ki(L);if(Vn)Wr=be(L);else{var oi=fe(L),Hi=oi==C||oi==k;if(cs(L))return Zn(L);if(oi==B||oi==f||Hi&&!pt)Wr={};else{if(!st[oi])return pt?L:{};Wr=Me(L,oi)}}_t||(_t=new q);var Ul=_t.get(L);if(Ul)return Ul;_t.set(L,Wr),V(L)?L.forEach(function(da){Wr.add(Gr(da,re,le,da,L,_t))}):F(L)&&L.forEach(function(da,Aa){Wr.set(Aa,Gr(da,re,le,Aa,L,_t))});var Vl=ot,_o=Vn?void 0:Vl(L);return Yr(_o||L,function(da,Aa){_o&&(Aa=da,da=L[Aa]),nt(Wr,Aa,Gr(da,re,le,Aa,L,_t))}),Wr}function fn(L,re,le,Ve,pt){var _t=-1,Wr=L.length;for(le||(le=Ke),pt||(pt=[]);++_t<Wr;){var Vn=L[_t];le(Vn)?Vr(pt,Vn):pt[pt.length]=Vn}return pt}function Kn(L,re){re=Sn(re,L);for(var le=0,Ve=re.length;L!=null&&le<Ve;)L=L[Ki(re[le++])];return le&&le==Ve?L:void 0}function Ln(L,re,le){var Ve=re(L);return ki(L)?Ve:Vr(Ve,le(L))}function vn(L){return L==null?L===void 0?oe:R:Nt&&Nt in Object(L)?Br(L):$r(L)}function Or(L){return zi(L)&&vn(L)==f}function Gn(L){return zi(L)&&fe(L)==T}function Bn(L){if(!fa(L)||pr(L))return!1;var re=fs(L)?P:$t;return re.test(pi(L))}function Mn(L){return zi(L)&&fe(L)==X}function Oi(L){return zi(L)&&ds(L.length)&&!!St[vn(L)]}function bi(L){if(!fa(L))return Tr(L);var re=yr(L),le=[];for(var Ve in L)Ve=="constructor"&&(re||!tt.call(L,Ve))||le.push(Ve);return le}var wi=or?function(L,re){return or(L,"toString",{configurable:!0,enumerable:!1,value:Rt(re),writable:!0})}:Kt;function _n(L,re,le){var Ve=-1,pt=L.length;re<0&&(re=-re>pt?0:pt+re),le=le>pt?pt:le,le<0&&(le+=pt),pt=re>le?0:le-re>>>0,re>>>=0;for(var _t=Array(pt);++Ve<pt;)_t[Ve]=L[Ve+re];return _t}function Ei(L){if(typeof L=="string")return L;if(ki(L))return Zr(L,Ei)+"";if(W(L))return bn?bn.call(L):"";var re=L+"";return re=="0"&&1/L==-1/0?"-0":re}function Un(L,re){re=Sn(re,L);var le=-1,Ve=re.length;if(!Ve)return!0;for(;++le<Ve;){var pt=Ki(re[le]);if(pt==="__proto__"&&!tt.call(L,"__proto__")||(pt==="constructor"||pt==="prototype")&&le<Ve-1)return!1}var _t=Xi(L,re);return _t==null||delete _t[Ki(Ha(re))]}function Sn(L,re){return ki(L)?L:yt(L,re)?[L]:$n(ve(L))}function Zn(L,re){return L.slice()}function lr(L){var re=new L.constructor(L.byteLength);return new ue(re).set(new ue(L)),re}function In(L,re){var le=lr(L.buffer);return new L.constructor(le,L.byteOffset,L.byteLength)}function Ci(L){var re=new L.constructor(L.source,Pr.exec(L));return re.lastIndex=L.lastIndex,re}function I(L){return Cr?Object(Cr.call(L)):{}}function H(L,re){var le=lr(L.buffer);return new L.constructor(le,L.byteOffset,L.length)}function ae(L,re,le,Ve){var pt=!le;le||(le={});for(var _t=-1,Wr=re.length;++_t<Wr;){var Vn=re[_t],oi=void 0;oi===void 0&&(oi=L[Vn]),pt?vr(le,Vn,oi):nt(le,Vn,oi)}return le}function Ce(L){return _(L)?void 0:L}function ht(L){return ua(yn(L,void 0,za),L+"")}function ot(L){return Ln(L,ke,te)}function jt(L,re){var le=L.__data__;return Pt(re)?le[typeof re=="string"?"string":"hash"]:le.map}function Ut(L,re){var le=Fr(L,re);return Bn(le)?le:void 0}function Br(L){var re=tt.call(L,Nt),le=L[Nt];try{L[Nt]=void 0;var Ve=!0}catch{}var pt=Xr.call(L);return Ve&&(re?L[Nt]=le:delete L[Nt]),pt}var M=Lt?function(L){return L==null?[]:(L=Object(L),kr(Lt(L),function(re){return We.call(L,re)}))}:qt,te=Lt?function(L){for(var re=[];L;)Vr(re,M(L)),L=Ie(L);return re}:qt,fe=vn;(Ye&&fe(new Ye(new ArrayBuffer(1)))!=ye||Ct&&fe(new Ct)!=T||dt&&fe(dt.resolve())!=G||Dt&&fe(new Dt)!=X||Et&&fe(new Et)!=se)&&(fe=function(L){var re=vn(L),le=re==B?L.constructor:void 0,Ve=le?pi(le):"";if(Ve)switch(Ve){case er:return ye;case dr:return T;case Ht:return G;case On:return X;case Tn:return se}return re});function be(L){var re=L.length,le=new L.constructor(re);return re&&typeof L[0]=="string"&&tt.call(L,"index")&&(le.index=L.index,le.input=L.input),le}function Me(L,re,le){var Ve=L.constructor;switch(re){case he:return lr(L);case v:case y:return new Ve(+L);case ye:return In(L);case Ue:case Oe:case Te:case K:case ie:case de:case Be:case Ee:case ze:return H(L);case T:return new Ve;case S:case J:return new Ve(L);case Y:return Ci(L);case X:return new Ve;case Q:return I(L)}}function Ke(L){return ki(L)||us(L)||!!(It&&L&&L[It])}function Xe(L,re){var le=typeof L;return re=re??h,!!re&&(le=="number"||le!="symbol"&&ar.test(L))&&L>-1&&L%1==0&&L<re}function yt(L,re){if(ki(L))return!1;var le=typeof L;return le=="number"||le=="symbol"||le=="boolean"||L==null||W(L)?!0:qe.test(L)||!je.test(L)||re!=null&&L in Object(re)}function Pt(L){var re=typeof L;return re=="string"||re=="number"||re=="symbol"||re=="boolean"?L!=="__proto__":L===null}function pr(L){return!!Nr&&Nr in L}function yr(L){var re=L&&L.constructor,le=typeof re=="function"&&re.prototype||zt;return L===le}function ur(L){var re=ca(L,function(Ve){return le.size===a&&le.clear(),Ve}),le=re.cache;return re}function Tr(L){var re=[];if(L!=null)for(var le in Object(L))re.push(le);return re}function $r(L){return Xr.call(L)}function yn(L,re,le){return re=De(re===void 0?L.length-1:re,0),function(){for(var Ve=arguments,pt=-1,_t=De(Ve.length-re,0),Wr=Array(_t);++pt<_t;)Wr[pt]=Ve[re+pt];pt=-1;for(var Vn=Array(re+1);++pt<re;)Vn[pt]=Ve[pt];return Vn[re]=le(Wr),ir(L,this,Vn)}}function Xi(L,re){return re.length<2?L:Kn(L,_n(re,0,-1))}var ua=Ji(wi);function Ji(L){var re=0,le=0;return function(){var Ve=Qe(),pt=c-(Ve-le);if(le=Ve,pt>0){if(++re>=u)return arguments[0]}else re=0;return L.apply(void 0,arguments)}}var $n=ur(function(L){var re=[];return L.charCodeAt(0)===46&&re.push(""),L.replace(Ge,function(le,Ve,pt,_t){re.push(pt?_t.replace(rr,"$1"):Ve||le)}),re});function Ki(L){if(typeof L=="string"||W(L))return L;var re=L+"";return re=="0"&&1/L==-1/0?"-0":re}function pi(L){if(L!=null){try{return Er.call(L)}catch{}try{return L+""}catch{}}return""}function za(L){var re=L==null?0:L.length;return re?fn(L):[]}function Ha(L){var re=L==null?0:L.length;return re?L[re-1]:void 0}function ca(L,re){if(typeof L!="function"||re!=null&&typeof re!="function")throw new TypeError(n);var le=function(){var Ve=arguments,pt=re?re.apply(this,Ve):Ve[0],_t=le.cache;if(_t.has(pt))return _t.get(pt);var Wr=L.apply(this,Ve);return le.cache=_t.set(pt,Wr)||_t,Wr};return le.cache=new(ca.Cache||rn),le}ca.Cache=rn;function ls(L,re){return L===re||L!==L&&re!==re}var us=Or((function(){return arguments})())?Or:function(L){return zi(L)&&tt.call(L,"callee")&&!We.call(L,"callee")},ki=Array.isArray;function ja(L){return L!=null&&ds(L.length)&&!fs(L)}var cs=ee||qr;function fs(L){if(!fa(L))return!1;var re=vn(L);return re==C||re==k||re==g||re==$}function ds(L){return typeof L=="number"&&L>-1&&L%1==0&&L<=h}function fa(L){var re=typeof L;return L!=null&&(re=="object"||re=="function")}function zi(L){return L!=null&&typeof L=="object"}var F=wr?gn(wr):Gn;function _(L){if(!zi(L)||vn(L)!=B)return!1;var re=Ie(L);if(re===null)return!0;var le=tt.call(re,"constructor")&&re.constructor;return typeof le=="function"&&le instanceof le&&Er.call(le)==Se}var V=an?gn(an):Mn;function W(L){return typeof L=="symbol"||zi(L)&&vn(L)==Q}var Ae=_r?gn(_r):Oi;function ve(L){return L==null?"":Ei(L)}function ke(L){return ja(L)?lt(L):bi(L)}var He=ht(function(L,re){var le={};if(L==null)return le;var Ve=!1;re=Zr(re,function(_t){return _t=Sn(_t,L),Ve||(Ve=_t.length>1),_t}),ae(L,ot(L),le),Ve&&(le=Gr(le,s|o|l,Ce));for(var pt=re.length;pt--;)Un(le,re[pt]);return le});function Rt(L){return function(){return L}}function Kt(L){return L}function qt(){return[]}function qr(){return!1}r.exports=He})(qf,qf.exports)),qf.exports}var R9=P9();const O9=zs(R9);function uA(r,e){function t(n){if(typeof n>"u"||!Array.isArray(n)&&!M9(n))return n;if(Array.isArray(n))return uA(n,e);let i={};for(const[a,s]of Object.entries(n))i[a]=B9(s)?s:uA(s,e);return O9(i,e)}return Array.isArray(r)?r.map(t):t(r)}function B9(r){return r==null}function M9(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}function SI(r){const e=new Map;return r?.aspects?.forEach(t=>{t.value!==""&&e.set(t.name,!0)}),e}class _9 extends Yg{constructor(e){super(),this.update=e}async execute(){await this.update(),await new Promise(e=>{window.setTimeout(()=>{e()},1e3)})}}function Bv(r){return uA(r,["__typename"])}class N9{constructor(e,t,n,i,a){this.stateUpdateQueue=new Xg(1),this.mandatoryFulfilledAspects=new Map,this.bundleId=e,this.bundleOwnerId=t,this.configuration=n,this.bundleOptions=a;const s=a?.existingGlobalPropertyState;this.initPromise=s?Promise.resolve(s).then(()=>{console.log("Setting global property state to existing state."),this.globalPropertyState=Bv(s),this.recalculateMandatoryStates()}):this.createGlobalPropertyState().then(o=>{console.log("Setting global property state to new state."),this.globalPropertyState=Bv(o),this.recalculateMandatoryStates()}),this.onGlobalPropertyStateChange=i}async clearAspects(e){if(!this.globalPropertyState)throw new Error("Global property state not initialized");const t=this.globalPropertyState.aspects;this.globalPropertyState.aspects=t.filter(n=>!e.includes(n.name))}recalculateMandatoryStates(){this.mandatoryFulfilledAspects=SI(this.globalPropertyState)}setBundleOptions(e){this.bundleOptions=e}getBundleOptions(){return this.bundleOptions}setConfiguration(e){this.configuration=e}getInitializationPromise(){return this.initPromise}getGlobalPropertyState(){return this.globalPropertyState}async setGlobalPropertyState(e){this.globalPropertyState||await this.initPromise;const t=vo(this.globalPropertyState);this.globalPropertyState={...Bv(e),id:t.id},this.recalculateMandatoryStates(),this.queueGlobalPropertyStateUpdate(),await this.onGlobalPropertyStateChange(t,this.globalPropertyState)}getAspectMandatoryFulfilled(e){return this.mandatoryFulfilledAspects.get(e)}getAspectHidden(e){if(!this.globalPropertyState)throw new Error("Global property state not initialized");return!!this.globalPropertyState.aspects.find(t=>t.name===e)?.hidden}getAspect(e,t){if(!this.globalPropertyState)throw new Error("Global property state not initialized");const n=this.globalPropertyState.aspects.find(i=>i.name===e&&i.channel===t);if(n)return n.value}getAspectStorage(e,t){if(!this.globalPropertyState)throw new Error("Global property state not initialized");return this.globalPropertyState.aspects.find(n=>n.name===e&&n.channel===t)?.storage}async setAspect(e,t,n,i,a){if(!this.globalPropertyState)throw new Error("Global property state not initialized");if(!this.configuration)throw new Error("Global property configuration not linked to the state manager.");const s=this.configuration.aspects.find(u=>u.name===e);if(!s)throw new Error(`Failed to find configuration aspect with name: ${e}`);this.mandatoryFulfilledAspects.set(e,t!=="");const o=vo(this.globalPropertyState),l=this.globalPropertyState.aspects.filter(u=>u.name===e);if(l.length>0)if(i){const u=l.find(c=>c.channel===i);if(u)u.value=t,u.type=s.type,u.channel=i,u.hidden=a??u.hidden,n!==void 0&&(u.storage=n!==null?n:void 0);else{let c;if(i===1){const h=this.globalPropertyState.aspects.findIndex(f=>!f.channel&&f.name===e);h&&h>0&&(c=this.globalPropertyState.aspects.splice(h,1)[0].hidden)}this.globalPropertyState.aspects.push({name:e,value:t,type:s.type,storage:n!==null?n:void 0,channel:i,hidden:a??c})}}else{const u=l[0];u.value=t,u.type=s.type,u.hidden=a??u.hidden,n!==void 0&&(u.storage=n!==null?n:void 0)}else this.globalPropertyState.aspects.push({name:e,value:t,type:s.type,storage:n!==null?n:void 0,channel:i,hidden:a});xd(o,this.globalPropertyState)||(this.queueGlobalPropertyStateUpdate(),await this.onGlobalPropertyStateChange(o,this.globalPropertyState))}async setAspectStorage(e,t,n){if(!this.globalPropertyState)throw new Error("Global property state not initialized");if(!this.configuration)throw new Error("Global property configuration not linked to the state manager.");const i=this.configuration.aspects.find(o=>o.name===e);if(!i)throw new Error(`Failed to find configuration aspect with name: ${e}`);const a=vo(this.globalPropertyState),s=this.globalPropertyState.aspects.filter(o=>o.name===e);if(s.length>0)if(n){const o=s.find(l=>l.channel===n);o&&(o.storage=t!==null?t:void 0,o.type=i.type)}else{const o=s[0];o.storage=t!==null?t:void 0,o.type=i.type}else this.globalPropertyState.aspects.push({name:e,value:"",type:i.type,storage:t!==null?t:void 0,channel:n});xd(a,this.globalPropertyState)||(this.queueGlobalPropertyStateUpdate(),await this.onGlobalPropertyStateChange(a,this.globalPropertyState))}queueGlobalPropertyStateUpdate(){this.stateUpdateQueue.enqueue(new _9(async()=>{await this.updateGlobalPropertyState()}))}async updateGlobalPropertyState(){if(!this.globalPropertyState)throw new Error("Global property state not initialized");if(!(await $e.getShadowGraphqlClient().mutate({mutation:DU,variables:{id:this.globalPropertyState.id,aspects:this.globalPropertyState.aspects.map(t=>{let n=t.type&&t.storage?{}:void 0;if(n)switch(t.type){case zn.FileUpload:{n.fileUpload=t.storage;break}case zn.ColorOption:case zn.Option:{n.option=t.storage;break}}return{name:t.name,value:t.value,type:t.type,storage:n,channel:t.channel,hidden:t.hidden}})},context:{headers:{bundleOwnerId:this.bundleOwnerId,...this.bundleOptions?.additionalHeaders}}})).data?.globalPropertyStateUpdate)throw new Error("Unable to update global property state")}async createGlobalPropertyState(){const e=await $e.getShadowGraphqlClient().mutate({mutation:IU,variables:{bundleId:this.bundleId},context:{headers:{bundleOwnerId:this.bundleOwnerId,...this.bundleOptions?.additionalHeaders}}});if(e.data?.globalPropertyStateCreate&&e.data.globalPropertyStateCreate.id)return e.data.globalPropertyStateCreate;throw new Error(`Unable to create global property state for bundle: ${this.bundleId}`)}}class L9{constructor(e){this.setState(e||'{"transactions": []}')}setState(e){e&&(this.state=JSON.parse(e))}getState(){return this.state}removeStateForTransaction(e){if(!this.state||!this.state.transactions)return;const t=this.state.transactions.findIndex(n=>n.transactionId===e);t!==-1&&this.state.transactions.splice(t,1)}getSerializedState(){if(this.state)return this.deleteFieldNameFromObjectRecursive(this.state,"__typename"),JSON.stringify(this.state)}deleteFieldNameFromObjectRecursive(e,t){if(!(typeof e!="object"||e===null))for(const n in e)n===t?delete e[n]:this.deleteFieldNameFromObjectRecursive(e[n],t)}}const U9=Fe`
2509
+ `;var xg=(r=>(r.PriceBreakChanged="PriceBreakChanged",r.ProductChanged="ProductChanged",r.QuantityChanged="QuantityChanged",r.RecipientChanged="RecipientChanged",r.SelectionChanged="SelectionChanged",r))(xg||{});class bI{constructor(e,t){this.cachedStepHandles=new Map,this.profanityList=[],this.currentPriceBreak=1,this.renderableScenes=[],this.renderableSceneCallbacks=[],this.eventCallbacks=new Map,this.debouncedSavedDesignUpdate=AI(async()=>{await Zp.getSavedDesignByTransaction(this.getTransaction().id)&&this.save()},2500),this.getCanvasObjectURLAsync=async n=>new Promise((i,a)=>{try{n.toBlob(s=>{if(s){const o=URL.createObjectURL(s);i(o)}})}catch(s){a(s)}}),this.client=e,this.transaction=t.transaction,this.workflow=t.workflow,this.profanityList=this.transaction.product?.profanities?.map(n=>n.word)||[],this.isReadOnly=t.transaction.isOrdered||!!t.readOnly,this.graphQlClient=t.graphQlClient,this.workflowManager=new sA(this,e,n=>{try{this.debouncedSavedDesignUpdate()}catch{console.error("Failed to update saved design details.")}return t.stateMutationFunc(n)},t.graphQlClient,t.reloadedState,t.readOnly,t.modelContainer,t.isReloadedTransaction,t.singleVariantsRenderable,t.delayWorkflowStateSync),this.workflowManager.addSelectionCallback(n=>{const i=n.traversableScenes.map(a=>{const s=a.renderableSteps.map(o=>o.stepName);return{id:a.name,title:a.title,renderableSteps:s,workflowScene:a}});this.renderableScenes=i,this.renderableSceneCallbacks.forEach(a=>a(i)),this.callEvent("SelectionChanged")}),this.currentPriceBreak=this.priceBreakToBeApplied()}getTransaction(){return this.transaction}getProduct(){return this.transaction.product}getProfanityList(){return this.profanityList}async setProduct(e){this.workflow=void 0;const t=await this.graphQlClient().mutate({mutation:vE,variables:{id:this.getTransaction().id,integrationProductId:e}}),n=t.data?.transactionUpdateIntegrationProduct.product;if(!n)throw new nn("Failed to set product. No product returned from server.");if(!this.bundle)throw new nn("Cannot set product on experience that is not part of a bundle.");this.transaction.product={...this.transaction.product,...t.data?.transactionUpdateIntegrationProduct.product},this.transaction.integrationProduct={...this.transaction.integrationProduct,...t.data?.transactionUpdateIntegrationProduct.integrationProduct},this.transaction.workflowState=void 0,this.currentPriceBreak=this.priceBreakToBeApplied(),this.callEvent("ProductChanged");const i=(await this.bundle.getProductCollection().fetchProducts()).find(a=>a.getId()===n.id);try{const a=i?.getDefaultWorkflow();if(a){const s=await BD(a.getId());await this.setWorkflow(s),console.log("Setting Product - Workflow set to default for product.")}}catch{console.log("Setting Product - No default workflow available, must be set manually.")}}async clearProduct(){if(!this.bundle)throw new nn("Cannot clear product on experience that is not part of a bundle.");this.workflow=void 0,this.transaction.workflowState=void 0,this.transaction.product=void 0,this.transaction.integrationProduct=void 0,this.currentPriceBreak=this.priceBreakToBeApplied(),this.callEvent("ProductChanged"),await this.graphQlClient().mutate({mutation:vE,variables:{id:this.getTransaction().id}})}getWorkflow(){return this.workflow}async setWorkflow(e){return this.workflow=e,await this.graphQlClient().mutate({mutation:S3,variables:{id:this.getTransaction().id,workflowId:e.id}}),this.workflowManager.setWorkflow(e)}async attachAddress(e,t,n,i,a,s){await this.graphQlClient().mutate({mutation:k9,variables:{transactionId:this.getTransaction().id,streetAddress:e||void 0,apartment:t||void 0,city:n||void 0,country:i||void 0,state:a||void 0,postCode:s||void 0}})}async attachOrganization(e){await this.graphQlClient().mutate({mutation:F9,variables:{transactionId:this.getTransaction().id,organizationName:e}})}getBundle(){return this.bundle}setBundle(e){this.bundle=e}getClient(){return this.client}getIsReadOnly(){return this.isReadOnly}getCommandContext(){return this.workflowManager.getCommandContext()}getWorkflowManager(){return this.workflowManager}async createPreviewImage(e,t){const n=this.getWorkflow(),i=n?.finalizeStepConfig?.lookAtAnimation;if(!n)throw new Error("Failed to generate cart preview image! No workflow is set.");if(e){if(!i)throw new Error("Failed to generate cart preview image! No camera orientation configured.");return await this.workflowManager.getPreviewService()?.renderSceneScreenshot(t??512,i)||""}let a=2048;t&&t<=2048&&(a=t);const s=Eo(a,a),o=this.workflowManager.getCommandContext().getAllLayouts(),l=n.defaultPreviewPanelIndex||0,u=n.panels[l],c=o.find(k=>k.layoutState?.layout.panelId===u?.name)||o[0],h=c.layoutState.layout.previewRegion?{x:c.layoutState.layout.previewRegion.left,y:c.layoutState.layout.previewRegion.top,width:c.layoutState.layout.previewRegion.width,height:c.layoutState.layout.previewRegion.height}:{x:0,y:0,width:c.layoutState.layout.width,height:c.layoutState.layout.height},f=this.workflowManager.getCommandContext().getLayoutById(c.layoutState.layout.id),d=s.getContext("2d");if(!d)throw new Ug("Failed to obtain 2D context for preview image creation");const g=this.workflowManager.getTemplatingContext(),v=Zg(f.layoutState.layout,f.layoutState.elements,{renderingConfiguration:{purpose:rc.Print,region:{left:h.x,top:h.y,width:h.width,height:h.height},templatingContext:g}}),y=Hk(v);await(await co.from(d,y,{anonymousCrossOrigin:!0,ignoreDimensions:!1,createCanvas:Eo,createImage:jd,DOMParser:jA(),fetch})).render();const C=await this.getCanvasObjectURLAsync(s);return s.toDataURL(C)}getStepById(e){const t=this.getWorkflow()?.steps.find(a=>a.stepName===e);if(!t||!this.stepHasHandle(t))return;const n=this.cachedStepHandles.get(t.stepName);if(n)return n;const i=Op.get(this.getWorkflowManager(),t);return this.cachedStepHandles.set(t.stepName,i),i}getSteps(){return this.getScenes().flatMap(e=>this.getStepsByScene(e))}async getStepsConditionallyActive(){const e=this.getScenes();return(await Promise.all(e.map(async n=>{const i=this.getStepsByScene(n),a=await Promise.all(i.map(s=>fo(s.getRaw(),this.getWorkflowManager().getStepSelections())));return i.filter((s,o)=>a[o])}))).flat()}getScenes(){return(this.getWorkflow()?.stepGroups||[]).map(t=>({id:t.id,name:t.name,stepIds:t.stepNames}))}getSelectionPriceSubunits(e){const t=this.getWorkflowManager().getWorkflowSelections();let n=0;return Object.values(t).forEach(i=>{n+=i.selections.reduce((a,s)=>a+(s.priceModifier||0),0)}),this.getPriceSubUnitsAfterPriceBreaks(n,e)}getBasePriceSubunits(e,t){const n=this.getPriceSubUnitsAfterPriceBreaks(this.getProduct()?.basePrice||0,t);if(e){const i=this.getAdditionalProductPriceSubunits(t)||0;return n+i}return n}getAdditionalProductPriceSubunits(e){const t=this.getTransaction().integrationProduct;if(t?.additionalIntegrationProduct?.product){const n=t.additionalIntegrationProduct.product.basePrice||0;return this.getPriceSubUnitsAfterPriceBreaks(n,e)}}getTotalPriceSubunits(e){return this.getBasePriceSubunits(!1,e)+this.getSelectionPriceSubunits(e)}getPriceSubUnitsAfterPriceBreaks(e,t){const n=t?1:this.priceBreakToBeApplied(),i=e*n;return Math.ceil(i)}priceBreakToBeApplied(){const e=(this.getProduct()?.priceBreaks||[]).sort((i,a)=>-(i.minQty-a.minQty)),n=[...this.getMatchingExperiencesFromBundle(),this].reduce((i,a)=>i+a.getQuantity(),0);for(const i of e)if(i.minQty<=n)return i.percentage;return 1}checkForPriceBreakChanges(){const e=this.priceBreakToBeApplied();this.currentPriceBreak!==e&&(this.updatePriceBreak(e),this.getMatchingExperiencesFromBundle().forEach(t=>t.updatePriceBreak(e)))}getMatchingExperiencesFromBundle(){return(this.bundle?.getWorkflowExperiences()||[]).filter(e=>{const t=e.getTransaction().id,n=this.getTransaction().id,i=e.getProduct()?.id,a=this.getProduct()?.id;return t!==n&&i===a})}updatePriceBreak(e){this.currentPriceBreak=e,this.callEvent("PriceBreakChanged")}async copySelectionsViaGlobalConfiguration(e,t,n){const i=await e.getGlobalProperties(),a=n?.map(u=>u.getId()),s=this.getSteps().filter(u=>a===void 0||a.includes(u.getId())),o=t.getSteps(),l=u=>i.find(c=>c.getRawProperty().name===u.aspectName);s.forEach(u=>{const c=new Set,h=u.getRaw().globalPropertyAspectConfigurations;h!==void 0&&(h.forEach(f=>c.add(JSON.stringify(f))),o.forEach(f=>{const d=f.getRaw().globalPropertyAspectConfigurations;d!==void 0&&d.forEach(g=>{const v=l(g),y=c.has(JSON.stringify(g));if(y&&v?.getType()==="Option"){const A=f.getCurrentVariant();if(!A)return;u.selectVariant(A),c.delete(JSON.stringify(g))}else if(y&&v?.getType()==="Text"){const A=f.getText();u.setText(A),c.delete(JSON.stringify(g))}})}))})}getStepByName(e){const t=this.getWorkflow()?.steps.find(n=>n.stepTitle===e);if(!(!t||!this.stepHasHandle(t)))return Op.get(this.getWorkflowManager(),t)}getStepsByType(e){return this.getWorkflow()?.steps.filter(t=>t.type===e).map(t=>Op.get(this.getWorkflowManager(),t))||[]}getStepsByScene(e){const t=this.getWorkflow();if(!t?.stepGroups.find(i=>i.name===e.name))throw new Error("Given scene is not present on workflow! Be careful when persisting scenes that you only use them with the relevant workflow.");return e.stepIds.map(i=>t.steps.find(a=>a.stepName===i)).filter(i=>!!i&&this.stepHasHandle(i)).map(i=>Op.get(this.getWorkflowManager(),i))}async attachCustomerDetails(e){return this.assignCustomerDetails({emailAddress:e.email})}async assignCustomerDetails(e){const n=(await this.graphQlClient().mutate({mutation:E9,variables:{id:this.getTransaction().id,details:e,type:"Owner"}})).data?.transactionAddStakeholder?.stakeholders?.find(i=>i.customer?.emailAddress===e.emailAddress);if(n?.customer){this.getWorkflowManager().setTransactionCustomer(n.customer);const i=xr.getMap("transactionCustomerIds")||new Map;i.set(this.getTransaction().id,n.customer.id),xr.setMap("transactionCustomerIds",i)}}attachRenderableSceneListener(e){this.renderableSceneCallbacks.push(e),e(this.renderableScenes)}detachRenderableSceneListener(e){this.renderableSceneCallbacks=this.renderableSceneCallbacks.filter(t=>t!==e)}async save(e){const t=this.getProduct(),n=this.getWorkflow(),i=this.getCommandContext().getState();if(!t)throw new nn("Product undefined!");if(!n)throw new nn("Workflow undefined!");if(!i)throw new nn("State undefined!");const s={title:await(async()=>{if(e)return e;const o=this.getTransaction().id,u=(await Zp.getSavedDesigns()).find(c=>c.transactionId===o)?.title;return u||"My design"})(),thumbnail:await this.createPreviewImage(!1,256),transactionId:this.getTransaction().id,productId:t.id,integrationProductId:this.getTransaction().integrationProduct.id,workflowName:n.name,workflowId:n.id,lastEdited:new Date};return await Zp.addDesign(s),s}async copy(){const e=vo(this.getCommandContext().getState());if(!e)throw new nn("Internal state is undefined! Cannot copy experience!");const t=JSON.stringify(e.transaction),n=this.getWorkflow();if(!n)throw new nn("Workflow is undefined! Cannot copy experience!");const i=this.getTransaction().integrationProduct?.id;if(!i)throw new nn("Integration product id is undefined!");return await this.getClient().getWorkflowExperience({type:"integration",integrationProductId:i,workflowId:n.id,workflowState:t})}async onDesignFinished(e=!0){const t=this.getTransaction(),n=this.getProduct(),i=this.getWorkflow();if(!n)throw new nn("Product undefined! Cannot finish an experience without a product.");if(!i)throw new nn("Workflow undefined! Cannot finish an experience without a workflow.");if(t.isOrdered)return{event:"",exportedData:{},lineItemImageUrl:"",optionsCost:0,transactionId:t.id,workflowViewerLink:"",workflowViewerReadOnlyLink:""};const a=await yI([{workflowManager:this.workflowManager,workflow:i,layouts:this.workflowManager.getLayouts(),getReducerState:()=>this.workflowManager.getCommandContext().getState(),product:n,transaction:t,workflowSelections:this.workflowManager.getWorkflowSelections(),workflowMetadata:this.workflowManager.getWorkflowMetadata(),designName:i.name}],s=>e?this.createPreviewImage(s,1024):Promise.resolve(void 0));return t.completed&&await this.graphQlClient().mutate({mutation:R3,variables:{transactionId:t.id}}),a[0]}stepHasHandle(e){return e.type!==Je.SilentIllustration&&e.type!==Je.ProductOverlay}async getExportedStepData(){const e=this.getWorkflow(),t=this.getWorkflowManager().getWorkflowMetadata(),n=this.getWorkflowManager().getWorkflowSelections(),i=[];for(const a of e?.steps||[]){const s=a.stepName,o=t[s],l=n[s]?.selections[0],u={stepId:s,title:a.stepTitle,properties:[]};if(l&&await I9(a,n)&&u.properties.push({type:"selection",value:l.name,priceModifier:l.priceModifier}),!o){i.push(u);continue}switch(a.type){case Je.Frame:{const c=a.data,h=o;h.image&&c.displayImageOnFinishStep&&u.properties.push({type:"image",value:h.image,priceModifier:0})}break;case Je.Illustration:{const c=a.data,h=o;if(h&&h.colors&&h.colors.length>0&&c.displayColorsOnFinishStep){const f=h.colors.join(", ").toUpperCase();u.properties.push({type:"color",value:f,priceModifier:0})}}break;case Je.Module:{const c=a.data,h=o;h&&h.text&&c.displayTextOnFinishStep&&u.properties.push({type:"text",value:h.text,priceModifier:0})}break;case Je.Text:{const c=a.data,h=o;h&&h.text&&c.displayTextOnFinishStep&&u.properties.push({type:"text",value:h.text,priceModifier:0}),h&&h.color&&c.displayColorOnFinishStep&&u.properties.push({type:"color",value:h.color,priceModifier:0})}}i.push(u)}return i.filter(a=>a.properties&&a.properties.length>0)}getQuantity(){return this.getTransaction().quantity||1}async setQuantity(e){if(e<1)throw new RangeError("WorkflowExperience quantity must be greater than zero.");if(this.isReadOnly)throw new Error("Cannot update quantity on a read-only WorkflowExperience");this.getTransaction().quantity=e,this.callEvent("QuantityChanged"),this.checkForPriceBreakChanges();const t=this.getTransaction();await this.graphQlClient().mutate({mutation:x3,variables:{id:t.id,quantity:e}})}addEventListener(e,t){const n=this.eventCallbacks.get(e)||[];n.push(t),this.eventCallbacks.set(e,n)}removeEventListener(e,t){const n=this.eventCallbacks.get(e)||[];this.eventCallbacks.set(e,n.filter(i=>i!==t))}callEvent(e){(this.eventCallbacks.get(e)||[]).forEach(t=>t(this))}}const T9=r=>{if([Je.Question,Je.Frame,Je.Illustration,Je.Material,Je.Model,Je.Picture,Je.Shape,Je.Text].includes(r.type)){const t=r.data;return!!t.displaySelectionOnFinishStep||!!t.displaySelectionsOnFinishStep}return!1},I9=async(r,e)=>{if(!T9(r))return!1;const t=await ft.getOptionForStep(r);if(t&&(t.variants||[]).length>1){const n=e[r.stepName];return!!(n&&n.selections.length>0)}return!1};class D9{constructor(e){this.handleCache={},this.bundle=e}async getHandle(e){if(this.handleCache[e.name])return this.handleCache[e.name];const t=await this.createHandle(e);return this.handleCache[e.name]=t,t}async getHandles(){if(!this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration)return[];await this.bundle.getGlobalPropertyStateManager().getInitializationPromise();const e=this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration;return e?Promise.all(e.aspects.map(t=>this.getHandle(t))):[]}applyConditionsFromState(e,t){return t?e.filter(n=>this.aspectConditionsSatisfied(n.getRawProperty(),t)):e}aspectConditionsSatisfied(e,t){return!e.conditions||e.conditions.length===0?!0:(e.conditionMode===Pk.AND?Array.prototype.every.bind(e.conditions):Array.prototype.some.bind(e.conditions))(i=>{const a=t.aspects.find(s=>s.name===i.targetAspectName);return a?i.requiredVariantSelections.some(s=>s===a.value):!1})}async createHandle(e){switch(e.type){case zn.FileUpload:return new wI(this.bundle,e).initialize();case zn.ColorOption:return new lA(this.bundle,e,e.entityId?await ft.getOption(e.entityId):void 0);case zn.Option:{const t=e.entityId?await ft.getOption(e.entityId):void 0;return t?.type==="Color"?new lA(this.bundle,e,t):new F1(this.bundle,e,t)}case zn.Text:return new CI(this.bundle,e);default:throw new Error("Unhandled Global Property Aspect Type")}}}class rm{constructor(e,t){this.bundle=e,this.property=t}getName(){return this.property.name}getTitle(){return this.property.title}getDescription(){return this.property.description}getType(){return this.property.type}getRawProperty(){return this.property}isMandatory(){return!!this.property.mandatory}isMandatoryFulfilled(){return!this.property.mandatory||!!this.bundle.getGlobalPropertyStateManager().getAspectMandatoryFulfilled(this.property.name)}isSilent(){return!!this.property.silent||this.bundle.getGlobalPropertyStateManager().getAspectHidden(this.property.name)}async getSharedSteps(e){const t=e??this.bundle.getWorkflowExperiences();return(await Promise.all(t.map(a=>a.getStepsConditionallyActive()))).map(a=>a.filter(s=>s.getOverrideGlobalPropertyConfiguration(this.property.type)?!1:s.getRaw().globalPropertyAspectConfigurations?.some(o=>o.globalPropertyConfigurationId===this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration?.id&&o.aspectName===this.property.name))).flat()}getStateValue(){return this.bundle.getGlobalPropertyStateManager().getAspect(this.property.name)}}class wI extends rm{constructor(e,t){super(e,t)}async initialize(){return this.property.data?.fileUpload?.colorOptionId&&(this.colorOption=await ft.getOption(this.property.data?.fileUpload?.colorOptionId)),await this.loadImageData(),this}async loadImageData(){const e=await this.getImage();if(e?.fileLink)if(e?.fileLink.endsWith(".svg")){const t=await ia(e?.fileLink),n=await m1(e?.fileLink),i=n.width,a=n.height,s=await Oa(t);this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.colors?.forEach(u=>{s.colors[u.key]={browserValue:u.browserValue,pmsValue:u.pmsValue}});const l={src:e?.fileLink,width:i,height:a,aspect:i/a,svg:s.svg,colors:s.colors};Bs.set(e?.fileLink,l),this.imageData=l}else this.imageData=void 0}async selectImage(e){const t=this.bundle.getGlobalPropertyStateManager();await Promise.all([t.setAspect(this.property.name,e.key,{...t.getAspectStorage(this.property.name)||{},originalAssetKey:e.key,backgroundRemovedAssetKey:void 0,vectorizedAssetKey:void 0,useOriginalAsset:void 0},void 0),this.applyImageSelection(e),this.loadImageData()])}async canUseAdvancedImageManipulation(){return this.bundle.getClient().canUseAddon(Ng.AdvancedImageManipulation)}async removeBackgroundFromImage(e=!0){if(!await this.canUseAdvancedImageManipulation())throw new Error("The current Integration does not have access to the Advanced Image Manipulation addon. Please call canUseAdvancedImageManipulation to ensure you disable this feature when appropriate.");const t=await this.getOriginalImage();if(!t)throw new Error("You must supply an image selection before attempting to remove the background.");const n=this.bundle.getGlobalPropertyStateManager(),i=await Qn.removeBackgroundFromAsset(t),s={...n.getAspectStorage(this.property.name),backgroundRemovedAssetKey:i.key,useOriginalAsset:!e},l=[e?n.setAspect(this.property.name,i.key,s):n.setAspectStorage(this.property.name,s)];return e&&(l.push(this.applyImageSelection(i,void 0,!1,!1)),l.push(this.loadImageData())),await Promise.all(l),this.updateSharedStepStorage(s),i}async vectorizeImage(e=!0){if(!await this.canUseAdvancedImageManipulation())throw new Error("The current Integration does not have access to the Advanced Image Manipulation addon. Please call canUseAdvancedImageManipulation to ensure you disable this feature when appropriate.");const t=await this.getOriginalImage();if(!t)throw new Error("You must supply an image selection before attempting to vectorize the image.");const n=this.bundle.getGlobalPropertyStateManager(),i=await Qn.vectorizeAsset(t),s={...n.getAspectStorage(this.property.name),vectorizedAssetKey:i.key,useOriginalAsset:!e},l=[e?n.setAspect(this.property.name,i.key,s):n.setAspectStorage(this.property.name,s)];return e&&(l.push(this.applyImageSelection(i,void 0,!1,!1)),l.push(this.loadImageData())),await Promise.all(l),this.updateSharedStepStorage(s),i}hasImage(){return!!this.getStateValue()}async getImage(){const e=this.getStateValue();if(e)return Qn.getLocalOrFromServer(e)}async getImageWithColors(){return await this.loadImageData(),this.imageData?.svg?Hg(Gg(this.imageData.svg,this.imageData.colors??{},!1)):this.imageData?.src}async getOriginalImage(){const e=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);if(e?.originalAssetKey)return Qn.getLocalOrFromServer(e.originalAssetKey)}async getBackgroundRemovedImage(){const e=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);if(e?.backgroundRemovedAssetKey)return Qn.getLocalOrFromServer(e.backgroundRemovedAssetKey)}getUseOriginalImage(){return this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.useOriginalAsset??!1}async setUseOriginalImage(e){const t=await this.getOriginalImage();if(!t)throw new Error("You must select an image before calling setUseOriginalImage");const n=this.bundle.getGlobalPropertyStateManager(),i=n.getAspectStorage(this.property.name);if(i?.useOriginalAsset===e)return;const a={...i,useOriginalAsset:e},s=e?i?.originalAssetKey:i?.backgroundRemovedAssetKey,o=[n.setAspect(this.property.name,s||"",a)];if(e)o.push(this.applyImageSelection(t,void 0,!1,!1));else{const l=async()=>{const u=await this.getBackgroundRemovedImage();if(!u)throw new Error("You must call removeBackgroundFromImage before attempting to use that version of the image.");this.applyImageSelection(u,void 0,!1,!1)};o.push(l())}o.push(this.loadImageData()),await Promise.all(o),this.updateSharedStepStorage(a)}async applyGlobalState(e){const t=this.getStateValue();if(!t)return;const n=await Qn.getLocalOrFromServer(t);if(!n)return;await this.applyImageSelection(n,e,!1,!0);const i=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);if(i){if(this.updateSharedStepStorage({...i}),i.colors){const a=new Map(i.colors.map(s=>[s.key,{browserValue:s.browserValue,pmsValue:s.pmsValue}])??[]);await Promise.all((await this.getSharedSteps(e)).map(async s=>{await s.changeColors(a)}))}}else this.updateSharedStepStorage({originalAssetKey:t}),await this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name,{originalAssetKey:t})}getAvailableColors(){return this.property.data?.fileUpload?.colorPickerEnabled?this.colorOption?.variants?.map(e=>({fill:e.color,stroke:e.color,variant:e,pmsValue:e.name}))??[]:[]}getCurrentColors(){return this.imageData?.colors}isColorPickerEnabled(){return this.property.data?.fileUpload?.colorPickerEnabled??!1}isPmsPickerEnabled(){return this.property.data?.fileUpload?.pmsPickerEnabled??!1}async getOriginalColors(){return this.imageData?.svg?(await Oa(this.imageData.svg)).colors:void 0}async changeColors(e){if(!this.imageData?.svg)return;const t=this.getSharedSteps(),n=new Map(Object.entries(e));await Promise.all((await t).map(async a=>{await a.changeColors(n)}));const i=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name);await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name,{...i,colors:Object.entries(e).map(([a,s])=>({key:a,browserValue:s.browserValue,pmsValue:s.pmsValue}))}),await this.loadImageData()])}async applyImageSelection(e,t,n=!0,i=!0){const s=(await this.getSharedSteps(t)).map(o=>{const l=o;if(l.getFrameService())return l.selectImage(e,n,i)});await Promise.all(s)}updateSharedStepStorage(e){this.bundle.getWorkflowExperiences().forEach(n=>n.getSteps().forEach(i=>{if(i.getOverrideGlobalPropertyConfiguration(this.property.type))return;i.getRaw().globalPropertyAspectConfigurations?.some(s=>s.globalPropertyConfigurationId===this.bundle.getProductCollection()?.getResource().globalPropertyConfiguration?.id&&s.aspectName===this.property.name)&&n.getWorkflowManager().updateStorage(i.getId(),{framePatternData:{originalAssetKey:e.originalAssetKey,backgroundRemovedAssetKey:e.backgroundRemovedAssetKey,useOriginalAsset:e.useOriginalAsset}})}))}}class CI extends rm{constructor(e,t){super(e,t)}isTemplatingEnabled(){return this.property.data?.text?.templatingEnabled||!1}getText(){const e=this.getStateValue();return e||""}async setText(e){await Promise.all([this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,e,void 0,void 0),this.applyTextSelection(e)])}async applyGlobalState(e){const t=this.getStateValue();if(!t)return Promise.resolve();await this.applyTextSelection(t,e)}async applyTextSelection(e,t){const i=(await this.getSharedSteps(t)).map(a=>{a.setText(e)});await Promise.all(i)}}class F1 extends rm{constructor(e,t,n){super(e,t),this.optionResource=n}async ensureOptionLoaded(){if(this.optionResource?.variants)return this.optionResource;if(!this.property.entityId)return this.optionResource;const e=await ft.getOption(this.property.entityId);return e&&(this.optionResource=e),this.optionResource}async initDefaultVariant(){await this.ensureOptionLoaded();const e=this.optionResource?.variants?.find(t=>t.id===this.optionResource?.defaultVariant?.id);e&&await this.selectVariant(new Da(e))}getCurrentVariant(){if(!this.optionResource)return;const e=this.getStateValue();if(e){const t=this.optionResource.variants?.find(n=>n.id===e);return t?new Da(t):void 0}else{const t=this.optionResource.variants?.find(n=>n.id===this.optionResource?.defaultVariant?.id);return t?new Da(t):void 0}}async getAvailableVariants(){return await this.ensureOptionLoaded(),(this.optionResource?.variants?.filter(t=>t.enabled)||[]).map(t=>new Da(t))}async getAllVariants(){return await this.ensureOptionLoaded(),(this.optionResource?.variants||[]).map(t=>new Da(t))}async selectVariant(e,t){await this.applyVariantSelection(e),await this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,e.getId(),void 0,t)}async applyGlobalState(e){const t=this.getStateValue();if(!t)return;await this.ensureOptionLoaded();const n=this.optionResource?.variants?.find(i=>i.id===t);if(n)return this.applyVariantSelection(new Da(n),e)}async applyVariantSelection(e,t){const i=(await this.getSharedSteps(t)).map(a=>a.selectVariant(e));await Promise.all(i)}}class lA extends F1{constructor(e,t,n){super(e,t,n)}async selectVariant(e,t){await this.bundle.getGlobalPropertyStateManager().setAspect(this.property.name,e.getId(),void 0,t),await this.applyColorVariant(e,void 0,t)}async applyGlobalState(e){const t=this.getStateValue();if(!t)return;await this.ensureOptionLoaded();const n=this.optionResource?.variants?.find(a=>a.id===t);if(!n)return;await this.applyColorVariant(new Da(n),e);const i=this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.customColor;i&&await this.setCustomColor(i)}async applyColorVariant(e,t,n){const a=(await this.getSharedSteps(t)).map(s=>{switch(s.getType()){case Je.Shape:return s.selectVariant(e);case Je.Text:return s.setFillColor({fill:e.getColor(),stroke:e.getColor(),variant:e.getResource()});case Je.Illustration:return s.setColor(n?.toString()||"",e.getColor()||"")}});await Promise.all(a)}async setCustomColor(e){const t=this.getCurrentVariant()?.getColor();t&&t.toLowerCase()==="#custom"&&(await this.getSharedSteps()).forEach(i=>i.setCustomColor(e)),this.bundle.getGlobalPropertyStateManager().setAspectStorage(this.property.name,{customColor:e})}getCustomColor(){return this.bundle.getGlobalPropertyStateManager().getAspectStorage(this.property.name)?.customColor||this.getCurrentVariant()?.getColor()||"#ffffff"}}const P9=(r,e,t)=>{const n=r.getWorkflowExperiences(),i=r.getGlobalPropertyConfiguration();return i?n.flatMap(s=>s.getSteps()).filter(s=>s.getGlobalPropertyAspects(i.id).includes(e)&&s.getType()===t):[]},xI=(r,e)=>{const n=P9(r,e,Je.Illustration).map(i=>{if(!i.getCurrentVariant()?.getAssetResource()?.assetConfiguration)return 0;const s=i.getColors();return s?Object.getOwnPropertyNames(s).length:0});return Math.max(...n)};var qf={exports:{}};qf.exports;var yE;function R9(){return yE||(yE=1,(function(r,e){var t=200,n="Expected a function",i="__lodash_hash_undefined__",a=500,s=1,o=2,l=4,u=800,c=16,h=9007199254740991,f="[object Arguments]",d="[object Array]",g="[object AsyncFunction]",v="[object Boolean]",y="[object Date]",A="[object Error]",C="[object Function]",k="[object GeneratorFunction]",T="[object Map]",S="[object Number]",R="[object Null]",B="[object Object]",G="[object Promise]",$="[object Proxy]",Y="[object RegExp]",X="[object Set]",J="[object String]",Q="[object Symbol]",oe="[object Undefined]",se="[object WeakMap]",he="[object ArrayBuffer]",ye="[object DataView]",Ue="[object Float32Array]",Oe="[object Float64Array]",Te="[object Int8Array]",K="[object Int16Array]",ie="[object Int32Array]",de="[object Uint8Array]",Be="[object Uint8ClampedArray]",Ee="[object Uint16Array]",ze="[object Uint32Array]",je=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,qe=/^\w*$/,Ge=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bt=/[\\^$.*+?()[\]{}|]/g,rr=/\\(\\)?/g,Pr=/\w*$/,$t=/^\[object .+?Constructor\]$/,ar=/^(?:0|[1-9]\d*)$/,St={};St[Ue]=St[Oe]=St[Te]=St[K]=St[ie]=St[de]=St[Be]=St[Ee]=St[ze]=!0,St[f]=St[d]=St[he]=St[v]=St[ye]=St[y]=St[A]=St[C]=St[T]=St[S]=St[B]=St[Y]=St[X]=St[J]=St[se]=!1;var st={};st[f]=st[d]=st[he]=st[ye]=st[v]=st[y]=st[Ue]=st[Oe]=st[Te]=st[K]=st[ie]=st[T]=st[S]=st[B]=st[Y]=st[X]=st[J]=st[Q]=st[de]=st[Be]=st[Ee]=st[ze]=!0,st[A]=st[C]=st[se]=!1;var Qr=typeof di=="object"&&di&&di.Object===Object&&di,Sr=typeof self=="object"&&self&&self.Object===Object&&self,gr=Qr||Sr||Function("return this")(),nr=e&&!e.nodeType&&e,fr=nr&&!0&&r&&!r.nodeType&&r,Yt=fr&&fr.exports===nr,Xt=Yt&&Qr.process,mt=(function(){try{var L=fr&&fr.require&&fr.require("util").types;return L||Xt&&Xt.binding&&Xt.binding("util")}catch{}})(),wr=mt&&mt.isMap,an=mt&&mt.isSet,_r=mt&&mt.isTypedArray;function ir(L,re,le){switch(le.length){case 0:return L.call(re);case 1:return L.call(re,le[0]);case 2:return L.call(re,le[0],le[1]);case 3:return L.call(re,le[0],le[1],le[2])}return L.apply(re,le)}function Yr(L,re){for(var le=-1,Ve=L==null?0:L.length;++le<Ve&&re(L[le],le,L)!==!1;);return L}function kr(L,re){for(var le=-1,Ve=L==null?0:L.length,pt=0,_t=[];++le<Ve;){var Wr=L[le];re(Wr,le,L)&&(_t[pt++]=Wr)}return _t}function Zr(L,re){for(var le=-1,Ve=L==null?0:L.length,pt=Array(Ve);++le<Ve;)pt[le]=re(L[le],le,L);return pt}function Vr(L,re){for(var le=-1,Ve=re.length,pt=L.length;++le<Ve;)L[pt+le]=re[le];return L}function pn(L,re){for(var le=-1,Ve=Array(L);++le<L;)Ve[le]=re(le);return Ve}function gn(L){return function(re){return L(re)}}function Fr(L,re){return L?.[re]}function zr(L,re){return function(le){return L(re(le))}}var en=Array.prototype,Hr=Function.prototype,zt=Object.prototype,sr=gr["__core-js_shared__"],Er=Hr.toString,tt=zt.hasOwnProperty,Nr=(function(){var L=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return L?"Symbol(src)_1."+L:""})(),Xr=zt.toString,Se=Er.call(Object),P=RegExp("^"+Er.call(tt).replace(bt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=Yt?gr.Buffer:void 0,Z=gr.Symbol,ue=gr.Uint8Array;U&&U.allocUnsafe;var Ie=zr(Object.getPrototypeOf,Object),We=zt.propertyIsEnumerable,wt=en.splice,It=Z?Z.isConcatSpreadable:void 0,Nt=Z?Z.toStringTag:void 0,or=(function(){try{var L=Ut(Object,"defineProperty");return L({},"",{}),L}catch{}})(),Lt=Object.getOwnPropertySymbols,ee=U?U.isBuffer:void 0,De=Math.max,Qe=Date.now,Ye=Ut(gr,"DataView"),Ct=Ut(gr,"Map"),dt=Ut(gr,"Promise"),Dt=Ut(gr,"Set"),Et=Ut(gr,"WeakMap"),hr=Ut(Object,"create"),er=pi(Ye),dr=pi(Ct),Ht=pi(dt),On=pi(Dt),Tn=pi(Et),mr=Z?Z.prototype:void 0,Cr=mr?mr.valueOf:void 0,bn=mr?mr.toString:void 0;function Rr(L){var re=-1,le=L==null?0:L.length;for(this.clear();++re<le;){var Ve=L[re];this.set(Ve[0],Ve[1])}}function jn(){this.__data__=hr?hr(null):{},this.size=0}function wn(L){var re=this.has(L)&&delete this.__data__[L];return this.size-=re?1:0,re}function jr(L){var re=this.__data__;if(hr){var le=re[L];return le===i?void 0:le}return tt.call(re,L)?re[L]:void 0}function Cn(L){var re=this.__data__;return hr?re[L]!==void 0:tt.call(re,L)}function cn(L,re){var le=this.__data__;return this.size+=this.has(L)?0:1,le[L]=hr&&re===void 0?i:re,this}Rr.prototype.clear=jn,Rr.prototype.delete=wn,Rr.prototype.get=jr,Rr.prototype.has=Cn,Rr.prototype.set=cn;function tn(L){var re=-1,le=L==null?0:L.length;for(this.clear();++re<le;){var Ve=L[re];this.set(Ve[0],Ve[1])}}function Jn(){this.__data__=[],this.size=0}function si(L){var re=this.__data__,le=Jt(re,L);if(le<0)return!1;var Ve=re.length-1;return le==Ve?re.pop():wt.call(re,le,1),--this.size,!0}function xn(L){var re=this.__data__,le=Jt(re,L);return le<0?void 0:re[le][1]}function mn(L){return Jt(this.__data__,L)>-1}function sn(L,re){var le=this.__data__,Ve=Jt(le,L);return Ve<0?(++this.size,le.push([L,re])):le[Ve][1]=re,this}tn.prototype.clear=Jn,tn.prototype.delete=si,tn.prototype.get=xn,tn.prototype.has=mn,tn.prototype.set=sn;function rn(L){var re=-1,le=L==null?0:L.length;for(this.clear();++re<le;){var Ve=L[re];this.set(Ve[0],Ve[1])}}function Lr(){this.size=0,this.__data__={hash:new Rr,map:new(Ct||tn),string:new Rr}}function on(L){var re=jt(this,L).delete(L);return this.size-=re?1:0,re}function E(L){return jt(this,L).get(L)}function O(L){return jt(this,L).has(L)}function z(L,re){var le=jt(this,L),Ve=le.size;return le.set(L,re),this.size+=le.size==Ve?0:1,this}rn.prototype.clear=Lr,rn.prototype.delete=on,rn.prototype.get=E,rn.prototype.has=O,rn.prototype.set=z;function q(L){var re=this.__data__=new tn(L);this.size=re.size}function pe(){this.__data__=new tn,this.size=0}function ce(L){var re=this.__data__,le=re.delete(L);return this.size=re.size,le}function xe(L){return this.__data__.get(L)}function _e(L){return this.__data__.has(L)}function rt(L,re){var le=this.__data__;if(le instanceof tn){var Ve=le.__data__;if(!Ct||Ve.length<t-1)return Ve.push([L,re]),this.size=++le.size,this;le=this.__data__=new rn(Ve)}return le.set(L,re),this.size=le.size,this}q.prototype.clear=pe,q.prototype.delete=ce,q.prototype.get=xe,q.prototype.has=_e,q.prototype.set=rt;function lt(L,re){var le=ki(L),Ve=!le&&us(L),pt=!le&&!Ve&&cs(L),_t=!le&&!Ve&&!pt&&Ae(L),Wr=le||Ve||pt||_t,Vn=Wr?pn(L.length,String):[],oi=Vn.length;for(var Hi in L)Wr&&(Hi=="length"||pt&&(Hi=="offset"||Hi=="parent")||_t&&(Hi=="buffer"||Hi=="byteLength"||Hi=="byteOffset")||Xe(Hi,oi))||Vn.push(Hi);return Vn}function nt(L,re,le){var Ve=L[re];(!(tt.call(L,re)&&ls(Ve,le))||le===void 0&&!(re in L))&&vr(L,re,le)}function Jt(L,re){for(var le=L.length;le--;)if(ls(L[le][0],re))return le;return-1}function vr(L,re,le){re=="__proto__"&&or?or(L,re,{configurable:!0,enumerable:!0,value:le,writable:!0}):L[re]=le}function Gr(L,re,le,Ve,pt,_t){var Wr;if(le&&(Wr=pt?le(L,Ve,pt,_t):le(L)),Wr!==void 0)return Wr;if(!fa(L))return L;var Vn=ki(L);if(Vn)Wr=be(L);else{var oi=fe(L),Hi=oi==C||oi==k;if(cs(L))return Zn(L);if(oi==B||oi==f||Hi&&!pt)Wr={};else{if(!st[oi])return pt?L:{};Wr=Me(L,oi)}}_t||(_t=new q);var Ul=_t.get(L);if(Ul)return Ul;_t.set(L,Wr),V(L)?L.forEach(function(da){Wr.add(Gr(da,re,le,da,L,_t))}):F(L)&&L.forEach(function(da,Aa){Wr.set(Aa,Gr(da,re,le,Aa,L,_t))});var Vl=ot,_o=Vn?void 0:Vl(L);return Yr(_o||L,function(da,Aa){_o&&(Aa=da,da=L[Aa]),nt(Wr,Aa,Gr(da,re,le,Aa,L,_t))}),Wr}function fn(L,re,le,Ve,pt){var _t=-1,Wr=L.length;for(le||(le=Ke),pt||(pt=[]);++_t<Wr;){var Vn=L[_t];le(Vn)?Vr(pt,Vn):pt[pt.length]=Vn}return pt}function Kn(L,re){re=Sn(re,L);for(var le=0,Ve=re.length;L!=null&&le<Ve;)L=L[Ki(re[le++])];return le&&le==Ve?L:void 0}function Ln(L,re,le){var Ve=re(L);return ki(L)?Ve:Vr(Ve,le(L))}function vn(L){return L==null?L===void 0?oe:R:Nt&&Nt in Object(L)?Br(L):$r(L)}function Or(L){return zi(L)&&vn(L)==f}function Gn(L){return zi(L)&&fe(L)==T}function Bn(L){if(!fa(L)||pr(L))return!1;var re=fs(L)?P:$t;return re.test(pi(L))}function Mn(L){return zi(L)&&fe(L)==X}function Oi(L){return zi(L)&&ds(L.length)&&!!St[vn(L)]}function bi(L){if(!fa(L))return Tr(L);var re=yr(L),le=[];for(var Ve in L)Ve=="constructor"&&(re||!tt.call(L,Ve))||le.push(Ve);return le}var wi=or?function(L,re){return or(L,"toString",{configurable:!0,enumerable:!1,value:Rt(re),writable:!0})}:Kt;function _n(L,re,le){var Ve=-1,pt=L.length;re<0&&(re=-re>pt?0:pt+re),le=le>pt?pt:le,le<0&&(le+=pt),pt=re>le?0:le-re>>>0,re>>>=0;for(var _t=Array(pt);++Ve<pt;)_t[Ve]=L[Ve+re];return _t}function Ei(L){if(typeof L=="string")return L;if(ki(L))return Zr(L,Ei)+"";if(W(L))return bn?bn.call(L):"";var re=L+"";return re=="0"&&1/L==-1/0?"-0":re}function Un(L,re){re=Sn(re,L);var le=-1,Ve=re.length;if(!Ve)return!0;for(;++le<Ve;){var pt=Ki(re[le]);if(pt==="__proto__"&&!tt.call(L,"__proto__")||(pt==="constructor"||pt==="prototype")&&le<Ve-1)return!1}var _t=Xi(L,re);return _t==null||delete _t[Ki(Ha(re))]}function Sn(L,re){return ki(L)?L:yt(L,re)?[L]:$n(ve(L))}function Zn(L,re){return L.slice()}function lr(L){var re=new L.constructor(L.byteLength);return new ue(re).set(new ue(L)),re}function In(L,re){var le=lr(L.buffer);return new L.constructor(le,L.byteOffset,L.byteLength)}function Ci(L){var re=new L.constructor(L.source,Pr.exec(L));return re.lastIndex=L.lastIndex,re}function I(L){return Cr?Object(Cr.call(L)):{}}function H(L,re){var le=lr(L.buffer);return new L.constructor(le,L.byteOffset,L.length)}function ae(L,re,le,Ve){var pt=!le;le||(le={});for(var _t=-1,Wr=re.length;++_t<Wr;){var Vn=re[_t],oi=void 0;oi===void 0&&(oi=L[Vn]),pt?vr(le,Vn,oi):nt(le,Vn,oi)}return le}function Ce(L){return _(L)?void 0:L}function ht(L){return ua(yn(L,void 0,za),L+"")}function ot(L){return Ln(L,Fe,te)}function jt(L,re){var le=L.__data__;return Pt(re)?le[typeof re=="string"?"string":"hash"]:le.map}function Ut(L,re){var le=Fr(L,re);return Bn(le)?le:void 0}function Br(L){var re=tt.call(L,Nt),le=L[Nt];try{L[Nt]=void 0;var Ve=!0}catch{}var pt=Xr.call(L);return Ve&&(re?L[Nt]=le:delete L[Nt]),pt}var M=Lt?function(L){return L==null?[]:(L=Object(L),kr(Lt(L),function(re){return We.call(L,re)}))}:qt,te=Lt?function(L){for(var re=[];L;)Vr(re,M(L)),L=Ie(L);return re}:qt,fe=vn;(Ye&&fe(new Ye(new ArrayBuffer(1)))!=ye||Ct&&fe(new Ct)!=T||dt&&fe(dt.resolve())!=G||Dt&&fe(new Dt)!=X||Et&&fe(new Et)!=se)&&(fe=function(L){var re=vn(L),le=re==B?L.constructor:void 0,Ve=le?pi(le):"";if(Ve)switch(Ve){case er:return ye;case dr:return T;case Ht:return G;case On:return X;case Tn:return se}return re});function be(L){var re=L.length,le=new L.constructor(re);return re&&typeof L[0]=="string"&&tt.call(L,"index")&&(le.index=L.index,le.input=L.input),le}function Me(L,re,le){var Ve=L.constructor;switch(re){case he:return lr(L);case v:case y:return new Ve(+L);case ye:return In(L);case Ue:case Oe:case Te:case K:case ie:case de:case Be:case Ee:case ze:return H(L);case T:return new Ve;case S:case J:return new Ve(L);case Y:return Ci(L);case X:return new Ve;case Q:return I(L)}}function Ke(L){return ki(L)||us(L)||!!(It&&L&&L[It])}function Xe(L,re){var le=typeof L;return re=re??h,!!re&&(le=="number"||le!="symbol"&&ar.test(L))&&L>-1&&L%1==0&&L<re}function yt(L,re){if(ki(L))return!1;var le=typeof L;return le=="number"||le=="symbol"||le=="boolean"||L==null||W(L)?!0:qe.test(L)||!je.test(L)||re!=null&&L in Object(re)}function Pt(L){var re=typeof L;return re=="string"||re=="number"||re=="symbol"||re=="boolean"?L!=="__proto__":L===null}function pr(L){return!!Nr&&Nr in L}function yr(L){var re=L&&L.constructor,le=typeof re=="function"&&re.prototype||zt;return L===le}function ur(L){var re=ca(L,function(Ve){return le.size===a&&le.clear(),Ve}),le=re.cache;return re}function Tr(L){var re=[];if(L!=null)for(var le in Object(L))re.push(le);return re}function $r(L){return Xr.call(L)}function yn(L,re,le){return re=De(re===void 0?L.length-1:re,0),function(){for(var Ve=arguments,pt=-1,_t=De(Ve.length-re,0),Wr=Array(_t);++pt<_t;)Wr[pt]=Ve[re+pt];pt=-1;for(var Vn=Array(re+1);++pt<re;)Vn[pt]=Ve[pt];return Vn[re]=le(Wr),ir(L,this,Vn)}}function Xi(L,re){return re.length<2?L:Kn(L,_n(re,0,-1))}var ua=Ji(wi);function Ji(L){var re=0,le=0;return function(){var Ve=Qe(),pt=c-(Ve-le);if(le=Ve,pt>0){if(++re>=u)return arguments[0]}else re=0;return L.apply(void 0,arguments)}}var $n=ur(function(L){var re=[];return L.charCodeAt(0)===46&&re.push(""),L.replace(Ge,function(le,Ve,pt,_t){re.push(pt?_t.replace(rr,"$1"):Ve||le)}),re});function Ki(L){if(typeof L=="string"||W(L))return L;var re=L+"";return re=="0"&&1/L==-1/0?"-0":re}function pi(L){if(L!=null){try{return Er.call(L)}catch{}try{return L+""}catch{}}return""}function za(L){var re=L==null?0:L.length;return re?fn(L):[]}function Ha(L){var re=L==null?0:L.length;return re?L[re-1]:void 0}function ca(L,re){if(typeof L!="function"||re!=null&&typeof re!="function")throw new TypeError(n);var le=function(){var Ve=arguments,pt=re?re.apply(this,Ve):Ve[0],_t=le.cache;if(_t.has(pt))return _t.get(pt);var Wr=L.apply(this,Ve);return le.cache=_t.set(pt,Wr)||_t,Wr};return le.cache=new(ca.Cache||rn),le}ca.Cache=rn;function ls(L,re){return L===re||L!==L&&re!==re}var us=Or((function(){return arguments})())?Or:function(L){return zi(L)&&tt.call(L,"callee")&&!We.call(L,"callee")},ki=Array.isArray;function ja(L){return L!=null&&ds(L.length)&&!fs(L)}var cs=ee||qr;function fs(L){if(!fa(L))return!1;var re=vn(L);return re==C||re==k||re==g||re==$}function ds(L){return typeof L=="number"&&L>-1&&L%1==0&&L<=h}function fa(L){var re=typeof L;return L!=null&&(re=="object"||re=="function")}function zi(L){return L!=null&&typeof L=="object"}var F=wr?gn(wr):Gn;function _(L){if(!zi(L)||vn(L)!=B)return!1;var re=Ie(L);if(re===null)return!0;var le=tt.call(re,"constructor")&&re.constructor;return typeof le=="function"&&le instanceof le&&Er.call(le)==Se}var V=an?gn(an):Mn;function W(L){return typeof L=="symbol"||zi(L)&&vn(L)==Q}var Ae=_r?gn(_r):Oi;function ve(L){return L==null?"":Ei(L)}function Fe(L){return ja(L)?lt(L):bi(L)}var He=ht(function(L,re){var le={};if(L==null)return le;var Ve=!1;re=Zr(re,function(_t){return _t=Sn(_t,L),Ve||(Ve=_t.length>1),_t}),ae(L,ot(L),le),Ve&&(le=Gr(le,s|o|l,Ce));for(var pt=re.length;pt--;)Un(le,re[pt]);return le});function Rt(L){return function(){return L}}function Kt(L){return L}function qt(){return[]}function qr(){return!1}r.exports=He})(qf,qf.exports)),qf.exports}var O9=R9();const B9=zs(O9);function uA(r,e){function t(n){if(typeof n>"u"||!Array.isArray(n)&&!_9(n))return n;if(Array.isArray(n))return uA(n,e);let i={};for(const[a,s]of Object.entries(n))i[a]=M9(s)?s:uA(s,e);return B9(i,e)}return Array.isArray(r)?r.map(t):t(r)}function M9(r){return r==null}function _9(r){return typeof r=="object"&&!Array.isArray(r)&&r!==null}function SI(r){const e=new Map;return r?.aspects?.forEach(t=>{t.value!==""&&e.set(t.name,!0)}),e}class N9 extends Yg{constructor(e){super(),this.update=e}async execute(){await this.update(),await new Promise(e=>{window.setTimeout(()=>{e()},1e3)})}}function Bv(r){return uA(r,["__typename"])}class L9{constructor(e,t,n,i,a){this.stateUpdateQueue=new Xg(1),this.mandatoryFulfilledAspects=new Map,this.bundleId=e,this.bundleOwnerId=t,this.configuration=n,this.bundleOptions=a;const s=a?.existingGlobalPropertyState;this.initPromise=s?Promise.resolve(s).then(()=>{console.log("Setting global property state to existing state."),this.globalPropertyState=Bv(s),this.recalculateMandatoryStates()}):this.createGlobalPropertyState().then(o=>{console.log("Setting global property state to new state."),this.globalPropertyState=Bv(o),this.recalculateMandatoryStates()}),this.onGlobalPropertyStateChange=i}async clearAspects(e){if(!this.globalPropertyState)throw new Error("Global property state not initialized");const t=this.globalPropertyState.aspects;this.globalPropertyState.aspects=t.filter(n=>!e.includes(n.name))}recalculateMandatoryStates(){this.mandatoryFulfilledAspects=SI(this.globalPropertyState)}setBundleOptions(e){this.bundleOptions=e}getBundleOptions(){return this.bundleOptions}setConfiguration(e){this.configuration=e}getInitializationPromise(){return this.initPromise}getGlobalPropertyState(){return this.globalPropertyState}async setGlobalPropertyState(e){this.globalPropertyState||await this.initPromise;const t=vo(this.globalPropertyState);this.globalPropertyState={...Bv(e),id:t.id},this.recalculateMandatoryStates(),this.queueGlobalPropertyStateUpdate(),await this.onGlobalPropertyStateChange(t,this.globalPropertyState)}getAspectMandatoryFulfilled(e){return this.mandatoryFulfilledAspects.get(e)}getAspectHidden(e){if(!this.globalPropertyState)throw new Error("Global property state not initialized");return!!this.globalPropertyState.aspects.find(t=>t.name===e)?.hidden}getAspect(e,t){if(!this.globalPropertyState)throw new Error("Global property state not initialized");const n=this.globalPropertyState.aspects.find(i=>i.name===e&&i.channel===t);if(n)return n.value}getAspectStorage(e,t){if(!this.globalPropertyState)throw new Error("Global property state not initialized");return this.globalPropertyState.aspects.find(n=>n.name===e&&n.channel===t)?.storage}async setAspect(e,t,n,i,a){if(!this.globalPropertyState)throw new Error("Global property state not initialized");if(!this.configuration)throw new Error("Global property configuration not linked to the state manager.");const s=this.configuration.aspects.find(u=>u.name===e);if(!s)throw new Error(`Failed to find configuration aspect with name: ${e}`);this.mandatoryFulfilledAspects.set(e,t!=="");const o=vo(this.globalPropertyState),l=this.globalPropertyState.aspects.filter(u=>u.name===e);if(l.length>0)if(i){const u=l.find(c=>c.channel===i);if(u)u.value=t,u.type=s.type,u.channel=i,u.hidden=a??u.hidden,n!==void 0&&(u.storage=n!==null?n:void 0);else{let c;if(i===1){const h=this.globalPropertyState.aspects.findIndex(f=>!f.channel&&f.name===e);h&&h>0&&(c=this.globalPropertyState.aspects.splice(h,1)[0].hidden)}this.globalPropertyState.aspects.push({name:e,value:t,type:s.type,storage:n!==null?n:void 0,channel:i,hidden:a??c})}}else{const u=l[0];u.value=t,u.type=s.type,u.hidden=a??u.hidden,n!==void 0&&(u.storage=n!==null?n:void 0)}else this.globalPropertyState.aspects.push({name:e,value:t,type:s.type,storage:n!==null?n:void 0,channel:i,hidden:a});xd(o,this.globalPropertyState)||(this.queueGlobalPropertyStateUpdate(),await this.onGlobalPropertyStateChange(o,this.globalPropertyState))}async setAspectStorage(e,t,n){if(!this.globalPropertyState)throw new Error("Global property state not initialized");if(!this.configuration)throw new Error("Global property configuration not linked to the state manager.");const i=this.configuration.aspects.find(o=>o.name===e);if(!i)throw new Error(`Failed to find configuration aspect with name: ${e}`);const a=vo(this.globalPropertyState),s=this.globalPropertyState.aspects.filter(o=>o.name===e);if(s.length>0)if(n){const o=s.find(l=>l.channel===n);o&&(o.storage=t!==null?t:void 0,o.type=i.type)}else{const o=s[0];o.storage=t!==null?t:void 0,o.type=i.type}else this.globalPropertyState.aspects.push({name:e,value:"",type:i.type,storage:t!==null?t:void 0,channel:n});xd(a,this.globalPropertyState)||(this.queueGlobalPropertyStateUpdate(),await this.onGlobalPropertyStateChange(a,this.globalPropertyState))}queueGlobalPropertyStateUpdate(){this.stateUpdateQueue.enqueue(new N9(async()=>{await this.updateGlobalPropertyState()}))}async updateGlobalPropertyState(){if(!this.globalPropertyState)throw new Error("Global property state not initialized");if(!(await $e.getShadowGraphqlClient().mutate({mutation:DU,variables:{id:this.globalPropertyState.id,aspects:this.globalPropertyState.aspects.map(t=>{let n=t.type&&t.storage?{}:void 0;if(n)switch(t.type){case zn.FileUpload:{n.fileUpload=t.storage;break}case zn.ColorOption:case zn.Option:{n.option=t.storage;break}}return{name:t.name,value:t.value,type:t.type,storage:n,channel:t.channel,hidden:t.hidden}})},context:{headers:{bundleOwnerId:this.bundleOwnerId,...this.bundleOptions?.additionalHeaders}}})).data?.globalPropertyStateUpdate)throw new Error("Unable to update global property state")}async createGlobalPropertyState(){const e=await $e.getShadowGraphqlClient().mutate({mutation:IU,variables:{bundleId:this.bundleId},context:{headers:{bundleOwnerId:this.bundleOwnerId,...this.bundleOptions?.additionalHeaders}}});if(e.data?.globalPropertyStateCreate&&e.data.globalPropertyStateCreate.id)return e.data.globalPropertyStateCreate;throw new Error(`Unable to create global property state for bundle: ${this.bundleId}`)}}class U9{constructor(e){this.setState(e||'{"transactions": []}')}setState(e){e&&(this.state=JSON.parse(e))}getState(){return this.state}removeStateForTransaction(e){if(!this.state||!this.state.transactions)return;const t=this.state.transactions.findIndex(n=>n.transactionId===e);t!==-1&&this.state.transactions.splice(t,1)}getSerializedState(){if(this.state)return this.deleteFieldNameFromObjectRecursive(this.state,"__typename"),JSON.stringify(this.state)}deleteFieldNameFromObjectRecursive(e,t){if(!(typeof e!="object"||e===null))for(const n in e)n===t?delete e[n]:this.deleteFieldNameFromObjectRecursive(e[n],t)}}const V9=ke`
2504
2510
  query GetManyMetafields($entityIds: [String!]!) {
2505
2511
  metafieldsMany(entityIds: $entityIds) {
2506
2512
  id
@@ -2512,14 +2518,14 @@ Minimum version required to store current data is: `+X+`.
2512
2518
  }
2513
2519
  }
2514
2520
  }
2515
- `;class V9{constructor(){this.internalMap=new Map}async requestKeysForEntity(e,t){const n=new Map;return await this.ensureIdsArePresent([e]),t.forEach(i=>{const a=this.requestKeyForEntityIfAvailable(e,i);a&&n.set(i,a)}),n}async ensureIdsArePresent(e){if(e.every(n=>this.internalMap.has(n)))return;const t=await $e.getShadowGraphqlClient().query({query:U9,errorPolicy:"all",variables:{entityIds:e.filter(n=>!this.internalMap.has(n))}});e.forEach((n,i)=>{const a=t.data.metafieldsMany[i];this.internalMap.set(n,a.map(s=>({key:s.metafieldConfiguration.name,value:s.value,metafieldConfigurationId:s.metafieldConfiguration.id,metafieldType:s.metafieldConfiguration.metafieldType})))})}async requestKeyForEntity(e,t){if(!this.internalMap.has(e))return;let n=this.internalMap.get(e);const i=n.find(a=>a.key===t);return i||(await this.ensureIdsArePresent([e]),n=this.internalMap.get(e)),i?JSON.parse(i.value):void 0}requestKeyForEntityIfAvailable(e,t){if(!this.internalMap.has(e))return;const i=this.internalMap.get(e).find(a=>a.key===t);if(i)return JSON.parse(i.value)}requestIfAvailable(e,t){return this.internalMap.has(e)?this.internalMap.get(e).find(a=>a.metafieldConfigurationId===t):void 0}}const Sg=new V9;var EI=(r=>(r.Default="Default",r.Name="Name",r.Price="Price",r))(EI||{});class T1{constructor(e){this.fullFetched=!1,this.collection=e;const t=this.collection.productCollectionProducts;t&&t.length>=this.collection.total&&(this.fullFetched=!0)}getId(){return this.collection.id}getName(){return this.collection.name}getDescription(){return this.collection.description||""}getDispatchStartDate(){if(this.collection.dispatchStartDate)return new Date(this.collection.dispatchStartDate)}getDispatchEndDate(){if(this.collection.dispatchEndDate)return new Date(this.collection.dispatchEndDate)}getImage(){return this.collection.image}getProducts(){if(!this.collection.productCollectionProducts)throw new Error("Failed to find products on collection. Ensure you fetch them first!");return this.collection.productCollectionProducts.filter(e=>!!e.product).map(e=>new Wf(e))}async fetchProducts(e){if(this.fullFetched)return(this.collection.productCollectionProducts??[]).filter(i=>!!i.product).map(i=>new Wf(i));const t=await $e.getShadowGraphqlClient().query({query:_U,variables:{id:this.getId(),productIds:e},errorPolicy:"all"}),n=this.collection.productCollectionProducts||[];return this.collection.productCollectionProducts=[...n,...t.data.productCollections[0].productCollectionProducts?.filter(i=>!n.some(a=>i.id===a.id))||[]],this.collection.productCollectionProducts.length>=this.collection.total&&(this.fullFetched=!0),this.collection.productCollectionProducts.filter(i=>!!i.product&&(!e||e.includes(i.product.id))).map(i=>new Wf(i))}async filterProducts(e,t,n,i){const a=await $e.getShadowGraphqlClient().query({query:NU,errorPolicy:"all",variables:{id:this.getId(),filters:e?{link:"And",metafields:e}:void 0,tags:t?{include:t.include??[],exclude:t.exclude??[]}:void 0,sortKey:n,sortDescending:i}});if(!a.data?.productCollections||a.data?.productCollections.length===0)throw new Error("Failed to filter product collection products.");const s=this.getProducts(),o=a.data.productCollections[0].productCollectionProducts.map(l=>l.product.id);return s.filter(l=>o.includes(l.getId()))}async fetchProductsFeed(e,t,n,i,a,s,o,l){if(this.fullFetched){const f=await(n?this.filterProducts(n):this.fetchProducts());return{total:f.length,items:f.slice(e,e+t)}}const u=new AbortController,{signal:c}=u,h=$e.getShadowGraphqlClient().watchQuery({query:LU,variables:{id:this.getId(),limit:t,offset:e,productFilters:n?{link:"And",metafields:n}:void 0,productWorkflowFilters:l?{link:"And",metafields:l}:void 0,tags:i?{include:i.include??[],exclude:i.exclude??[]}:void 0,sortKey:a,sortDescending:s,quickSearch:o},errorPolicy:"all",fetchPolicy:"cache-first",returnPartialData:!0,context:{fetchOptions:{signal:c}}});return new Promise(f=>{let d=!1;const g=h.subscribe({next(v){if(d||v.partial&&(!v.data.productCollections||v.data.productCollections.length===0||!v.data.productCollections[0].productCollectionProductsFeed?.items||v.data.productCollections[0].productCollectionProductsFeed?.items.length===0))return;u.abort(),d=!0,g.unsubscribe();const y=v.data.productCollections?.[0].productCollectionProductsFeed?.items.filter(A=>!!A.product).map(A=>new Wf(vo(A)))||[];f({items:y,total:v.data.productCollections?.[0].productCollectionProductsFeed?.total??0})},error(){d||(d=!0,g.unsubscribe(),f({items:[],total:0}))}})})}getResource(){return this.collection}}class Wf{constructor(e){this.product=e.product,this.productResource=e}getId(){return this.product.id}getName(){return this.product.name}getIntegrationByType(e,t){const i=(this.product.integrationProducts||[]).find(a=>{const s=a.integration?.type,o=a.integration?.type===e,l=t?a.integration?.externalIntegrationId===t:!0;return s&&o&&l});if(!i)throw new Error("Failed to find requested integration type on product. This is generally due to a configuration error");return i}getCurrentIntegration(){const t=(this.product.integrationProducts||[]).find(n=>n.integration?.isCurrent);if(!t)throw new Error(`Product: ${this.productResource.id} is not linked to this current integration. This is generally due to a configuration error.`);return t}getDefaultWorkflow(){const e=this.product.workflows;if(e===void 0)throw new uo("Called getDefaultWorkflow() before fetching collection products. Use collection.fetchProducts() first to ensure the data is available.");if(e.length===0)throw new uo("Called getDefaultWorkflow() but no workflows on requested product. Ensure at least 1 workflow is assigned to this product.");const t=this.productResource.workflowId;if(t){const n=e.find(i=>i.workflowName===t);if(n)return new Qu(n)}if(e.length===1)return new Qu(e[0]);throw new uo("Called getDefaultWorkflow() but no default workflow is configured for the requested product. Multiple workflows exist so we can't assume!")}getAllWorkflows(){if((this.product.workflows||[]).length===0)throw new uo("No workflows on configured product. Ensure at least 1 workflow is assigned to this product.");return this.product.workflows.sort((t,n)=>(t.index??0)-(n.index??0)).map(t=>new Qu(t))}getIntegrations(){return this.product.integrationProducts||[]}getResource(){return this.product}getBasePrice(e){const t=this.product.basePrice||0;if(!e)return t;if(!e.integrationType&&!e.externalId&&!e.integrationId)throw new Error("You must provide at least one of the following fields on the includeAdditionalProduct object: integrationType, externalId, integrationId");let n;return e.integrationId?n=this.product.integrationProducts?.find(i=>i.integration?.id===e.integrationId):e.externalId?n=this.product.integrationProducts?.find(i=>i.integration?.externalIntegrationId===e.externalId):n=this.product.integrationProducts?.find(i=>i.integration?.type===e.integrationType),n?.additionalIntegrationProduct?.product?t+(n.additionalIntegrationProduct.product.basePrice||0):t}async requestMetafields(e){return Sg.requestKeysForEntity(this.product.id,e)}}class Qu{constructor(e){this.workflow=e}getId(){return this.workflow.workflowName}getName(){return this.workflow.friendlyName}getThumbnail(e=128,t){const n=this.workflow?.imageUrl,i=window?.devicePixelRatio||1;if(n)return $g(n,e*i,"webp",t)}}const z9=Fe`
2521
+ `;class z9{constructor(){this.internalMap=new Map}async requestKeysForEntity(e,t){const n=new Map;return await this.ensureIdsArePresent([e]),t.forEach(i=>{const a=this.requestKeyForEntityIfAvailable(e,i);a&&n.set(i,a)}),n}async ensureIdsArePresent(e){if(e.every(n=>this.internalMap.has(n)))return;const t=await $e.getShadowGraphqlClient().query({query:V9,errorPolicy:"all",variables:{entityIds:e.filter(n=>!this.internalMap.has(n))}});e.forEach((n,i)=>{const a=t.data.metafieldsMany[i];this.internalMap.set(n,a.map(s=>({key:s.metafieldConfiguration.name,value:s.value,metafieldConfigurationId:s.metafieldConfiguration.id,metafieldType:s.metafieldConfiguration.metafieldType})))})}async requestKeyForEntity(e,t){if(!this.internalMap.has(e))return;let n=this.internalMap.get(e);const i=n.find(a=>a.key===t);return i||(await this.ensureIdsArePresent([e]),n=this.internalMap.get(e)),i?JSON.parse(i.value):void 0}requestKeyForEntityIfAvailable(e,t){if(!this.internalMap.has(e))return;const i=this.internalMap.get(e).find(a=>a.key===t);if(i)return JSON.parse(i.value)}requestIfAvailable(e,t){return this.internalMap.has(e)?this.internalMap.get(e).find(a=>a.metafieldConfigurationId===t):void 0}}const Sg=new z9;var EI=(r=>(r.Default="Default",r.Name="Name",r.Price="Price",r))(EI||{});class T1{constructor(e){this.fullFetched=!1,this.collection=e;const t=this.collection.productCollectionProducts;t&&t.length>=this.collection.total&&(this.fullFetched=!0)}getId(){return this.collection.id}getName(){return this.collection.name}getDescription(){return this.collection.description||""}getDispatchStartDate(){if(this.collection.dispatchStartDate)return new Date(this.collection.dispatchStartDate)}getDispatchEndDate(){if(this.collection.dispatchEndDate)return new Date(this.collection.dispatchEndDate)}getImage(){return this.collection.image}getProducts(){if(!this.collection.productCollectionProducts)throw new Error("Failed to find products on collection. Ensure you fetch them first!");return this.collection.productCollectionProducts.filter(e=>!!e.product).map(e=>new Wf(e))}async fetchProducts(e){if(this.fullFetched)return(this.collection.productCollectionProducts??[]).filter(i=>!!i.product).map(i=>new Wf(i));const t=await $e.getShadowGraphqlClient().query({query:_U,variables:{id:this.getId(),productIds:e},errorPolicy:"all"}),n=this.collection.productCollectionProducts||[];return this.collection.productCollectionProducts=[...n,...t.data.productCollections[0].productCollectionProducts?.filter(i=>!n.some(a=>i.id===a.id))||[]],this.collection.productCollectionProducts.length>=this.collection.total&&(this.fullFetched=!0),this.collection.productCollectionProducts.filter(i=>!!i.product&&(!e||e.includes(i.product.id))).map(i=>new Wf(i))}async filterProducts(e,t,n,i){const a=await $e.getShadowGraphqlClient().query({query:NU,errorPolicy:"all",variables:{id:this.getId(),filters:e?{link:"And",metafields:e}:void 0,tags:t?{include:t.include??[],exclude:t.exclude??[]}:void 0,sortKey:n,sortDescending:i}});if(!a.data?.productCollections||a.data?.productCollections.length===0)throw new Error("Failed to filter product collection products.");const s=this.getProducts(),o=a.data.productCollections[0].productCollectionProducts.map(l=>l.product.id);return s.filter(l=>o.includes(l.getId()))}async fetchProductsFeed(e,t,n,i,a,s,o,l){if(this.fullFetched){const f=await(n?this.filterProducts(n):this.fetchProducts());return{total:f.length,items:f.slice(e,e+t)}}const u=new AbortController,{signal:c}=u,h=$e.getShadowGraphqlClient().watchQuery({query:LU,variables:{id:this.getId(),limit:t,offset:e,productFilters:n?{link:"And",metafields:n}:void 0,productWorkflowFilters:l?{link:"And",metafields:l}:void 0,tags:i?{include:i.include??[],exclude:i.exclude??[]}:void 0,sortKey:a,sortDescending:s,quickSearch:o},errorPolicy:"all",fetchPolicy:"cache-first",returnPartialData:!0,context:{fetchOptions:{signal:c}}});return new Promise(f=>{let d=!1;const g=h.subscribe({next(v){if(d||v.partial&&(!v.data.productCollections||v.data.productCollections.length===0||!v.data.productCollections[0].productCollectionProductsFeed?.items||v.data.productCollections[0].productCollectionProductsFeed?.items.length===0))return;u.abort(),d=!0,g.unsubscribe();const y=v.data.productCollections?.[0].productCollectionProductsFeed?.items.filter(A=>!!A.product).map(A=>new Wf(vo(A)))||[];f({items:y,total:v.data.productCollections?.[0].productCollectionProductsFeed?.total??0})},error(){d||(d=!0,g.unsubscribe(),f({items:[],total:0}))}})})}getResource(){return this.collection}}class Wf{constructor(e){this.product=e.product,this.productResource=e}getId(){return this.product.id}getName(){return this.product.name}getIntegrationByType(e,t){const i=(this.product.integrationProducts||[]).find(a=>{const s=a.integration?.type,o=a.integration?.type===e,l=t?a.integration?.externalIntegrationId===t:!0;return s&&o&&l});if(!i)throw new Error("Failed to find requested integration type on product. This is generally due to a configuration error");return i}getCurrentIntegration(){const t=(this.product.integrationProducts||[]).find(n=>n.integration?.isCurrent);if(!t)throw new Error(`Product: ${this.productResource.id} is not linked to this current integration. This is generally due to a configuration error.`);return t}getDefaultWorkflow(){const e=this.product.workflows;if(e===void 0)throw new uo("Called getDefaultWorkflow() before fetching collection products. Use collection.fetchProducts() first to ensure the data is available.");if(e.length===0)throw new uo("Called getDefaultWorkflow() but no workflows on requested product. Ensure at least 1 workflow is assigned to this product.");const t=this.productResource.workflowId;if(t){const n=e.find(i=>i.workflowName===t);if(n)return new Qu(n)}if(e.length===1)return new Qu(e[0]);throw new uo("Called getDefaultWorkflow() but no default workflow is configured for the requested product. Multiple workflows exist so we can't assume!")}getAllWorkflows(){if((this.product.workflows||[]).length===0)throw new uo("No workflows on configured product. Ensure at least 1 workflow is assigned to this product.");return this.product.workflows.sort((t,n)=>(t.index??0)-(n.index??0)).map(t=>new Qu(t))}getIntegrations(){return this.product.integrationProducts||[]}getResource(){return this.product}getBasePrice(e){const t=this.product.basePrice||0;if(!e)return t;if(!e.integrationType&&!e.externalId&&!e.integrationId)throw new Error("You must provide at least one of the following fields on the includeAdditionalProduct object: integrationType, externalId, integrationId");let n;return e.integrationId?n=this.product.integrationProducts?.find(i=>i.integration?.id===e.integrationId):e.externalId?n=this.product.integrationProducts?.find(i=>i.integration?.externalIntegrationId===e.externalId):n=this.product.integrationProducts?.find(i=>i.integration?.type===e.integrationType),n?.additionalIntegrationProduct?.product?t+(n.additionalIntegrationProduct.product.basePrice||0):t}async requestMetafields(e){return Sg.requestKeysForEntity(this.product.id,e)}}class Qu{constructor(e){this.workflow=e}getId(){return this.workflow.workflowName}getName(){return this.workflow.friendlyName}getThumbnail(e=128,t){const n=this.workflow?.imageUrl,i=window?.devicePixelRatio||1;if(n)return $g(n,e*i,"webp",t)}}const H9=ke`
2516
2522
  ${tm(!1)}
2517
2523
  query GetProductCollections($ids: [String!]!) {
2518
2524
  productCollections(ids: $ids) {
2519
2525
  ...ProductCollectionFields
2520
2526
  }
2521
2527
  }
2522
- `,H9=async r=>(await $e.getShadowGraphqlClient().query({query:z9,errorPolicy:"all",variables:{ids:r}})).data?.productCollections?.map(t=>new T1(t));class j9{constructor(){this.listeners={}}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){this.listeners[e]&&(this.listeners[e]=this.listeners[e].filter(n=>n!==t))}emit(e,t){if(this.listeners[e])for(const n of this.listeners[e])n(t)}clear(e){if(e)delete this.listeners[e];else for(const t in this.listeners)delete this.listeners[t]}}const G9=Fe`
2528
+ `,j9=async r=>(await $e.getShadowGraphqlClient().query({query:H9,errorPolicy:"all",variables:{ids:r}})).data?.productCollections?.map(t=>new T1(t));class G9{constructor(){this.listeners={}}on(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}off(e,t){this.listeners[e]&&(this.listeners[e]=this.listeners[e].filter(n=>n!==t))}emit(e,t){if(this.listeners[e])for(const n of this.listeners[e])n(t)}clear(e){if(e)delete this.listeners[e];else for(const t in this.listeners)delete this.listeners[t]}}const $9=ke`
2523
2529
  mutation AddAddressToBundle(
2524
2530
  $bundleId: String!
2525
2531
  $streetAddress: String
@@ -2541,26 +2547,26 @@ Minimum version required to store current data is: `+X+`.
2541
2547
  id
2542
2548
  }
2543
2549
  }
2544
- `,$9=Fe`
2550
+ `,q9=ke`
2545
2551
  mutation AddOrganizationToBundle($bundleId: String!, $organizationName: String!) {
2546
2552
  organizationAttachToBundle(bundleId: $bundleId, organizationName: $organizationName) {
2547
2553
  id
2548
2554
  }
2549
2555
  }
2550
- `,q9=Fe`
2556
+ `,W9=ke`
2551
2557
  mutation GenerateQuoteId($id: String!) {
2552
2558
  bundleGenerateQuoteId(id: $id) {
2553
2559
  id
2554
2560
  quoteId
2555
2561
  }
2556
2562
  }
2557
- `;class AE{constructor(e,t,n,i,a,s,o){this.workflowExperiences=[],this.eventEmitter=new j9,this.updatesLocked=!1,this.client=e,this.id=t.id,this.name=t.name||"",this.dispatchDate=t.dispatchDate,this.template=t.template||!1,this.quoteId=t.quoteId,this.shareActions=t.bundleShareActions,this.workflowViewerLink=t.workflowViewerLink,this.workflowViewerAmendLink=t.workflowViewerAmendLink,this.ownerId=a,this.metadata=new Map(t.metadata?.map(u=>[u.key,u.value])||[]),this.completed=t.completed??!1,this.productCollection=t.productCollection,this.bundleStateManager=new L9(t.bundleStateData);const l=this.productCollection?.globalPropertyConfiguration;this.globalConfigurationPropertyId=l?.id,this.globalPropertyStateManager=new N9(this.id,this.ownerId,l,this.onGlobalPropertiesChanged.bind(this),s),this.globalPropertyHandleService=new I9(this),this.setPreviewService(n),this.initializationPromise=(async()=>{if(!s?.readonly){const u=this.bundleStateManager.getState();if(u.integrationProductIds&&u.integrationProductIds.length>0){const c=await $e.getShadowGraphqlClient().query({query:pF,variables:{ids:u.integrationProductIds},errorPolicy:"all",fetchPolicy:"no-cache"});if(c.errors)throw new Error(`Failed to fetch integration products for Bundle ${t.id}`);const h=c.data.integrationProducts?.filter(d=>!!d.product?.id&&u.integrationProductIds.includes(d.id)).map(d=>d.product.id);u.integrationProductIds=[],u.productIds=Array.from(new Set([...u.productIds||[],...h||[]]));const f=JSON.stringify(u);this.bundleStateManager.setState(f),await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,bundleStateData:f},context:{bundleOwnerId:a}})}}return Promise.all([this.loadExistingWorkflowExperiences(t.transactionIds||[],{...i,bundleOwnerId:a},o),this.globalPropertyStateManager.getInitializationPromise()]).then(()=>new Promise((u,c)=>{if(s?.readonly){u([]);return}console.log("Setting default global variants."),this.initializeUninitializedHandles().then(u).catch(c)}))})(),this.initializationPromise.catch(u=>{console.error(`Bundle initialization failed: ${u}`)}),this.initializationPromise.then(()=>{this.getGlobalProperties().then(u=>this.checkMandatoryHandlesChanged(void 0,u))})}async initializeUninitializedHandles(){const e=this.globalPropertyStateManager.getGlobalPropertyState();if(!e)return console.log("Attempted to set global default variant before state was initialized."),[];const n=(await this.globalPropertyHandleService.getHandles()).map(async i=>{if(i.getType()===zn.ColorOption||i.getType()===zn.Option){const a=i;if(!e.aspects.find(o=>o.name===a.getName()))try{return await a.initDefaultVariant()}catch(o){console.error(`Failed to initialize default global variant - ${o}`)}}});return Promise.all(n)}getProductIds(){return this.bundleStateManager.getState()?.productIds}async addProductId(e){const t=this.bundleStateManager.getState();if(t){if(!t.productIds)t.productIds=[];else if(t.productIds.some(i=>i===e)){this.fireEvent("bundle-products-added",{productIds:t.productIds,added:[]});return}t.productIds=[...t.productIds,e];const n=JSON.stringify(t);this.bundleStateManager.setState(n),this.fireEvent("bundle-products-added",{productIds:t.productIds,added:[e]}),await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,bundleStateData:n},context:{bundleOwnerId:this.ownerId}})}}async removeProductIds(e){const t=this.bundleStateManager.getState();if(t){const n=e.filter(a=>(t.productIds??[]).includes(a));if(n.length===0)return;t.productIds=(t.productIds??[]).filter(a=>!n.includes(a));const i=JSON.stringify(t);this.bundleStateManager.setState(i),this.fireEvent("bundle-products-removed",{productIds:t.productIds,removed:n}),await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,bundleStateData:i},context:{bundleOwnerId:this.ownerId}})}}getTemplate(){return this.template}async generateQuoteId(){const t=(await $e.getShadowGraphqlClient().mutate({mutation:q9,variables:{id:this.id},context:{bundleOwnerId:this.ownerId}})).data?.bundleGenerateQuoteId?.quoteId;return this.quoteId=t,t||""}async attachAddress(e,t,n,i,a,s){await $e.getShadowGraphqlClient().mutate({mutation:G9,variables:{bundleId:this.id,streetAddress:e||void 0,apartment:t||void 0,city:n||void 0,country:i||void 0,state:a||void 0,postCode:s||void 0},context:{bundleOwnerId:this.ownerId}})}async attachOrganization(e){await $e.getShadowGraphqlClient().mutate({mutation:$9,variables:{bundleId:this.id,organizationName:e},context:{bundleOwnerId:this.ownerId}})}setBundleOptions(e){this.globalPropertyStateManager.setBundleOptions(e)}getInitializationPromise(){return this.initializationPromise}addEventListener(e,t){this.eventEmitter.on(e,t)}removeEventListener(e,t){this.eventEmitter.off(e,t)}getClient(){return this.client}getId(){return this.id}getName(){return this.name}getQuoteId(){return this.quoteId}setName(e){return this.name=e,this.updateBundle()}getDispatchDate(){return this.dispatchDate}setDispatchDate(e){return this.dispatchDate=e,this.updateBundle()}getPurchaseOrder(){return this.purchaseOrder}setPurchaseOrder(e){return this.purchaseOrder=e,this.updateBundle()}getMetadata(){return new Map(this.metadata)}setMetadata(e){return this.metadata=new Map(e),this.updateBundle()}setNameAndMetadata(e,t){return this.name=e,this.metadata=new Map(t),this.updateBundle()}hasGlobalProperties(){return!!this.productCollection?.globalPropertyConfiguration}getGlobalPropertyConfiguration(){return this.productCollection?.globalPropertyConfiguration}async getGlobalProperties(){return this.globalPropertyHandleService.applyConditionsFromState(await this.globalPropertyHandleService.getHandles(),this.getGlobalPropertyStateManager().getGlobalPropertyState())}async applyGlobalPropertyState(e){this.updatesLocked=!0;const t=await this.globalPropertyHandleService.getHandles();try{for(const n of e.aspects){const i=n?.name;await this.getGlobalPropertyStateManager().setAspect(i,n.value,void 0,void 0,n.hidden)}for(const n of e.aspects){const i=n?.name,a=t.find(s=>s.getName()===i);if(a)switch(n.type){case zn.FileUpload:{const s=a,o=await cg([n.value]);o.length>0&&await s.selectImage(o[0]);const l=n.storage?.colors;if(l){const u=Object.fromEntries(l.map(c=>[c.key,{browserValue:c.browserValue,pmsValue:c.pmsValue}])??[]);await s.changeColors(u)}break}case zn.ColorOption:{const s=a,l=(await s.getAllVariants()).find(c=>c.getId()===n.value),u=n.storage?n.storage:void 0;l&&await s.selectVariant(l),u?.customColor&&s.setCustomColor(u.customColor);break}case zn.Option:{const s=a,l=(await s.getAllVariants()).find(u=>u.getId()===n.value);l&&await s.selectVariant(l);break}case zn.Text:{await a.setText(n.value);break}}}}finally{this.updatesLocked=!1,this.onGlobalPropertiesChanged(void 0,this.globalPropertyStateManager.getGlobalPropertyState())}}getGlobalPropertyStateManager(){return this.globalPropertyStateManager}async getGlobalPropertyTotalSubunits(){return(await this.globalPropertyHandleService.getHandles()).filter(n=>n.getType()===zn.Option).map(n=>n.getCurrentVariant()?.getPrice()||0).reduce((n,i)=>n+i,0)}getTotalSubunits(){return this.workflowExperiences.map(e=>e.getTotalPriceSubunits()).reduce((e,t)=>e+t,0)}getProductCollection(){return this.productCollection?new T1(this.productCollection):void 0}async initializeAdditionalRequiredColorChannels(e){for(const t of e.getStepsByType(Je.Illustration)){const n=t.getGlobalPropertyAspects(this.globalConfigurationPropertyId||"");for(const i of n){const a=this.getGlobalPropertyConfiguration()?.aspects.find(s=>s.name===i);if(a&&a.type===zn.ColorOption){const s=t.getCurrentVariant()?.getAssetResource(),o=s?.assetConfiguration?.channelNumbers||[],l=s?.assetConfiguration?.defaultColorVariants||[],u=xI(this,i),c=[...new Set(o.map(f=>f.number))];if(c.length>u)for(const f of c){const d=this.getGlobalPropertyStateManager(),g=l.find(v=>v.channelNumber===f);g&&await d.setAspect(i,g.variant.id||"",void 0,g.channelNumber)}}}}}async addWorkflowExperience(e){await this.initializeAdditionalRequiredColorChannels(e),e.setBundle(this),await this.appendWorkflowExperience(e),await this.injectExperienceIntoPreviewService(e),await e.getWorkflowManager().getInitializationPromise();const t=await this.getGlobalProperties();for(const n of t)await n.applyGlobalState([e]);this.fireEvent("workflow-experience-added",{workflowExperiences:[e]})}async addWorkflowExperiences(e){for(const o of e)await this.initializeAdditionalRequiredColorChannels(o);const t=e.map(o=>o.getTransaction().id),n=t.map(o=>this.workflowExperiences.find(l=>l.getTransaction().id===o));if(n.some(o=>!!o))throw new Error("Unable to add transaction to bundle - Already Exists: "+n.filter(o=>!!o).map(o=>o?.getTransaction().id).join(", "));const i=xr.getMap("transactionOwnerIds")||new Map,a=t.map(o=>i.get(o));await $e.getShadowGraphqlClient().mutate({mutation:HU,variables:{id:this.id,transactionIds:t,transactionOwnerIds:a},context:{bundleOwnerId:this.ownerId}}).catch(o=>{console.error(o)}),this.workflowExperiences.push(...e);const s=async()=>{for(const l of e)l.setBundle(this),await this.injectExperienceIntoPreviewService(l);await Promise.all(e.map(l=>l.getWorkflowManager().getInitializationPromise()));const o=await this.getGlobalProperties();for(const l of o)await l.applyGlobalState(e)};await Promise.all([this.updateTransactionOrder(),s()]),await this.initializeUninitializedHandles(),this.workflowExperiences.forEach(o=>o.checkForPriceBreakChanges()),this.fireEvent("workflow-experience-added",{workflowExperiences:this.workflowExperiences})}async appendWorkflowExperience(e,t=!0){const n=e.getTransaction().id;if(this.workflowExperiences.find(o=>o.getTransaction().id===n))throw new Error("Unable to add transaction to bundle - Already Exists!");const s=(xr.getMap("transactionOwnerIds")||new Map).get(n);await $e.getShadowGraphqlClient().mutate({mutation:zU,variables:{id:this.id,transactionId:n},context:{bundleOwnerId:this.ownerId,transactionOwnerId:s}}),t&&(this.workflowExperiences.push(e),this.workflowExperiences.forEach(o=>o.checkForPriceBreakChanges()))}async removeWorkflowExperience(e){const t=this.workflowExperiences.indexOf(e);await this.removeTransaction(t,this.workflowExperiences[t].getTransaction()),this.fireEvent("workflow-experience-added",{workflowExperiences:[e]})}async removeWorkflowExperiences(e){await this.removeTransactions(e.map(t=>t.getTransaction()))}async removeWorkflowExperienceByTransaction(e){const t=this.workflowExperiences.findIndex(n=>n.getTransaction().id===e.id);await this.removeTransaction(t,e)}async removeWorkflowExperiencesByTransactions(e){await this.removeTransactions(e)}async removeTransaction(e,t,n=!0){if(e>-1){const i=this.workflowExperiences.find(a=>a.getTransaction().id===t.id);if(i.setBundle(void 0),this.previewService&&i.getWorkflowManager().ejectFromPreviewService(),this.bundleStateManager.removeStateForTransaction(t.id),await $e.getShadowGraphqlClient().mutate({mutation:jU,variables:{id:this.id,transactionId:t.id,name:this.name,metadata:Array.from(this.metadata.entries()).map(([a,s])=>({key:a,value:s})),bundleStateData:this.bundleStateManager.getSerializedState()},context:{bundleOwnerId:this.ownerId}}),n){const a=this.workflowExperiences.splice(e,1);this.workflowExperiences.forEach(s=>s.checkForPriceBreakChanges()),i.checkForPriceBreakChanges(),await this.updateTransactionOrder(),this.fireEvent("workflow-experience-removed",{workflowExperiences:a})}}else throw new Error("Unable to remove workflow experience from bundle - Not Found! - "+t.id)}async removeTransactions(e){const t=e.map(i=>this.workflowExperiences.findIndex(a=>a.getTransaction().id===i.id));if(t.some(i=>i===-1))throw new Error("Unable to remove workflow experience from bundle - The following aren't included in the bundle: "+e.filter((i,a)=>t[a]===-1).map(i=>i.id).join(", "));const n=e.map(i=>this.workflowExperiences.splice(this.workflowExperiences.findIndex(a=>a.getTransaction().id===i.id),1)[0]);n.forEach(i=>i.setBundle(void 0)),[...this.workflowExperiences,...n].forEach(i=>i.checkForPriceBreakChanges()),this.previewService&&n.forEach(i=>i.getWorkflowManager().ejectFromPreviewService()),e.forEach(i=>this.bundleStateManager.removeStateForTransaction(i.id)),await $e.getShadowGraphqlClient().mutate({mutation:GU,variables:{id:this.id,transactionIds:e.map(i=>i.id),name:this.name,metadata:Array.from(this.metadata.entries()).map(([i,a])=>({key:i,value:a})),bundleStateData:this.bundleStateManager.getSerializedState()},context:{bundleOwnerId:this.ownerId}}),this.fireEvent("workflow-experience-removed",{workflowExperiences:n}),await this.updateTransactionOrder()}async insertWorkflowExperience(e,t){await this.appendWorkflowExperience(e,!1),this.workflowExperiences.splice(t,0,e),await Promise.all([this.updateTransactionOrder(),(async()=>{await this.injectExperienceIntoPreviewService(e);const n=await this.getGlobalProperties();await Promise.all(n.map(i=>i.applyGlobalState([e])))})()])}async replaceWorkflowExperience(e,t){if(e<0||e>=this.workflowExperiences.length)throw new Error("Unable to replace workflow experience in bundle - Index out of range!");const n=this.workflowExperiences[e];if(n.getTransaction().id===t.getTransaction().id)throw new Error("Unable to replace workflow experience in bundle - Same transaction!");await Promise.all([this.removeTransaction(e,n.getTransaction(),!1),this.appendWorkflowExperience(t,!1)]),this.workflowExperiences[e]=t,await Promise.all([this.updateTransactionOrder(),(async()=>{await this.injectExperienceIntoPreviewService(t);const i=await this.getGlobalProperties();await Promise.all(i.map(a=>a.applyGlobalState([t])))})()])}async swapWorkflowExperiences(e,t){if(e<0||e>=this.workflowExperiences.length||t<0||t>=this.workflowExperiences.length)throw new Error("Unable to swap workflow experiences in bundle - Index out of range!");if(e===t)return;const n=this.workflowExperiences[e];this.workflowExperiences[e]=this.workflowExperiences[t],this.workflowExperiences[t]=n,await this.updateTransactionOrder()}getWorkflowExperiences(){return[...this.workflowExperiences]}async sortWorkflowExperiences(e){this.workflowExperiences=this.workflowExperiences.sort(e),await this.updateTransactionOrder()}getWorkflowExperienceCount(){return this.workflowExperiences.length}async addStakeholder(e,t){const n=await $e.getShadowGraphqlClient().mutate({mutation:$U,variables:{id:this.id,details:e,type:t||VA.Owner},context:{bundleOwnerId:this.ownerId}});if(!n.data?.bundleAddStakeholder)throw new Error("Bundle not found!");const i=n.data.bundleAddStakeholder.bundleStakeholders||[];this.storeStakeholderCustomers(i)}async removeStakeholder(e){if(!(await $e.getShadowGraphqlClient().mutate({mutation:qU,variables:{id:this.id,emailAddress:e},context:{bundleOwnerId:this.ownerId}})).data?.bundleRemoveStakeholder)throw new Error("Bundle not found!")}async updateStakeholders(e){const t=await $e.getShadowGraphqlClient().mutate({mutation:WU,variables:{id:this.id,input:e},context:{bundleOwnerId:this.ownerId}});if(!t.data?.bundleUpdateStakeholders)throw new Error("Bundle not found!");const n=t.data.bundleUpdateStakeholders.bundleStakeholders||[];this.storeStakeholderCustomers(n)}async getAllStakeholders(){const e=await $e.getShadowGraphqlClient().query({query:dE,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id},context:{bundleOwnerId:this.ownerId}});if(!e.data.bundles||e.data.bundles.length===0)throw new Error("Bundle not found!");const t=e.data.bundles[0].bundleStakeholders||[];return this.storeStakeholderCustomers(t),t}async getCurrentStakeholder(){const e=await $e.getShadowGraphqlClient().query({query:dE,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id},context:{bundleOwnerId:this.ownerId}});if(!e.data.bundles||e.data.bundles.length===0)throw new Error("Bundle not found!");return e.data.bundles[0].currentBundleStakeholder}storeStakeholderCustomers(e){e.forEach(t=>{t.customer&&this.client.storeCustomer(t.customer)})}async finish(e,t){this.completed&&await $e.getShadowGraphqlClient().mutate({mutation:KU,variables:{bundleId:this.id}});const n=await yI(this.workflowExperiences.map(i=>{const a=i.getWorkflow();if(!a)throw new Error("Unable to create designs - Workflow not found!");const s=i.getProduct();if(!s)throw new Error("Unable to create designs - Product not found!");return{workflowManager:i.getWorkflowManager(),workflow:a,layouts:i.getWorkflowManager().getLayouts(),getReducerState:()=>i.getCommandContext().getState(),product:s,transaction:i.getTransaction(),workflowSelections:i.getWorkflowManager().getWorkflowSelections(),designName:a.name,workflowMetadata:i.getWorkflowManager().getWorkflowMetadata()}}),t?(i,a)=>{const s=this.workflowExperiences.find(o=>o.getTransaction().id===a);return s?t(s,i):(console.warn("SpiffCommerce - Bundle create design - Unable to find experience for transaction: "+a),Promise.resolve(void 0))}:void 0);return{bundleId:this.id,name:this.getName(),dispatchDate:this.getDispatchDate()||"",purchaseOrder:this.getPurchaseOrder()||"",collectionId:this.getProductCollection()?.getId()||"",collectionName:this.getProductCollection()?.getName()||"",items:n,bundleOwnerId:this.ownerId}}async placeOrder(){const e=this.workflowExperiences.map(t=>({transactionId:t.getTransaction().id,amountToOrder:t.getTransaction().quantity||1}));return await this.getClient().placeOrder(e)}getPreviewService(){return this.previewService}async setPreviewService(e){if(this.workflowExperiences&&this.workflowExperiences.length>0&&(this.workflowExperiences.forEach(t=>t.getWorkflowManager().ejectFromPreviewService()),e))for(const t of this.workflowExperiences)await this.injectExperienceIntoPreviewService(t);e&&e.registerModelLoadEventListener&&e.registerModelLoadEventListener(this.onModelLoadEvent.bind(this)),this.previewService&&this.previewService!==e&&this.previewService.unregisterModelLoadEventListener&&this.previewService.unregisterModelLoadEventListener(this.onModelLoadEvent.bind(this)),this.previewService=e}async assignGlobalPropertyConfiguration(e){await $e.getShadowGraphqlClient().mutate({mutation:XU,variables:{bundleId:this.id,globalPropertyConfigurationId:e},context:{bundleOwnerId:this.ownerId}}),this.globalConfigurationPropertyId=e}async assignProductCollection(e){const t=await $e.getShadowGraphqlClient().mutate({mutation:YU(this.globalPropertyStateManager.getBundleOptions()?.eagerFetchProducts??!1),variables:{id:this.id,productCollectionId:e??""},context:{bundleOwnerId:this.ownerId}});if(t.data?.bundleAssignProductCollection.productCollection){this.productCollection=t.data.bundleAssignProductCollection.productCollection;const n=t.data.bundleAssignProductCollection.productCollection.globalPropertyConfiguration;this.globalPropertyStateManager.setConfiguration(n),await this.globalPropertyHandleService.getHandles(),this.globalConfigurationPropertyId=n?.id,await this.clearOldProducts(this.workflowExperiences)}}onModelLoadEvent(e){e.eventType==="unload"||!e.modelContainer||(e.modelContainer.registerMaterialSelectedCallback(()=>this.onModelSelectedEvent(e.modelContainer,!0)),e.modelContainer.registerMaterialDeselectedCallback(()=>this.onModelSelectedEvent(e.modelContainer,!1)))}onModelSelectedEvent(e,t){if(e&&e.metadata&&e.metadata instanceof Map&&e.metadata.has("workflowManager")){const i=e.metadata.get("workflowManager").getWorkflowExperience().getTransaction(),a=this.workflowExperiences.find(s=>s.getTransaction().id===i.id);a&&this.fireEvent(t?"workflow-experience-hover-enter":"workflow-experience-hover-exit",{workflowExperience:a})}}async injectExperienceIntoPreviewService(e){this.previewService&&await e.getWorkflowManager().injectIntoPreviewService(this.previewService)}async loadExistingWorkflowExperiences(e,t,n){let i=[];if(e.length>0&&(i=await this.client.getWorkflowExperiences(e.map(a=>({type:"transaction",transactionId:a})),t,void 0,n),i.forEach(a=>a.setBundle(this)),i.forEach(a=>a.checkForPriceBreakChanges()),this.workflowExperiences=i,this.previewService))for(const a of i)await this.injectExperienceIntoPreviewService(a);await this.clearOldProducts(i)}async clearOldProducts(e){if(!this.globalPropertyStateManager.getBundleOptions()?.readonly){const t=this.getProductIds()||[],n=this.getProductCollection();if(n&&t.length>0){await n.fetchProducts();const i=n.getProducts(),a=[],s=[];for(const l of t)if(!i.find(c=>c.getId()===l)){for(const c of e)c.getProduct()?.id===l&&s.push(c);a.push(l)}const o=[];a.length>0&&o.push(this.removeProductIds(a)),s.length>0&&o.push(Promise.all(s.map(l=>l.clearProduct()))),o.length>0&&await Promise.all(o)}}}async updateBundle(){if(!(await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,name:this.name,metadata:Array.from(this.metadata.entries()).map(([t,n])=>({key:t,value:n})),bundleStateData:this.bundleStateManager.getSerializedState(),dispatchDate:this.dispatchDate,purchaseOrder:this.purchaseOrder},context:{bundleOwnerId:this.ownerId}})).data?.bundleUpdate)throw new Error("Bundle not found!")}async updateTransactionOrder(){await $e.getShadowGraphqlClient().mutate({mutation:QU,variables:{id:this.id,transactionIds:this.workflowExperiences.map(e=>e.getTransaction().id)},context:{bundleOwnerId:this.ownerId}})}async onGlobalPropertiesChanged(e,t){if(this.updatesLocked)return;const n=await this.globalPropertyHandleService.getHandles(),i=this.globalPropertyHandleService.applyConditionsFromState(n,e),a=this.globalPropertyHandleService.applyConditionsFromState(n,t);this.checkConditionalHandlesChanged(i,a),this.checkMandatoryHandlesChanged(e,a);const s=this.getGlobalPropertyStateManager();let o=[];for(const h of n)a.find(f=>f.getName()==h.getName())||(o=[...o,h.getName()]);await s.clearAspects(o);const l=a.map(h=>{if(h.getType()===zn.ColorOption||h.getType()===zn.Option){const f=h;if(!t.aspects.find(g=>g.name===f.getName()))return f.initDefaultVariant()}});await Promise.all(l),await Promise.all(a.map(h=>h.applyGlobalState()));const u=this.globalPropertyStateManager.getGlobalPropertyState(),c=this.globalPropertyHandleService.applyConditionsFromState(n,u);xd(a.sort(),c.sort())||(this.checkConditionalHandlesChanged(a,c),this.checkMandatoryHandlesChanged(u,c),await this.onGlobalPropertiesChanged(t,u))}checkConditionalHandlesChanged(e,t){(()=>{if(e.length!==t.length)return!0;for(let a=0;a<e.length;a++)if(e[a].getName()!==t[a].getName())return!0;return!1})()&&this.fireEvent("conditional-global-properties-changed",{globalProperties:t})}checkMandatoryHandlesChanged(e,t){const n=[],i=[],a=[],s=SI(e);t.forEach(o=>{if(o.isMandatory()){const l=o.isMandatoryFulfilled();l?i.push(o):a.push(o);const u=s.get(o.getName());(u===void 0||u!==l)&&n.push(o)}}),this.fireEvent("global-properties-mandatory-changed",{changed:n,completed:i,remaining:a})}fireEvent(e,t){this.eventEmitter.emit(e,t)}getShareActions(){return this.shareActions}getWorkflowViewerLink(){return this.workflowViewerLink}getWorkflowViewerAmendLink(){return this.workflowViewerAmendLink}async approve(e,t){await $e.getShadowGraphqlClient().mutate({mutation:ZU,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id,note:e,stakeholderId:t}})}async reject(e,t){await $e.getShadowGraphqlClient().mutate({mutation:e9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id,note:e,stakeholderId:t}})}getQuoteCompleteMessage(){return{bundleId:this.id,bundleOwnerId:this.ownerId,quoteId:this.quoteId||""}}}const W9=Fe`
2563
+ `;class AE{constructor(e,t,n,i,a,s,o){this.workflowExperiences=[],this.eventEmitter=new G9,this.updatesLocked=!1,this.client=e,this.id=t.id,this.name=t.name||"",this.dispatchDate=t.dispatchDate,this.template=t.template||!1,this.quoteId=t.quoteId,this.shareActions=t.bundleShareActions,this.workflowViewerLink=t.workflowViewerLink,this.workflowViewerAmendLink=t.workflowViewerAmendLink,this.ownerId=a,this.metadata=new Map(t.metadata?.map(u=>[u.key,u.value])||[]),this.completed=t.completed??!1,this.productCollection=t.productCollection,this.bundleStateManager=new U9(t.bundleStateData);const l=this.productCollection?.globalPropertyConfiguration;this.globalConfigurationPropertyId=l?.id,this.globalPropertyStateManager=new L9(this.id,this.ownerId,l,this.onGlobalPropertiesChanged.bind(this),s),this.globalPropertyHandleService=new D9(this),this.setPreviewService(n),this.initializationPromise=(async()=>{if(!s?.readonly){const u=this.bundleStateManager.getState();if(u.integrationProductIds&&u.integrationProductIds.length>0){const c=await $e.getShadowGraphqlClient().query({query:pF,variables:{ids:u.integrationProductIds},errorPolicy:"all",fetchPolicy:"no-cache"});if(c.errors)throw new Error(`Failed to fetch integration products for Bundle ${t.id}`);const h=c.data.integrationProducts?.filter(d=>!!d.product?.id&&u.integrationProductIds.includes(d.id)).map(d=>d.product.id);u.integrationProductIds=[],u.productIds=Array.from(new Set([...u.productIds||[],...h||[]]));const f=JSON.stringify(u);this.bundleStateManager.setState(f),await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,bundleStateData:f},context:{bundleOwnerId:a}})}}return Promise.all([this.loadExistingWorkflowExperiences(t.transactionIds||[],{...i,bundleOwnerId:a},o),this.globalPropertyStateManager.getInitializationPromise()]).then(()=>new Promise((u,c)=>{if(s?.readonly){u([]);return}console.log("Setting default global variants."),this.initializeUninitializedHandles().then(u).catch(c)}))})(),this.initializationPromise.catch(u=>{console.error(`Bundle initialization failed: ${u}`)}),this.initializationPromise.then(()=>{this.getGlobalProperties().then(u=>this.checkMandatoryHandlesChanged(void 0,u))})}async initializeUninitializedHandles(){const e=this.globalPropertyStateManager.getGlobalPropertyState();if(!e)return console.log("Attempted to set global default variant before state was initialized."),[];const n=(await this.globalPropertyHandleService.getHandles()).map(async i=>{if(i.getType()===zn.ColorOption||i.getType()===zn.Option){const a=i;if(!e.aspects.find(o=>o.name===a.getName()))try{return await a.initDefaultVariant()}catch(o){console.error(`Failed to initialize default global variant - ${o}`)}}});return Promise.all(n)}getProductIds(){return this.bundleStateManager.getState()?.productIds}async addProductId(e){const t=this.bundleStateManager.getState();if(t){if(!t.productIds)t.productIds=[];else if(t.productIds.some(i=>i===e)){this.fireEvent("bundle-products-added",{productIds:t.productIds,added:[]});return}t.productIds=[...t.productIds,e];const n=JSON.stringify(t);this.bundleStateManager.setState(n),this.fireEvent("bundle-products-added",{productIds:t.productIds,added:[e]}),await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,bundleStateData:n},context:{bundleOwnerId:this.ownerId}})}}async removeProductIds(e){const t=this.bundleStateManager.getState();if(t){const n=e.filter(a=>(t.productIds??[]).includes(a));if(n.length===0)return;t.productIds=(t.productIds??[]).filter(a=>!n.includes(a));const i=JSON.stringify(t);this.bundleStateManager.setState(i),this.fireEvent("bundle-products-removed",{productIds:t.productIds,removed:n}),await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,bundleStateData:i},context:{bundleOwnerId:this.ownerId}})}}getTemplate(){return this.template}async generateQuoteId(){const t=(await $e.getShadowGraphqlClient().mutate({mutation:W9,variables:{id:this.id},context:{bundleOwnerId:this.ownerId}})).data?.bundleGenerateQuoteId?.quoteId;return this.quoteId=t,t||""}async attachAddress(e,t,n,i,a,s){await $e.getShadowGraphqlClient().mutate({mutation:$9,variables:{bundleId:this.id,streetAddress:e||void 0,apartment:t||void 0,city:n||void 0,country:i||void 0,state:a||void 0,postCode:s||void 0},context:{bundleOwnerId:this.ownerId}})}async attachOrganization(e){await $e.getShadowGraphqlClient().mutate({mutation:q9,variables:{bundleId:this.id,organizationName:e},context:{bundleOwnerId:this.ownerId}})}setBundleOptions(e){this.globalPropertyStateManager.setBundleOptions(e)}getInitializationPromise(){return this.initializationPromise}addEventListener(e,t){this.eventEmitter.on(e,t)}removeEventListener(e,t){this.eventEmitter.off(e,t)}getClient(){return this.client}getId(){return this.id}getName(){return this.name}getQuoteId(){return this.quoteId}setName(e){return this.name=e,this.updateBundle()}getDispatchDate(){return this.dispatchDate}setDispatchDate(e){return this.dispatchDate=e,this.updateBundle()}getPurchaseOrder(){return this.purchaseOrder}setPurchaseOrder(e){return this.purchaseOrder=e,this.updateBundle()}getMetadata(){return new Map(this.metadata)}setMetadata(e){return this.metadata=new Map(e),this.updateBundle()}setNameAndMetadata(e,t){return this.name=e,this.metadata=new Map(t),this.updateBundle()}hasGlobalProperties(){return!!this.productCollection?.globalPropertyConfiguration}getGlobalPropertyConfiguration(){return this.productCollection?.globalPropertyConfiguration}async getGlobalProperties(){return this.globalPropertyHandleService.applyConditionsFromState(await this.globalPropertyHandleService.getHandles(),this.getGlobalPropertyStateManager().getGlobalPropertyState())}async applyGlobalPropertyState(e){this.updatesLocked=!0;const t=await this.globalPropertyHandleService.getHandles();try{for(const n of e.aspects){const i=n?.name;await this.getGlobalPropertyStateManager().setAspect(i,n.value,void 0,void 0,n.hidden)}for(const n of e.aspects){const i=n?.name,a=t.find(s=>s.getName()===i);if(a)switch(n.type){case zn.FileUpload:{const s=a,o=await cg([n.value]);o.length>0&&await s.selectImage(o[0]);const l=n.storage?.colors;if(l){const u=Object.fromEntries(l.map(c=>[c.key,{browserValue:c.browserValue,pmsValue:c.pmsValue}])??[]);await s.changeColors(u)}break}case zn.ColorOption:{const s=a,l=(await s.getAllVariants()).find(c=>c.getId()===n.value),u=n.storage?n.storage:void 0;l&&await s.selectVariant(l),u?.customColor&&s.setCustomColor(u.customColor);break}case zn.Option:{const s=a,l=(await s.getAllVariants()).find(u=>u.getId()===n.value);l&&await s.selectVariant(l);break}case zn.Text:{await a.setText(n.value);break}}}}finally{this.updatesLocked=!1,this.onGlobalPropertiesChanged(void 0,this.globalPropertyStateManager.getGlobalPropertyState())}}getGlobalPropertyStateManager(){return this.globalPropertyStateManager}async getGlobalPropertyTotalSubunits(){return(await this.globalPropertyHandleService.getHandles()).filter(n=>n.getType()===zn.Option).map(n=>n.getCurrentVariant()?.getPrice()||0).reduce((n,i)=>n+i,0)}getTotalSubunits(){return this.workflowExperiences.map(e=>e.getTotalPriceSubunits()).reduce((e,t)=>e+t,0)}getProductCollection(){return this.productCollection?new T1(this.productCollection):void 0}async initializeAdditionalRequiredColorChannels(e){for(const t of e.getStepsByType(Je.Illustration)){const n=t.getGlobalPropertyAspects(this.globalConfigurationPropertyId||"");for(const i of n){const a=this.getGlobalPropertyConfiguration()?.aspects.find(s=>s.name===i);if(a&&a.type===zn.ColorOption){const s=t.getCurrentVariant()?.getAssetResource(),o=s?.assetConfiguration?.channelNumbers||[],l=s?.assetConfiguration?.defaultColorVariants||[],u=xI(this,i),c=[...new Set(o.map(f=>f.number))];if(c.length>u)for(const f of c){const d=this.getGlobalPropertyStateManager(),g=l.find(v=>v.channelNumber===f);g&&await d.setAspect(i,g.variant.id||"",void 0,g.channelNumber)}}}}}async addWorkflowExperience(e){await this.initializeAdditionalRequiredColorChannels(e),e.setBundle(this),await this.appendWorkflowExperience(e),await this.injectExperienceIntoPreviewService(e),await e.getWorkflowManager().getInitializationPromise();const t=await this.getGlobalProperties();for(const n of t)await n.applyGlobalState([e]);this.fireEvent("workflow-experience-added",{workflowExperiences:[e]})}async addWorkflowExperiences(e){for(const o of e)await this.initializeAdditionalRequiredColorChannels(o);const t=e.map(o=>o.getTransaction().id),n=t.map(o=>this.workflowExperiences.find(l=>l.getTransaction().id===o));if(n.some(o=>!!o))throw new Error("Unable to add transaction to bundle - Already Exists: "+n.filter(o=>!!o).map(o=>o?.getTransaction().id).join(", "));const i=xr.getMap("transactionOwnerIds")||new Map,a=t.map(o=>i.get(o));await $e.getShadowGraphqlClient().mutate({mutation:HU,variables:{id:this.id,transactionIds:t,transactionOwnerIds:a},context:{bundleOwnerId:this.ownerId}}).catch(o=>{console.error(o)}),this.workflowExperiences.push(...e);const s=async()=>{for(const l of e)l.setBundle(this),await this.injectExperienceIntoPreviewService(l);await Promise.all(e.map(l=>l.getWorkflowManager().getInitializationPromise()));const o=await this.getGlobalProperties();for(const l of o)await l.applyGlobalState(e)};await Promise.all([this.updateTransactionOrder(),s()]),await this.initializeUninitializedHandles(),this.workflowExperiences.forEach(o=>o.checkForPriceBreakChanges()),this.fireEvent("workflow-experience-added",{workflowExperiences:this.workflowExperiences})}async appendWorkflowExperience(e,t=!0){const n=e.getTransaction().id;if(this.workflowExperiences.find(o=>o.getTransaction().id===n))throw new Error("Unable to add transaction to bundle - Already Exists!");const s=(xr.getMap("transactionOwnerIds")||new Map).get(n);await $e.getShadowGraphqlClient().mutate({mutation:zU,variables:{id:this.id,transactionId:n},context:{bundleOwnerId:this.ownerId,transactionOwnerId:s}}),t&&(this.workflowExperiences.push(e),this.workflowExperiences.forEach(o=>o.checkForPriceBreakChanges()))}async removeWorkflowExperience(e){const t=this.workflowExperiences.indexOf(e);await this.removeTransaction(t,this.workflowExperiences[t].getTransaction()),this.fireEvent("workflow-experience-added",{workflowExperiences:[e]})}async removeWorkflowExperiences(e){await this.removeTransactions(e.map(t=>t.getTransaction()))}async removeWorkflowExperienceByTransaction(e){const t=this.workflowExperiences.findIndex(n=>n.getTransaction().id===e.id);await this.removeTransaction(t,e)}async removeWorkflowExperiencesByTransactions(e){await this.removeTransactions(e)}async removeTransaction(e,t,n=!0){if(e>-1){const i=this.workflowExperiences.find(a=>a.getTransaction().id===t.id);if(i.setBundle(void 0),this.previewService&&i.getWorkflowManager().ejectFromPreviewService(),this.bundleStateManager.removeStateForTransaction(t.id),await $e.getShadowGraphqlClient().mutate({mutation:jU,variables:{id:this.id,transactionId:t.id,name:this.name,metadata:Array.from(this.metadata.entries()).map(([a,s])=>({key:a,value:s})),bundleStateData:this.bundleStateManager.getSerializedState()},context:{bundleOwnerId:this.ownerId}}),n){const a=this.workflowExperiences.splice(e,1);this.workflowExperiences.forEach(s=>s.checkForPriceBreakChanges()),i.checkForPriceBreakChanges(),await this.updateTransactionOrder(),this.fireEvent("workflow-experience-removed",{workflowExperiences:a})}}else throw new Error("Unable to remove workflow experience from bundle - Not Found! - "+t.id)}async removeTransactions(e){const t=e.map(i=>this.workflowExperiences.findIndex(a=>a.getTransaction().id===i.id));if(t.some(i=>i===-1))throw new Error("Unable to remove workflow experience from bundle - The following aren't included in the bundle: "+e.filter((i,a)=>t[a]===-1).map(i=>i.id).join(", "));const n=e.map(i=>this.workflowExperiences.splice(this.workflowExperiences.findIndex(a=>a.getTransaction().id===i.id),1)[0]);n.forEach(i=>i.setBundle(void 0)),[...this.workflowExperiences,...n].forEach(i=>i.checkForPriceBreakChanges()),this.previewService&&n.forEach(i=>i.getWorkflowManager().ejectFromPreviewService()),e.forEach(i=>this.bundleStateManager.removeStateForTransaction(i.id)),await $e.getShadowGraphqlClient().mutate({mutation:GU,variables:{id:this.id,transactionIds:e.map(i=>i.id),name:this.name,metadata:Array.from(this.metadata.entries()).map(([i,a])=>({key:i,value:a})),bundleStateData:this.bundleStateManager.getSerializedState()},context:{bundleOwnerId:this.ownerId}}),this.fireEvent("workflow-experience-removed",{workflowExperiences:n}),await this.updateTransactionOrder()}async insertWorkflowExperience(e,t){await this.appendWorkflowExperience(e,!1),this.workflowExperiences.splice(t,0,e),await Promise.all([this.updateTransactionOrder(),(async()=>{await this.injectExperienceIntoPreviewService(e);const n=await this.getGlobalProperties();await Promise.all(n.map(i=>i.applyGlobalState([e])))})()])}async replaceWorkflowExperience(e,t){if(e<0||e>=this.workflowExperiences.length)throw new Error("Unable to replace workflow experience in bundle - Index out of range!");const n=this.workflowExperiences[e];if(n.getTransaction().id===t.getTransaction().id)throw new Error("Unable to replace workflow experience in bundle - Same transaction!");await Promise.all([this.removeTransaction(e,n.getTransaction(),!1),this.appendWorkflowExperience(t,!1)]),this.workflowExperiences[e]=t,await Promise.all([this.updateTransactionOrder(),(async()=>{await this.injectExperienceIntoPreviewService(t);const i=await this.getGlobalProperties();await Promise.all(i.map(a=>a.applyGlobalState([t])))})()])}async swapWorkflowExperiences(e,t){if(e<0||e>=this.workflowExperiences.length||t<0||t>=this.workflowExperiences.length)throw new Error("Unable to swap workflow experiences in bundle - Index out of range!");if(e===t)return;const n=this.workflowExperiences[e];this.workflowExperiences[e]=this.workflowExperiences[t],this.workflowExperiences[t]=n,await this.updateTransactionOrder()}getWorkflowExperiences(){return[...this.workflowExperiences]}async sortWorkflowExperiences(e){this.workflowExperiences=this.workflowExperiences.sort(e),await this.updateTransactionOrder()}getWorkflowExperienceCount(){return this.workflowExperiences.length}async addStakeholder(e,t){const n=await $e.getShadowGraphqlClient().mutate({mutation:$U,variables:{id:this.id,details:e,type:t||VA.Owner},context:{bundleOwnerId:this.ownerId}});if(!n.data?.bundleAddStakeholder)throw new Error("Bundle not found!");const i=n.data.bundleAddStakeholder.bundleStakeholders||[];this.storeStakeholderCustomers(i)}async removeStakeholder(e){if(!(await $e.getShadowGraphqlClient().mutate({mutation:qU,variables:{id:this.id,emailAddress:e},context:{bundleOwnerId:this.ownerId}})).data?.bundleRemoveStakeholder)throw new Error("Bundle not found!")}async updateStakeholders(e){const t=await $e.getShadowGraphqlClient().mutate({mutation:WU,variables:{id:this.id,input:e},context:{bundleOwnerId:this.ownerId}});if(!t.data?.bundleUpdateStakeholders)throw new Error("Bundle not found!");const n=t.data.bundleUpdateStakeholders.bundleStakeholders||[];this.storeStakeholderCustomers(n)}async getAllStakeholders(){const e=await $e.getShadowGraphqlClient().query({query:dE,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id},context:{bundleOwnerId:this.ownerId}});if(!e.data.bundles||e.data.bundles.length===0)throw new Error("Bundle not found!");const t=e.data.bundles[0].bundleStakeholders||[];return this.storeStakeholderCustomers(t),t}async getCurrentStakeholder(){const e=await $e.getShadowGraphqlClient().query({query:dE,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id},context:{bundleOwnerId:this.ownerId}});if(!e.data.bundles||e.data.bundles.length===0)throw new Error("Bundle not found!");return e.data.bundles[0].currentBundleStakeholder}storeStakeholderCustomers(e){e.forEach(t=>{t.customer&&this.client.storeCustomer(t.customer)})}async finish(e,t){this.completed&&await $e.getShadowGraphqlClient().mutate({mutation:KU,variables:{bundleId:this.id}});const n=await yI(this.workflowExperiences.map(i=>{const a=i.getWorkflow();if(!a)throw new Error("Unable to create designs - Workflow not found!");const s=i.getProduct();if(!s)throw new Error("Unable to create designs - Product not found!");return{workflowManager:i.getWorkflowManager(),workflow:a,layouts:i.getWorkflowManager().getLayouts(),getReducerState:()=>i.getCommandContext().getState(),product:s,transaction:i.getTransaction(),workflowSelections:i.getWorkflowManager().getWorkflowSelections(),designName:a.name,workflowMetadata:i.getWorkflowManager().getWorkflowMetadata()}}),t?(i,a)=>{const s=this.workflowExperiences.find(o=>o.getTransaction().id===a);return s?t(s,i):(console.warn("SpiffCommerce - Bundle create design - Unable to find experience for transaction: "+a),Promise.resolve(void 0))}:void 0);return{bundleId:this.id,name:this.getName(),dispatchDate:this.getDispatchDate()||"",purchaseOrder:this.getPurchaseOrder()||"",collectionId:this.getProductCollection()?.getId()||"",collectionName:this.getProductCollection()?.getName()||"",items:n,bundleOwnerId:this.ownerId}}async placeOrder(){const e=this.workflowExperiences.map(t=>({transactionId:t.getTransaction().id,amountToOrder:t.getTransaction().quantity||1}));return await this.getClient().placeOrder(e)}getPreviewService(){return this.previewService}async setPreviewService(e){if(this.workflowExperiences&&this.workflowExperiences.length>0&&(this.workflowExperiences.forEach(t=>t.getWorkflowManager().ejectFromPreviewService()),e))for(const t of this.workflowExperiences)await this.injectExperienceIntoPreviewService(t);e&&e.registerModelLoadEventListener&&e.registerModelLoadEventListener(this.onModelLoadEvent.bind(this)),this.previewService&&this.previewService!==e&&this.previewService.unregisterModelLoadEventListener&&this.previewService.unregisterModelLoadEventListener(this.onModelLoadEvent.bind(this)),this.previewService=e}async assignGlobalPropertyConfiguration(e){await $e.getShadowGraphqlClient().mutate({mutation:XU,variables:{bundleId:this.id,globalPropertyConfigurationId:e},context:{bundleOwnerId:this.ownerId}}),this.globalConfigurationPropertyId=e}async assignProductCollection(e){const t=await $e.getShadowGraphqlClient().mutate({mutation:YU(this.globalPropertyStateManager.getBundleOptions()?.eagerFetchProducts??!1),variables:{id:this.id,productCollectionId:e??""},context:{bundleOwnerId:this.ownerId}});if(t.data?.bundleAssignProductCollection.productCollection){this.productCollection=t.data.bundleAssignProductCollection.productCollection;const n=t.data.bundleAssignProductCollection.productCollection.globalPropertyConfiguration;this.globalPropertyStateManager.setConfiguration(n),await this.globalPropertyHandleService.getHandles(),this.globalConfigurationPropertyId=n?.id,await this.clearOldProducts(this.workflowExperiences)}}onModelLoadEvent(e){e.eventType==="unload"||!e.modelContainer||(e.modelContainer.registerMaterialSelectedCallback(()=>this.onModelSelectedEvent(e.modelContainer,!0)),e.modelContainer.registerMaterialDeselectedCallback(()=>this.onModelSelectedEvent(e.modelContainer,!1)))}onModelSelectedEvent(e,t){if(e&&e.metadata&&e.metadata instanceof Map&&e.metadata.has("workflowManager")){const i=e.metadata.get("workflowManager").getWorkflowExperience().getTransaction(),a=this.workflowExperiences.find(s=>s.getTransaction().id===i.id);a&&this.fireEvent(t?"workflow-experience-hover-enter":"workflow-experience-hover-exit",{workflowExperience:a})}}async injectExperienceIntoPreviewService(e){this.previewService&&await e.getWorkflowManager().injectIntoPreviewService(this.previewService)}async loadExistingWorkflowExperiences(e,t,n){let i=[];if(e.length>0&&(i=await this.client.getWorkflowExperiences(e.map(a=>({type:"transaction",transactionId:a})),t,void 0,n),i.forEach(a=>a.setBundle(this)),i.forEach(a=>a.checkForPriceBreakChanges()),this.workflowExperiences=i,this.previewService))for(const a of i)await this.injectExperienceIntoPreviewService(a);await this.clearOldProducts(i)}async clearOldProducts(e){if(!this.globalPropertyStateManager.getBundleOptions()?.readonly){const t=this.getProductIds()||[],n=this.getProductCollection();if(n&&t.length>0){await n.fetchProducts();const i=n.getProducts(),a=[],s=[];for(const l of t)if(!i.find(c=>c.getId()===l)){for(const c of e)c.getProduct()?.id===l&&s.push(c);a.push(l)}const o=[];a.length>0&&o.push(this.removeProductIds(a)),s.length>0&&o.push(Promise.all(s.map(l=>l.clearProduct()))),o.length>0&&await Promise.all(o)}}}async updateBundle(){if(!(await $e.getShadowGraphqlClient().mutate({mutation:Rp,variables:{id:this.id,name:this.name,metadata:Array.from(this.metadata.entries()).map(([t,n])=>({key:t,value:n})),bundleStateData:this.bundleStateManager.getSerializedState(),dispatchDate:this.dispatchDate,purchaseOrder:this.purchaseOrder},context:{bundleOwnerId:this.ownerId}})).data?.bundleUpdate)throw new Error("Bundle not found!")}async updateTransactionOrder(){await $e.getShadowGraphqlClient().mutate({mutation:QU,variables:{id:this.id,transactionIds:this.workflowExperiences.map(e=>e.getTransaction().id)},context:{bundleOwnerId:this.ownerId}})}async onGlobalPropertiesChanged(e,t){if(this.updatesLocked)return;const n=await this.globalPropertyHandleService.getHandles(),i=this.globalPropertyHandleService.applyConditionsFromState(n,e),a=this.globalPropertyHandleService.applyConditionsFromState(n,t);this.checkConditionalHandlesChanged(i,a),this.checkMandatoryHandlesChanged(e,a);const s=this.getGlobalPropertyStateManager();let o=[];for(const h of n)a.find(f=>f.getName()==h.getName())||(o=[...o,h.getName()]);await s.clearAspects(o);const l=a.map(h=>{if(h.getType()===zn.ColorOption||h.getType()===zn.Option){const f=h;if(!t.aspects.find(g=>g.name===f.getName()))return f.initDefaultVariant()}});await Promise.all(l),await Promise.all(a.map(h=>h.applyGlobalState()));const u=this.globalPropertyStateManager.getGlobalPropertyState(),c=this.globalPropertyHandleService.applyConditionsFromState(n,u);xd(a.sort(),c.sort())||(this.checkConditionalHandlesChanged(a,c),this.checkMandatoryHandlesChanged(u,c),await this.onGlobalPropertiesChanged(t,u))}checkConditionalHandlesChanged(e,t){(()=>{if(e.length!==t.length)return!0;for(let a=0;a<e.length;a++)if(e[a].getName()!==t[a].getName())return!0;return!1})()&&this.fireEvent("conditional-global-properties-changed",{globalProperties:t})}checkMandatoryHandlesChanged(e,t){const n=[],i=[],a=[],s=SI(e);t.forEach(o=>{if(o.isMandatory()){const l=o.isMandatoryFulfilled();l?i.push(o):a.push(o);const u=s.get(o.getName());(u===void 0||u!==l)&&n.push(o)}}),this.fireEvent("global-properties-mandatory-changed",{changed:n,completed:i,remaining:a})}fireEvent(e,t){this.eventEmitter.emit(e,t)}getShareActions(){return this.shareActions}getWorkflowViewerLink(){return this.workflowViewerLink}getWorkflowViewerAmendLink(){return this.workflowViewerAmendLink}async approve(e,t){await $e.getShadowGraphqlClient().mutate({mutation:ZU,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id,note:e,stakeholderId:t}})}async reject(e,t){await $e.getShadowGraphqlClient().mutate({mutation:e9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:this.id,note:e,stakeholderId:t}})}getQuoteCompleteMessage(){return{bundleId:this.id,bundleOwnerId:this.ownerId,quoteId:this.quoteId||""}}}const Q9=ke`
2558
2564
  mutation processFlowCreate($processFlowId: String!, $inputs: [String]!) {
2559
2565
  processExecutionCreate(processFlowId: $processFlowId, inputs: $inputs) {
2560
2566
  id
2561
2567
  }
2562
2568
  }
2563
- `;class kI{async execute(e,t,n){const a=(await $e.getShadowGraphqlClient().mutate({mutation:W9,variables:{processFlowId:e,inputs:[...t.map(h=>h.getValueForTransmission())]}})).data?.processExecutionCreate?.id;if(!a)throw new Error("Failed to create process execution.");function s(h){return new Promise(f=>{setTimeout(f,h)})}let o=!1,l=0,u,c;for(;!o;){u=await $e.getShadowGraphqlClient().query({query:Fe`
2569
+ `;class kI{async execute(e,t,n){const a=(await $e.getShadowGraphqlClient().mutate({mutation:Q9,variables:{processFlowId:e,inputs:[...t.map(h=>h.getValueForTransmission())]}})).data?.processExecutionCreate?.id;if(!a)throw new Error("Failed to create process execution.");function s(h){return new Promise(f=>{setTimeout(f,h)})}let o=!1,l=0,u,c;for(;!o;){u=await $e.getShadowGraphqlClient().query({query:ke`
2564
2570
  query getProcessFlowExecution($ids: [String]!) {
2565
2571
  processExecutions(ids: $ids) {
2566
2572
  id
@@ -2573,7 +2579,7 @@ Minimum version required to store current data is: `+X+`.
2573
2579
  }
2574
2580
  }
2575
2581
  }
2576
- `,variables:{ids:[a]}});const h=u.data?.processExecutions[0];if(!u||!h)throw new Error("Failed to retrieve server response for execution.");if(h.failedAt)throw new Error("Execution has failed to complete. See Automation > FLows in Flight on partner account on SpiffCommerce Hub.");if(h.completedAt){o=!0,c=new FI(h);break}l+=1;const f=n?.repeats?n?.repeats:5;if(l>=f)throw new Error("Maximum wait time exceeded for execution result.");await s(n?.sleepTime?Math.max(n.sleepTime,500):2e3)}if(!c)throw new Error("Failed to retrieve server response for execution.");return Promise.resolve(c)}}class FI{constructor(e){this.execution=e}getRaw(){return this.execution}getNodes(){return this.execution.nodes.map(e=>new Qf(e))}getNodesByType(e){return this.execution.nodes.filter(t=>t.type===e).map(t=>new Qf(t))}getInputs(){return this.execution.nodes.filter(e=>e.type==="StartTerminal").map(e=>new Qf(e))}getOutputs(){return this.execution.nodes.filter(e=>e.type==="EndTerminal").map(e=>new Qf(e))}getCompletedAt(){if(this.execution.completedAt)return new Date(this.execution.completedAt)}getFailedAt(){if(this.execution.failedAt)return new Date(this.execution.failedAt)}}class Qf{constructor(e){this.node=e}getId(){return this.node.id}getType(){return this.node.type}getArtifacts(){return new Map(Object.entries(JSON.parse(this.node.artifacts).value))}getArtifactByName(e){return this.getArtifacts().get(e)}}class I1{constructor(e){this.value=e}getRaw(){return this.value}getValueForTransmission(){const e=this.value;return e.startsWith("[")?JSON.stringify(JSON.parse(e)):e}}var TI=(r=>(r.Transaction="Transaction",r.Bundle="Bundle",r.Product="Product",r.Variant="Variant",r.Option="Option",r.LineItem="LineItem",r.Asset="Asset",r))(TI||{});class Q9 extends I1{constructor(e){super(`"${e}"`)}}class D1 extends I1{constructor(e,t){if(t!=="Asset"&&!D1.validUUID(e))throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");super(`{"isSpiffObject": true, "id": "${e}", "type": "${t}"}`)}static validUUID(e){return e.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i)}}class Y9 extends I1{constructor(e){super(`[${e.map(t=>t.getRaw()).join(",")}]`)}}class cA{constructor(e){this.integrationProduct=e}getId(){return this.integrationProduct.id}getResource(){return this.integrationProduct}getBasePrice(){if(!this.integrationProduct.product)throw new Error("IntegrationProductResource does not have a product");const e=this.integrationProduct.product.basePrice||0,t=this.integrationProduct?.additionalIntegrationProduct;if(!t)return e;if(t&&!t.product)throw new Error("An additional integration product was found, but it does not have a product");return e+(t.product.basePrice||0)}getDefaultWorkflow(){if(!this.integrationProduct.product)throw new Error("IntegrationProductResource does not have a product");const e=this.integrationProduct.product.workflows||[];if(e.length===0)throw new Error("No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product.");return new Qu(e[0])}getAllWorkflows(){if(!this.integrationProduct.product)throw new Error("IntegrationProductResource does not have a product");const e=this.integrationProduct.product.workflows||[];if(e.length===0)throw new Error("No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product.");return e.sort((t,n)=>(t.index??0)-(n.index??0)).map(t=>new Qu(t))}}const Bp=Fe`
2582
+ `,variables:{ids:[a]}});const h=u.data?.processExecutions[0];if(!u||!h)throw new Error("Failed to retrieve server response for execution.");if(h.failedAt)throw new Error("Execution has failed to complete. See Automation > FLows in Flight on partner account on SpiffCommerce Hub.");if(h.completedAt){o=!0,c=new FI(h);break}l+=1;const f=n?.repeats?n?.repeats:5;if(l>=f)throw new Error("Maximum wait time exceeded for execution result.");await s(n?.sleepTime?Math.max(n.sleepTime,500):2e3)}if(!c)throw new Error("Failed to retrieve server response for execution.");return Promise.resolve(c)}}class FI{constructor(e){this.execution=e}getRaw(){return this.execution}getNodes(){return this.execution.nodes.map(e=>new Qf(e))}getNodesByType(e){return this.execution.nodes.filter(t=>t.type===e).map(t=>new Qf(t))}getInputs(){return this.execution.nodes.filter(e=>e.type==="StartTerminal").map(e=>new Qf(e))}getOutputs(){return this.execution.nodes.filter(e=>e.type==="EndTerminal").map(e=>new Qf(e))}getCompletedAt(){if(this.execution.completedAt)return new Date(this.execution.completedAt)}getFailedAt(){if(this.execution.failedAt)return new Date(this.execution.failedAt)}}class Qf{constructor(e){this.node=e}getId(){return this.node.id}getType(){return this.node.type}getArtifacts(){return new Map(Object.entries(JSON.parse(this.node.artifacts).value))}getArtifactByName(e){return this.getArtifacts().get(e)}}class I1{constructor(e){this.value=e}getRaw(){return this.value}getValueForTransmission(){const e=this.value;return e.startsWith("[")?JSON.stringify(JSON.parse(e)):e}}var TI=(r=>(r.Transaction="Transaction",r.Bundle="Bundle",r.Product="Product",r.Variant="Variant",r.Option="Option",r.LineItem="LineItem",r.Asset="Asset",r))(TI||{});class Y9 extends I1{constructor(e){super(`"${e}"`)}}class D1 extends I1{constructor(e,t){if(t!=="Asset"&&!D1.validUUID(e))throw new Error("Invalid ID, must be a valid v4 UUID. https://www.uuidgenerator.net/");super(`{"isSpiffObject": true, "id": "${e}", "type": "${t}"}`)}static validUUID(e){return e.match(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i)}}class X9 extends I1{constructor(e){super(`[${e.map(t=>t.getRaw()).join(",")}]`)}}class cA{constructor(e){this.integrationProduct=e}getId(){return this.integrationProduct.id}getResource(){return this.integrationProduct}getBasePrice(){if(!this.integrationProduct.product)throw new Error("IntegrationProductResource does not have a product");const e=this.integrationProduct.product.basePrice||0,t=this.integrationProduct?.additionalIntegrationProduct;if(!t)return e;if(t&&!t.product)throw new Error("An additional integration product was found, but it does not have a product");return e+(t.product.basePrice||0)}getDefaultWorkflow(){if(!this.integrationProduct.product)throw new Error("IntegrationProductResource does not have a product");const e=this.integrationProduct.product.workflows||[];if(e.length===0)throw new Error("No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product.");return new Qu(e[0])}getAllWorkflows(){if(!this.integrationProduct.product)throw new Error("IntegrationProductResource does not have a product");const e=this.integrationProduct.product.workflows||[];if(e.length===0)throw new Error("No workflows found on product. This is generally due to a configuration error. Please confirm at least one workflow is configured for this product.");return e.sort((t,n)=>(t.index??0)-(n.index??0)).map(t=>new Qu(t))}}const Bp=ke`
2577
2583
  query GetCustomer($emailAddress: String!) {
2578
2584
  customer(emailAddress: $emailAddress) {
2579
2585
  id
@@ -2591,7 +2597,7 @@ Minimum version required to store current data is: `+X+`.
2591
2597
  }
2592
2598
  }
2593
2599
  }
2594
- `,X9=Fe`
2600
+ `,J9=ke`
2595
2601
  mutation CustomerCreate($details: CustomerDetailsInput!) {
2596
2602
  customerCreate(details: $details) {
2597
2603
  id
@@ -2601,7 +2607,7 @@ Minimum version required to store current data is: `+X+`.
2601
2607
  }
2602
2608
  }
2603
2609
  }
2604
- `;Fe`
2610
+ `;ke`
2605
2611
  mutation CustomerAuthenticate($loginToken: String!) {
2606
2612
  customerAuthenticate(loginToken: $loginToken) {
2607
2613
  id
@@ -2631,11 +2637,11 @@ Minimum version required to store current data is: `+X+`.
2631
2637
  }
2632
2638
  }
2633
2639
  }
2634
- `;const J9=Fe`
2640
+ `;const K9=ke`
2635
2641
  mutation CustomerGenerateVerificationCode($emailAddress: String!) {
2636
2642
  customerGenerateVerificationCode(emailAddress: $emailAddress)
2637
2643
  }
2638
- `;Fe`
2644
+ `;ke`
2639
2645
  mutation CustomerVerifyCode($emailAddress: String!, $verificationCode: String!) {
2640
2646
  customerVerifyCode(emailAddress: $emailAddress, verificationCode: $verificationCode) {
2641
2647
  id
@@ -2666,7 +2672,7 @@ Minimum version required to store current data is: `+X+`.
2666
2672
  }
2667
2673
  }
2668
2674
  }
2669
- `;const K9=Fe`
2675
+ `;const Z9=ke`
2670
2676
  query CustomerMetafields($id: String!) {
2671
2677
  metafields(entityId: $id) {
2672
2678
  id
@@ -2684,13 +2690,13 @@ Minimum version required to store current data is: `+X+`.
2684
2690
  }
2685
2691
  }
2686
2692
  }
2687
- `;class Z9{constructor(e,t=$e.getShadowGraphqlClient.bind($e)){this.options=e,this.client=t}query(e){const t=this.options?.onQuery?this.options?.onQuery(e):{};return this.client().query({...t,...e,context:{...t.context??{},...e.context??{}}})}mutate(e){const t=this.options?.onMutate?this.options?.onMutate(e):{};return this.client().mutate({...t,...e,context:{...t.context??{},...e.context??{}}})}}const eV=r=>({setHttpHandler(e){r.httpHandler=e},httpHandler(){return r.httpHandler},updateHttpClientConfig(e,t){r.httpHandler?.updateHttpClientConfig(e,t)},httpHandlerConfigs(){return r.httpHandler.httpHandlerConfigs()}}),tV=r=>({httpHandler:r.httpHandler()});var Id;(function(r){r.HTTP="http",r.HTTPS="https"})(Id||(Id={}));var Dd;(function(r){r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256"})(Dd||(Dd={}));const fA="__smithy_context";class aa{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new aa({...e,headers:{...e.headers}});return t.query&&(t.query=rV(t.query)),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query=="object"&&typeof t.headers=="object"}clone(){return aa.clone(this)}}function rV(r){return Object.keys(r).reduce((e,t)=>{const n=r[t];return{...e,[t]:Array.isArray(n)?[...n]:n}},{})}class fc{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return typeof t.statusCode=="number"&&typeof t.headers=="object"}}const nV=r=>e=>async t=>{if(!aa.isInstance(t.request))return e(t);const{request:n}=t,{handlerProtocol:i=""}=r.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let a=n.hostname;n.port!=null&&(a+=`:${n.port}`),n.headers.host=a}return e(t)},iV={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},aV=r=>({applyToStack:e=>{e.add(nV(r),iV)}}),sV=()=>(r,e)=>async t=>{try{const n=await r(t),{clientName:i,commandName:a,logger:s,dynamoDbDocumentClientOptions:o={}}=e,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=o,c=l??e.inputFilterSensitiveLog,h=u??e.outputFilterSensitiveLog,{$metadata:f,...d}=n.output;return s?.info?.({clientName:i,commandName:a,input:c(t.input),output:h(d),metadata:f}),n}catch(n){const{clientName:i,commandName:a,logger:s,dynamoDbDocumentClientOptions:o={}}=e,{overrideInputFilterSensitiveLog:l}=o,u=l??e.inputFilterSensitiveLog;throw s?.error?.({clientName:i,commandName:a,input:u(t.input),error:n,metadata:n.$metadata}),n}},oV={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},lV=r=>({applyToStack:e=>{e.add(sV(),oV)}}),uV={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},cV=()=>r=>async e=>r(e),fV=r=>({applyToStack:e=>{e.add(cV(),uV)}}),xc=r=>r[fA]||(r[fA]={}),Ls=r=>{if(typeof r=="function")return r;const e=Promise.resolve(r);return()=>e},dV=(r,e)=>{if(!e||e.length===0)return r;const t=[];for(const n of e)for(const i of r)i.schemeId.split("#")[1]===n&&t.push(i);for(const n of r)t.find(({schemeId:i})=>i===n.schemeId)||t.push(n);return t};function hV(r){const e=new Map;for(const t of r)e.set(t.schemeId,t);return e}const pV=(r,e)=>(t,n)=>async i=>{const a=r.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(r,n,i.input)),s=r.authSchemePreference?await r.authSchemePreference():[],o=dV(a,s),l=hV(r.httpAuthSchemes),u=xc(n),c=[];for(const h of o){const f=l.get(h.schemeId);if(!f){c.push(`HttpAuthScheme \`${h.schemeId}\` was not enabled for this service.`);continue}const d=f.identityProvider(await e.identityProviderConfigProvider(r));if(!d){c.push(`HttpAuthScheme \`${h.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:g={},signingProperties:v={}}=h.propertiesExtractor?.(r,n)||{};h.identityProperties=Object.assign(h.identityProperties||{},g),h.signingProperties=Object.assign(h.signingProperties||{},v),u.selectedHttpAuthScheme={httpAuthOption:h,identity:await d(h.identityProperties),signer:f.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(c.join(`
2688
- `));return t(i)},gV={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},mV=(r,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:t})=>({applyToStack:n=>{n.addRelativeTo(pV(r,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:t}),gV)}}),vV=r=>e=>{throw e},yV=(r,e)=>{},AV=r=>(e,t)=>async n=>{if(!aa.isInstance(n.request))return e(n);const a=xc(t).selectedHttpAuthScheme;if(!a)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:s={}},identity:o,signer:l}=a,u=await e({...n,request:await l.sign(n.request,o,s)}).catch((l.errorHandler||vV)(s));return(l.successHandler||yV)(u.response,s),u},bV={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},wV=r=>({applyToStack:e=>{e.addRelativeTo(AV(),bV)}}),sd=r=>{if(typeof r=="function")return r;const e=Promise.resolve(r);return()=>e},II="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bE=Object.entries(II).reduce((r,[e,t])=>(r[t]=Number(e),r),{}),CV=II.split(""),Yu=6,od=8,xV=63,nm=r=>{let e=r.length/4*3;r.slice(-2)==="=="?e-=2:r.slice(-1)==="="&&e--;const t=new ArrayBuffer(e),n=new DataView(t);for(let i=0;i<r.length;i+=4){let a=0,s=0;for(let u=i,c=i+3;u<=c;u++)if(r[u]!=="="){if(!(r[u]in bE))throw new TypeError(`Invalid character ${r[u]} in base64 string.`);a|=bE[r[u]]<<(c-u)*Yu,s+=Yu}else a>>=Yu;const o=i/4*3;a>>=s%od;const l=Math.floor(s/od);for(let u=0;u<l;u++){const c=(l-u-1)*od;n.setUint8(o+u,(a&255<<c)>>c)}}return new Uint8Array(t)},Il=r=>new TextEncoder().encode(r),Pd=r=>typeof r=="string"?Il(r):ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(r),im=r=>{if(typeof r=="string")return r;if(typeof r!="object"||typeof r.byteOffset!="number"||typeof r.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(r)};function Eg(r){let e;typeof r=="string"?e=Il(r):e=r;const t=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!t&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let a=0;a<e.length;a+=3){let s=0,o=0;for(let u=a,c=Math.min(a+3,e.length);u<c;u++)s|=e[u]<<(c-u-1)*od,o+=od;const l=Math.ceil(o/Yu);s<<=l*Yu-o;for(let u=1;u<=l;u++){const c=(l-u)*Yu;i+=CV[(s&xV<<c)>>c]}i+="==".slice(0,4-l)}return i}class Sl extends Uint8Array{static fromString(e,t="utf-8"){if(typeof e=="string")return t==="base64"?Sl.mutate(nm(e)):Sl.mutate(Il(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Sl.prototype),e}transformToString(e="utf-8"){return e==="base64"?Eg(this):im(this)}}const El=r=>encodeURIComponent(r).replace(/[!'()*]/g,SV),SV=r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;function EV(r){const e=[];for(let t of Object.keys(r).sort()){const n=r[t];if(t=El(t),Array.isArray(n))for(let i=0,a=n.length;i<a;i++)e.push(`${t}=${El(n[i])}`);else{let i=t;(n||typeof n=="string")&&(i+=`=${El(n)}`),e.push(i)}}return e.join("&")}function wE(r,e){return new Request(r,e)}function kV(r=0){return new Promise((e,t)=>{r&&setTimeout(()=>{const n=new Error(`Request did not complete within ${r} ms`);n.name="TimeoutError",t(n)},r)})}const Mv={supported:void 0};class P1{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new P1(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(t=>t||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Mv.supported===void 0&&(Mv.supported=typeof Request<"u"&&"keepalive"in wE("https://[::1]"))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,a=this.config.keepAlive===!0,s=this.config.credentials;if(t?.aborted){const C=CE(t);return Promise.reject(C)}let o=e.path;const l=EV(e.query||{});l&&(o+=`?${l}`),e.fragment&&(o+=`#${e.fragment}`);let u="";if(e.username!=null||e.password!=null){const C=e.username??"",k=e.password??"";u=`${C}:${k}@`}const{port:c,method:h}=e,f=`${e.protocol}//${u}${e.hostname}${c?`:${c}`:""}${o}`,d=h==="GET"||h==="HEAD"?void 0:e.body,g={body:d,headers:new Headers(e.headers),method:h,credentials:s};this.config?.cache&&(g.cache=this.config.cache),d&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=t),Mv.supported&&(g.keepalive=a),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(e));let v=()=>{};const y=wE(f,g),A=[fetch(y).then(C=>{const k=C.headers,T={};for(const R of k.entries())T[R[0]]=R[1];return C.body!=null?{response:new fc({headers:T,reason:C.statusText,statusCode:C.status,body:C.body})}:C.blob().then(R=>({response:new fc({headers:T,reason:C.statusText,statusCode:C.status,body:R})}))}),kV(i)];return t&&A.push(new Promise((C,k)=>{const T=()=>{const S=CE(t);k(S)};if(typeof t.addEventListener=="function"){const S=t;S.addEventListener("abort",T,{once:!0}),v=()=>S.removeEventListener("abort",T)}else t.onabort=T})),Promise.race(A).finally(v)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}function CE(r){const e=r&&typeof r=="object"&&"reason"in r?r.reason:void 0;if(e){if(e instanceof Error){const i=new Error("Request aborted");return i.name="AbortError",i.cause=e,i}const n=new Error(String(e));return n.name="AbortError",n}const t=new Error("Request aborted");return t.name="AbortError",t}const FV=async r=>typeof Blob=="function"&&r instanceof Blob||r.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await r.arrayBuffer()):TV(r):IV(r);async function TV(r){const e=await DV(r),t=nm(e);return new Uint8Array(t)}async function IV(r){const e=[],t=r.getReader();let n=!1,i=0;for(;!n;){const{done:o,value:l}=await t.read();l&&(e.push(l),i+=l.length),n=o}const a=new Uint8Array(i);let s=0;for(const o of e)a.set(o,s),s+=o.length;return a}function DV(r){return new Promise((e,t)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return t(new Error("Reader aborted too early"));const i=n.result??"",a=i.indexOf(","),s=a>-1?a+1:i.length;e(i.substring(s))},n.onabort=()=>t(new Error("Read aborted")),n.onerror=()=>t(n.error),n.readAsDataURL(r)})}const DI={},dA={};for(let r=0;r<256;r++){let e=r.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),DI[r]=e,dA[e]=r}function PV(r){if(r.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2){const n=r.slice(t,t+2).toLowerCase();if(n in dA)e[t/2]=dA[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e}function kl(r){let e="";for(let t=0;t<r.byteLength;t++)e+=DI[r[t]];return e}const hA=async(r=new Uint8Array,e)=>{if(r instanceof Uint8Array)return Sl.mutate(r);if(!r)return Sl.mutate(new Uint8Array);const t=e.streamCollector(r);return Sl.mutate(await t)},eg=r=>typeof r=="function"?r():r,PI=(r,e,t,n,i)=>({name:e,namespace:r,traits:t,input:n,output:i}),RV=r=>(e,t)=>async n=>{const{response:i}=await e(n),{operationSchema:a}=xc(t),[,s,o,l,u,c]=a??[];try{const h=await r.protocol.deserializeResponse(PI(s,o,l,u,c),{...r,...t},i);return{response:i,output:h}}catch(h){if(Object.defineProperty(h,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in h)){const f="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{h.message+=`
2689
- `+f}catch{!t.logger||t.logger?.constructor?.name==="NoOpLogger"?console.warn(f):t.logger?.warn?.(f)}typeof h.$responseBodyText<"u"&&h.$response&&(h.$response.body=h.$responseBodyText);try{if(fc.isInstance(i)){const{headers:d={}}=i,g=Object.entries(d);h.$metadata={httpStatusCode:i.statusCode,requestId:_v(/^x-[\w-]+-request-?id$/,g),extendedRequestId:_v(/^x-[\w-]+-id-2$/,g),cfId:_v(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw h}},_v=(r,e)=>(e.find(([t])=>t.match(r))||[void 0,void 0])[1];function OV(r){const e={};if(r=r.replace(/^\?/,""),r)for(const t of r.split("&")){let[n,i=null]=t.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in e?Array.isArray(e[n])?e[n].push(i):e[n]=[e[n],i]:e[n]=i}return e}const dc=r=>{if(typeof r=="string")return dc(new URL(r));const{hostname:e,pathname:t,port:n,protocol:i,search:a}=r;let s;return a&&(s=OV(a)),{hostname:e,port:n?parseInt(n):void 0,protocol:i,path:t,query:s}},BV=r=>{if(typeof r=="object"){if("url"in r){const e=dc(r.url);if(r.headers){e.headers={};for(const[t,n]of Object.entries(r.headers))e.headers[t.toLowerCase()]=n.join(", ")}return e}return r}return dc(r)},MV=r=>(e,t)=>async n=>{const{operationSchema:i}=xc(t),[,a,s,o,l,u]=i??[],c=t.endpointV2?async()=>BV(t.endpointV2):r.endpoint,h=await r.protocol.serializeRequest(PI(a,s,o,l,u),n.input,{...r,...t,endpoint:c});return e({...n,request:h})},_V={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},NV={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function LV(r){return{applyToStack:e=>{e.add(MV(r),NV),e.add(RV(r),_V),r.protocol.setSerdeContext(r)}}}const Nv=[];function Yf(r){if(typeof r=="object")return r;if(r=r|0,Nv[r])return Nv[r];const e={};let t=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(r>>t++&1)===1&&(e[n]=1);return Nv[r]=e}const Of={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},Lv=[],Uv={};class vi{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=vi.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const n=[];let i=e,a=e;for(this._isMemberSchema=!1;Vv(i);)n.push(i[1]),i=i[0],a=eg(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let s=n.length-1;s>=0;--s){const o=n[s];Object.assign(this.memberTraits,Yf(o))}}else this.memberTraits=0;if(a instanceof vi){const s=this.memberTraits;Object.assign(this,a),this.memberTraits=Object.assign({},s,a.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=t??a.memberName;return}if(this.schema=eg(a),UV(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(a),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);return!t&&typeof e=="object"&&e!==null?e.symbol===this.symbol:t}static of(e){const t=typeof e=="function"||typeof e=="object"&&e!==null;if(typeof e=="number"){if(Lv[e])return Lv[e]}else if(typeof e=="string"){if(Uv[e])return Uv[e]}else if(t&&e[Of.ns])return e[Of.ns];const n=eg(e);if(n instanceof vi)return n;if(Vv(n)){const[a,s]=n;if(a instanceof vi)return Object.assign(a.getMergedTraits(),Yf(s)),a;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}const i=new vi(n);return t?e[Of.ns]=i:typeof n=="string"?Uv[n]=i:typeof n=="number"?Lv[n]=i:i}getSchema(){const e=this.schema;return Array.isArray(e)&&e[0]===0?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const e=this.getSchema();if(typeof e!="object")return!1;const t=e[0];return t===3||t===-3||t===4}isUnionSchema(){const e=this.getSchema();return typeof e!="object"?!1:e[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Yf(this.memberTraits)}getOwnTraits(){return Yf(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema(),i=e?15:n[4]??0;return Bf([i,0],"key")}getValueSchema(){const e=this.getSchema(),[t,n,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],a=typeof e=="number"?63&e:e&&typeof e=="object"&&(n||i)?e[3+e[0]]:t?15:void 0;if(a!=null)return Bf([a,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const n=t[4].indexOf(e),i=t[5][n];return Bf(Vv(i)?i:[i,0],e)}if(this.isDocumentSchema())return Bf([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,n]of this.structIterator())e[t]=n}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let n=e[Of.it];if(n&&t===n.length){yield*n;return}n=Array(t);for(let i=0;i<t;++i){const a=e[4][i],s=Bf([e[5][i],0],a);yield n[i]=[a,s]}e[Of.it]=n}}function Bf(r,e){if(r instanceof vi)return Object.assign(r,{memberName:e,_isMemberSchema:!0});const t=vi;return new t(r,e)}const Vv=r=>Array.isArray(r)&&r.length===2,UV=r=>Array.isArray(r)&&r.length>=5;class ra{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,n=new Map){this.namespace=e,this.schemas=t,this.exceptions=n}static for(e){return ra.registries.has(e)||ra.registries.set(e,new ra(e)),ra.registries.get(e)}copyFrom(e){const{schemas:t,exceptions:n}=this;for(const[i,a]of e.schemas)t.has(i)||t.set(i,a);for(const[i,a]of e.exceptions)n.has(i)||n.set(i,a)}register(e,t){const n=this.normalizeShapeId(e);for(const i of[this,ra.for(n.split("#")[0])])i.schemas.set(n,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const n=e,i=n[1];for(const a of[this,ra.for(i)])a.schemas.set(i+"#"+n[2],n),a.exceptions.set(n,t)}getErrorCtor(e){const t=e;return this.exceptions.has(t)?this.exceptions.get(t):ra.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,n]=e,i=t+"#"+n;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const pA=r=>{if(r!=null){if(typeof r=="string"){const e=parseFloat(r);if(!Number.isNaN(e))return String(e)!==String(r)&&QV.warn(WV(`Expected number but observed string: ${r}`)),e}if(typeof r=="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)}},VV=Math.ceil(2**127*(2-2**-23)),xE=r=>{const e=pA(r);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0&&Math.abs(e)>VV)throw new TypeError(`Expected 32-bit float, got ${r}`);return e},zV=r=>{if(r!=null){if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)}},SE=r=>RI(r,16),EE=r=>RI(r,8),RI=(r,e)=>{const t=zV(r);if(t!==void 0&&HV(t,e)!==t)throw new TypeError(`Expected ${e}-bit integer, got ${r}`);return t},HV=(r,e)=>{switch(e){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},jV=r=>pA(typeof r=="string"?am(r):r),GV=r=>xE(typeof r=="string"?am(r):r),$V=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,am=r=>{const e=r.match($V);if(e===null||e[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},kg=r=>SE(typeof r=="string"?am(r):r),qV=r=>EE(typeof r=="string"?am(r):r),WV=r=>String(new TypeError(r).stack||r).split(`
2693
+ `;class eV{constructor(e,t=$e.getShadowGraphqlClient.bind($e)){this.options=e,this.client=t}query(e){const t=this.options?.onQuery?this.options?.onQuery(e):{};return this.client().query({...t,...e,context:{...t.context??{},...e.context??{}}})}mutate(e){const t=this.options?.onMutate?this.options?.onMutate(e):{};return this.client().mutate({...t,...e,context:{...t.context??{},...e.context??{}}})}}const tV=r=>({setHttpHandler(e){r.httpHandler=e},httpHandler(){return r.httpHandler},updateHttpClientConfig(e,t){r.httpHandler?.updateHttpClientConfig(e,t)},httpHandlerConfigs(){return r.httpHandler.httpHandlerConfigs()}}),rV=r=>({httpHandler:r.httpHandler()});var Id;(function(r){r.HTTP="http",r.HTTPS="https"})(Id||(Id={}));var Dd;(function(r){r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256"})(Dd||(Dd={}));const fA="__smithy_context";class aa{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?e.protocol.slice(-1)!==":"?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?e.path.charAt(0)!=="/"?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static clone(e){const t=new aa({...e,headers:{...e.headers}});return t.query&&(t.query=nV(t.query)),t}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&typeof t.query=="object"&&typeof t.headers=="object"}clone(){return aa.clone(this)}}function nV(r){return Object.keys(r).reduce((e,t)=>{const n=r[t];return{...e,[t]:Array.isArray(n)?[...n]:n}},{})}class fc{statusCode;reason;headers;body;constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return typeof t.statusCode=="number"&&typeof t.headers=="object"}}const iV=r=>e=>async t=>{if(!aa.isInstance(t.request))return e(t);const{request:n}=t,{handlerProtocol:i=""}=r.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!n.headers[":authority"])delete n.headers.host,n.headers[":authority"]=n.hostname+(n.port?":"+n.port:"");else if(!n.headers.host){let a=n.hostname;n.port!=null&&(a+=`:${n.port}`),n.headers.host=a}return e(t)},aV={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},sV=r=>({applyToStack:e=>{e.add(iV(r),aV)}}),oV=()=>(r,e)=>async t=>{try{const n=await r(t),{clientName:i,commandName:a,logger:s,dynamoDbDocumentClientOptions:o={}}=e,{overrideInputFilterSensitiveLog:l,overrideOutputFilterSensitiveLog:u}=o,c=l??e.inputFilterSensitiveLog,h=u??e.outputFilterSensitiveLog,{$metadata:f,...d}=n.output;return s?.info?.({clientName:i,commandName:a,input:c(t.input),output:h(d),metadata:f}),n}catch(n){const{clientName:i,commandName:a,logger:s,dynamoDbDocumentClientOptions:o={}}=e,{overrideInputFilterSensitiveLog:l}=o,u=l??e.inputFilterSensitiveLog;throw s?.error?.({clientName:i,commandName:a,input:u(t.input),error:n,metadata:n.$metadata}),n}},lV={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},uV=r=>({applyToStack:e=>{e.add(oV(),lV)}}),cV={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},fV=()=>r=>async e=>r(e),dV=r=>({applyToStack:e=>{e.add(fV(),cV)}}),xc=r=>r[fA]||(r[fA]={}),Ls=r=>{if(typeof r=="function")return r;const e=Promise.resolve(r);return()=>e},hV=(r,e)=>{if(!e||e.length===0)return r;const t=[];for(const n of e)for(const i of r)i.schemeId.split("#")[1]===n&&t.push(i);for(const n of r)t.find(({schemeId:i})=>i===n.schemeId)||t.push(n);return t};function pV(r){const e=new Map;for(const t of r)e.set(t.schemeId,t);return e}const gV=(r,e)=>(t,n)=>async i=>{const a=r.httpAuthSchemeProvider(await e.httpAuthSchemeParametersProvider(r,n,i.input)),s=r.authSchemePreference?await r.authSchemePreference():[],o=hV(a,s),l=pV(r.httpAuthSchemes),u=xc(n),c=[];for(const h of o){const f=l.get(h.schemeId);if(!f){c.push(`HttpAuthScheme \`${h.schemeId}\` was not enabled for this service.`);continue}const d=f.identityProvider(await e.identityProviderConfigProvider(r));if(!d){c.push(`HttpAuthScheme \`${h.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:g={},signingProperties:v={}}=h.propertiesExtractor?.(r,n)||{};h.identityProperties=Object.assign(h.identityProperties||{},g),h.signingProperties=Object.assign(h.signingProperties||{},v),u.selectedHttpAuthScheme={httpAuthOption:h,identity:await d(h.identityProperties),signer:f.signer};break}if(!u.selectedHttpAuthScheme)throw new Error(c.join(`
2694
+ `));return t(i)},mV={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},vV=(r,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:t})=>({applyToStack:n=>{n.addRelativeTo(gV(r,{httpAuthSchemeParametersProvider:e,identityProviderConfigProvider:t}),mV)}}),yV=r=>e=>{throw e},AV=(r,e)=>{},bV=r=>(e,t)=>async n=>{if(!aa.isInstance(n.request))return e(n);const a=xc(t).selectedHttpAuthScheme;if(!a)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:s={}},identity:o,signer:l}=a,u=await e({...n,request:await l.sign(n.request,o,s)}).catch((l.errorHandler||yV)(s));return(l.successHandler||AV)(u.response,s),u},wV={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:"retryMiddleware"},CV=r=>({applyToStack:e=>{e.addRelativeTo(bV(),wV)}}),sd=r=>{if(typeof r=="function")return r;const e=Promise.resolve(r);return()=>e},II="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bE=Object.entries(II).reduce((r,[e,t])=>(r[t]=Number(e),r),{}),xV=II.split(""),Yu=6,od=8,SV=63,nm=r=>{let e=r.length/4*3;r.slice(-2)==="=="?e-=2:r.slice(-1)==="="&&e--;const t=new ArrayBuffer(e),n=new DataView(t);for(let i=0;i<r.length;i+=4){let a=0,s=0;for(let u=i,c=i+3;u<=c;u++)if(r[u]!=="="){if(!(r[u]in bE))throw new TypeError(`Invalid character ${r[u]} in base64 string.`);a|=bE[r[u]]<<(c-u)*Yu,s+=Yu}else a>>=Yu;const o=i/4*3;a>>=s%od;const l=Math.floor(s/od);for(let u=0;u<l;u++){const c=(l-u-1)*od;n.setUint8(o+u,(a&255<<c)>>c)}}return new Uint8Array(t)},Il=r=>new TextEncoder().encode(r),Pd=r=>typeof r=="string"?Il(r):ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(r),im=r=>{if(typeof r=="string")return r;if(typeof r!="object"||typeof r.byteOffset!="number"||typeof r.byteLength!="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return new TextDecoder("utf-8").decode(r)};function Eg(r){let e;typeof r=="string"?e=Il(r):e=r;const t=typeof e=="object"&&typeof e.length=="number",n=typeof e=="object"&&typeof e.byteOffset=="number"&&typeof e.byteLength=="number";if(!t&&!n)throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");let i="";for(let a=0;a<e.length;a+=3){let s=0,o=0;for(let u=a,c=Math.min(a+3,e.length);u<c;u++)s|=e[u]<<(c-u-1)*od,o+=od;const l=Math.ceil(o/Yu);s<<=l*Yu-o;for(let u=1;u<=l;u++){const c=(l-u)*Yu;i+=xV[(s&SV<<c)>>c]}i+="==".slice(0,4-l)}return i}class Sl extends Uint8Array{static fromString(e,t="utf-8"){if(typeof e=="string")return t==="base64"?Sl.mutate(nm(e)):Sl.mutate(Il(e));throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,Sl.prototype),e}transformToString(e="utf-8"){return e==="base64"?Eg(this):im(this)}}const El=r=>encodeURIComponent(r).replace(/[!'()*]/g,EV),EV=r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;function kV(r){const e=[];for(let t of Object.keys(r).sort()){const n=r[t];if(t=El(t),Array.isArray(n))for(let i=0,a=n.length;i<a;i++)e.push(`${t}=${El(n[i])}`);else{let i=t;(n||typeof n=="string")&&(i+=`=${El(n)}`),e.push(i)}}return e.join("&")}function wE(r,e){return new Request(r,e)}function FV(r=0){return new Promise((e,t)=>{r&&setTimeout(()=>{const n=new Error(`Request did not complete within ${r} ms`);n.name="TimeoutError",t(n)},r)})}const Mv={supported:void 0};class P1{config;configProvider;static create(e){return typeof e?.handle=="function"?e:new P1(e)}constructor(e){typeof e=="function"?this.configProvider=e().then(t=>t||{}):(this.config=e??{},this.configProvider=Promise.resolve(this.config)),Mv.supported===void 0&&(Mv.supported=typeof Request<"u"&&"keepalive"in wE("https://[::1]"))}destroy(){}async handle(e,{abortSignal:t,requestTimeout:n}={}){this.config||(this.config=await this.configProvider);const i=n??this.config.requestTimeout,a=this.config.keepAlive===!0,s=this.config.credentials;if(t?.aborted){const C=CE(t);return Promise.reject(C)}let o=e.path;const l=kV(e.query||{});l&&(o+=`?${l}`),e.fragment&&(o+=`#${e.fragment}`);let u="";if(e.username!=null||e.password!=null){const C=e.username??"",k=e.password??"";u=`${C}:${k}@`}const{port:c,method:h}=e,f=`${e.protocol}//${u}${e.hostname}${c?`:${c}`:""}${o}`,d=h==="GET"||h==="HEAD"?void 0:e.body,g={body:d,headers:new Headers(e.headers),method:h,credentials:s};this.config?.cache&&(g.cache=this.config.cache),d&&(g.duplex="half"),typeof AbortController<"u"&&(g.signal=t),Mv.supported&&(g.keepalive=a),typeof this.config.requestInit=="function"&&Object.assign(g,this.config.requestInit(e));let v=()=>{};const y=wE(f,g),A=[fetch(y).then(C=>{const k=C.headers,T={};for(const R of k.entries())T[R[0]]=R[1];return C.body!=null?{response:new fc({headers:T,reason:C.statusText,statusCode:C.status,body:C.body})}:C.blob().then(R=>({response:new fc({headers:T,reason:C.statusText,statusCode:C.status,body:R})}))}),FV(i)];return t&&A.push(new Promise((C,k)=>{const T=()=>{const S=CE(t);k(S)};if(typeof t.addEventListener=="function"){const S=t;S.addEventListener("abort",T,{once:!0}),v=()=>S.removeEventListener("abort",T)}else t.onabort=T})),Promise.race(A).finally(v)}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then(n=>(n[e]=t,n))}httpHandlerConfigs(){return this.config??{}}}function CE(r){const e=r&&typeof r=="object"&&"reason"in r?r.reason:void 0;if(e){if(e instanceof Error){const i=new Error("Request aborted");return i.name="AbortError",i.cause=e,i}const n=new Error(String(e));return n.name="AbortError",n}const t=new Error("Request aborted");return t.name="AbortError",t}const TV=async r=>typeof Blob=="function"&&r instanceof Blob||r.constructor?.name==="Blob"?Blob.prototype.arrayBuffer!==void 0?new Uint8Array(await r.arrayBuffer()):IV(r):DV(r);async function IV(r){const e=await PV(r),t=nm(e);return new Uint8Array(t)}async function DV(r){const e=[],t=r.getReader();let n=!1,i=0;for(;!n;){const{done:o,value:l}=await t.read();l&&(e.push(l),i+=l.length),n=o}const a=new Uint8Array(i);let s=0;for(const o of e)a.set(o,s),s+=o.length;return a}function PV(r){return new Promise((e,t)=>{const n=new FileReader;n.onloadend=()=>{if(n.readyState!==2)return t(new Error("Reader aborted too early"));const i=n.result??"",a=i.indexOf(","),s=a>-1?a+1:i.length;e(i.substring(s))},n.onabort=()=>t(new Error("Read aborted")),n.onerror=()=>t(n.error),n.readAsDataURL(r)})}const DI={},dA={};for(let r=0;r<256;r++){let e=r.toString(16).toLowerCase();e.length===1&&(e=`0${e}`),DI[r]=e,dA[e]=r}function RV(r){if(r.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2){const n=r.slice(t,t+2).toLowerCase();if(n in dA)e[t/2]=dA[n];else throw new Error(`Cannot decode unrecognized sequence ${n} as hexadecimal`)}return e}function kl(r){let e="";for(let t=0;t<r.byteLength;t++)e+=DI[r[t]];return e}const hA=async(r=new Uint8Array,e)=>{if(r instanceof Uint8Array)return Sl.mutate(r);if(!r)return Sl.mutate(new Uint8Array);const t=e.streamCollector(r);return Sl.mutate(await t)},eg=r=>typeof r=="function"?r():r,PI=(r,e,t,n,i)=>({name:e,namespace:r,traits:t,input:n,output:i}),OV=r=>(e,t)=>async n=>{const{response:i}=await e(n),{operationSchema:a}=xc(t),[,s,o,l,u,c]=a??[];try{const h=await r.protocol.deserializeResponse(PI(s,o,l,u,c),{...r,...t},i);return{response:i,output:h}}catch(h){if(Object.defineProperty(h,"$response",{value:i,enumerable:!1,writable:!1,configurable:!1}),!("$metadata"in h)){const f="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";try{h.message+=`
2695
+ `+f}catch{!t.logger||t.logger?.constructor?.name==="NoOpLogger"?console.warn(f):t.logger?.warn?.(f)}typeof h.$responseBodyText<"u"&&h.$response&&(h.$response.body=h.$responseBodyText);try{if(fc.isInstance(i)){const{headers:d={}}=i,g=Object.entries(d);h.$metadata={httpStatusCode:i.statusCode,requestId:_v(/^x-[\w-]+-request-?id$/,g),extendedRequestId:_v(/^x-[\w-]+-id-2$/,g),cfId:_v(/^x-[\w-]+-cf-id$/,g)}}}catch{}}throw h}},_v=(r,e)=>(e.find(([t])=>t.match(r))||[void 0,void 0])[1];function BV(r){const e={};if(r=r.replace(/^\?/,""),r)for(const t of r.split("&")){let[n,i=null]=t.split("=");n=decodeURIComponent(n),i&&(i=decodeURIComponent(i)),n in e?Array.isArray(e[n])?e[n].push(i):e[n]=[e[n],i]:e[n]=i}return e}const dc=r=>{if(typeof r=="string")return dc(new URL(r));const{hostname:e,pathname:t,port:n,protocol:i,search:a}=r;let s;return a&&(s=BV(a)),{hostname:e,port:n?parseInt(n):void 0,protocol:i,path:t,query:s}},MV=r=>{if(typeof r=="object"){if("url"in r){const e=dc(r.url);if(r.headers){e.headers={};for(const[t,n]of Object.entries(r.headers))e.headers[t.toLowerCase()]=n.join(", ")}return e}return r}return dc(r)},_V=r=>(e,t)=>async n=>{const{operationSchema:i}=xc(t),[,a,s,o,l,u]=i??[],c=t.endpointV2?async()=>MV(t.endpointV2):r.endpoint,h=await r.protocol.serializeRequest(PI(a,s,o,l,u),n.input,{...r,...t,endpoint:c});return e({...n,request:h})},NV={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},LV={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function UV(r){return{applyToStack:e=>{e.add(_V(r),LV),e.add(OV(r),NV),r.protocol.setSerdeContext(r)}}}const Nv=[];function Yf(r){if(typeof r=="object")return r;if(r=r|0,Nv[r])return Nv[r];const e={};let t=0;for(const n of["httpLabel","idempotent","idempotencyToken","sensitive","httpPayload","httpResponseCode","httpQueryParams"])(r>>t++&1)===1&&(e[n]=1);return Nv[r]=e}const Of={it:Symbol.for("@smithy/nor-struct-it"),ns:Symbol.for("@smithy/ns")},Lv=[],Uv={};class vi{ref;memberName;static symbol=Symbol.for("@smithy/nor");symbol=vi.symbol;name;schema;_isMemberSchema;traits;memberTraits;normalizedTraits;constructor(e,t){this.ref=e,this.memberName=t;const n=[];let i=e,a=e;for(this._isMemberSchema=!1;Vv(i);)n.push(i[1]),i=i[0],a=eg(i),this._isMemberSchema=!0;if(n.length>0){this.memberTraits={};for(let s=n.length-1;s>=0;--s){const o=n[s];Object.assign(this.memberTraits,Yf(o))}}else this.memberTraits=0;if(a instanceof vi){const s=this.memberTraits;Object.assign(this,a),this.memberTraits=Object.assign({},s,a.getMemberTraits(),this.getMemberTraits()),this.normalizedTraits=void 0,this.memberName=t??a.memberName;return}if(this.schema=eg(a),VV(this.schema)?(this.name=`${this.schema[1]}#${this.schema[2]}`,this.traits=this.schema[3]):(this.name=this.memberName??String(a),this.traits=0),this._isMemberSchema&&!t)throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(!0)} missing member name.`)}static[Symbol.hasInstance](e){const t=this.prototype.isPrototypeOf(e);return!t&&typeof e=="object"&&e!==null?e.symbol===this.symbol:t}static of(e){const t=typeof e=="function"||typeof e=="object"&&e!==null;if(typeof e=="number"){if(Lv[e])return Lv[e]}else if(typeof e=="string"){if(Uv[e])return Uv[e]}else if(t&&e[Of.ns])return e[Of.ns];const n=eg(e);if(n instanceof vi)return n;if(Vv(n)){const[a,s]=n;if(a instanceof vi)return Object.assign(a.getMergedTraits(),Yf(s)),a;throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(e,null,2)}.`)}const i=new vi(n);return t?e[Of.ns]=i:typeof n=="string"?Uv[n]=i:typeof n=="number"?Lv[n]=i:i}getSchema(){const e=this.schema;return Array.isArray(e)&&e[0]===0?e[4]:e}getName(e=!1){const{name:t}=this;return!e&&t&&t.includes("#")?t.split("#")[1]:t||void 0}getMemberName(){return this.memberName}isMemberSchema(){return this._isMemberSchema}isListSchema(){const e=this.getSchema();return typeof e=="number"?e>=64&&e<128:e[0]===1}isMapSchema(){const e=this.getSchema();return typeof e=="number"?e>=128&&e<=255:e[0]===2}isStructSchema(){const e=this.getSchema();if(typeof e!="object")return!1;const t=e[0];return t===3||t===-3||t===4}isUnionSchema(){const e=this.getSchema();return typeof e!="object"?!1:e[0]===4}isBlobSchema(){const e=this.getSchema();return e===21||e===42}isTimestampSchema(){const e=this.getSchema();return typeof e=="number"&&e>=4&&e<=7}isUnitSchema(){return this.getSchema()==="unit"}isDocumentSchema(){return this.getSchema()===15}isStringSchema(){return this.getSchema()===0}isBooleanSchema(){return this.getSchema()===2}isNumericSchema(){return this.getSchema()===1}isBigIntegerSchema(){return this.getSchema()===17}isBigDecimalSchema(){return this.getSchema()===19}isStreaming(){const{streaming:e}=this.getMergedTraits();return!!e||this.getSchema()===42}isIdempotencyToken(){return!!this.getMergedTraits().idempotencyToken}getMergedTraits(){return this.normalizedTraits??(this.normalizedTraits={...this.getOwnTraits(),...this.getMemberTraits()})}getMemberTraits(){return Yf(this.memberTraits)}getOwnTraits(){return Yf(this.traits)}getKeySchema(){const[e,t]=[this.isDocumentSchema(),this.isMapSchema()];if(!e&&!t)throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(!0)}`);const n=this.getSchema(),i=e?15:n[4]??0;return Bf([i,0],"key")}getValueSchema(){const e=this.getSchema(),[t,n,i]=[this.isDocumentSchema(),this.isMapSchema(),this.isListSchema()],a=typeof e=="number"?63&e:e&&typeof e=="object"&&(n||i)?e[3+e[0]]:t?15:void 0;if(a!=null)return Bf([a,0],n?"value":"member");throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no value member.`)}getMemberSchema(e){const t=this.getSchema();if(this.isStructSchema()&&t[4].includes(e)){const n=t[4].indexOf(e),i=t[5][n];return Bf(Vv(i)?i:[i,0],e)}if(this.isDocumentSchema())return Bf([15,0],e);throw new Error(`@smithy/core/schema - ${this.getName(!0)} has no member=${e}.`)}getMemberSchemas(){const e={};try{for(const[t,n]of this.structIterator())e[t]=n}catch{}return e}getEventStreamMember(){if(this.isStructSchema()){for(const[e,t]of this.structIterator())if(t.isStreaming()&&t.isStructSchema())return e}return""}*structIterator(){if(this.isUnitSchema())return;if(!this.isStructSchema())throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");const e=this.getSchema(),t=e[4].length;let n=e[Of.it];if(n&&t===n.length){yield*n;return}n=Array(t);for(let i=0;i<t;++i){const a=e[4][i],s=Bf([e[5][i],0],a);yield n[i]=[a,s]}e[Of.it]=n}}function Bf(r,e){if(r instanceof vi)return Object.assign(r,{memberName:e,_isMemberSchema:!0});const t=vi;return new t(r,e)}const Vv=r=>Array.isArray(r)&&r.length===2,VV=r=>Array.isArray(r)&&r.length>=5;class ra{namespace;schemas;exceptions;static registries=new Map;constructor(e,t=new Map,n=new Map){this.namespace=e,this.schemas=t,this.exceptions=n}static for(e){return ra.registries.has(e)||ra.registries.set(e,new ra(e)),ra.registries.get(e)}copyFrom(e){const{schemas:t,exceptions:n}=this;for(const[i,a]of e.schemas)t.has(i)||t.set(i,a);for(const[i,a]of e.exceptions)n.has(i)||n.set(i,a)}register(e,t){const n=this.normalizeShapeId(e);for(const i of[this,ra.for(n.split("#")[0])])i.schemas.set(n,t)}getSchema(e){const t=this.normalizeShapeId(e);if(!this.schemas.has(t))throw new Error(`@smithy/core/schema - schema not found for ${t}`);return this.schemas.get(t)}registerError(e,t){const n=e,i=n[1];for(const a of[this,ra.for(i)])a.schemas.set(i+"#"+n[2],n),a.exceptions.set(n,t)}getErrorCtor(e){const t=e;return this.exceptions.has(t)?this.exceptions.get(t):ra.for(t[1]).exceptions.get(t)}getBaseException(){for(const e of this.exceptions.keys())if(Array.isArray(e)){const[,t,n]=e,i=t+"#"+n;if(i.startsWith("smithy.ts.sdk.synthetic.")&&i.endsWith("ServiceException"))return e}}find(e){return[...this.schemas.values()].find(e)}clear(){this.schemas.clear(),this.exceptions.clear()}normalizeShapeId(e){return e.includes("#")?e:this.namespace+"#"+e}}const pA=r=>{if(r!=null){if(typeof r=="string"){const e=parseFloat(r);if(!Number.isNaN(e))return String(e)!==String(r)&&YV.warn(QV(`Expected number but observed string: ${r}`)),e}if(typeof r=="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)}},zV=Math.ceil(2**127*(2-2**-23)),xE=r=>{const e=pA(r);if(e!==void 0&&!Number.isNaN(e)&&e!==1/0&&e!==-1/0&&Math.abs(e)>zV)throw new TypeError(`Expected 32-bit float, got ${r}`);return e},HV=r=>{if(r!=null){if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)}},SE=r=>RI(r,16),EE=r=>RI(r,8),RI=(r,e)=>{const t=HV(r);if(t!==void 0&&jV(t,e)!==t)throw new TypeError(`Expected ${e}-bit integer, got ${r}`);return t},jV=(r,e)=>{switch(e){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},GV=r=>pA(typeof r=="string"?am(r):r),$V=r=>xE(typeof r=="string"?am(r):r),qV=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,am=r=>{const e=r.match(qV);if(e===null||e[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},kg=r=>SE(typeof r=="string"?am(r):r),WV=r=>EE(typeof r=="string"?am(r):r),QV=r=>String(new TypeError(r).stack||r).split(`
2690
2696
  `).slice(0,5).filter(e=>!e.includes("stackTraceWarning")).join(`
2691
- `),QV={warn:console.warn},YV=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],R1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function XV(r){const e=r.getUTCFullYear(),t=r.getUTCMonth(),n=r.getUTCDay(),i=r.getUTCDate(),a=r.getUTCHours(),s=r.getUTCMinutes(),o=r.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,u=a<10?`0${a}`:`${a}`,c=s<10?`0${s}`:`${s}`,h=o<10?`0${o}`:`${o}`;return`${YV[n]}, ${l} ${R1[t]} ${e} ${u}:${c}:${h} GMT`}const JV=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),KV=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=JV.exec(r);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[t,n,i,a,s,o,l,u,c]=e,h=kg(Rd(n)),f=Ao(i,"month",1,12),d=Ao(a,"day",1,31),g=tg(h,f,d,{hours:s,minutes:o,seconds:l,fractionalMilliseconds:u});return c.toUpperCase()!="Z"&&g.setTime(g.getTime()-cz(c)),g},ZV=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),ez=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),tz=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),OI=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=ZV.exec(r);if(e){const[t,n,i,a,s,o,l,u]=e;return tg(kg(Rd(a)),zv(i),Ao(n,"day",1,31),{hours:s,minutes:o,seconds:l,fractionalMilliseconds:u})}if(e=ez.exec(r),e){const[t,n,i,a,s,o,l,u]=e;return az(tg(nz(a),zv(i),Ao(n,"day",1,31),{hours:s,minutes:o,seconds:l,fractionalMilliseconds:u}))}if(e=tz.exec(r),e){const[t,n,i,a,s,o,l,u]=e;return tg(kg(Rd(u)),zv(n),Ao(i.trimLeft(),"day",1,31),{hours:a,minutes:s,seconds:o,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},rz=r=>{if(r==null)return;let e;if(typeof r=="number")e=r;else if(typeof r=="string")e=jV(r);else if(typeof r=="object"&&r.tag===1)e=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))},tg=(r,e,t,n)=>{const i=e-1;return oz(r,i,t),new Date(Date.UTC(r,i,t,Ao(n.hours,"hour",0,23),Ao(n.minutes,"minute",0,59),Ao(n.seconds,"seconds",0,60),uz(n.fractionalMilliseconds)))},nz=r=>{const e=new Date().getUTCFullYear(),t=Math.floor(e/100)*100+kg(Rd(r));return t<e?t+100:t},iz=50*365*24*60*60*1e3,az=r=>r.getTime()-new Date().getTime()>iz?new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())):r,zv=r=>{const e=R1.indexOf(r);if(e<0)throw new TypeError(`Invalid month: ${r}`);return e+1},sz=[31,28,31,30,31,30,31,31,30,31,30,31],oz=(r,e,t)=>{let n=sz[e];if(e===1&&lz(r)&&(n=29),t>n)throw new TypeError(`Invalid day for ${R1[e]} in ${r}: ${t}`)},lz=r=>r%4===0&&(r%100!==0||r%400===0),Ao=(r,e,t,n)=>{const i=qV(Rd(r));if(i<t||i>n)throw new TypeError(`${e} must be between ${t} and ${n}, inclusive`);return i},uz=r=>r==null?0:GV("0."+r)*1e3,cz=r=>{const e=r[0];let t=1;if(e=="+")t=1;else if(e=="-")t=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);const n=Number(r.substring(1,3)),i=Number(r.substring(4,6));return t*(n*60+i)*60*1e3},Rd=r=>{let e=0;for(;e<r.length-1&&r.charAt(e)==="0";)e++;return e===0?r:r.slice(e)},kE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ti=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0")),BI=()=>{if(kE)return kE();const r=new Uint8Array(16);return crypto.getRandomValues(r),r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ti[r[0]]+Ti[r[1]]+Ti[r[2]]+Ti[r[3]]+"-"+Ti[r[4]]+Ti[r[5]]+"-"+Ti[r[6]]+Ti[r[7]]+"-"+Ti[r[8]]+Ti[r[9]]+"-"+Ti[r[10]]+Ti[r[11]]+Ti[r[12]]+Ti[r[13]]+Ti[r[14]]+Ti[r[15]]},go=function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})};go.from=r=>r&&typeof r=="object"&&(r instanceof go||"deserializeJSON"in r)?r:typeof r=="string"||Object.getPrototypeOf(r)===String.prototype?go(String(r)):go(JSON.stringify(r));go.fromObject=go.from;const FE=/^-?\d*(\.\d+)?$/;class ts{string;type;constructor(e,t){if(this.string=e,this.type=t,!FE.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!="object")return!1;const t=e;return ts.prototype.isPrototypeOf(e)||t.type==="bigDecimal"&&FE.test(t.string)}}class fz{serdeContext;setSerdeContext(e){this.serdeContext=e}}class dz extends fz{options;compositeErrorRegistry;constructor(e){super(),this.options=e,this.compositeErrorRegistry=ra.for(e.defaultNamespace);for(const t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return aa}getResponseType(){return fc}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(const[n,i]of t.url.searchParams.entries())e.query[n]=i;if(t.headers)for(const[n,i]of Object.entries(t.headers))e.headers[n]=i.join(", ");return e}else{if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(const[n,i]of Object.entries(t.headers))e.headers[n]=i;return e}}setHostPrefix(e,t,n){if(this.serdeContext?.disableHostPrefix)return;const i=vi.of(t.input),a=Yf(t.traits??{});if(a.endpoint){let s=a.endpoint?.[0];if(typeof s=="string"){const o=[...i.structIterator()].filter(([,l])=>l.getMergedTraits().hostLabel);for(const[l]of o){const u=n[l];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${l} in input must be a string as hostLabel.`);s=s.replace(`{${l}}`,u)}e.hostname=s+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Promise.resolve().then(()=>require("./index-DcBQyt1j.cjs"));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,n,i,a){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class hz extends dz{async serializeRequest(e,t,n){const i=this.serializer,a={},s={},o=await n.endpoint(),l=vi.of(e?.input),u=l.getSchema();let c;const h=t&&typeof t=="object"?t:{},f=new aa({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:a,headers:s,body:void 0});if(o&&(this.updateServiceEndpoint(f,o),this.setHostPrefix(f,e,h)),h){const d=l.getEventStreamMember();if(d){if(h[d]){const g={};for(const[v,y]of l.structIterator())v!==d&&h[v]&&(i.write(y,h[v]),g[v]=i.flush());c=await this.serializeEventStream({eventStream:h[d],requestSchema:l,initialRequest:g})}}else i.write(u,h),c=i.flush()}return f.headers=Object.assign(f.headers,s),f.query=a,f.body=c,f.method="POST",f}async deserializeResponse(e,t,n){const i=this.deserializer,a=vi.of(e.output),s={};if(n.statusCode>=300){const l=await hA(n.body,t);throw l.byteLength>0&&Object.assign(s,await i.read(15,l)),await this.handleError(e,t,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const u=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=u}const o=a.getEventStreamMember();if(o)s[o]=await this.deserializeEventStream({response:n,responseSchema:a,initialResponseContainer:s});else{const l=await hA(n.body,t);l.byteLength>0&&Object.assign(s,await i.read(a,l))}return s.$metadata=this.deserializeMetadata(n),s}}function MI(r,e){if(e.timestampFormat.useTrait&&r.isTimestampSchema()&&(r.getSchema()===5||r.getSchema()===6||r.getSchema()===7))return r.getSchema();const{httpLabel:t,httpPrefixHeaders:n,httpHeader:i,httpQuery:a}=r.getMergedTraits();return(e.httpBindings?typeof n=="string"||i?6:a||t?5:void 0:void 0)??e.timestampFormat.default}function pz(r,e,t){r.__smithy_context?r.__smithy_context.features||(r.__smithy_context.features={}):r.__smithy_context={features:{}},r.__smithy_context.features[e]=t}class gz{authSchemes=new Map;constructor(e){for(const[t,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class mz{async sign(e,t,n){return e}}const vz=r=>function(t){return _I(t)&&t.expiration.getTime()-Date.now()<r},yz=3e5,Az=vz(yz),_I=r=>r.expiration!==void 0,bz=(r,e,t)=>{if(r===void 0)return;const n=typeof r!="function"?async()=>Promise.resolve(r):r;let i,a,s,o=!1;const l=async u=>{a||(a=n(u));try{i=await a,s=!0,o=!1}finally{a=void 0}return i};return e===void 0?async u=>((!s||u?.forceRefresh)&&(i=await l(u)),i):async u=>((!s||u?.forceRefresh)&&(i=await l(u)),o?i:t(i)?(e(i)&&await l(u),i):(o=!0,i))},wz=void 0;function Cz(r){return r===void 0?!0:typeof r=="string"&&r.length<=50}function xz(r){const e=sd(r.userAgentAppId??wz),{customUserAgent:t}=r;return Object.assign(r,{customUserAgent:typeof t=="string"?[[t]]:t,userAgentAppId:async()=>{const n=await e();if(!Cz(n)){const i=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console:r.logger;typeof n!="string"?i?.warn("userAgentAppId must be a string or undefined."):n.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class Sz{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(n===!1)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const i=this.data.keys();let a=0;for(;;){const{value:s,done:o}=i.next();if(this.data.delete(s),o||++a>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(n.length===0)return!1;for(const i of n){const a=String(e[i]??"");if(a.includes("|;"))return!1;t+=a+"|;"}return t}}const Ez=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),O1=r=>Ez.test(r)||r.startsWith("[")&&r.endsWith("]"),kz=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ah=(r,e=!1)=>{if(!e)return kz.test(r);const t=r.split(".");for(const n of t)if(!ah(n))return!1;return!0},Od={},Bd="endpoints";function Do(r){return typeof r!="object"||r==null?r:"ref"in r?`$${Do(r.ref)}`:"fn"in r?`${r.fn}(${(r.argv||[]).map(Do).join(", ")})`:JSON.stringify(r,null,2)}class sa extends Error{constructor(e){super(e),this.name="EndpointError"}}const Fz=(r,e)=>r===e,Tz=r=>{const e=r.split("."),t=[];for(const n of e){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new sa(`Path: '${r}' does not end with ']'`);const a=n.slice(i+1,-1);if(Number.isNaN(parseInt(a)))throw new sa(`Invalid array index: '${a}' in path: '${r}'`);i!==0&&t.push(n.slice(0,i)),t.push(a)}else t.push(n)}return t},NI=(r,e)=>Tz(e).reduce((t,n)=>{if(typeof t!="object")throw new sa(`Index '${n}' in '${e}' not found in '${JSON.stringify(r)}'`);return Array.isArray(t)?t[parseInt(n)]:t[n]},r),Iz=r=>r!=null,Dz=r=>!r,Hv={[Id.HTTP]:80,[Id.HTTPS]:443},Pz=r=>{const e=(()=>{try{if(r instanceof URL)return r;if(typeof r=="object"&&"hostname"in r){const{hostname:f,port:d,protocol:g="",path:v="",query:y={}}=r,A=new URL(`${g}//${f}${d?`:${d}`:""}${v}`);return A.search=Object.entries(y).map(([C,k])=>`${C}=${k}`).join("&"),A}return new URL(r)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(r)} as a whatwg URL.`),null;const t=e.href,{host:n,hostname:i,pathname:a,protocol:s,search:o}=e;if(o)return null;const l=s.slice(0,-1);if(!Object.values(Id).includes(l))return null;const u=O1(i),c=t.includes(`${n}:${Hv[l]}`)||typeof r=="string"&&r.includes(`${n}:${Hv[l]}`),h=`${n}${c?`:${Hv[l]}`:""}`;return{scheme:l,authority:h,path:a,normalizedPath:a.endsWith("/")?a:`${a}/`,isIp:u}},Rz=(r,e)=>r===e,Oz=(r,e,t,n)=>e>=t||r.length<t||/[^\u0000-\u007f]/.test(r)?null:n?r.substring(r.length-t,r.length-e):r.substring(e,t),Bz=r=>encodeURIComponent(r).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),Mz={booleanEquals:Fz,getAttr:NI,isSet:Iz,isValidHostLabel:ah,not:Dz,parseURL:Pz,stringEquals:Rz,substring:Oz,uriEncode:Bz},LI=(r,e)=>{const t=[],n={...e.endpointParams,...e.referenceRecord};let i=0;for(;i<r.length;){const a=r.indexOf("{",i);if(a===-1){t.push(r.slice(i));break}t.push(r.slice(i,a));const s=r.indexOf("}",a);if(s===-1){t.push(r.slice(a));break}r[a+1]==="{"&&r[s+1]==="}"&&(t.push(r.slice(a+1,s)),i=s+2);const o=r.substring(a+1,s);if(o.includes("#")){const[l,u]=o.split("#");t.push(NI(n[l],u))}else t.push(n[o]);i=s+1}return t.join("")},_z=({ref:r},e)=>({...e.endpointParams,...e.referenceRecord})[r],sm=(r,e,t)=>{if(typeof r=="string")return LI(r,t);if(r.fn)return VI.callFunction(r,t);if(r.ref)return _z(r,t);throw new sa(`'${e}': ${String(r)} is not a string, function or reference.`)},UI=({fn:r,argv:e},t)=>{const n=e.map(a=>["boolean","number"].includes(typeof a)?a:VI.evaluateExpression(a,"arg",t)),i=r.split(".");return i[0]in Od&&i[1]!=null?Od[i[0]][i[1]](...n):Mz[r](...n)},VI={evaluateExpression:sm,callFunction:UI},Nz=({assign:r,...e},t)=>{if(r&&r in t.referenceRecord)throw new sa(`'${r}' is already defined in Reference Record.`);const n=UI(e,t);return t.logger?.debug?.(`${Bd} evaluateCondition: ${Do(e)} = ${Do(n)}`),{result:n===""?!0:!!n,...r!=null&&{toAssign:{name:r,value:n}}}},B1=(r=[],e)=>{const t={};for(const n of r){const{result:i,toAssign:a}=Nz(n,{...e,referenceRecord:{...e.referenceRecord,...t}});if(!i)return{result:i};a&&(t[a.name]=a.value,e.logger?.debug?.(`${Bd} assign: ${a.name} := ${Do(a.value)}`))}return{result:!0,referenceRecord:t}},Lz=(r,e)=>Object.entries(r).reduce((t,[n,i])=>({...t,[n]:i.map(a=>{const s=sm(a,"Header value entry",e);if(typeof s!="string")throw new sa(`Header '${n}' value '${s}' is not a string`);return s})}),{}),zI=(r,e)=>Object.entries(r).reduce((t,[n,i])=>({...t,[n]:jI.getEndpointProperty(i,e)}),{}),HI=(r,e)=>{if(Array.isArray(r))return r.map(t=>HI(t,e));switch(typeof r){case"string":return LI(r,e);case"object":if(r===null)throw new sa(`Unexpected endpoint property: ${r}`);return jI.getEndpointProperties(r,e);case"boolean":return r;default:throw new sa(`Unexpected endpoint property type: ${typeof r}`)}},jI={getEndpointProperty:HI,getEndpointProperties:zI},Uz=(r,e)=>{const t=sm(r,"Endpoint URL",e);if(typeof t=="string")try{return new URL(t)}catch(n){throw console.error(`Failed to construct URL with ${t}`,n),n}throw new sa(`Endpoint URL must be a string, got ${typeof t}`)},Vz=(r,e)=>{const{conditions:t,endpoint:n}=r,{result:i,referenceRecord:a}=B1(t,e);if(!i)return;const s={...e,referenceRecord:{...e.referenceRecord,...a}},{url:o,properties:l,headers:u}=n;return e.logger?.debug?.(`${Bd} Resolving endpoint from template: ${Do(n)}`),{...u!=null&&{headers:Lz(u,s)},...l!=null&&{properties:zI(l,s)},url:Uz(o,s)}},zz=(r,e)=>{const{conditions:t,error:n}=r,{result:i,referenceRecord:a}=B1(t,e);if(i)throw new sa(sm(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...a}}))},GI=(r,e)=>{for(const t of r)if(t.type==="endpoint"){const n=Vz(t,e);if(n)return n}else if(t.type==="error")zz(t,e);else if(t.type==="tree"){const n=$I.evaluateTreeRule(t,e);if(n)return n}else throw new sa(`Unknown endpoint rule: ${t}`);throw new sa("Rules evaluation failed")},Hz=(r,e)=>{const{conditions:t,rules:n}=r,{result:i,referenceRecord:a}=B1(t,e);if(i)return $I.evaluateRules(n,{...e,referenceRecord:{...e.referenceRecord,...a}})},$I={evaluateRules:GI,evaluateTreeRule:Hz},jz=(r,e)=>{const{endpointParams:t,logger:n}=e,{parameters:i,rules:a}=r;e.logger?.debug?.(`${Bd} Initial EndpointParams: ${Do(t)}`);const s=Object.entries(i).filter(([,u])=>u.default!=null).map(([u,c])=>[u,c.default]);if(s.length>0)for(const[u,c]of s)t[u]=t[u]??c;const o=Object.entries(i).filter(([,u])=>u.required).map(([u])=>u);for(const u of o)if(t[u]==null)throw new sa(`Missing required parameter: '${u}'`);const l=GI(a,{endpointParams:t,logger:n,referenceRecord:{}});return e.logger?.debug?.(`${Bd} Resolved endpoint: ${Do(l)}`),l},qI=(r,e=!1)=>{if(e){for(const t of r.split("."))if(!qI(t))return!1;return!0}return!(!ah(r)||r.length<3||r.length>63||r!==r.toLowerCase()||O1(r))},TE=":",Gz="/",$z=r=>{const e=r.split(TE);if(e.length<6)return null;const[t,n,i,a,s,...o]=e;if(t!=="arn"||n===""||i===""||o.join(TE)==="")return null;const l=o.map(u=>u.split(Gz)).flat();return{partition:n,service:i,region:a,accountId:s,resourceId:l}},qz=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Wz={partitions:qz};let Qz=Wz;const Yz=r=>{const{partitions:e}=Qz;for(const n of e){const{regions:i,outputs:a}=n;for(const[s,o]of Object.entries(i))if(s===r)return{...a,...o}}for(const n of e){const{regionRegex:i,outputs:a}=n;if(new RegExp(i).test(r))return{...a}}const t=e.find(n=>n.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},Xz={isVirtualHostableS3Bucket:qI,parseArn:$z,partition:Yz};Od.aws=Xz;function Jz(r,e,t){return r.$source||(r.$source={}),r.$source[e]=t,r}function Fs(r,e,t){r.__aws_sdk_context?r.__aws_sdk_context.features||(r.__aws_sdk_context.features={}):r.__aws_sdk_context={features:{}},r.__aws_sdk_context.features[e]=t}var Md;(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(Md||(Md={}));Md.STANDARD;const Kz=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Zz=["TimeoutError","RequestTimeout","RequestTimeoutException"],eH=[500,502,503,504],tH=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],rH=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],nH=r=>r?.$retryable!==void 0,iH=r=>r.$metadata?.clockSkewCorrected,aH=r=>{const e=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return r&&r instanceof TypeError?e.has(r.message):!1},WI=r=>r.$metadata?.httpStatusCode===429||Kz.includes(r.name)||r.$retryable?.throttling==!0,M1=(r,e=0)=>nH(r)||iH(r)||Zz.includes(r.name)||tH.includes(r?.code||"")||rH.includes(r?.code||"")||eH.includes(r.$metadata?.httpStatusCode||0)||aH(r)||r.cause!==void 0&&e<=10&&M1(r.cause,e+1),sH=r=>{if(r.$metadata?.httpStatusCode!==void 0){const e=r.$metadata.httpStatusCode;return 500<=e&&e<=599&&!M1(r)}return!1},oH=/\d{12}\.ddb/;async function lH(r,e,t){if(t.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Fs(r,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const a=await e.retryStrategy();if(typeof a.mode=="string")switch(a.mode){case Md.ADAPTIVE:Fs(r,"RETRY_MODE_ADAPTIVE","F");break;case Md.STANDARD:Fs(r,"RETRY_MODE_STANDARD","E");break}}if(typeof e.accountIdEndpointMode=="function"){const a=r.endpointV2;switch(String(a?.url?.hostname).match(oH)&&Fs(r,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":Fs(r,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Fs(r,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Fs(r,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=r.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const a=i;a.accountId&&Fs(r,"RESOLVED_ACCOUNT_ID","T");for(const[s,o]of Object.entries(a.$source??{}))Fs(r,s,o)}}const IE="user-agent",jv="x-amz-user-agent",DE=" ",Gv="/",uH=/[^!$%&'*+\-.^_`|~\w]/g,cH=/[^!$%&'*+\-.^_`|~\w#]/g,PE="-",fH=1024;function dH(r){let e="";for(const t in r){const n=r[t];if(e.length+n.length+1<=fH){e.length?e+=","+n:e+=n;continue}break}return e}const hH=r=>(e,t)=>async n=>{const{request:i}=n;if(!aa.isInstance(i))return e(n);const{headers:a}=i,s=t?.userAgent?.map(Mp)||[],o=(await r.defaultUserAgentProvider()).map(Mp);await lH(t,r,n);const l=t;o.push(`m/${dH(Object.assign({},t.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const u=r?.customUserAgent?.map(Mp)||[],c=await r.userAgentAppId();c&&o.push(Mp(["app",`${c}`]));const h=[].concat([...o,...s,...u]).join(DE),f=[...o.filter(d=>d.startsWith("aws-sdk-")),...u].join(DE);return r.runtime!=="browser"?(f&&(a[jv]=a[jv]?`${a[IE]} ${f}`:f),a[IE]=h):a[jv]=h,e({...n,request:i})},Mp=r=>{const e=r[0].split(Gv).map(s=>s.replace(uH,PE)).join(Gv),t=r[1]?.replace(cH,PE),n=e.indexOf(Gv),i=e.substring(0,n);let a=e.substring(n+1);return i==="api"&&(a=a.toLowerCase()),[i,a,t].filter(s=>s&&s.length>0).reduce((s,o,l)=>{switch(l){case 0:return o;case 1:return`${s}/${o}`;default:return`${s}#${o}`}},"")},pH={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},gH=r=>({applyToStack:e=>{e.add(hH(r),pH)}}),mH=!1,vH=!1,RE=new Set,yH=(r,e=ah)=>{if(!RE.has(r)&&!e(r))if(r==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${r}" is not a valid hostname component.`);else RE.add(r)},QI=r=>typeof r=="string"&&(r.startsWith("fips-")||r.endsWith("-fips")),AH=r=>QI(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r,bH=r=>{const{region:e,useFipsEndpoint:t}=r;if(!e)throw new Error("Region is missing");return Object.assign(r,{region:async()=>{const n=typeof e=="function"?await e():e,i=AH(n);return yH(i),i},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return QI(n)?!0:typeof t!="function"?Promise.resolve(!!t):t()}})},OE="content-length";function wH(r){return e=>async t=>{const n=t.request;if(aa.isInstance(n)){const{body:i,headers:a}=n;if(i&&Object.keys(a).map(s=>s.toLowerCase()).indexOf(OE)===-1)try{const s=r(i);n.headers={...n.headers,[OE]:String(s)}}catch{}}return e({...t,request:n})}}const CH={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},xH=r=>({applyToStack:e=>{e.add(wH(r.bodyLengthChecker),CH)}}),SH=async r=>{const e=r?.Bucket||"";if(typeof r.Bucket=="string"&&(r.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),IH(e)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!TH(e)||e.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(r.ForcePathStyle=!0);return r.DisableMultiRegionAccessPoints&&(r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0),r},EH=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,kH=/(\d+\.){3}\d+/,FH=/\.\./,TH=r=>EH.test(r)&&!kH.test(r)&&!FH.test(r),IH=r=>{const[e,t,n,,,i]=r.split(":"),a=e==="arn"&&r.split(":").length>=6,s=!!(a&&t&&n&&i);if(a&&!s)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return s},DH=(r,e,t,n=!1)=>{const i=async()=>{let a;return n?a=t.clientContextParams?.[r]??t[r]??t[e]:a=t[r]??t[e],typeof a=="function"?a():a};return r==="credentialScope"||e==="CredentialScope"?async()=>{const a=typeof t.credentials=="function"?await t.credentials():t.credentials;return a?.credentialScope??a?.CredentialScope}:r==="accountId"||e==="AccountId"?async()=>{const a=typeof t.credentials=="function"?await t.credentials():t.credentials;return a?.accountId??a?.AccountId}:r==="endpoint"||e==="endpoint"?async()=>{if(t.isCustomEndpoint===!1)return;const a=await i();if(a&&typeof a=="object"){if("url"in a)return a.url.href;if("hostname"in a){const{protocol:s,hostname:o,port:l,path:u}=a;return`${s}//${o}${l?":"+l:""}${u}`}}return a}:i},YI=async r=>{},XI=r=>{if(typeof r=="object"){if("url"in r){const e=dc(r.url);if(r.headers){e.headers={};for(const[t,n]of Object.entries(r.headers))e.headers[t.toLowerCase()]=n.join(", ")}return e}return r}return dc(r)},PH=async(r,e,t,n)=>{if(!t.isCustomEndpoint){let s;t.serviceConfiguredEndpoint?s=await t.serviceConfiguredEndpoint():s=await YI(t.serviceId),s&&(t.endpoint=()=>Promise.resolve(XI(s)),t.isCustomEndpoint=!0)}const i=await RH(r,e,t);if(typeof t.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const a=t.endpointProvider(i,n);if(t.isCustomEndpoint&&t.endpoint){const s=await t.endpoint();if(s?.headers){a.headers??={};for(const[o,l]of Object.entries(s.headers))a.headers[o]=Array.isArray(l)?l:[l]}}return a},RH=async(r,e,t)=>{const n={},i=e?.getEndpointParameterInstructions?.()||{};for(const[a,s]of Object.entries(i))switch(s.type){case"staticContextParams":n[a]=s.value;break;case"contextParams":n[a]=r[s.name];break;case"clientContextParams":case"builtInParams":n[a]=await DH(s.name,a,t,s.type!=="builtInParams")();break;case"operationContextParams":n[a]=s.get(r);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return Object.keys(i).length===0&&Object.assign(n,t),String(t.serviceId).toLowerCase()==="s3"&&await SH(n),n},OH=({config:r,instructions:e})=>(t,n)=>async i=>{r.isCustomEndpoint&&pz(n,"ENDPOINT_OVERRIDE","N");const a=await PH(i.input,{getEndpointParameterInstructions(){return e}},{...r},n);n.endpointV2=a,n.authSchemes=a.properties?.authSchemes;const s=n.authSchemes?.[0];if(s){n.signing_region=s.signingRegion,n.signing_service=s.signingName;const l=xc(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return t({...i})},BH={name:"serializerMiddleware"},MH={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:BH.name},JI=(r,e)=>({applyToStack:t=>{t.addRelativeTo(OH({config:r,instructions:e}),MH)}}),_H=r=>{const e=r.tls??!0,{endpoint:t,useDualstackEndpoint:n,useFipsEndpoint:i}=r,a=t!=null?async()=>XI(await Ls(t)()):void 0,o=Object.assign(r,{endpoint:a,tls:e,isCustomEndpoint:!!t,useDualstackEndpoint:Ls(n??!1),useFipsEndpoint:Ls(i??!1)});let l;return o.serviceConfiguredEndpoint=async()=>(r.serviceId&&!l&&(l=YI(r.serviceId)),l),o};var hc;(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(hc||(hc={}));const ld=3,NH=hc.STANDARD;class _1{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(e){let t;this.updateMeasuredRate();const n=e;if(n?.errorType==="THROTTLING"||WI(n?.error??e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const a=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(a)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.availableTokens){const t=(e-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>_1.setTimeoutFn(n,t))}this.availableTokens=this.availableTokens-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const t=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+t),this.lastTimestamp=e}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){const n=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const KI=20*1e3,BE=500,LH=1,UH="amz-sdk-invocation-id",VH="amz-sdk-request";class Ui{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Ui.v2026?50:100}static throttlingDelay(){return Ui.v2026?1e3:500}static cost(){return Ui.v2026?14:5}static throttlingCost(){return Ui.v2026?5:10}static modifiedCostType(){return Ui.v2026?"THROTTLING":"TRANSIENT"}}class zH{x=Ui.delay();computeNextBackoffDelay(e){const i=Math.random()*Math.min(this.x*2**e,KI);return Math.floor(i)}setDelayBase(e){this.x=e}}class ME{delay;count;cost;longPoll;constructor(e,t,n,i){this.delay=e,this.count=t,this.cost=n,this.longPoll=i}getRetryCount(){return this.count}getRetryDelay(){return Math.min(KI,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class gA{mode=hc.STANDARD;capacity=BE;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(e){typeof e=="number"?this.maxAttemptsProvider=async()=>e:typeof e=="function"?this.maxAttemptsProvider=e:e&&typeof e=="object"&&(this.maxAttemptsProvider=async()=>e.maxAttempts,this.baseDelay=e.baseDelay,this.retryBackoffStrategy=e.backoff),this.maxAttemptsProvider??=async()=>ld,this.baseDelay??=Ui.delay(),this.retryBackoffStrategy??=new zH}async acquireInitialRetryToken(e){return new ME(Ui.delay(),0,void 0,Ui.v2026&&e.includes(":longpoll"))}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts(),i=this.shouldRetry(e,t,n);if(i||e.isLongPoll?.()){const a=t.errorType;this.retryBackoffStrategy.setDelayBase(a==="THROTTLING"?Ui.throttlingDelay():this.baseDelay);const s=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount());let o=s;if(t.retryAfterHint instanceof Date&&(o=Math.max(s,Math.min(t.retryAfterHint.getTime()-Date.now(),s+5e3))),i){const l=this.getCapacityCost(a);return this.capacity-=l,new ME(o,e.getRetryCount()+1,l,e.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:Ui.v2026?o:0})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.min(BE,this.capacity+(e.getRetryCost()??LH))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${ld}`),ld}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e===Ui.modifiedCostType()?Ui.throttlingCost():Ui.cost()}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class HH{mode=hc.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(e,t){const{rateLimiter:n}=t??{};this.rateLimiter=n??new _1,this.standardRetryStrategy=t?new gA({maxAttempts:typeof e=="number"?e:3,...t}):new gA(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const jH=r=>r instanceof Error?r:r instanceof Object?Object.assign(new Error,r):typeof r=="string"?new Error(r):new Error(`AWS SDK error wrapper for ${r}`),GH=r=>{const{retryStrategy:e,retryMode:t}=r,n=Ls(r.maxAttempts??ld);let i=e?Promise.resolve(e):void 0;const a=async()=>await Ls(t)()===hc.ADAPTIVE?new HH(n):new gA(n);return Object.assign(r,{maxAttempts:n,retryStrategy:()=>i??=a()})},hl=(r,e)=>{const t=[];if(r&&t.push(r),e)for(const n of e)t.push(n);return t},io=(r,e)=>`${r||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,Fg=()=>{let r=[],e=[],t=!1;const n=new Set,i=h=>h.sort((f,d)=>_E[d.step]-_E[f.step]||NE[d.priority||"normal"]-NE[f.priority||"normal"]),a=h=>{let f=!1;const d=g=>{const v=hl(g.name,g.aliases);if(v.includes(h)){f=!0;for(const y of v)n.delete(y);return!1}return!0};return r=r.filter(d),e=e.filter(d),f},s=h=>{let f=!1;const d=g=>{if(g.middleware===h){f=!0;for(const v of hl(g.name,g.aliases))n.delete(v);return!1}return!0};return r=r.filter(d),e=e.filter(d),f},o=h=>(r.forEach(f=>{h.add(f.middleware,{...f})}),e.forEach(f=>{h.addRelativeTo(f.middleware,{...f})}),h.identifyOnResolve?.(c.identifyOnResolve()),h),l=h=>{const f=[];return h.before.forEach(d=>{d.before.length===0&&d.after.length===0?f.push(d):f.push(...l(d))}),f.push(h),h.after.reverse().forEach(d=>{d.before.length===0&&d.after.length===0?f.push(d):f.push(...l(d))}),f},u=(h=!1)=>{const f=[],d=[],g={};return r.forEach(y=>{const A={...y,before:[],after:[]};for(const C of hl(A.name,A.aliases))g[C]=A;f.push(A)}),e.forEach(y=>{const A={...y,before:[],after:[]};for(const C of hl(A.name,A.aliases))g[C]=A;d.push(A)}),d.forEach(y=>{if(y.toMiddleware){const A=g[y.toMiddleware];if(A===void 0){if(h)return;throw new Error(`${y.toMiddleware} is not found when adding ${io(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}y.relation==="after"&&A.after.push(y),y.relation==="before"&&A.before.push(y)}}),i(f).map(l).reduce((y,A)=>(y.push(...A),y),[])},c={add:(h,f={})=>{const{name:d,override:g,aliases:v}=f,y={step:"initialize",priority:"normal",middleware:h,...f},A=hl(d,v);if(A.length>0){if(A.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${io(d,v)}'`);for(const C of A){const k=r.findIndex(S=>S.name===C||S.aliases?.some(R=>R===C));if(k===-1)continue;const T=r[k];if(T.step!==y.step||y.priority!==T.priority)throw new Error(`"${io(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${io(d,v)}" middleware with ${y.priority} priority in ${y.step} step.`);r.splice(k,1)}}for(const C of A)n.add(C)}r.push(y)},addRelativeTo:(h,f)=>{const{name:d,override:g,aliases:v}=f,y={middleware:h,...f},A=hl(d,v);if(A.length>0){if(A.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${io(d,v)}'`);for(const C of A){const k=e.findIndex(S=>S.name===C||S.aliases?.some(R=>R===C));if(k===-1)continue;const T=e[k];if(T.toMiddleware!==y.toMiddleware||T.relation!==y.relation)throw new Error(`"${io(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${io(d,v)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);e.splice(k,1)}}for(const C of A)n.add(C)}e.push(y)},clone:()=>o(Fg()),use:h=>{h.applyToStack(c)},remove:h=>typeof h=="string"?a(h):s(h),removeByTag:h=>{let f=!1;const d=g=>{const{tags:v,name:y,aliases:A}=g;if(v&&v.includes(h)){const C=hl(y,A);for(const k of C)n.delete(k);return f=!0,!1}return!0};return r=r.filter(d),e=e.filter(d),f},concat:h=>{const f=o(Fg());return f.use(h),f.identifyOnResolve(t||f.identifyOnResolve()||(h.identifyOnResolve?.()??!1)),f},applyToStack:o,identify:()=>u(!0).map(h=>{const f=h.step??h.relation+" "+h.toMiddleware;return io(h.name,h.aliases)+" - "+f}),identifyOnResolve(h){return typeof h=="boolean"&&(t=h),t},resolve:(h,f)=>{for(const d of u().map(g=>g.middleware).reverse())h=d(h,f);return t&&console.log(c.identify()),h}};return c},_E={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},NE={high:3,normal:2,low:1};class $H{config;middlewareStack=Fg();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:n}=e;n&&typeof t=="function"&&(e.protocol=new t(n))}send(e,t,n){const i=typeof t!="function"?t:void 0,a=typeof t=="function"?t:n,s=i===void 0&&this.config.cacheMiddleware===!0;let o;if(s){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(e.constructor)?o=l.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,i),l.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(a)o(e).then(l=>a(null,l.output),l=>a(l)).catch(()=>{});else return o(e).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const $v="***SensitiveInformation***";function mA(r,e){if(e==null)return e;const t=vi.of(r);if(t.getMergedTraits().sensitive)return $v;if(t.isListSchema()){if(!!t.getValueSchema().getMergedTraits().sensitive)return $v}else if(t.isMapSchema()){if(!!t.getKeySchema().getMergedTraits().sensitive||!!t.getValueSchema().getMergedTraits().sensitive)return $v}else if(t.isStructSchema()&&typeof e=="object"){const n=e,i={};for(const[a,s]of t.structIterator())n[a]!=null&&(i[a]=mA(s,n[a]));return i}return e}class N1{middlewareStack=Fg();schema;static classBuilder(){return new qH}resolveMiddlewareWithContext(e,t,n,{middlewareFn:i,clientName:a,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:c,CommandCtor:h}){for(const y of i.bind(this)(h,e,t,n))this.middlewareStack.use(y);const f=e.concat(this.middlewareStack),{logger:d}=t,g={logger:d,clientName:a,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:l,[fA]:{commandInstance:this,...u},...c},{requestHandler:v}=t;return f.resolve(y=>v.handle(y.request,n||{}),g)}}class qH{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=n=>n,t=n=>n){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends N1{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.input=n??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,i,a){const s=e._operationSchema,o=s?.[4]??s?.input,l=s?.[5]??s?.output;return this.resolveMiddlewareWithContext(n,i,a,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(s?mA.bind(null,o):u=>u),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(s?mA.bind(null,l):u=>u),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class zu extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return zu.prototype.isPrototypeOf(t)||!!t.$fault&&!!t.$metadata&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===zu?zu.isInstance(e):zu.isInstance(e)?t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e):!1}}const LE=(r,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(r[n]==null||r[n]==="")&&(r[n]=i)});const t=r.message||r.Message||"UnknownError";return r.message=t,delete r.Message,r},WH=r=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},ZI=Object.values(Dd),QH=r=>{const e=[];for(const t in Dd){const n=Dd[t];r[n]!==void 0&&e.push({algorithmId:()=>n,checksumConstructor:()=>r[n]})}for(const[t,n]of Object.entries(r.checksumAlgorithms??{}))e.push({algorithmId:()=>t,checksumConstructor:()=>n});return{addChecksumAlgorithm(t){r.checksumAlgorithms=r.checksumAlgorithms??{};const n=t.algorithmId(),i=t.checksumConstructor();ZI.includes(n)?r.checksumAlgorithms[n.toUpperCase()]=i:r.checksumAlgorithms[n]=i,e.push(t)},checksumAlgorithms(){return e}}},YH=r=>{const e={};return r.checksumAlgorithms().forEach(t=>{const n=t.algorithmId();ZI.includes(n)&&(e[n]=t.checksumConstructor())}),e},XH=r=>({setRetryStrategy(e){r.retryStrategy=e},retryStrategy(){return r.retryStrategy}}),JH=r=>{const e={};return e.retryStrategy=r.retryStrategy(),e},KH=r=>Object.assign(QH(r),XH(r)),ZH=r=>Object.assign(YH(r),JH(r));class eD{trace(){}debug(){}info(){}warn(){}error(){}}const ej=r=>r?.body instanceof ReadableStream;function tj(r,e){if(fc.isInstance(r))for(const t of Object.keys(r.headers)){const n=t.toLowerCase();if(n==="retry-after"){const i=r.headers[t];let a=NaN;if(i.endsWith("GMT"))try{a=(OI(i).getTime()-Date.now())/1e3}catch(s){e?.trace?.("Failed to parse retry-after header"),e?.trace?.(s)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?a=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?a=Number(i):Date.parse(i)>=Date.now()&&(a=(Date.parse(i)-Date.now())/1e3);return isNaN(a)?void 0:new Date(Date.now()+a*1e3)}else if(n==="x-amz-retry-after"){const i=r.headers[t],a=Number(i);if(isNaN(a)){e?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+a)}}}const rj=r=>(e,t)=>async n=>{let i=await r.retryStrategy();const a=await r.maxAttempts();if(nj(i)){i=i;let s=await i.acquireInitialRetryToken((t.partition_id??"")+(t.__retryLongPoll?":longpoll":"")),o=new Error,l=0,u=0;const{request:c}=n,h=aa.isInstance(c);for(h&&(c.headers[UH]=BI());;)try{h&&(c.headers[VH]=`attempt=${l+1}; max=${a}`);const{response:f,output:d}=await e(n);return i.recordSuccess(s),d.$metadata.attempts=l+1,d.$metadata.totalRetryDelay=u,{response:f,output:d}}catch(f){const d=ij(f,r.logger);if(o=jH(f),h&&ej(c))throw(t.logger instanceof eD?console:t.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{s=await i.refreshRetryTokenForRetry(s,d)}catch(v){throw typeof v.$backoff=="number"&&await UE(v.$backoff),o.$metadata||(o.$metadata={}),o.$metadata.attempts=l+1,o.$metadata.totalRetryDelay=u,o}l=s.getRetryCount();const g=s.getRetryDelay();u+=g,await UE(g)}}else return i=i,i?.mode&&(t.userAgent=[...t.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(e,n)},UE=r=>new Promise(e=>setTimeout(e,r)),nj=r=>typeof r.acquireInitialRetryToken<"u"&&typeof r.refreshRetryTokenForRetry<"u"&&typeof r.recordSuccess<"u",ij=(r,e)=>{const t={error:r,errorType:aj(r)},n=tj(r.$response,e);return n&&(t.retryAfterHint=n),t},aj=r=>WI(r)?"THROTTLING":M1(r)?"TRANSIENT":sH(r)?"SERVER_ERROR":"CLIENT_ERROR",sj={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},oj=r=>({applyToStack:e=>{e.add(rj(r),sj)}}),VE=r=>fc.isInstance(r)?r.headers?.date??r.headers?.Date:void 0,tD=r=>new Date(Date.now()+r),lj=(r,e)=>Math.abs(tD(e).getTime()-r)>=3e5,zE=(r,e)=>{const t=Date.parse(r);return lj(t,e)?t-Date.now():e},ud=(r,e)=>{if(!e)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return e},uj=async r=>{const e=ud("context",r.context),t=ud("config",r.config),n=e.endpointV2?.properties?.authSchemes?.[0],a=await ud("signer",t.signer)(n),s=r?.signingRegion,o=r?.signingRegionSet,l=r?.signingName;return{config:t,signer:a,signingRegion:s,signingRegionSet:o,signingName:l}};class cj{async sign(e,t,n){if(!aa.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await uj(n),{config:a,signer:s}=i;let{signingRegion:o,signingName:l}=i;const u=n.context;if(u?.authSchemes?.length??!1){const[h,f]=u.authSchemes;h?.name==="sigv4a"&&f?.name==="sigv4"&&(o=f?.signingRegion??o,l=f?.signingName??l)}return await s.sign(e,{signingDate:tD(a.systemClockOffset),signingRegion:o,signingService:l})}errorHandler(e){return t=>{const n=t.ServerTime??VE(t.$response);if(n){const i=ud("config",e.config),a=i.systemClockOffset;i.systemClockOffset=zE(n,i.systemClockOffset),i.systemClockOffset!==a&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=VE(e);if(n){const i=ud("config",t.config);i.systemClockOffset=zE(n,i.systemClockOffset)}}}const fj=(r,e,t)=>{let n,i,a,s=!1;const o=async()=>{i||(i=r());try{n=await i,a=!0,s=!1}finally{i=void 0}return n};return async l=>((!a||l?.forceRefresh)&&(n=await o()),n)},dj="X-Amz-Algorithm",hj="X-Amz-Credential",rD="X-Amz-Date",pj="X-Amz-SignedHeaders",gj="X-Amz-Expires",nD="X-Amz-Signature",iD="X-Amz-Security-Token",aD="authorization",sD=rD.toLowerCase(),mj="date",vj=[aD,sD,mj],yj=nD.toLowerCase(),vA="x-amz-content-sha256",Aj=iD.toLowerCase(),bj={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},wj=/^proxy-/,Cj=/^sec-/,qv="AWS4-HMAC-SHA256",xj="AWS4-HMAC-SHA256-PAYLOAD",Sj="UNSIGNED-PAYLOAD",Ej=50,oD="aws4_request",kj=3600*24*7,_p={},Wv=[],Qv=(r,e,t)=>`${r}/${e}/${t}/${oD}`,Fj=async(r,e,t,n,i)=>{const a=await HE(r,e.secretAccessKey,e.accessKeyId),s=`${t}:${n}:${i}:${kl(a)}:${e.sessionToken}`;if(s in _p)return _p[s];for(Wv.push(s);Wv.length>Ej;)delete _p[Wv.shift()];let o=`AWS4${e.secretAccessKey}`;for(const l of[t,n,i,oD])o=await HE(r,o,l);return _p[s]=o},HE=(r,e,t)=>{const n=new r(e);return n.update(Pd(t)),n.digest()},jE=({headers:r},e,t)=>{const n={};for(const i of Object.keys(r).sort()){if(r[i]==null)continue;const a=i.toLowerCase();(a in bj||e?.has(a)||wj.test(a)||Cj.test(a))&&(!t||t&&!t.has(a))||(n[a]=r[i].trim().replace(/\s+/g," "))}return n},Tj=r=>typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]",Yv=async({headers:r,body:e},t)=>{for(const n of Object.keys(r))if(n.toLowerCase()===vA)return r[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Tj(e)){const n=new t;return n.update(Pd(e)),kl(await n.digest())}return Sj};class Ij{format(e){const t=[];for(const a of Object.keys(e)){const s=Il(a);t.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(e[a]))}const n=new Uint8Array(t.reduce((a,s)=>a+s.byteLength,0));let i=0;for(const a of t)n.set(a,i),i+=a.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const a=new DataView(new ArrayBuffer(3+e.value.byteLength));a.setUint8(0,6),a.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(a.buffer);return s.set(e.value,3),s;case"string":const o=Il(e.value),l=new DataView(new ArrayBuffer(3+o.byteLength));l.setUint8(0,7),l.setUint16(1,o.byteLength,!1);const u=new Uint8Array(l.buffer);return u.set(o,3),u;case"timestamp":const c=new Uint8Array(9);return c[0]=8,c.set(L1.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Dj.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const h=new Uint8Array(17);return h[0]=9,h.set(PV(e.value.replace(/\-/g,"")),1),h}}}var GE;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(GE||(GE={}));const Dj=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class L1{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)t[n]=i;return e<0&&$E(t),new L1(t)}valueOf(){const e=this.bytes.slice(0),t=e[0]&128;return t&&$E(e),parseInt(kl(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function $E(r){for(let e=0;e<8;e++)r[e]^=255;for(let e=7;e>-1&&(r[e]++,r[e]===0);e--);}const Pj=(r,e)=>{r=r.toLowerCase();for(const t of Object.keys(e))if(r===t.toLowerCase())return!0;return!1},Rj=(r,e={})=>{const{headers:t,query:n={}}=aa.clone(r);for(const i of Object.keys(t)){const a=i.toLowerCase();(a.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(a)||e.hoistableHeaders?.has(a))&&(n[i]=t[i],delete t[i])}return{...r,headers:t,query:n}},qE=r=>{r=aa.clone(r);for(const e of Object.keys(r.headers))vj.indexOf(e.toLowerCase())>-1&&delete r.headers[e];return r},Oj=({query:r={}})=>{const e=[],t={};for(const n of Object.keys(r)){if(n.toLowerCase()===yj)continue;const i=El(n);e.push(i);const a=r[n];typeof a=="string"?t[i]=`${i}=${El(a)}`:Array.isArray(a)&&(t[i]=a.slice(0).reduce((s,o)=>s.concat([`${i}=${El(o)}`]),[]).sort().join("&"))}return e.sort().map(n=>t[n]).filter(n=>n).join("&")},Bj=r=>Mj(r).toISOString().replace(/\.\d{3}Z$/,"Z"),Mj=r=>typeof r=="number"?new Date(r*1e3):typeof r=="string"?Number(r)?new Date(Number(r)*1e3):new Date(r):r;class _j{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:a,uriEscapePath:s=!0}){this.service=i,this.sha256=a,this.uriEscapePath=s,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=Ls(n),this.credentialProvider=Ls(t)}createCanonicalRequest(e,t,n){const i=Object.keys(t).sort();return`${e.method}
2697
+ `),YV={warn:console.warn},XV=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],R1=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function JV(r){const e=r.getUTCFullYear(),t=r.getUTCMonth(),n=r.getUTCDay(),i=r.getUTCDate(),a=r.getUTCHours(),s=r.getUTCMinutes(),o=r.getUTCSeconds(),l=i<10?`0${i}`:`${i}`,u=a<10?`0${a}`:`${a}`,c=s<10?`0${s}`:`${s}`,h=o<10?`0${o}`:`${o}`;return`${XV[n]}, ${l} ${R1[t]} ${e} ${u}:${c}:${h} GMT`}const KV=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),ZV=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const e=KV.exec(r);if(!e)throw new TypeError("Invalid RFC-3339 date-time value");const[t,n,i,a,s,o,l,u,c]=e,h=kg(Rd(n)),f=Ao(i,"month",1,12),d=Ao(a,"day",1,31),g=tg(h,f,d,{hours:s,minutes:o,seconds:l,fractionalMilliseconds:u});return c.toUpperCase()!="Z"&&g.setTime(g.getTime()-fz(c)),g},ez=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),tz=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),rz=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),OI=r=>{if(r==null)return;if(typeof r!="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let e=ez.exec(r);if(e){const[t,n,i,a,s,o,l,u]=e;return tg(kg(Rd(a)),zv(i),Ao(n,"day",1,31),{hours:s,minutes:o,seconds:l,fractionalMilliseconds:u})}if(e=tz.exec(r),e){const[t,n,i,a,s,o,l,u]=e;return sz(tg(iz(a),zv(i),Ao(n,"day",1,31),{hours:s,minutes:o,seconds:l,fractionalMilliseconds:u}))}if(e=rz.exec(r),e){const[t,n,i,a,s,o,l,u]=e;return tg(kg(Rd(u)),zv(n),Ao(i.trimLeft(),"day",1,31),{hours:a,minutes:s,seconds:o,fractionalMilliseconds:l})}throw new TypeError("Invalid RFC-7231 date-time value")},nz=r=>{if(r==null)return;let e;if(typeof r=="number")e=r;else if(typeof r=="string")e=GV(r);else if(typeof r=="object"&&r.tag===1)e=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(e)||e===1/0||e===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(e*1e3))},tg=(r,e,t,n)=>{const i=e-1;return lz(r,i,t),new Date(Date.UTC(r,i,t,Ao(n.hours,"hour",0,23),Ao(n.minutes,"minute",0,59),Ao(n.seconds,"seconds",0,60),cz(n.fractionalMilliseconds)))},iz=r=>{const e=new Date().getUTCFullYear(),t=Math.floor(e/100)*100+kg(Rd(r));return t<e?t+100:t},az=50*365*24*60*60*1e3,sz=r=>r.getTime()-new Date().getTime()>az?new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())):r,zv=r=>{const e=R1.indexOf(r);if(e<0)throw new TypeError(`Invalid month: ${r}`);return e+1},oz=[31,28,31,30,31,30,31,31,30,31,30,31],lz=(r,e,t)=>{let n=oz[e];if(e===1&&uz(r)&&(n=29),t>n)throw new TypeError(`Invalid day for ${R1[e]} in ${r}: ${t}`)},uz=r=>r%4===0&&(r%100!==0||r%400===0),Ao=(r,e,t,n)=>{const i=WV(Rd(r));if(i<t||i>n)throw new TypeError(`${e} must be between ${t} and ${n}, inclusive`);return i},cz=r=>r==null?0:$V("0."+r)*1e3,fz=r=>{const e=r[0];let t=1;if(e=="+")t=1;else if(e=="-")t=-1;else throw new TypeError(`Offset direction, ${e}, must be "+" or "-"`);const n=Number(r.substring(1,3)),i=Number(r.substring(4,6));return t*(n*60+i)*60*1e3},Rd=r=>{let e=0;for(;e<r.length-1&&r.charAt(e)==="0";)e++;return e===0?r:r.slice(e)},kE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ti=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0")),BI=()=>{if(kE)return kE();const r=new Uint8Array(16);return crypto.getRandomValues(r),r[6]=r[6]&15|64,r[8]=r[8]&63|128,Ti[r[0]]+Ti[r[1]]+Ti[r[2]]+Ti[r[3]]+"-"+Ti[r[4]]+Ti[r[5]]+"-"+Ti[r[6]]+Ti[r[7]]+"-"+Ti[r[8]]+Ti[r[9]]+"-"+Ti[r[10]]+Ti[r[11]]+Ti[r[12]]+Ti[r[13]]+Ti[r[14]]+Ti[r[15]]},go=function(e){return Object.assign(new String(e),{deserializeJSON(){return JSON.parse(String(e))},toString(){return String(e)},toJSON(){return String(e)}})};go.from=r=>r&&typeof r=="object"&&(r instanceof go||"deserializeJSON"in r)?r:typeof r=="string"||Object.getPrototypeOf(r)===String.prototype?go(String(r)):go(JSON.stringify(r));go.fromObject=go.from;const FE=/^-?\d*(\.\d+)?$/;class ts{string;type;constructor(e,t){if(this.string=e,this.type=t,!FE.test(e))throw new Error('@smithy/core/serde - NumericValue must only contain [0-9], at most one decimal point ".", and an optional negation prefix "-".')}toString(){return this.string}static[Symbol.hasInstance](e){if(!e||typeof e!="object")return!1;const t=e;return ts.prototype.isPrototypeOf(e)||t.type==="bigDecimal"&&FE.test(t.string)}}class dz{serdeContext;setSerdeContext(e){this.serdeContext=e}}class hz extends dz{options;compositeErrorRegistry;constructor(e){super(),this.options=e,this.compositeErrorRegistry=ra.for(e.defaultNamespace);for(const t of e.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(t)}getRequestType(){return aa}getResponseType(){return fc}setSerdeContext(e){this.serdeContext=e,this.serializer.setSerdeContext(e),this.deserializer.setSerdeContext(e),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(e)}updateServiceEndpoint(e,t){if("url"in t){e.protocol=t.url.protocol,e.hostname=t.url.hostname,e.port=t.url.port?Number(t.url.port):void 0,e.path=t.url.pathname,e.fragment=t.url.hash||void 0,e.username=t.url.username||void 0,e.password=t.url.password||void 0,e.query||(e.query={});for(const[n,i]of t.url.searchParams.entries())e.query[n]=i;if(t.headers)for(const[n,i]of Object.entries(t.headers))e.headers[n]=i.join(", ");return e}else{if(e.protocol=t.protocol,e.hostname=t.hostname,e.port=t.port?Number(t.port):void 0,e.path=t.path,e.query={...t.query},t.headers)for(const[n,i]of Object.entries(t.headers))e.headers[n]=i;return e}}setHostPrefix(e,t,n){if(this.serdeContext?.disableHostPrefix)return;const i=vi.of(t.input),a=Yf(t.traits??{});if(a.endpoint){let s=a.endpoint?.[0];if(typeof s=="string"){const o=[...i.structIterator()].filter(([,l])=>l.getMergedTraits().hostLabel);for(const[l]of o){const u=n[l];if(typeof u!="string")throw new Error(`@smithy/core/schema - ${l} in input must be a string as hostLabel.`);s=s.replace(`{${l}}`,u)}e.hostname=s+e.hostname}}}deserializeMetadata(e){return{httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n})}async deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n}){return(await this.loadEventStreamCapability()).deserializeEventStream({response:e,responseSchema:t,initialResponseContainer:n})}async loadEventStreamCapability(){const{EventStreamSerde:e}=await Promise.resolve().then(()=>require("./index-DGhZjYge.cjs"));return new e({marshaller:this.getEventStreamMarshaller(),serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType()})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(e,t,n,i,a){return[]}getEventStreamMarshaller(){const e=this.serdeContext;if(!e.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return e.eventStreamMarshaller}}class pz extends hz{async serializeRequest(e,t,n){const i=this.serializer,a={},s={},o=await n.endpoint(),l=vi.of(e?.input),u=l.getSchema();let c;const h=t&&typeof t=="object"?t:{},f=new aa({protocol:"",hostname:"",port:void 0,path:"/",fragment:void 0,query:a,headers:s,body:void 0});if(o&&(this.updateServiceEndpoint(f,o),this.setHostPrefix(f,e,h)),h){const d=l.getEventStreamMember();if(d){if(h[d]){const g={};for(const[v,y]of l.structIterator())v!==d&&h[v]&&(i.write(y,h[v]),g[v]=i.flush());c=await this.serializeEventStream({eventStream:h[d],requestSchema:l,initialRequest:g})}}else i.write(u,h),c=i.flush()}return f.headers=Object.assign(f.headers,s),f.query=a,f.body=c,f.method="POST",f}async deserializeResponse(e,t,n){const i=this.deserializer,a=vi.of(e.output),s={};if(n.statusCode>=300){const l=await hA(n.body,t);throw l.byteLength>0&&Object.assign(s,await i.read(15,l)),await this.handleError(e,t,n,s,this.deserializeMetadata(n)),new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.")}for(const l in n.headers){const u=n.headers[l];delete n.headers[l],n.headers[l.toLowerCase()]=u}const o=a.getEventStreamMember();if(o)s[o]=await this.deserializeEventStream({response:n,responseSchema:a,initialResponseContainer:s});else{const l=await hA(n.body,t);l.byteLength>0&&Object.assign(s,await i.read(a,l))}return s.$metadata=this.deserializeMetadata(n),s}}function MI(r,e){if(e.timestampFormat.useTrait&&r.isTimestampSchema()&&(r.getSchema()===5||r.getSchema()===6||r.getSchema()===7))return r.getSchema();const{httpLabel:t,httpPrefixHeaders:n,httpHeader:i,httpQuery:a}=r.getMergedTraits();return(e.httpBindings?typeof n=="string"||i?6:a||t?5:void 0:void 0)??e.timestampFormat.default}function gz(r,e,t){r.__smithy_context?r.__smithy_context.features||(r.__smithy_context.features={}):r.__smithy_context={features:{}},r.__smithy_context.features[e]=t}class mz{authSchemes=new Map;constructor(e){for(const[t,n]of Object.entries(e))n!==void 0&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class vz{async sign(e,t,n){return e}}const yz=r=>function(t){return _I(t)&&t.expiration.getTime()-Date.now()<r},Az=3e5,bz=yz(Az),_I=r=>r.expiration!==void 0,wz=(r,e,t)=>{if(r===void 0)return;const n=typeof r!="function"?async()=>Promise.resolve(r):r;let i,a,s,o=!1;const l=async u=>{a||(a=n(u));try{i=await a,s=!0,o=!1}finally{a=void 0}return i};return e===void 0?async u=>((!s||u?.forceRefresh)&&(i=await l(u)),i):async u=>((!s||u?.forceRefresh)&&(i=await l(u)),o?i:t(i)?(e(i)&&await l(u),i):(o=!0,i))},Cz=void 0;function xz(r){return r===void 0?!0:typeof r=="string"&&r.length<=50}function Sz(r){const e=sd(r.userAgentAppId??Cz),{customUserAgent:t}=r;return Object.assign(r,{customUserAgent:typeof t=="string"?[[t]]:t,userAgentAppId:async()=>{const n=await e();if(!xz(n)){const i=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console:r.logger;typeof n!="string"?i?.warn("userAgentAppId must be a string or undefined."):n.length>50&&i?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return n}})}class Ez{capacity;data=new Map;parameters=[];constructor({size:e,params:t}){this.capacity=e??50,t&&(this.parameters=t)}get(e,t){const n=this.hash(e);if(n===!1)return t();if(!this.data.has(n)){if(this.data.size>this.capacity+10){const i=this.data.keys();let a=0;for(;;){const{value:s,done:o}=i.next();if(this.data.delete(s),o||++a>10)break}}this.data.set(n,t())}return this.data.get(n)}size(){return this.data.size}hash(e){let t="";const{parameters:n}=this;if(n.length===0)return!1;for(const i of n){const a=String(e[i]??"");if(a.includes("|;"))return!1;t+=a+"|;"}return t}}const kz=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),O1=r=>kz.test(r)||r.startsWith("[")&&r.endsWith("]"),Fz=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),ah=(r,e=!1)=>{if(!e)return Fz.test(r);const t=r.split(".");for(const n of t)if(!ah(n))return!1;return!0},Od={},Bd="endpoints";function Do(r){return typeof r!="object"||r==null?r:"ref"in r?`$${Do(r.ref)}`:"fn"in r?`${r.fn}(${(r.argv||[]).map(Do).join(", ")})`:JSON.stringify(r,null,2)}class sa extends Error{constructor(e){super(e),this.name="EndpointError"}}const Tz=(r,e)=>r===e,Iz=r=>{const e=r.split("."),t=[];for(const n of e){const i=n.indexOf("[");if(i!==-1){if(n.indexOf("]")!==n.length-1)throw new sa(`Path: '${r}' does not end with ']'`);const a=n.slice(i+1,-1);if(Number.isNaN(parseInt(a)))throw new sa(`Invalid array index: '${a}' in path: '${r}'`);i!==0&&t.push(n.slice(0,i)),t.push(a)}else t.push(n)}return t},NI=(r,e)=>Iz(e).reduce((t,n)=>{if(typeof t!="object")throw new sa(`Index '${n}' in '${e}' not found in '${JSON.stringify(r)}'`);return Array.isArray(t)?t[parseInt(n)]:t[n]},r),Dz=r=>r!=null,Pz=r=>!r,Hv={[Id.HTTP]:80,[Id.HTTPS]:443},Rz=r=>{const e=(()=>{try{if(r instanceof URL)return r;if(typeof r=="object"&&"hostname"in r){const{hostname:f,port:d,protocol:g="",path:v="",query:y={}}=r,A=new URL(`${g}//${f}${d?`:${d}`:""}${v}`);return A.search=Object.entries(y).map(([C,k])=>`${C}=${k}`).join("&"),A}return new URL(r)}catch{return null}})();if(!e)return console.error(`Unable to parse ${JSON.stringify(r)} as a whatwg URL.`),null;const t=e.href,{host:n,hostname:i,pathname:a,protocol:s,search:o}=e;if(o)return null;const l=s.slice(0,-1);if(!Object.values(Id).includes(l))return null;const u=O1(i),c=t.includes(`${n}:${Hv[l]}`)||typeof r=="string"&&r.includes(`${n}:${Hv[l]}`),h=`${n}${c?`:${Hv[l]}`:""}`;return{scheme:l,authority:h,path:a,normalizedPath:a.endsWith("/")?a:`${a}/`,isIp:u}},Oz=(r,e)=>r===e,Bz=(r,e,t,n)=>e>=t||r.length<t||/[^\u0000-\u007f]/.test(r)?null:n?r.substring(r.length-t,r.length-e):r.substring(e,t),Mz=r=>encodeURIComponent(r).replace(/[!*'()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),_z={booleanEquals:Tz,getAttr:NI,isSet:Dz,isValidHostLabel:ah,not:Pz,parseURL:Rz,stringEquals:Oz,substring:Bz,uriEncode:Mz},LI=(r,e)=>{const t=[],n={...e.endpointParams,...e.referenceRecord};let i=0;for(;i<r.length;){const a=r.indexOf("{",i);if(a===-1){t.push(r.slice(i));break}t.push(r.slice(i,a));const s=r.indexOf("}",a);if(s===-1){t.push(r.slice(a));break}r[a+1]==="{"&&r[s+1]==="}"&&(t.push(r.slice(a+1,s)),i=s+2);const o=r.substring(a+1,s);if(o.includes("#")){const[l,u]=o.split("#");t.push(NI(n[l],u))}else t.push(n[o]);i=s+1}return t.join("")},Nz=({ref:r},e)=>({...e.endpointParams,...e.referenceRecord})[r],sm=(r,e,t)=>{if(typeof r=="string")return LI(r,t);if(r.fn)return VI.callFunction(r,t);if(r.ref)return Nz(r,t);throw new sa(`'${e}': ${String(r)} is not a string, function or reference.`)},UI=({fn:r,argv:e},t)=>{const n=e.map(a=>["boolean","number"].includes(typeof a)?a:VI.evaluateExpression(a,"arg",t)),i=r.split(".");return i[0]in Od&&i[1]!=null?Od[i[0]][i[1]](...n):_z[r](...n)},VI={evaluateExpression:sm,callFunction:UI},Lz=({assign:r,...e},t)=>{if(r&&r in t.referenceRecord)throw new sa(`'${r}' is already defined in Reference Record.`);const n=UI(e,t);return t.logger?.debug?.(`${Bd} evaluateCondition: ${Do(e)} = ${Do(n)}`),{result:n===""?!0:!!n,...r!=null&&{toAssign:{name:r,value:n}}}},B1=(r=[],e)=>{const t={};for(const n of r){const{result:i,toAssign:a}=Lz(n,{...e,referenceRecord:{...e.referenceRecord,...t}});if(!i)return{result:i};a&&(t[a.name]=a.value,e.logger?.debug?.(`${Bd} assign: ${a.name} := ${Do(a.value)}`))}return{result:!0,referenceRecord:t}},Uz=(r,e)=>Object.entries(r).reduce((t,[n,i])=>({...t,[n]:i.map(a=>{const s=sm(a,"Header value entry",e);if(typeof s!="string")throw new sa(`Header '${n}' value '${s}' is not a string`);return s})}),{}),zI=(r,e)=>Object.entries(r).reduce((t,[n,i])=>({...t,[n]:jI.getEndpointProperty(i,e)}),{}),HI=(r,e)=>{if(Array.isArray(r))return r.map(t=>HI(t,e));switch(typeof r){case"string":return LI(r,e);case"object":if(r===null)throw new sa(`Unexpected endpoint property: ${r}`);return jI.getEndpointProperties(r,e);case"boolean":return r;default:throw new sa(`Unexpected endpoint property type: ${typeof r}`)}},jI={getEndpointProperty:HI,getEndpointProperties:zI},Vz=(r,e)=>{const t=sm(r,"Endpoint URL",e);if(typeof t=="string")try{return new URL(t)}catch(n){throw console.error(`Failed to construct URL with ${t}`,n),n}throw new sa(`Endpoint URL must be a string, got ${typeof t}`)},zz=(r,e)=>{const{conditions:t,endpoint:n}=r,{result:i,referenceRecord:a}=B1(t,e);if(!i)return;const s={...e,referenceRecord:{...e.referenceRecord,...a}},{url:o,properties:l,headers:u}=n;return e.logger?.debug?.(`${Bd} Resolving endpoint from template: ${Do(n)}`),{...u!=null&&{headers:Uz(u,s)},...l!=null&&{properties:zI(l,s)},url:Vz(o,s)}},Hz=(r,e)=>{const{conditions:t,error:n}=r,{result:i,referenceRecord:a}=B1(t,e);if(i)throw new sa(sm(n,"Error",{...e,referenceRecord:{...e.referenceRecord,...a}}))},GI=(r,e)=>{for(const t of r)if(t.type==="endpoint"){const n=zz(t,e);if(n)return n}else if(t.type==="error")Hz(t,e);else if(t.type==="tree"){const n=$I.evaluateTreeRule(t,e);if(n)return n}else throw new sa(`Unknown endpoint rule: ${t}`);throw new sa("Rules evaluation failed")},jz=(r,e)=>{const{conditions:t,rules:n}=r,{result:i,referenceRecord:a}=B1(t,e);if(i)return $I.evaluateRules(n,{...e,referenceRecord:{...e.referenceRecord,...a}})},$I={evaluateRules:GI,evaluateTreeRule:jz},Gz=(r,e)=>{const{endpointParams:t,logger:n}=e,{parameters:i,rules:a}=r;e.logger?.debug?.(`${Bd} Initial EndpointParams: ${Do(t)}`);const s=Object.entries(i).filter(([,u])=>u.default!=null).map(([u,c])=>[u,c.default]);if(s.length>0)for(const[u,c]of s)t[u]=t[u]??c;const o=Object.entries(i).filter(([,u])=>u.required).map(([u])=>u);for(const u of o)if(t[u]==null)throw new sa(`Missing required parameter: '${u}'`);const l=GI(a,{endpointParams:t,logger:n,referenceRecord:{}});return e.logger?.debug?.(`${Bd} Resolved endpoint: ${Do(l)}`),l},qI=(r,e=!1)=>{if(e){for(const t of r.split("."))if(!qI(t))return!1;return!0}return!(!ah(r)||r.length<3||r.length>63||r!==r.toLowerCase()||O1(r))},TE=":",$z="/",qz=r=>{const e=r.split(TE);if(e.length<6)return null;const[t,n,i,a,s,...o]=e;if(t!=="arn"||n===""||i===""||o.join(TE)==="")return null;const l=o.map(u=>u.split($z)).flat();return{partition:n,service:i,region:a,accountId:s,resourceId:l}},Wz=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],Qz={partitions:Wz};let Yz=Qz;const Xz=r=>{const{partitions:e}=Yz;for(const n of e){const{regions:i,outputs:a}=n;for(const[s,o]of Object.entries(i))if(s===r)return{...a,...o}}for(const n of e){const{regionRegex:i,outputs:a}=n;if(new RegExp(i).test(r))return{...a}}const t=e.find(n=>n.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},Jz={isVirtualHostableS3Bucket:qI,parseArn:qz,partition:Xz};Od.aws=Jz;function Kz(r,e,t){return r.$source||(r.$source={}),r.$source[e]=t,r}function Fs(r,e,t){r.__aws_sdk_context?r.__aws_sdk_context.features||(r.__aws_sdk_context.features={}):r.__aws_sdk_context={features:{}},r.__aws_sdk_context.features[e]=t}var Md;(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(Md||(Md={}));Md.STANDARD;const Zz=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],eH=["TimeoutError","RequestTimeout","RequestTimeoutException"],tH=[500,502,503,504],rH=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],nH=["EHOSTUNREACH","ENETUNREACH","ENOTFOUND"],iH=r=>r?.$retryable!==void 0,aH=r=>r.$metadata?.clockSkewCorrected,sH=r=>{const e=new Set(["Failed to fetch","NetworkError when attempting to fetch resource","The Internet connection appears to be offline","Load failed","Network request failed"]);return r&&r instanceof TypeError?e.has(r.message):!1},WI=r=>r.$metadata?.httpStatusCode===429||Zz.includes(r.name)||r.$retryable?.throttling==!0,M1=(r,e=0)=>iH(r)||aH(r)||eH.includes(r.name)||rH.includes(r?.code||"")||nH.includes(r?.code||"")||tH.includes(r.$metadata?.httpStatusCode||0)||sH(r)||r.cause!==void 0&&e<=10&&M1(r.cause,e+1),oH=r=>{if(r.$metadata?.httpStatusCode!==void 0){const e=r.$metadata.httpStatusCode;return 500<=e&&e<=599&&!M1(r)}return!1},lH=/\d{12}\.ddb/;async function uH(r,e,t){if(t.request?.headers?.["smithy-protocol"]==="rpc-v2-cbor"&&Fs(r,"PROTOCOL_RPC_V2_CBOR","M"),typeof e.retryStrategy=="function"){const a=await e.retryStrategy();if(typeof a.mode=="string")switch(a.mode){case Md.ADAPTIVE:Fs(r,"RETRY_MODE_ADAPTIVE","F");break;case Md.STANDARD:Fs(r,"RETRY_MODE_STANDARD","E");break}}if(typeof e.accountIdEndpointMode=="function"){const a=r.endpointV2;switch(String(a?.url?.hostname).match(lH)&&Fs(r,"ACCOUNT_ID_ENDPOINT","O"),await e.accountIdEndpointMode?.()){case"disabled":Fs(r,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Fs(r,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Fs(r,"ACCOUNT_ID_MODE_REQUIRED","R");break}}const i=r.__smithy_context?.selectedHttpAuthScheme?.identity;if(i?.$source){const a=i;a.accountId&&Fs(r,"RESOLVED_ACCOUNT_ID","T");for(const[s,o]of Object.entries(a.$source??{}))Fs(r,s,o)}}const IE="user-agent",jv="x-amz-user-agent",DE=" ",Gv="/",cH=/[^!$%&'*+\-.^_`|~\w]/g,fH=/[^!$%&'*+\-.^_`|~\w#]/g,PE="-",dH=1024;function hH(r){let e="";for(const t in r){const n=r[t];if(e.length+n.length+1<=dH){e.length?e+=","+n:e+=n;continue}break}return e}const pH=r=>(e,t)=>async n=>{const{request:i}=n;if(!aa.isInstance(i))return e(n);const{headers:a}=i,s=t?.userAgent?.map(Mp)||[],o=(await r.defaultUserAgentProvider()).map(Mp);await uH(t,r,n);const l=t;o.push(`m/${hH(Object.assign({},t.__smithy_context?.features,l.__aws_sdk_context?.features))}`);const u=r?.customUserAgent?.map(Mp)||[],c=await r.userAgentAppId();c&&o.push(Mp(["app",`${c}`]));const h=[].concat([...o,...s,...u]).join(DE),f=[...o.filter(d=>d.startsWith("aws-sdk-")),...u].join(DE);return r.runtime!=="browser"?(f&&(a[jv]=a[jv]?`${a[IE]} ${f}`:f),a[IE]=h):a[jv]=h,e({...n,request:i})},Mp=r=>{const e=r[0].split(Gv).map(s=>s.replace(cH,PE)).join(Gv),t=r[1]?.replace(fH,PE),n=e.indexOf(Gv),i=e.substring(0,n);let a=e.substring(n+1);return i==="api"&&(a=a.toLowerCase()),[i,a,t].filter(s=>s&&s.length>0).reduce((s,o,l)=>{switch(l){case 0:return o;case 1:return`${s}/${o}`;default:return`${s}#${o}`}},"")},gH={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},mH=r=>({applyToStack:e=>{e.add(pH(r),gH)}}),vH=!1,yH=!1,RE=new Set,AH=(r,e=ah)=>{if(!RE.has(r)&&!e(r))if(r==="*")console.warn('@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.');else throw new Error(`Region not accepted: region="${r}" is not a valid hostname component.`);else RE.add(r)},QI=r=>typeof r=="string"&&(r.startsWith("fips-")||r.endsWith("-fips")),bH=r=>QI(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r,wH=r=>{const{region:e,useFipsEndpoint:t}=r;if(!e)throw new Error("Region is missing");return Object.assign(r,{region:async()=>{const n=typeof e=="function"?await e():e,i=bH(n);return AH(i),i},useFipsEndpoint:async()=>{const n=typeof e=="string"?e:await e();return QI(n)?!0:typeof t!="function"?Promise.resolve(!!t):t()}})},OE="content-length";function CH(r){return e=>async t=>{const n=t.request;if(aa.isInstance(n)){const{body:i,headers:a}=n;if(i&&Object.keys(a).map(s=>s.toLowerCase()).indexOf(OE)===-1)try{const s=r(i);n.headers={...n.headers,[OE]:String(s)}}catch{}}return e({...t,request:n})}}const xH={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},SH=r=>({applyToStack:e=>{e.add(CH(r.bodyLengthChecker),xH)}}),EH=async r=>{const e=r?.Bucket||"";if(typeof r.Bucket=="string"&&(r.Bucket=e.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),DH(e)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else(!IH(e)||e.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||e.toLowerCase()!==e||e.length<3)&&(r.ForcePathStyle=!0);return r.DisableMultiRegionAccessPoints&&(r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0),r},kH=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,FH=/(\d+\.){3}\d+/,TH=/\.\./,IH=r=>kH.test(r)&&!FH.test(r)&&!TH.test(r),DH=r=>{const[e,t,n,,,i]=r.split(":"),a=e==="arn"&&r.split(":").length>=6,s=!!(a&&t&&n&&i);if(a&&!s)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return s},PH=(r,e,t,n=!1)=>{const i=async()=>{let a;return n?a=t.clientContextParams?.[r]??t[r]??t[e]:a=t[r]??t[e],typeof a=="function"?a():a};return r==="credentialScope"||e==="CredentialScope"?async()=>{const a=typeof t.credentials=="function"?await t.credentials():t.credentials;return a?.credentialScope??a?.CredentialScope}:r==="accountId"||e==="AccountId"?async()=>{const a=typeof t.credentials=="function"?await t.credentials():t.credentials;return a?.accountId??a?.AccountId}:r==="endpoint"||e==="endpoint"?async()=>{if(t.isCustomEndpoint===!1)return;const a=await i();if(a&&typeof a=="object"){if("url"in a)return a.url.href;if("hostname"in a){const{protocol:s,hostname:o,port:l,path:u}=a;return`${s}//${o}${l?":"+l:""}${u}`}}return a}:i},YI=async r=>{},XI=r=>{if(typeof r=="object"){if("url"in r){const e=dc(r.url);if(r.headers){e.headers={};for(const[t,n]of Object.entries(r.headers))e.headers[t.toLowerCase()]=n.join(", ")}return e}return r}return dc(r)},RH=async(r,e,t,n)=>{if(!t.isCustomEndpoint){let s;t.serviceConfiguredEndpoint?s=await t.serviceConfiguredEndpoint():s=await YI(t.serviceId),s&&(t.endpoint=()=>Promise.resolve(XI(s)),t.isCustomEndpoint=!0)}const i=await OH(r,e,t);if(typeof t.endpointProvider!="function")throw new Error("config.endpointProvider is not set.");const a=t.endpointProvider(i,n);if(t.isCustomEndpoint&&t.endpoint){const s=await t.endpoint();if(s?.headers){a.headers??={};for(const[o,l]of Object.entries(s.headers))a.headers[o]=Array.isArray(l)?l:[l]}}return a},OH=async(r,e,t)=>{const n={},i=e?.getEndpointParameterInstructions?.()||{};for(const[a,s]of Object.entries(i))switch(s.type){case"staticContextParams":n[a]=s.value;break;case"contextParams":n[a]=r[s.name];break;case"clientContextParams":case"builtInParams":n[a]=await PH(s.name,a,t,s.type!=="builtInParams")();break;case"operationContextParams":n[a]=s.get(r);break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(s))}return Object.keys(i).length===0&&Object.assign(n,t),String(t.serviceId).toLowerCase()==="s3"&&await EH(n),n},BH=({config:r,instructions:e})=>(t,n)=>async i=>{r.isCustomEndpoint&&gz(n,"ENDPOINT_OVERRIDE","N");const a=await RH(i.input,{getEndpointParameterInstructions(){return e}},{...r},n);n.endpointV2=a,n.authSchemes=a.properties?.authSchemes;const s=n.authSchemes?.[0];if(s){n.signing_region=s.signingRegion,n.signing_service=s.signingName;const l=xc(n)?.selectedHttpAuthScheme?.httpAuthOption;l&&(l.signingProperties=Object.assign(l.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return t({...i})},MH={name:"serializerMiddleware"},_H={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:MH.name},JI=(r,e)=>({applyToStack:t=>{t.addRelativeTo(BH({config:r,instructions:e}),_H)}}),NH=r=>{const e=r.tls??!0,{endpoint:t,useDualstackEndpoint:n,useFipsEndpoint:i}=r,a=t!=null?async()=>XI(await Ls(t)()):void 0,o=Object.assign(r,{endpoint:a,tls:e,isCustomEndpoint:!!t,useDualstackEndpoint:Ls(n??!1),useFipsEndpoint:Ls(i??!1)});let l;return o.serviceConfiguredEndpoint=async()=>(r.serviceId&&!l&&(l=YI(r.serviceId)),l),o};var hc;(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(hc||(hc={}));const ld=3,LH=hc.STANDARD;class _1{static setTimeoutFn=setTimeout;beta;minCapacity;minFillRate;scaleConstant;smooth;enabled=!1;availableTokens=0;lastMaxRate=0;measuredTxRate=0;requestCount=0;fillRate;lastThrottleTime;lastTimestamp=0;lastTxRateBucket;maxCapacity;timeWindow=0;constructor(e){this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8,this.lastThrottleTime=this.getCurrentTimeInSeconds(),this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}async getSendToken(){return this.acquireTokenBucket(1)}updateClientSendingRate(e){let t;this.updateMeasuredRate();const n=e;if(n?.errorType==="THROTTLING"||WI(n?.error??e)){const s=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=s,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(s),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const a=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(a)}getCurrentTimeInSeconds(){return Date.now()/1e3}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.availableTokens){const t=(e-this.availableTokens)/this.fillRate*1e3;await new Promise(n=>_1.setTimeoutFn(n,t))}this.availableTokens=this.availableTokens-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=e;return}const t=(e-this.lastTimestamp)*this.fillRate;this.availableTokens=Math.min(this.maxCapacity,this.availableTokens+t),this.lastTimestamp=e}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.availableTokens=Math.min(this.availableTokens,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(e*2)/2;if(this.requestCount++,t>this.lastTxRateBucket){const n=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(n*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const KI=20*1e3,BE=500,UH=1,VH="amz-sdk-invocation-id",zH="amz-sdk-request";class Ui{static v2026=typeof process<"u"&&process.env?.SMITHY_NEW_RETRIES_2026==="true";static delay(){return Ui.v2026?50:100}static throttlingDelay(){return Ui.v2026?1e3:500}static cost(){return Ui.v2026?14:5}static throttlingCost(){return Ui.v2026?5:10}static modifiedCostType(){return Ui.v2026?"THROTTLING":"TRANSIENT"}}class HH{x=Ui.delay();computeNextBackoffDelay(e){const i=Math.random()*Math.min(this.x*2**e,KI);return Math.floor(i)}setDelayBase(e){this.x=e}}class ME{delay;count;cost;longPoll;constructor(e,t,n,i){this.delay=e,this.count=t,this.cost=n,this.longPoll=i}getRetryCount(){return this.count}getRetryDelay(){return Math.min(KI,this.delay)}getRetryCost(){return this.cost}isLongPoll(){return this.longPoll}}class gA{mode=hc.STANDARD;capacity=BE;retryBackoffStrategy;maxAttemptsProvider;baseDelay;constructor(e){typeof e=="number"?this.maxAttemptsProvider=async()=>e:typeof e=="function"?this.maxAttemptsProvider=e:e&&typeof e=="object"&&(this.maxAttemptsProvider=async()=>e.maxAttempts,this.baseDelay=e.baseDelay,this.retryBackoffStrategy=e.backoff),this.maxAttemptsProvider??=async()=>ld,this.baseDelay??=Ui.delay(),this.retryBackoffStrategy??=new HH}async acquireInitialRetryToken(e){return new ME(Ui.delay(),0,void 0,Ui.v2026&&e.includes(":longpoll"))}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts(),i=this.shouldRetry(e,t,n);if(i||e.isLongPoll?.()){const a=t.errorType;this.retryBackoffStrategy.setDelayBase(a==="THROTTLING"?Ui.throttlingDelay():this.baseDelay);const s=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount());let o=s;if(t.retryAfterHint instanceof Date&&(o=Math.max(s,Math.min(t.retryAfterHint.getTime()-Date.now(),s+5e3))),i){const l=this.getCapacityCost(a);return this.capacity-=l,new ME(o,e.getRetryCount()+1,l,e.isLongPoll?.()??!1)}else throw Object.assign(new Error("No retry token available"),{$backoff:Ui.v2026?o:0})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.min(BE,this.capacity+(e.getRetryCost()??UH))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch{return console.warn(`Max attempts provider could not resolve. Using default of ${ld}`),ld}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return e===Ui.modifiedCostType()?Ui.throttlingCost():Ui.cost()}isRetryableError(e){return e==="THROTTLING"||e==="TRANSIENT"}}class jH{mode=hc.ADAPTIVE;rateLimiter;standardRetryStrategy;constructor(e,t){const{rateLimiter:n}=t??{};this.rateLimiter=n??new _1,this.standardRetryStrategy=t?new gA({maxAttempts:typeof e=="number"?e:3,...t}):new gA(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const GH=r=>r instanceof Error?r:r instanceof Object?Object.assign(new Error,r):typeof r=="string"?new Error(r):new Error(`AWS SDK error wrapper for ${r}`),$H=r=>{const{retryStrategy:e,retryMode:t}=r,n=Ls(r.maxAttempts??ld);let i=e?Promise.resolve(e):void 0;const a=async()=>await Ls(t)()===hc.ADAPTIVE?new jH(n):new gA(n);return Object.assign(r,{maxAttempts:n,retryStrategy:()=>i??=a()})},hl=(r,e)=>{const t=[];if(r&&t.push(r),e)for(const n of e)t.push(n);return t},io=(r,e)=>`${r||"anonymous"}${e&&e.length>0?` (a.k.a. ${e.join(",")})`:""}`,Fg=()=>{let r=[],e=[],t=!1;const n=new Set,i=h=>h.sort((f,d)=>_E[d.step]-_E[f.step]||NE[d.priority||"normal"]-NE[f.priority||"normal"]),a=h=>{let f=!1;const d=g=>{const v=hl(g.name,g.aliases);if(v.includes(h)){f=!0;for(const y of v)n.delete(y);return!1}return!0};return r=r.filter(d),e=e.filter(d),f},s=h=>{let f=!1;const d=g=>{if(g.middleware===h){f=!0;for(const v of hl(g.name,g.aliases))n.delete(v);return!1}return!0};return r=r.filter(d),e=e.filter(d),f},o=h=>(r.forEach(f=>{h.add(f.middleware,{...f})}),e.forEach(f=>{h.addRelativeTo(f.middleware,{...f})}),h.identifyOnResolve?.(c.identifyOnResolve()),h),l=h=>{const f=[];return h.before.forEach(d=>{d.before.length===0&&d.after.length===0?f.push(d):f.push(...l(d))}),f.push(h),h.after.reverse().forEach(d=>{d.before.length===0&&d.after.length===0?f.push(d):f.push(...l(d))}),f},u=(h=!1)=>{const f=[],d=[],g={};return r.forEach(y=>{const A={...y,before:[],after:[]};for(const C of hl(A.name,A.aliases))g[C]=A;f.push(A)}),e.forEach(y=>{const A={...y,before:[],after:[]};for(const C of hl(A.name,A.aliases))g[C]=A;d.push(A)}),d.forEach(y=>{if(y.toMiddleware){const A=g[y.toMiddleware];if(A===void 0){if(h)return;throw new Error(`${y.toMiddleware} is not found when adding ${io(y.name,y.aliases)} middleware ${y.relation} ${y.toMiddleware}`)}y.relation==="after"&&A.after.push(y),y.relation==="before"&&A.before.push(y)}}),i(f).map(l).reduce((y,A)=>(y.push(...A),y),[])},c={add:(h,f={})=>{const{name:d,override:g,aliases:v}=f,y={step:"initialize",priority:"normal",middleware:h,...f},A=hl(d,v);if(A.length>0){if(A.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${io(d,v)}'`);for(const C of A){const k=r.findIndex(S=>S.name===C||S.aliases?.some(R=>R===C));if(k===-1)continue;const T=r[k];if(T.step!==y.step||y.priority!==T.priority)throw new Error(`"${io(T.name,T.aliases)}" middleware with ${T.priority} priority in ${T.step} step cannot be overridden by "${io(d,v)}" middleware with ${y.priority} priority in ${y.step} step.`);r.splice(k,1)}}for(const C of A)n.add(C)}r.push(y)},addRelativeTo:(h,f)=>{const{name:d,override:g,aliases:v}=f,y={middleware:h,...f},A=hl(d,v);if(A.length>0){if(A.some(C=>n.has(C))){if(!g)throw new Error(`Duplicate middleware name '${io(d,v)}'`);for(const C of A){const k=e.findIndex(S=>S.name===C||S.aliases?.some(R=>R===C));if(k===-1)continue;const T=e[k];if(T.toMiddleware!==y.toMiddleware||T.relation!==y.relation)throw new Error(`"${io(T.name,T.aliases)}" middleware ${T.relation} "${T.toMiddleware}" middleware cannot be overridden by "${io(d,v)}" middleware ${y.relation} "${y.toMiddleware}" middleware.`);e.splice(k,1)}}for(const C of A)n.add(C)}e.push(y)},clone:()=>o(Fg()),use:h=>{h.applyToStack(c)},remove:h=>typeof h=="string"?a(h):s(h),removeByTag:h=>{let f=!1;const d=g=>{const{tags:v,name:y,aliases:A}=g;if(v&&v.includes(h)){const C=hl(y,A);for(const k of C)n.delete(k);return f=!0,!1}return!0};return r=r.filter(d),e=e.filter(d),f},concat:h=>{const f=o(Fg());return f.use(h),f.identifyOnResolve(t||f.identifyOnResolve()||(h.identifyOnResolve?.()??!1)),f},applyToStack:o,identify:()=>u(!0).map(h=>{const f=h.step??h.relation+" "+h.toMiddleware;return io(h.name,h.aliases)+" - "+f}),identifyOnResolve(h){return typeof h=="boolean"&&(t=h),t},resolve:(h,f)=>{for(const d of u().map(g=>g.middleware).reverse())h=d(h,f);return t&&console.log(c.identify()),h}};return c},_E={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},NE={high:3,normal:2,low:1};class qH{config;middlewareStack=Fg();initConfig;handlers;constructor(e){this.config=e;const{protocol:t,protocolSettings:n}=e;n&&typeof t=="function"&&(e.protocol=new t(n))}send(e,t,n){const i=typeof t!="function"?t:void 0,a=typeof t=="function"?t:n,s=i===void 0&&this.config.cacheMiddleware===!0;let o;if(s){this.handlers||(this.handlers=new WeakMap);const l=this.handlers;l.has(e.constructor)?o=l.get(e.constructor):(o=e.resolveMiddleware(this.middlewareStack,this.config,i),l.set(e.constructor,o))}else delete this.handlers,o=e.resolveMiddleware(this.middlewareStack,this.config,i);if(a)o(e).then(l=>a(null,l.output),l=>a(l)).catch(()=>{});else return o(e).then(l=>l.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}const $v="***SensitiveInformation***";function mA(r,e){if(e==null)return e;const t=vi.of(r);if(t.getMergedTraits().sensitive)return $v;if(t.isListSchema()){if(!!t.getValueSchema().getMergedTraits().sensitive)return $v}else if(t.isMapSchema()){if(!!t.getKeySchema().getMergedTraits().sensitive||!!t.getValueSchema().getMergedTraits().sensitive)return $v}else if(t.isStructSchema()&&typeof e=="object"){const n=e,i={};for(const[a,s]of t.structIterator())n[a]!=null&&(i[a]=mA(s,n[a]));return i}return e}class N1{middlewareStack=Fg();schema;static classBuilder(){return new WH}resolveMiddlewareWithContext(e,t,n,{middlewareFn:i,clientName:a,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:l,smithyContext:u,additionalContext:c,CommandCtor:h}){for(const y of i.bind(this)(h,e,t,n))this.middlewareStack.use(y);const f=e.concat(this.middlewareStack),{logger:d}=t,g={logger:d,clientName:a,commandName:s,inputFilterSensitiveLog:o,outputFilterSensitiveLog:l,[fA]:{commandInstance:this,...u},...c},{requestHandler:v}=t;return f.resolve(y=>v.handle(y.request,n||{}),g)}}class WH{_init=()=>{};_ep={};_middlewareFn=()=>[];_commandName="";_clientName="";_additionalContext={};_smithyContext={};_inputFilterSensitiveLog=void 0;_outputFilterSensitiveLog=void 0;_serializer=null;_deserializer=null;_operationSchema;init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=n=>n,t=n=>n){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}sc(e){return this._operationSchema=e,this._smithyContext.operationSchema=e,this}build(){const e=this;let t;return t=class extends N1{input;static getEndpointParameterInstructions(){return e._ep}constructor(...[n]){super(),this.input=n??{},e._init(this),this.schema=e._operationSchema}resolveMiddleware(n,i,a){const s=e._operationSchema,o=s?.[4]??s?.input,l=s?.[5]??s?.output;return this.resolveMiddlewareWithContext(n,i,a,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog??(s?mA.bind(null,o):u=>u),outputFilterSensitiveLog:e._outputFilterSensitiveLog??(s?mA.bind(null,l):u=>u),smithyContext:e._smithyContext,additionalContext:e._additionalContext})}serialize=e._serializer;deserialize=e._deserializer}}}class zu extends Error{$fault;$response;$retryable;$metadata;constructor(e){super(e.message),Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}static isInstance(e){if(!e)return!1;const t=e;return zu.prototype.isPrototypeOf(t)||!!t.$fault&&!!t.$metadata&&(t.$fault==="client"||t.$fault==="server")}static[Symbol.hasInstance](e){if(!e)return!1;const t=e;return this===zu?zu.isInstance(e):zu.isInstance(e)?t.name&&this.name?this.prototype.isPrototypeOf(e)||t.name===this.name:this.prototype.isPrototypeOf(e):!1}}const LE=(r,e={})=>{Object.entries(e).filter(([,n])=>n!==void 0).forEach(([n,i])=>{(r[n]==null||r[n]==="")&&(r[n]=i)});const t=r.message||r.Message||"UnknownError";return r.message=t,delete r.Message,r},QH=r=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}},ZI=Object.values(Dd),YH=r=>{const e=[];for(const t in Dd){const n=Dd[t];r[n]!==void 0&&e.push({algorithmId:()=>n,checksumConstructor:()=>r[n]})}for(const[t,n]of Object.entries(r.checksumAlgorithms??{}))e.push({algorithmId:()=>t,checksumConstructor:()=>n});return{addChecksumAlgorithm(t){r.checksumAlgorithms=r.checksumAlgorithms??{};const n=t.algorithmId(),i=t.checksumConstructor();ZI.includes(n)?r.checksumAlgorithms[n.toUpperCase()]=i:r.checksumAlgorithms[n]=i,e.push(t)},checksumAlgorithms(){return e}}},XH=r=>{const e={};return r.checksumAlgorithms().forEach(t=>{const n=t.algorithmId();ZI.includes(n)&&(e[n]=t.checksumConstructor())}),e},JH=r=>({setRetryStrategy(e){r.retryStrategy=e},retryStrategy(){return r.retryStrategy}}),KH=r=>{const e={};return e.retryStrategy=r.retryStrategy(),e},ZH=r=>Object.assign(YH(r),JH(r)),ej=r=>Object.assign(XH(r),KH(r));class eD{trace(){}debug(){}info(){}warn(){}error(){}}const tj=r=>r?.body instanceof ReadableStream;function rj(r,e){if(fc.isInstance(r))for(const t of Object.keys(r.headers)){const n=t.toLowerCase();if(n==="retry-after"){const i=r.headers[t];let a=NaN;if(i.endsWith("GMT"))try{a=(OI(i).getTime()-Date.now())/1e3}catch(s){e?.trace?.("Failed to parse retry-after header"),e?.trace?.(s)}else i.match(/ GMT, ((\d+)|(\d+\.\d+))$/)?a=Number(i.match(/ GMT, ([\d.]+)$/)?.[1]):i.match(/^((\d+)|(\d+\.\d+))$/)?a=Number(i):Date.parse(i)>=Date.now()&&(a=(Date.parse(i)-Date.now())/1e3);return isNaN(a)?void 0:new Date(Date.now()+a*1e3)}else if(n==="x-amz-retry-after"){const i=r.headers[t],a=Number(i);if(isNaN(a)){e?.trace?.(`Failed to parse x-amz-retry-after=${i}`);return}return new Date(Date.now()+a)}}}const nj=r=>(e,t)=>async n=>{let i=await r.retryStrategy();const a=await r.maxAttempts();if(ij(i)){i=i;let s=await i.acquireInitialRetryToken((t.partition_id??"")+(t.__retryLongPoll?":longpoll":"")),o=new Error,l=0,u=0;const{request:c}=n,h=aa.isInstance(c);for(h&&(c.headers[VH]=BI());;)try{h&&(c.headers[zH]=`attempt=${l+1}; max=${a}`);const{response:f,output:d}=await e(n);return i.recordSuccess(s),d.$metadata.attempts=l+1,d.$metadata.totalRetryDelay=u,{response:f,output:d}}catch(f){const d=aj(f,r.logger);if(o=GH(f),h&&tj(c))throw(t.logger instanceof eD?console:t.logger)?.warn("An error was encountered in a non-retryable streaming request."),o;try{s=await i.refreshRetryTokenForRetry(s,d)}catch(v){throw typeof v.$backoff=="number"&&await UE(v.$backoff),o.$metadata||(o.$metadata={}),o.$metadata.attempts=l+1,o.$metadata.totalRetryDelay=u,o}l=s.getRetryCount();const g=s.getRetryDelay();u+=g,await UE(g)}}else return i=i,i?.mode&&(t.userAgent=[...t.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(e,n)},UE=r=>new Promise(e=>setTimeout(e,r)),ij=r=>typeof r.acquireInitialRetryToken<"u"&&typeof r.refreshRetryTokenForRetry<"u"&&typeof r.recordSuccess<"u",aj=(r,e)=>{const t={error:r,errorType:sj(r)},n=rj(r.$response,e);return n&&(t.retryAfterHint=n),t},sj=r=>WI(r)?"THROTTLING":M1(r)?"TRANSIENT":oH(r)?"SERVER_ERROR":"CLIENT_ERROR",oj={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},lj=r=>({applyToStack:e=>{e.add(nj(r),oj)}}),VE=r=>fc.isInstance(r)?r.headers?.date??r.headers?.Date:void 0,tD=r=>new Date(Date.now()+r),uj=(r,e)=>Math.abs(tD(e).getTime()-r)>=3e5,zE=(r,e)=>{const t=Date.parse(r);return uj(t,e)?t-Date.now():e},ud=(r,e)=>{if(!e)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return e},cj=async r=>{const e=ud("context",r.context),t=ud("config",r.config),n=e.endpointV2?.properties?.authSchemes?.[0],a=await ud("signer",t.signer)(n),s=r?.signingRegion,o=r?.signingRegionSet,l=r?.signingName;return{config:t,signer:a,signingRegion:s,signingRegionSet:o,signingName:l}};class fj{async sign(e,t,n){if(!aa.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const i=await cj(n),{config:a,signer:s}=i;let{signingRegion:o,signingName:l}=i;const u=n.context;if(u?.authSchemes?.length??!1){const[h,f]=u.authSchemes;h?.name==="sigv4a"&&f?.name==="sigv4"&&(o=f?.signingRegion??o,l=f?.signingName??l)}return await s.sign(e,{signingDate:tD(a.systemClockOffset),signingRegion:o,signingService:l})}errorHandler(e){return t=>{const n=t.ServerTime??VE(t.$response);if(n){const i=ud("config",e.config),a=i.systemClockOffset;i.systemClockOffset=zE(n,i.systemClockOffset),i.systemClockOffset!==a&&t.$metadata&&(t.$metadata.clockSkewCorrected=!0)}throw t}}successHandler(e,t){const n=VE(e);if(n){const i=ud("config",t.config);i.systemClockOffset=zE(n,i.systemClockOffset)}}}const dj=(r,e,t)=>{let n,i,a,s=!1;const o=async()=>{i||(i=r());try{n=await i,a=!0,s=!1}finally{i=void 0}return n};return async l=>((!a||l?.forceRefresh)&&(n=await o()),n)},hj="X-Amz-Algorithm",pj="X-Amz-Credential",rD="X-Amz-Date",gj="X-Amz-SignedHeaders",mj="X-Amz-Expires",nD="X-Amz-Signature",iD="X-Amz-Security-Token",aD="authorization",sD=rD.toLowerCase(),vj="date",yj=[aD,sD,vj],Aj=nD.toLowerCase(),vA="x-amz-content-sha256",bj=iD.toLowerCase(),wj={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},Cj=/^proxy-/,xj=/^sec-/,qv="AWS4-HMAC-SHA256",Sj="AWS4-HMAC-SHA256-PAYLOAD",Ej="UNSIGNED-PAYLOAD",kj=50,oD="aws4_request",Fj=3600*24*7,_p={},Wv=[],Qv=(r,e,t)=>`${r}/${e}/${t}/${oD}`,Tj=async(r,e,t,n,i)=>{const a=await HE(r,e.secretAccessKey,e.accessKeyId),s=`${t}:${n}:${i}:${kl(a)}:${e.sessionToken}`;if(s in _p)return _p[s];for(Wv.push(s);Wv.length>kj;)delete _p[Wv.shift()];let o=`AWS4${e.secretAccessKey}`;for(const l of[t,n,i,oD])o=await HE(r,o,l);return _p[s]=o},HE=(r,e,t)=>{const n=new r(e);return n.update(Pd(t)),n.digest()},jE=({headers:r},e,t)=>{const n={};for(const i of Object.keys(r).sort()){if(r[i]==null)continue;const a=i.toLowerCase();(a in wj||e?.has(a)||Cj.test(a)||xj.test(a))&&(!t||t&&!t.has(a))||(n[a]=r[i].trim().replace(/\s+/g," "))}return n},Ij=r=>typeof ArrayBuffer=="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]",Yv=async({headers:r,body:e},t)=>{for(const n of Object.keys(r))if(n.toLowerCase()===vA)return r[n];if(e==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if(typeof e=="string"||ArrayBuffer.isView(e)||Ij(e)){const n=new t;return n.update(Pd(e)),kl(await n.digest())}return Ej};class Dj{format(e){const t=[];for(const a of Object.keys(e)){const s=Il(a);t.push(Uint8Array.from([s.byteLength]),s,this.formatHeaderValue(e[a]))}const n=new Uint8Array(t.reduce((a,s)=>a+s.byteLength,0));let i=0;for(const a of t)n.set(a,i),i+=a.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const i=new Uint8Array(9);return i[0]=5,i.set(e.value.bytes,1),i;case"binary":const a=new DataView(new ArrayBuffer(3+e.value.byteLength));a.setUint8(0,6),a.setUint16(1,e.value.byteLength,!1);const s=new Uint8Array(a.buffer);return s.set(e.value,3),s;case"string":const o=Il(e.value),l=new DataView(new ArrayBuffer(3+o.byteLength));l.setUint8(0,7),l.setUint16(1,o.byteLength,!1);const u=new Uint8Array(l.buffer);return u.set(o,3),u;case"timestamp":const c=new Uint8Array(9);return c[0]=8,c.set(L1.fromNumber(e.value.valueOf()).bytes,1),c;case"uuid":if(!Pj.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const h=new Uint8Array(17);return h[0]=9,h.set(RV(e.value.replace(/\-/g,"")),1),h}}}var GE;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(GE||(GE={}));const Pj=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class L1{bytes;constructor(e){if(this.bytes=e,e.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>9223372036854776e3||e<-9223372036854776e3)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,i=Math.abs(Math.round(e));n>-1&&i>0;n--,i/=256)t[n]=i;return e<0&&$E(t),new L1(t)}valueOf(){const e=this.bytes.slice(0),t=e[0]&128;return t&&$E(e),parseInt(kl(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function $E(r){for(let e=0;e<8;e++)r[e]^=255;for(let e=7;e>-1&&(r[e]++,r[e]===0);e--);}const Rj=(r,e)=>{r=r.toLowerCase();for(const t of Object.keys(e))if(r===t.toLowerCase())return!0;return!1},Oj=(r,e={})=>{const{headers:t,query:n={}}=aa.clone(r);for(const i of Object.keys(t)){const a=i.toLowerCase();(a.slice(0,6)==="x-amz-"&&!e.unhoistableHeaders?.has(a)||e.hoistableHeaders?.has(a))&&(n[i]=t[i],delete t[i])}return{...r,headers:t,query:n}},qE=r=>{r=aa.clone(r);for(const e of Object.keys(r.headers))yj.indexOf(e.toLowerCase())>-1&&delete r.headers[e];return r},Bj=({query:r={}})=>{const e=[],t={};for(const n of Object.keys(r)){if(n.toLowerCase()===Aj)continue;const i=El(n);e.push(i);const a=r[n];typeof a=="string"?t[i]=`${i}=${El(a)}`:Array.isArray(a)&&(t[i]=a.slice(0).reduce((s,o)=>s.concat([`${i}=${El(o)}`]),[]).sort().join("&"))}return e.sort().map(n=>t[n]).filter(n=>n).join("&")},Mj=r=>_j(r).toISOString().replace(/\.\d{3}Z$/,"Z"),_j=r=>typeof r=="number"?new Date(r*1e3):typeof r=="string"?Number(r)?new Date(Number(r)*1e3):new Date(r):r;class Nj{service;regionProvider;credentialProvider;sha256;uriEscapePath;applyChecksum;constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:a,uriEscapePath:s=!0}){this.service=i,this.sha256=a,this.uriEscapePath=s,this.applyChecksum=typeof e=="boolean"?e:!0,this.regionProvider=Ls(n),this.credentialProvider=Ls(t)}createCanonicalRequest(e,t,n){const i=Object.keys(t).sort();return`${e.method}
2692
2698
  ${this.getCanonicalPath(e)}
2693
- ${Oj(e)}
2699
+ ${Bj(e)}
2694
2700
  ${i.map(a=>`${a}:${t[a]}`).join(`
2695
2701
  `)}
2696
2702
 
@@ -2698,16 +2704,16 @@ ${i.join(";")}
2698
2704
  ${n}`}async createStringToSign(e,t,n,i){const a=new this.sha256;a.update(Pd(n));const s=await a.digest();return`${i}
2699
2705
  ${e}
2700
2706
  ${t}
2701
- ${kl(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const a of e.split("/"))a?.length!==0&&a!=="."&&(a===".."?t.pop():t.push(a));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return El(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const t=Bj(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class WE extends _j{headerFormatter=new Ij;constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:a,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:i,sha256:a,uriEscapePath:s})}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:a,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:l,signingRegion:u,signingService:c}=t,h=await this.credentialProvider();this.validateResolvedCredentials(h);const f=u??await this.regionProvider(),{longDate:d,shortDate:g}=this.formatDate(n);if(i>kj)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const v=Qv(g,f,c??this.service),y=Rj(qE(e),{unhoistableHeaders:s,hoistableHeaders:l});h.sessionToken&&(y.query[iD]=h.sessionToken),y.query[dj]=qv,y.query[hj]=`${h.accessKeyId}/${v}`,y.query[rD]=d,y.query[gj]=i.toString(10);const A=jE(y,a,o);return y.query[pj]=this.getCanonicalHeaderList(A),y.query[nD]=await this.getSignature(d,v,this.getSigningKey(h,f,g,c),this.createCanonicalRequest(y,A,await Yv(e,this.sha256))),y}async sign(e,t){return typeof e=="string"?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:a,signingService:s}){const o=a??await this.regionProvider(),{shortDate:l,longDate:u}=this.formatDate(n),c=Qv(l,o,s??this.service),h=await Yv({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);const d=kl(await f.digest()),g=[xj,u,c,i,d,h].join(`
2702
- `);return this.signString(g,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:i,priorSignature:e.priorSignature}).then(s=>({message:e.message,signature:s}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),l=new this.sha256(await this.getSigningKey(a,s,o,i));return l.update(Pd(e)),kl(await l.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:a,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const l=a??await this.regionProvider(),u=qE(e),{longDate:c,shortDate:h}=this.formatDate(t),f=Qv(h,l,s??this.service);u.headers[sD]=c,o.sessionToken&&(u.headers[Aj]=o.sessionToken);const d=await Yv(u,this.sha256);!Pj(vA,u.headers)&&this.applyChecksum&&(u.headers[vA]=d);const g=jE(u,i,n),v=await this.getSignature(c,f,this.getSigningKey(o,l,h,s),this.createCanonicalRequest(u,g,d));return u.headers[aD]=`${qv} Credential=${o.accessKeyId}/${f}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${v}`,u}async getSignature(e,t,n,i){const a=await this.createStringToSign(e,t,i,qv),s=new this.sha256(await n);return s.update(Pd(a)),kl(await s.digest())}getSigningKey(e,t,n,i){return Fj(this.sha256,e,n,t,i||this.service)}}const Nj=r=>{let e=r.credentials,t=!!r.credentials,n;Object.defineProperty(r,"credentials",{set(u){u&&u!==e&&u!==n&&(t=!0),e=u;const c=Lj(r,{credentials:e,credentialDefaultProvider:r.credentialDefaultProvider}),h=Uj(r,c);if(t&&!h.attributed){const f=typeof e=="object"&&e!==null;n=async d=>{const v=await h(d);return f&&(!v.$source||Object.keys(v.$source).length===0)?Jz(v,"CREDENTIALS_CODE","e"):v},n.memoized=h.memoized,n.configBound=h.configBound,n.attributed=!0}else n=h},get(){return n},enumerable:!0,configurable:!0}),r.credentials=e;const{signingEscapePath:i=!0,systemClockOffset:a=r.systemClockOffset||0,sha256:s}=r;let o;return r.signer?o=sd(r.signer):r.regionInfoProvider?o=()=>sd(r.region)().then(async u=>[await r.regionInfoProvider(u,{useFipsEndpoint:await r.useFipsEndpoint(),useDualstackEndpoint:await r.useDualstackEndpoint()})||{},u]).then(([u,c])=>{const{signingRegion:h,signingService:f}=u;r.signingRegion=r.signingRegion||h||c,r.signingName=r.signingName||f||r.serviceId;const d={...r,credentials:r.credentials,region:r.signingRegion,service:r.signingName,sha256:s,uriEscapePath:i},g=r.signerConstructor||WE;return new g(d)}):o=async u=>{u=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await sd(r.region)(),properties:{}},u);const c=u.signingRegion,h=u.signingName;r.signingRegion=r.signingRegion||c,r.signingName=r.signingName||h||r.serviceId;const f={...r,credentials:r.credentials,region:r.signingRegion,service:r.signingName,sha256:s,uriEscapePath:i},d=r.signerConstructor||WE;return new d(f)},Object.assign(r,{systemClockOffset:a,signingEscapePath:i,signer:o})};function Lj(r,{credentials:e,credentialDefaultProvider:t}){let n;return e?e?.memoized?n=e:n=bz(e,Az,_I):t?n=sd(t(Object.assign({},r,{parentClientConfig:r}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function Uj(r,e){if(e.configBound)return e;const t=async n=>e({...n,callerClientConfig:r});return t.memoized=e.memoized,t.configBound=!0,t}const Vj=async(r,e,t)=>({operation:xc(e).operation,region:await Ls(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function zj(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:r.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Ur(r){return{schemeId:"smithy.api#noAuth"}}const Hj=r=>{const e=[];switch(r.operation){case"AssociateSoftwareToken":{e.push(Ur());break}case"ChangePassword":{e.push(Ur());break}case"CompleteWebAuthnRegistration":{e.push(Ur());break}case"ConfirmDevice":{e.push(Ur());break}case"ConfirmForgotPassword":{e.push(Ur());break}case"ConfirmSignUp":{e.push(Ur());break}case"DeleteUser":{e.push(Ur());break}case"DeleteUserAttributes":{e.push(Ur());break}case"DeleteWebAuthnCredential":{e.push(Ur());break}case"ForgetDevice":{e.push(Ur());break}case"ForgotPassword":{e.push(Ur());break}case"GetDevice":{e.push(Ur());break}case"GetTokensFromRefreshToken":{e.push(Ur());break}case"GetUser":{e.push(Ur());break}case"GetUserAttributeVerificationCode":{e.push(Ur());break}case"GetUserAuthFactors":{e.push(Ur());break}case"GlobalSignOut":{e.push(Ur());break}case"InitiateAuth":{e.push(Ur());break}case"ListDevices":{e.push(Ur());break}case"ListWebAuthnCredentials":{e.push(Ur());break}case"ResendConfirmationCode":{e.push(Ur());break}case"RespondToAuthChallenge":{e.push(Ur());break}case"RevokeToken":{e.push(Ur());break}case"SetUserMFAPreference":{e.push(Ur());break}case"SetUserSettings":{e.push(Ur());break}case"SignUp":{e.push(Ur());break}case"StartWebAuthnRegistration":{e.push(Ur());break}case"UpdateAuthEventFeedback":{e.push(Ur());break}case"UpdateDeviceStatus":{e.push(Ur());break}case"UpdateUserAttributes":{e.push(Ur());break}case"VerifySoftwareToken":{e.push(Ur());break}case"VerifyUserAttribute":{e.push(Ur());break}default:e.push(zj(r))}return e},jj=r=>{const e=Nj(r);return Object.assign(e,{authSchemePreference:Ls(r.authSchemePreference??[])})},Gj=r=>Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),lD={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},$j="3.1026.0",qj={version:$j},Wj=r=>new TextEncoder().encode(r);var Qj=typeof Buffer<"u"&&Buffer.from?function(r){return Buffer.from(r,"utf8")}:Wj;function _d(r){return r instanceof Uint8Array?r:typeof r=="string"?Qj(r):ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(r)}function yA(r){return typeof r=="string"?r.length===0:r.byteLength===0}var uD={name:"SHA-256"},QE={name:"HMAC",hash:uD},Yj=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Xj={};function rg(){return typeof window<"u"?window:typeof self<"u"?self:Xj}var Jj=(function(){function r(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return r.prototype.update=function(e){if(!yA(e)){var t=_d(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},r.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return rg().crypto.subtle.sign(QE,t,e.toHash).then(function(n){return new Uint8Array(n)})}):yA(this.toHash)?Promise.resolve(Yj):Promise.resolve().then(function(){return rg().crypto.subtle.digest(uD,e.toHash)}).then(function(t){return Promise.resolve(new Uint8Array(t))})},r.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(t,n){rg().crypto.subtle.importKey("raw",_d(e.secret),QE,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},r})(),ma=64,Kj=32,Zj=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),eG=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],tG=Math.pow(2,53)-1,ng=(function(){function r(){this.state=Int32Array.from(eG),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>tG)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ma&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%ma>=ma-8){for(var i=this.bufferLength;i<ma;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<ma-8;i++)t.setUint8(i,0);t.setUint32(ma-8,Math.floor(e/4294967296),!0),t.setUint32(ma-4,e),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(Kj),i=0;i<8;i++)a[i*4]=this.state[i]>>>24&255,a[i*4+1]=this.state[i]>>>16&255,a[i*4+2]=this.state[i]>>>8&255,a[i*4+3]=this.state[i]>>>0&255;return a},r.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,i=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],c=n[6],h=n[7],f=0;f<ma;f++){if(f<16)this.temp[f]=(t[f*4]&255)<<24|(t[f*4+1]&255)<<16|(t[f*4+2]&255)<<8|t[f*4+3]&255;else{var d=this.temp[f-2],g=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10;d=this.temp[f-15];var v=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(g+this.temp[f-7]|0)+(v+this.temp[f-16]|0)}var y=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&c)|0)+(h+(Zj[f]+this.temp[f]|0)|0)|0,A=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&a^i&s^a&s)|0;h=c,c=u,u=l,l=o+y|0,o=s,s=a,a=i,i=y+A|0}n[0]+=i,n[1]+=a,n[2]+=s,n[3]+=o,n[4]+=l,n[5]+=u,n[6]+=c,n[7]+=h},r})(),rG=(function(){function r(e){this.secret=e,this.hash=new ng,this.reset()}return r.prototype.update=function(e){if(!(yA(e)||this.error))try{this.hash.update(_d(e))}catch(t){this.error=t}},r.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},r.prototype.digest=function(){return Rs(this,void 0,void 0,function(){return Os(this,function(e){return[2,this.digestSync()]})})},r.prototype.reset=function(){if(this.hash=new ng,this.secret){this.outer=new ng;var e=nG(this.secret),t=new Uint8Array(ma);t.set(e);for(var n=0;n<ma;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(var n=0;n<e.byteLength;n++)e[n]=0}},r})();function nG(r){var e=_d(r);if(e.byteLength>ma){var t=new ng;t.update(e),e=t.digest()}var n=new Uint8Array(ma);return n.set(e),n}var iG=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function aG(r){if(sG(r)&&typeof r.crypto.subtle=="object"){var e=r.crypto.subtle;return oG(e)}return!1}function sG(r){if(typeof r=="object"&&typeof r.crypto=="object"){var e=r.crypto.getRandomValues;return typeof e=="function"}return!1}function oG(r){return r&&iG.every(function(e){return typeof r[e]=="function"})}var lG=(function(){function r(e){aG(rg())?this.hash=new Jj(e):this.hash=new rG(e)}return r.prototype.update=function(e,t){this.hash.update(_d(e))},r.prototype.digest=function(){return this.hash.digest()},r.prototype.reset=function(){this.hash.reset()},r})();const uG=({serviceId:r,clientVersion:e})=>async t=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",a=n?.userAgentData?.platform??YE.os(i)??"other",s=void 0,o=n?.userAgentData?.brands??[],l=o[o.length-1],u=l?.brand??YE.browser(i)??"unknown",c=l?.version??"unknown",h=[["aws-sdk-js",e],["ua","2.1"],[`os/${a}`,s],["lang/js"],["md/browser",`${u}_${c}`]];r&&h.push([`api/${r}`,e]);const f=await t?.userAgentAppId?.();return f&&h.push([`app/${f}`]),h},YE={os(r){if(/iPhone|iPad|iPod/.test(r))return"iOS";if(/Macintosh|Mac OS X/.test(r))return"macOS";if(/Windows NT/.test(r))return"Windows";if(/Android/.test(r))return"Android";if(/Linux/.test(r))return"Linux"},browser(r){if(/EdgiOS|EdgA|Edg\//.test(r))return"Microsoft Edge";if(/Firefox\//.test(r))return"Firefox";if(/Chrome\//.test(r))return"Chrome";if(/Safari\//.test(r))return"Safari"}},cG=r=>()=>Promise.reject(r),XE=typeof TextEncoder=="function"?new TextEncoder:null,fG=r=>{if(typeof r=="string"){if(XE)return XE.encode(r).byteLength;let e=r.length;for(let t=e-1;t>=0;t--){const n=r.charCodeAt(t);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&t--}return e}else{if(typeof r.byteLength=="number")return r.byteLength;if(typeof r.size=="number")return r.size}throw new Error(`Body Length computation failed for ${r}`)},dG=["in-region","cross-region","mobile","standard","legacy"],hG=({defaultsMode:r}={})=>fj(async()=>{const e=typeof r=="function"?await r():r;switch(e?.toLowerCase()){case"auto":return Promise.resolve(pG()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${dG.join(", ")}, got ${e}`)}}),pG=()=>{const r=window?.navigator;if(r?.connection){const{effectiveType:e,rtt:t,downlink:n}=r?.connection;if(typeof e=="string"&&e!=="4g"||Number(t)>100||Number(n)<10)return!0}return r?.userAgentData?.mobile||typeof r?.maxTouchPoints=="number"&&r?.maxTouchPoints>1};class gG{queryCompat;errorRegistry;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas(),i=Object.values(n).find(a=>!!a.getMergedTraits().httpPayload);if(i){const a=i.getMergedTraits().mediaType;return a||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":e)}else if(!t.isUnitSchema()&&Object.values(n).find(s=>{const{httpQuery:o,httpQueryParams:l,httpHeader:u,httpLabel:c,httpPrefixHeaders:h}=s.getMergedTraits();return!o&&!l&&!u&&!c&&h===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,n,i,a,s){let o=e;e.includes("#")&&([,o]=e.split("#"));const l={$metadata:a,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:s?.(this.errorRegistry,o)??this.errorRegistry.getSchema(e),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const c=this.errorRegistry,h=c.getBaseException();if(h){const g=c.getErrorCtor(h)??Error;throw this.decorateServiceException(Object.assign(new g({name:o}),l),i)}const f=i,d=f?.message??f?.Message??f?.Error?.Message??f?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(d),{name:o},l),i)}}compose(e,t,n){let i=n;t.includes("#")&&([i]=t.split("#"));const a=ra.for(i),s=ra.for("smithy.ts.sdk.synthetic."+n);e.copyFrom(a),e.copyFrom(s),this.errorRegistry=e}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message,i=LE(e,t);n&&(i.message=n),i.Error={...i.Error,Type:i.Error?.Type,Code:i.Error?.Code,Message:i.Error?.message??i.Error?.Message??n};const a=i.$metadata.requestId;return a&&(i.RequestId=a),i}return LE(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[i,a]=n.split(";"),s=Object.entries(e),o={Code:i,Type:a};Object.assign(e,o);for(const[l,u]of s)o[l==="message"?"Message":l]=u;delete o.__type,e.Error=o}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch{return e.find(i=>vi.of(i).getMergedTraits().awsQueryError?.[0]===t)}}}class U1{serdeContext;setSerdeContext(e){this.serdeContext=e}}class mG{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}function vG(r,e,t){if(t?.source){const n=t.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new ts(n,"bigDecimal"):BigInt(n)}return e}const yG=(r,e)=>hA(r,e).then(t=>(e?.utf8Encoder??im)(t)),AG=(r,e)=>yG(r,e).then(t=>{if(t.length)try{return JSON.parse(t)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:t}),n}return{}}),bG=(r,e)=>{const t=(a,s)=>Object.keys(a).find(o=>o.toLowerCase()===s.toLowerCase()),n=a=>{let s=a;return typeof s=="number"&&(s=s.toString()),s.indexOf(",")>=0&&(s=s.split(",")[0]),s.indexOf(":")>=0&&(s=s.split(":")[0]),s.indexOf("#")>=0&&(s=s.split("#")[1]),s},i=t(r.headers,"x-amzn-errortype");if(i!==void 0)return n(r.headers[i]);if(e&&typeof e=="object"){const a=t(e,"code");if(a&&e[a]!==void 0)return n(e[a]);if(e.__type!==void 0)return n(e.__type)}};class wG extends U1{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,typeof t=="string"?JSON.parse(t,vG):await AG(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=t!==null&&typeof t=="object",i=vi.of(e);if(n){if(i.isStructSchema()){const s=t,o=i.isUnionSchema(),l={};let u;const{jsonName:c}=this.settings;c&&(u={});let h;o&&(h=new mG(s,l));for(const[f,d]of i.structIterator()){let g=f;c&&(g=d.getMergedTraits().jsonName??g,u[g]=f),o&&h.mark(g),s[g]!=null&&(l[f]=this._read(d,s[g]))}if(o)h.writeUnknown();else if(typeof s.__type=="string")for(const[f,d]of Object.entries(s)){const g=c?u[f]??f:f;g in l||(l[g]=d)}return l}if(Array.isArray(t)&&i.isListSchema()){const s=i.getValueSchema(),o=[];for(const l of t)o.push(this._read(s,l));return o}if(i.isMapSchema()){const s=i.getValueSchema(),o={};for(const[l,u]of Object.entries(t))o[l]=this._read(s,u);return o}}if(i.isBlobSchema()&&typeof t=="string")return nm(t);const a=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof t=="string"&&a)return a==="application/json"||a.endsWith("+json")?go.from(t):t;if(i.isTimestampSchema()&&t!=null)switch(MI(i,this.settings)){case 5:return KV(t);case 6:return OI(t);case 7:return rz(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(i.isBigIntegerSchema()&&(typeof t=="number"||typeof t=="string"))return BigInt(t);if(i.isBigDecimalSchema()&&t!=null){if(t instanceof ts)return t;const s=t;return s.type==="bigDecimal"&&"string"in s?new ts(s.string,s.type):new ts(String(t),"bigDecimal")}if(i.isNumericSchema()&&typeof t=="string"){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return t}if(i.isDocumentSchema())if(n){const s=Array.isArray(t)?[]:{};for(const[o,l]of Object.entries(t))l instanceof ts?s[o]=l:s[o]=this._read(i,l);return s}else return structuredClone(t);return t}}const JE="Ν";class CG{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,t)=>{if(t instanceof ts){const n=`${JE+"nv"+this.counter++}_`+t.string;return this.values.set(`"${n}"`,t.string),n}if(typeof t=="bigint"){const n=t.toString(),i=`${JE+"b"+this.counter++}_`+n;return this.values.set(`"${i}"`,n),i}return t}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[t,n]of this.values)e=e.replace(t,n);return e}}class xG extends U1{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=vi.of(e),this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t),typeof this.buffer=="object"&&(this.buffer.__type=vi.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);const n=new CG;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,t,n){const i=t!==null&&typeof t=="object",a=vi.of(e);if(i){if(a.isStructSchema()){const s=t,o={},{jsonName:l}=this.settings;let u;l&&(u={});for(const[c,h]of a.structIterator()){const f=this._write(h,s[c],a);if(f!==void 0){let d=c;l&&(d=h.getMergedTraits().jsonName??c,u[c]=d),o[d]=f}}if(a.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:c}=s;if(Array.isArray(c)){const[h,f]=c;o[h]=this._write(15,f)}}else if(typeof s.__type=="string")for(const[c,h]of Object.entries(s)){const f=l?u[c]??c:c;f in o||(o[f]=this._write(15,h))}return o}if(Array.isArray(t)&&a.isListSchema()){const s=a.getValueSchema(),o=[],l=!!a.getMergedTraits().sparse;for(const u of t)(l||u!=null)&&o.push(this._write(s,u));return o}if(a.isMapSchema()){const s=a.getValueSchema(),o={},l=!!a.getMergedTraits().sparse;for(const[u,c]of Object.entries(t))(l||c!=null)&&(o[u]=this._write(s,c));return o}if(t instanceof Uint8Array&&(a.isBlobSchema()||a.isDocumentSchema()))return a===this.rootSchema?t:(this.serdeContext?.base64Encoder??Eg)(t);if(t instanceof Date&&(a.isTimestampSchema()||a.isDocumentSchema()))switch(MI(a,this.settings)){case 5:return t.toISOString().replace(".000Z","Z");case 6:return XV(t);case 7:return t.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",t),t.getTime()/1e3}t instanceof ts&&(this.useReplacer=!0)}if(!(t===null&&n?.isStructSchema())){if(a.isStringSchema()){if(typeof t>"u"&&a.isIdempotencyToken())return BI();const s=a.getMergedTraits().mediaType;return t!=null&&s&&(s==="application/json"||s.endsWith("+json"))?go.from(t):t}if(typeof t=="number"&&a.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if(typeof t=="string"&&a.isBlobSchema())return a===this.rootSchema?t:(this.serdeContext?.base64Encoder??Eg)(t);if(typeof t=="bigint"&&(this.useReplacer=!0),a.isDocumentSchema())if(i){const s=Array.isArray(t)?[]:{};for(const[o,l]of Object.entries(t))l instanceof ts?(this.useReplacer=!0,s[o]=l):s[o]=this._write(a,l);return s}else return structuredClone(t);return t}}}class SG extends U1{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new xG(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new wG(this.settings);return e.setSerdeContext(this.serdeContext),e}}class EG extends hz{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a}){super({defaultNamespace:e,errorTypeRegistries:t}),this.serviceTarget=n,this.codec=a??new SG({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new gG(this.awsQueryCompatible)}async serializeRequest(e,t,n){const i=await super.serializeRequest(e,t,n);return i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(i.headers["x-amzn-query-mode"]="true"),(eg(e.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(e,t,n,i,a){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const s=bG(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);const{errorSchema:o,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,i,a,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=vi.of(o),c=i.message??i.Message??"UnknownError",h=this.compositeErrorRegistry.getErrorCtor(o)??Error,f=new h(c),d={};for(const[g,v]of u.structIterator())i[g]!=null&&(d[g]=this.codec.createDeserializer().readObject(v,i[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,d),this.mixin.decorateServiceException(Object.assign(f,l,{$fault:u.getMergedTraits().error,message:c},d),i)}}class kG extends EG{constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a}){super({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const cD=(r,e=!1)=>{if(e){for(const t of r.split("."))if(!cD(t))return!1;return!0}return!(!ah(r)||r.length<3||r.length>63||r!==r.toLowerCase()||O1(r))},KE=":",FG="/",TG=r=>{const e=r.split(KE);if(e.length<6)return null;const[t,n,i,a,s,...o]=e;if(t!=="arn"||n===""||i===""||o.join(KE)==="")return null;const l=o.map(u=>u.split(FG)).flat();return{partition:n,service:i,region:a,accountId:s,resourceId:l}},IG=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],DG={partitions:IG};let PG=DG;const RG=r=>{const{partitions:e}=PG;for(const n of e){const{regions:i,outputs:a}=n;for(const[s,o]of Object.entries(i))if(s===r)return{...a,...o}}for(const n of e){const{regionRegex:i,outputs:a}=n;if(new RegExp(i).test(r))return{...a}}const t=e.find(n=>n.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},fD={isVirtualHostableS3Bucket:cD,parseArn:TG,partition:RG};Od.aws=fD;const dD="required",Ii="fn",Di="argv",Sc="ref",ZE=!0,e2="isSet",Nd="booleanEquals",Du="error",Ja="endpoint",Ts="tree",V1="PartitionResult",z1="getAttr",Mf="stringEquals",t2={[dD]:!1,type:"string"},r2={[dD]:!0,default:!1,type:"boolean"},n2={[Sc]:"Endpoint"},hD={[Ii]:Nd,[Di]:[{[Sc]:"UseFIPS"},!0]},pD={[Ii]:Nd,[Di]:[{[Sc]:"UseDualStack"},!0]},ti={},Xf={[Sc]:"Region"},i2={[Ii]:z1,[Di]:[{[Sc]:V1},"supportsFIPS"]},gD={[Sc]:V1},a2={[Ii]:Nd,[Di]:[!0,{[Ii]:z1,[Di]:[gD,"supportsDualStack"]}]},s2=[hD],o2=[pD],l2=[Xf],OG={parameters:{Region:t2,UseDualStack:r2,UseFIPS:r2,Endpoint:t2},rules:[{conditions:[{[Ii]:e2,[Di]:[n2]}],rules:[{conditions:s2,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Du},{conditions:o2,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Du},{endpoint:{url:n2,properties:ti,headers:ti},type:Ja}],type:Ts},{conditions:[{[Ii]:e2,[Di]:l2}],rules:[{conditions:[{[Ii]:"aws.partition",[Di]:l2,assign:V1}],rules:[{conditions:[hD,pD],rules:[{conditions:[{[Ii]:Nd,[Di]:[ZE,i2]},a2],rules:[{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-east-1"]}],endpoint:{url:"https://cognito-idp-fips.us-east-1.amazonaws.com",properties:ti,headers:ti},type:Ja},{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-east-2"]}],endpoint:{url:"https://cognito-idp-fips.us-east-2.amazonaws.com",properties:ti,headers:ti},type:Ja},{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-west-1"]}],endpoint:{url:"https://cognito-idp-fips.us-west-1.amazonaws.com",properties:ti,headers:ti},type:Ja},{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-west-2"]}],endpoint:{url:"https://cognito-idp-fips.us-west-2.amazonaws.com",properties:ti,headers:ti},type:Ja},{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Du}],type:Ts},{conditions:s2,rules:[{conditions:[{[Ii]:Nd,[Di]:[i2,ZE]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts},{error:"FIPS is enabled but this partition does not support FIPS",type:Du}],type:Ts},{conditions:o2,rules:[{conditions:[a2],rules:[{conditions:[{[Ii]:Mf,[Di]:["aws",{[Ii]:z1,[Di]:[gD,"name"]}]}],endpoint:{url:"https://cognito-idp.{Region}.amazonaws.com",properties:ti,headers:ti},type:Ja},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts},{error:"DualStack is enabled but this partition does not support DualStack",type:Du}],type:Ts},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts}],type:Ts},{error:"Invalid Configuration: Missing Region",type:Du}]},BG=OG,MG=new Sz({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),_G=(r,e={})=>MG.get(r,()=>jz(BG,{endpointParams:r,logger:e.logger}));Od.aws=fD;class xt extends zu{constructor(e){super(e),Object.setPrototypeOf(this,xt.prototype)}}class H1 extends xt{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,H1.prototype)}}class j1 extends xt{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,j1.prototype)}}class G1 extends xt{name="InvalidParameterException";$fault="client";reasonCode;constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,G1.prototype),this.reasonCode=e.reasonCode}}class $1 extends xt{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,$1.prototype)}}class q1 extends xt{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,q1.prototype)}}class W1 extends xt{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,W1.prototype)}}class Q1 extends xt{name="UserImportInProgressException";$fault="client";constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,Q1.prototype)}}class Y1 extends xt{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Y1.prototype)}}class X1 extends xt{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,X1.prototype)}}class J1 extends xt{name="UserNotFoundException";$fault="client";constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,J1.prototype)}}class K1 extends xt{name="InvalidLambdaResponseException";$fault="client";constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),Object.setPrototypeOf(this,K1.prototype)}}class Z1 extends xt{name="TooManyFailedAttemptsException";$fault="client";constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),Object.setPrototypeOf(this,Z1.prototype)}}class eb extends xt{name="UnexpectedLambdaException";$fault="client";constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),Object.setPrototypeOf(this,eb.prototype)}}class tb extends xt{name="UserLambdaValidationException";$fault="client";constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,tb.prototype)}}class rb extends xt{name="CodeDeliveryFailureException";$fault="client";constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),Object.setPrototypeOf(this,rb.prototype)}}class nb extends xt{name="InvalidPasswordException";$fault="client";constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),Object.setPrototypeOf(this,nb.prototype)}}class ib extends xt{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,ib.prototype)}}class ab extends xt{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),Object.setPrototypeOf(this,ab.prototype)}}class sb extends xt{name="PreconditionNotMetException";$fault="client";constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),Object.setPrototypeOf(this,sb.prototype)}}class ob extends xt{name="UnsupportedUserStateException";$fault="client";constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),Object.setPrototypeOf(this,ob.prototype)}}class lb extends xt{name="UsernameExistsException";$fault="client";constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,lb.prototype)}}class ub extends xt{name="AliasExistsException";$fault="client";constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,ub.prototype)}}class cb extends xt{name="InvalidUserPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,cb.prototype)}}class fb extends xt{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,fb.prototype)}}class db extends xt{name="MFAMethodNotFoundException";$fault="client";constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,db.prototype)}}class hb extends xt{name="PasswordResetRequiredException";$fault="client";constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),Object.setPrototypeOf(this,hb.prototype)}}class pb extends xt{name="UnsupportedOperationException";$fault="client";constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),Object.setPrototypeOf(this,pb.prototype)}}class gb extends xt{name="UserNotConfirmedException";$fault="client";constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),Object.setPrototypeOf(this,gb.prototype)}}class mb extends xt{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,mb.prototype)}}class vb extends xt{name="CodeMismatchException";$fault="client";constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,vb.prototype)}}class yb extends xt{name="ExpiredCodeException";$fault="client";constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),Object.setPrototypeOf(this,yb.prototype)}}class Ab extends xt{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ab.prototype)}}class bb extends xt{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,bb.prototype)}}class wb extends xt{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,wb.prototype)}}class Cb extends xt{name="ForbiddenException";$fault="client";constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),Object.setPrototypeOf(this,Cb.prototype)}}class xb extends xt{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(e){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,xb.prototype)}}class Sb extends xt{name="WebAuthnClientMismatchException";$fault="client";constructor(e){super({name:"WebAuthnClientMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,Sb.prototype)}}class Eb extends xt{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(e){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,Eb.prototype)}}class kb extends xt{name="WebAuthnNotEnabledException";$fault="client";constructor(e){super({name:"WebAuthnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,kb.prototype)}}class Fb extends xt{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(e){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Fb.prototype)}}class Tb extends xt{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(e){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,Tb.prototype)}}class Ib extends xt{name="DeviceKeyExistsException";$fault="client";constructor(e){super({name:"DeviceKeyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ib.prototype)}}class Db extends xt{name="GroupExistsException";$fault="client";constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Db.prototype)}}class Pb extends xt{name="DuplicateProviderException";$fault="client";constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Pb.prototype)}}class Rb extends xt{name="ManagedLoginBrandingExistsException";$fault="client";constructor(e){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Rb.prototype)}}class Ob extends xt{name="TermsExistsException";$fault="client";constructor(e){super({name:"TermsExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ob.prototype)}}class Bb extends xt{name="FeatureUnavailableInTierException";$fault="client";constructor(e){super({name:"FeatureUnavailableInTierException",$fault:"client",...e}),Object.setPrototypeOf(this,Bb.prototype)}}class Mb extends xt{name="TierChangeNotAllowedException";$fault="client";constructor(e){super({name:"TierChangeNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Mb.prototype)}}class _b extends xt{name="UserPoolTaggingException";$fault="client";constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),Object.setPrototypeOf(this,_b.prototype)}}class Nb extends xt{name="InvalidOAuthFlowException";$fault="client";constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),Object.setPrototypeOf(this,Nb.prototype)}}class Lb extends xt{name="ScopeDoesNotExistException";$fault="client";constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),Object.setPrototypeOf(this,Lb.prototype)}}class Ub extends xt{name="UnsupportedIdentityProviderException";$fault="client";constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Ub.prototype)}}class Vb extends xt{name="RefreshTokenReuseException";$fault="client";constructor(e){super({name:"RefreshTokenReuseException",$fault:"client",...e}),Object.setPrototypeOf(this,Vb.prototype)}}class zb extends xt{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,zb.prototype)}}class Hb extends xt{name="UnsupportedTokenTypeException";$fault="client";constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Hb.prototype)}}class jb extends xt{name="WebAuthnConfigurationMissingException";$fault="client";constructor(e){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...e}),Object.setPrototypeOf(this,jb.prototype)}}class Gb extends xt{name="EnableSoftwareTokenMFAException";$fault="client";constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),Object.setPrototypeOf(this,Gb.prototype)}}const NG="AvailableChallenges",LG="AccessDeniedException",UG="AliasExistsException",VG="AnalyticsEndpointId",zG="AuthFlow",mD="AnalyticsMetadata",HG="AnalyticsMetadataType",jG="AuthParameters",GG="AuthParametersType",vD="AuthenticationResult",$G="AuthenticationResultType",qG="AccessToken",WG="CodeDeliveryFailureException",yD="ClientId",QG="ClientIdType",AD="ClientMetadata",YG="CodeMismatchException",XG="ConcurrentModificationException",$b="ChallengeName",bD="ChallengeParameters",JG="ChallengeResponses",KG="ChallengeResponsesType",ZG="DeviceGroupKey",e$="DeviceKey",t$="DeviceKeyExistsException",r$="DuplicateProviderException",n$="ExpiredCodeException",i$="EncodedData",a$="ExpiresIn",s$="EnableSoftwareTokenMFAException",o$="ForbiddenException",l$="FeatureUnavailableInTierException",u$="GroupExistsException",c$="IpAddress",f$="InitiateAuthRequest",d$="InitiateAuthResponse",h$="InitiateAuth",p$="InternalErrorException",g$="InvalidEmailRoleAccessPolicyException",m$="InvalidLambdaResponseException",v$="InvalidOAuthFlowException",y$="InvalidParameterException",A$="InvalidPasswordException",b$="InternalServerException",w$="InvalidSmsRoleAccessPolicyException",C$="InvalidSmsRoleTrustRelationshipException",x$="IdToken",S$="InvalidUserPoolConfigurationException",E$="LimitExceededException",k$="MFAMethodNotFoundException",F$="ManagedLoginBrandingExistsException",T$="NotAuthorizedException",I$="NewDeviceMetadata",D$="NewDeviceMetadataType",P$="PasswordHistoryPolicyViolationException",R$="PreconditionNotMetException",O$="PasswordResetRequiredException",B$="ResourceNotFoundException",M$="RefreshToken",_$="RespondToAuthChallenge",N$="RespondToAuthChallengeRequest",L$="RespondToAuthChallengeResponse",U$="RefreshTokenReuseException",om="Session",V$="ScopeDoesNotExistException",z$="SessionType",H$="SoftwareTokenMFANotFoundException",j$="TierChangeNotAllowedException",G$="TermsExistsException",$$="TooManyFailedAttemptsException",q$="TooManyRequestsException",W$="TokenModelType",Q$="TokenType",Y$="UserContextDataType",wD="UserContextData",X$="UnauthorizedException",J$="UsernameExistsException",K$="UserImportInProgressException",Z$="UnsupportedIdentityProviderException",eq="UnexpectedLambdaException",tq="UserLambdaValidationException",rq="UserNotConfirmedException",nq="UserNotFoundException",iq="UnsupportedOperationException",aq="UserPoolAddOnNotEnabledException",sq="UserPoolTaggingException",oq="UnsupportedTokenTypeException",lq="UnsupportedUserStateException",uq="WebAuthnClientMismatchException",cq="WebAuthnConfigurationMissingException",fq="WebAuthnChallengeNotFoundException",dq="WebAuthnCredentialNotSupportedException",hq="WebAuthnNotEnabledException",pq="WebAuthnOriginNotAllowedException",gq="WebAuthnRelyingPartyMismatchException",Ot="client",Ft="error",Bt="httpError",Tt="message",mq="reasonCode",CD="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",xD="server",at="com.amazonaws.cognitoidentityprovider",SD=ra.for(CD);var vq=[-3,CD,"CognitoIdentityProviderServiceException",0,[],[]];SD.registerError(vq,xt);const kt=ra.for(at);var yq=[-3,at,LG,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(yq,H1);var Aq=[-3,at,UG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Aq,ub);var bq=[-3,at,WG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(bq,rb);var wq=[-3,at,YG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(wq,vb);var Cq=[-3,at,XG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Cq,wb);var xq=[-3,at,t$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(xq,Ib);var Sq=[-3,at,r$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Sq,Pb);var Eq=[-3,at,s$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Eq,Gb);var kq=[-3,at,n$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(kq,yb);var Fq=[-3,at,l$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Fq,Bb);var Tq=[-3,at,o$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Tq,Cb);var Iq=[-3,at,u$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Iq,Db);var Dq=[-3,at,p$,{[Ft]:xD},[Tt],[0]];kt.registerError(Dq,j1);var Pq=[-3,at,b$,{[Ft]:xD},[Tt],[0]];kt.registerError(Pq,Y1);var Rq=[-3,at,g$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Rq,fb);var Oq=[-3,at,m$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Oq,K1);var Bq=[-3,at,v$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Bq,Nb);var Mq=[-3,at,y$,{[Ft]:Ot,[Bt]:400},[Tt,mq],[0,0]];kt.registerError(Mq,G1);var _q=[-3,at,A$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(_q,nb);var Nq=[-3,at,w$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Nq,ib);var Lq=[-3,at,C$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Lq,ab);var Uq=[-3,at,S$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Uq,cb);var Vq=[-3,at,E$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Vq,X1);var zq=[-3,at,F$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(zq,Rb);var Hq=[-3,at,k$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Hq,db);var jq=[-3,at,T$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(jq,$1);var Gq=[-3,at,P$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Gq,Ab);var $q=[-3,at,O$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError($q,hb);var qq=[-3,at,R$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(qq,sb);var Wq=[-3,at,U$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Wq,Vb);var Qq=[-3,at,B$,{[Ft]:Ot,[Bt]:404},[Tt],[0]];kt.registerError(Qq,q1);var Yq=[-3,at,V$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Yq,Lb);var Xq=[-3,at,H$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Xq,bb);var Jq=[-3,at,G$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Jq,Ob);var Kq=[-3,at,j$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Kq,Mb);var Zq=[-3,at,$$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Zq,Z1);var eW=[-3,at,q$,{[Ft]:Ot,[Bt]:429},[Tt],[0]];kt.registerError(eW,W1);var tW=[-3,at,X$,{[Ft]:Ot,[Bt]:401},[Tt],[0]];kt.registerError(tW,zb);var rW=[-3,at,eq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(rW,eb);var nW=[-3,at,Z$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(nW,Ub);var iW=[-3,at,iq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(iW,pb);var aW=[-3,at,oq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(aW,Hb);var sW=[-3,at,lq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(sW,ob);var oW=[-3,at,K$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(oW,Q1);var lW=[-3,at,tq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(lW,tb);var uW=[-3,at,J$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(uW,lb);var cW=[-3,at,rq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(cW,gb);var fW=[-3,at,nq,{[Ft]:Ot,[Bt]:404},[Tt],[0]];kt.registerError(fW,J1);var dW=[-3,at,aq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(dW,mb);var hW=[-3,at,sq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(hW,_b);var pW=[-3,at,fq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(pW,xb);var gW=[-3,at,uq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(gW,Sb);var mW=[-3,at,cq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(mW,jb);var vW=[-3,at,dq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(vW,Eb);var yW=[-3,at,hq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(yW,kb);var AW=[-3,at,pq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(AW,Fb);var bW=[-3,at,gq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(bW,Tb);const wW=[SD,kt];var ED=[0,at,QG,8,0],lm=[0,at,z$,8,0],Xv=[0,at,W$,8,0],kD=[3,at,HG,0,[VG],[0]],FD=[3,at,$G,0,[qG,a$,Q$,M$,x$,I$],[[()=>Xv,0],1,0,[()=>Xv,0],[()=>Xv,0],()=>SW]],CW=[3,at,f$,0,[zG,yD,jG,AD,mD,wD,om],[0,[()=>ED,0],[()=>FW,0],128,()=>kD,[()=>TD,0],[()=>lm,0]],2],xW=[3,at,d$,0,[$b,om,bD,vD,NG],[0,[()=>lm,0],128,[()=>FD,0],64]],SW=[3,at,D$,0,[e$,ZG],[0,0]],EW=[3,at,N$,0,[yD,$b,om,JG,mD,wD,AD],[[()=>ED,0],0,[()=>lm,0],[()=>TW,0],()=>kD,[()=>TD,0],128],2],kW=[3,at,L$,0,[$b,om,bD,vD],[0,[()=>lm,0],128,[()=>FD,0]]],TD=[3,at,Y$,8,[c$,i$],[0,0]],FW=[2,at,GG,8,0,0],TW=[2,at,KG,8,0,0],IW=[9,at,h$,0,()=>CW,()=>xW],DW=[9,at,_$,0,()=>EW,()=>kW];const PW=r=>({apiVersion:"2016-04-18",base64Decoder:r?.base64Decoder??nm,base64Encoder:r?.base64Encoder??Eg,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??_G,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??Hj,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new cj},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new mz}],logger:r?.logger??new eD,protocol:r?.protocol??kG,protocolSettings:r?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:wW,xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:r?.serviceId??"Cognito Identity Provider",urlParser:r?.urlParser??dc,utf8Decoder:r?.utf8Decoder??Il,utf8Encoder:r?.utf8Encoder??im}),RW=r=>{const e=hG(r),t=()=>e().then(WH),n=PW(r);return{...n,...r,runtime:"browser",defaultsMode:e,bodyLengthChecker:r?.bodyLengthChecker??fG,credentialDefaultProvider:r?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:r?.defaultUserAgentProvider??uG({serviceId:n.serviceId,clientVersion:qj.version}),maxAttempts:r?.maxAttempts??ld,region:r?.region??cG("Region is missing"),requestHandler:P1.create(r?.requestHandler??t),retryMode:r?.retryMode??(async()=>(await t()).retryMode||NH),sha256:r?.sha256??lG,streamCollector:r?.streamCollector??FV,useDualstackEndpoint:r?.useDualstackEndpoint??(()=>Promise.resolve(mH)),useFipsEndpoint:r?.useFipsEndpoint??(()=>Promise.resolve(vH))}},OW=r=>({setRegion(e){r.region=e},region(){return r.region}}),BW=r=>({region:r.region()}),MW=r=>{const e=r.httpAuthSchemes;let t=r.httpAuthSchemeProvider,n=r.credentials;return{setHttpAuthScheme(i){const a=e.findIndex(s=>s.schemeId===i.schemeId);a===-1?e.push(i):e.splice(a,1,i)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(i){t=i},httpAuthSchemeProvider(){return t},setCredentials(i){n=i},credentials(){return n}}},_W=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}),NW=(r,e)=>{const t=Object.assign(OW(r),KH(r),eV(r),MW(r));return e.forEach(n=>n.configure(t)),Object.assign(r,BW(t),ZH(t),tV(t),_W(t))};class LW extends $H{config;constructor(...[e]){const t=RW(e||{});super(t),this.initConfig=t;const n=Gj(t),i=xz(n),a=GH(i),s=bH(a),o=s,l=_H(o),u=jj(l),c=NW(u,e?.extensions||[]);this.config=c,this.middlewareStack.use(LV(this.config)),this.middlewareStack.use(gH(this.config)),this.middlewareStack.use(oj(this.config)),this.middlewareStack.use(xH(this.config)),this.middlewareStack.use(aV(this.config)),this.middlewareStack.use(lV(this.config)),this.middlewareStack.use(fV(this.config)),this.middlewareStack.use(mV(this.config,{httpAuthSchemeParametersProvider:Vj,identityProviderConfigProvider:async h=>new gz({"aws.auth#sigv4":h.credentials})})),this.middlewareStack.use(wV(this.config))}destroy(){super.destroy()}}class u2 extends N1.classBuilder().ep(lD).m(function(e,t,n,i){return[JI(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(IW).build(){}class UW extends N1.classBuilder().ep(lD).m(function(e,t,n,i){return[JI(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").sc(DW).build(){}class VW{init(e,t,n){this.cognitoClient=new LW({region:t}),this.spiffRegion=e,this.userPoolClientId=n}async generateCode(e){const t=await this.cognitoClient?.send(new u2({AuthFlow:"CUSTOM_AUTH",ClientId:this.userPoolClientId,AuthParameters:{USERNAME:e}}));t?.ChallengeName==="CUSTOM_CHALLENGE"&&(this.challengeSession=t.Session)}async verifyCode(e,t,n){const i=await this.cognitoClient?.send(new UW({ClientId:this.userPoolClientId,ChallengeName:"CUSTOM_CHALLENGE",Session:this.challengeSession,ChallengeResponses:{USERNAME:e,ANSWER:t},ClientMetadata:{partnerId:n,environment:(this.spiffRegion||"").toLowerCase()}}));return i?.ChallengeName==="CUSTOM_CHALLENGE"&&(this.challengeSession=i.Session),i}async refreshTokens(){const e=localStorage.getItem("cognito-tokens");if(!e)throw new Error("Failed to find existing tokens.");const t=JSON.parse(e);return await this.cognitoClient?.send(new u2({AuthFlow:"REFRESH_TOKEN_AUTH",ClientId:this.userPoolClientId,AuthParameters:{REFRESH_TOKEN:t.RefreshToken||""}}))}}const _f=new VW;var zW={defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},HW={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function cd(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cd=function(e){return typeof e}:cd=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cd(r)}function c2(r){return jW(r)||GW(r)||$W(r)||qW()}function jW(r){if(Array.isArray(r))return r}function GW(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function $W(r,e){if(r){if(typeof r=="string")return f2(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f2(r,e)}}function f2(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function qW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2703
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var WW={normalizePrecision:function(e){var t=e.reduce(function(n,i){return Math.max(n.getPrecision(),i.getPrecision())});return e.map(function(n){return n.getPrecision()!==t?n.convertPrecision(t):n})},minimum:function(e){var t=c2(e),n=t[0],i=t.slice(1),a=n;return i.forEach(function(s){a=a.lessThan(s)?a:s}),a},maximum:function(e){var t=c2(e),n=t[0],i=t.slice(1),a=n;return i.forEach(function(s){a=a.greaterThan(s)?a:s}),a}};function ID(r){return!isNaN(parseInt(r))&&isFinite(r)}function QW(r){return ID(r)&&r<=100&&r>=0}function YW(r){return r.length>0&&r.every(function(e){return e>=0})&&r.some(function(e){return e>0})}function d2(r){return r%2===0}function h2(r){return ID(r)&&!Number.isInteger(r)}function XW(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=r.toString();if(e.indexOf("e-")>0)return parseInt(e.split("e-")[1]);var t=e.split(".")[1];return t?t.length:0}function Nf(r){return Math.abs(r)%1===.5}function JW(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(t,n){var i=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){i.readyState===4&&(i.status>=200&&i.status<400?t(JSON.parse(i.responseText)):n(new Error(i.statusText)))},onerror:function(){n(new Error("Network error"))}});i.open("GET",r,!0),KW(i,e.headers),i.send()})}function KW(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var t in e)r.setRequestHeader(t,e[t]);return r}function Jf(r){return typeof r>"u"}function DD(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",t={};return Object.entries(r).forEach(function(n){if(cd(n[1])==="object"){var i=DD(n[1]);Object.entries(i).forEach(function(a){t[n[0]+e+a[0]]=a[1]})}else t[n[0]]=n[1]}),t}function ZW(r){return!!r&&(cd(r)==="object"||typeof r=="function")&&typeof r.then=="function"}function PD(){var r=function(n,i){var a=function(l){return Math.pow(10,XW(l))},s=Math.max(a(n),a(i));return Math.round(n*s)*Math.round(i*s)/(s*s)},e={HALF_ODD:function(n){var i=Math.round(n);return Nf(n)&&d2(i)?i-1:i},HALF_EVEN:function(n){var i=Math.round(n);return Nf(n)?d2(i)?i:i-1:i},HALF_UP:function(n){return Math.round(n)},HALF_DOWN:function(n){return Nf(n)?Math.floor(n):Math.round(n)},HALF_TOWARDS_ZERO:function(n){return Nf(n)?Math.sign(n)*Math.floor(Math.abs(n)):Math.round(n)},HALF_AWAY_FROM_ZERO:function(n){return Nf(n)?Math.sign(n)*Math.ceil(Math.abs(n)):Math.round(n)},DOWN:function(n){return Math.floor(n)}};return{add:function(n,i){return n+i},subtract:function(n,i){return n-i},multiply:function(n,i){return h2(n)||h2(i)?r(n,i):n*i},divide:function(n,i){return n/i},modulo:function(n,i){return n%i},round:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"HALF_EVEN";return e[i](n)}}}var eQ=PD();function tQ(r){var e=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(r);return{getMatches:function(){return e!==null?e.slice(1).filter(function(n){return!Jf(n)}):[]},getMinimumFractionDigits:function(){var n=function(a){return a==="."};return Jf(this.getMatches().find(n))?0:this.getMatches()[eQ.add(this.getMatches().findIndex(n),1)].split("").length},getCurrencyDisplay:function(){var n={USD:"code",dollar:"name",$:"symbol"};return n[this.getMatches().find(function(i){return i==="USD"||i==="dollar"||i==="$"})]},getStyle:function(){return Jf(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!Jf(this.getMatches().find(function(n){return n===","}))}}}function rQ(r){var e=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;for(var s in a)i=i.replace("{{".concat(s,"}}"),a[s]);return i},t=function(i,a){return JW(e(r.endpoint,{from:i,to:a}),{headers:r.headers})};return{getExchangeRate:function(i,a){return(ZW(r.endpoint)?r.endpoint:t(i,a)).then(function(s){return DD(s)[e(r.propertyPath,{from:i,to:a})]})}}}function Ld(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!r)throw new t(e)}function nQ(r){Ld(QW(r),"You must provide a numeric value between 0 and 100.",RangeError)}function iQ(r){Ld(YW(r),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function Jv(r){Ld(Number.isInteger(r),"You must provide an integer.",TypeError)}var En=PD(),aQ=function r(e){var t=Object.assign({},{amount:r.defaultAmount,currency:r.defaultCurrency,precision:r.defaultPrecision},e),n=t.amount,i=t.currency,a=t.precision;Jv(n),Jv(a);var s=r.globalLocale,o=r.globalFormat,l=r.globalRoundingMode,u=r.globalFormatRoundingMode,c=Object.assign({},r.globalExchangeRatesApi),h=function(g){var v=Object.assign({},Object.assign({},{amount:n,currency:i,precision:a},g),Object.assign({},{locale:this.locale},g));return Object.assign(r({amount:v.amount,currency:v.currency,precision:v.precision}),{locale:v.locale})},f=function(g){Ld(this.hasSameCurrency(g),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return n},getCurrency:function(){return i},getLocale:function(){return this.locale||s},setLocale:function(g){return h.call(this,{locale:g})},getPrecision:function(){return a},convertPrecision:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;Jv(g);var y=this.getPrecision(),A=g>y,C=A?En.multiply:En.divide,k=A?[g,y]:[y,g],T=Math.pow(10,En.subtract.apply(En,k));return h.call(this,{amount:En.round(C(this.getAmount(),T),v),precision:g})},add:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return h.call(this,{amount:En.add(v[0].getAmount(),v[1].getAmount()),precision:v[0].getPrecision()})},subtract:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return h.call(this,{amount:En.subtract(v[0].getAmount(),v[1].getAmount()),precision:v[0].getPrecision()})},multiply:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return h.call(this,{amount:En.round(En.multiply(this.getAmount(),g),v)})},divide:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return h.call(this,{amount:En.round(En.divide(this.getAmount(),g),v)})},percentage:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return nQ(g),this.multiply(En.divide(g,100),v)},allocate:function(g){var v=this;iQ(g);for(var y=g.reduce(function(T,S){return En.add(T,S)}),A=this.getAmount(),C=g.map(function(T){var S=Math.floor(En.divide(En.multiply(v.getAmount(),T),y));return A=En.subtract(A,S),h.call(v,{amount:S})}),k=0;A>0;)g[k]>0&&(C[k]=C[k].add(h.call(this,{amount:1})),A=En.subtract(A,1)),k+=1;return C},convert:function(g){var v=this,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=y.endpoint,C=A===void 0?c.endpoint:A,k=y.propertyPath,T=k===void 0?c.propertyPath||"rates.{{to}}":k,S=y.headers,R=S===void 0?c.headers:S,B=y.roundingMode,G=B===void 0?l:B,$=Object.assign({},{endpoint:C,propertyPath:T,headers:R,roundingMode:G});return rQ($).getExchangeRate(this.getCurrency(),g).then(function(Y){return Ld(!Jf(Y),'No rate was found for the destination currency "'.concat(g,'".'),TypeError),h.call(v,{amount:En.round(En.multiply(v.getAmount(),parseFloat(Y)),$.roundingMode),currency:g})})},equalsTo:function(g){return this.hasSameAmount(g)&&this.hasSameCurrency(g)},lessThan:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()<v[1].getAmount()},lessThanOrEqual:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()<=v[1].getAmount()},greaterThan:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()>v[1].getAmount()},greaterThanOrEqual:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()>=v[1].getAmount()},isZero:function(){return this.getAmount()===0},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return En.modulo(this.getAmount(),Math.pow(10,a))!==0},hasCents:function(){return En.modulo(this.getAmount(),Math.pow(10,a))!==0},hasSameCurrency:function(g){return this.getCurrency()===g.getCurrency()},hasSameAmount:function(g){var v=r.normalizePrecision([this,g]);return v[0].getAmount()===v[1].getAmount()},toFormat:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,y=tQ(g);return this.toRoundedUnit(y.getMinimumFractionDigits(),v).toLocaleString(this.getLocale(),{currencyDisplay:y.getCurrencyDisplay(),useGrouping:y.getUseGrouping(),minimumFractionDigits:y.getMinimumFractionDigits(),style:y.getStyle(),currency:this.getCurrency()})},toUnit:function(){return En.divide(this.getAmount(),Math.pow(10,a))},toRoundedUnit:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,y=Math.pow(10,g);return En.divide(En.round(En.multiply(this.toUnit(),y),v),y)},toObject:function(){return{amount:n,currency:i,precision:a}},toJSON:function(){return this.toObject()}}},sQ=Object.assign(aQ,zW,HW,WW),Ka={},Kv,p2;function oQ(){if(p2)return Kv;p2=1;function r(t){return t}function e(t,a,s){for(var a=a||r,s=s||t,o=0,l=t.length;o<l;o+=1)if(a.call(s,t[o],o))return t[o]}return Kv=e,Kv}var Zv={exports:{}},g2;function lQ(){if(g2)return Zv.exports;g2=1;var r=Zv.exports=function(e,t){if(typeof e=="function"||t)return r.by(e,t);for(var n={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},i=[],a=0;a<e.length;a++){var s=e[a],o=s==="__proto__"?n.objects:n[typeof s]||n.objects;Array.isArray(o)?o.indexOf(s)<0&&(o.push(s),i.push(s)):Object.hasOwnProperty.call(o,s)||(o[s]=!0,i.push(s))}return i};return r.by=function(e,t){if(typeof e=="function"){var n=t;t=e,e=n}for(var i=[],a=0;a<e.length;a++){for(var s=e[a],o=!1,l=0;l<i.length;l++){var u=i[l];if(t.call(i,s,u)){o=!0;break}}o||i.push(s)}return i},Zv.exports}var ey,m2;function uQ(){return m2||(m2=1,ey=[{code:"AED",number:"784",digits:2,currency:"UAE Dirham",countries:["United Arab Emirates (The)"]},{code:"AFN",number:"971",digits:2,currency:"Afghani",countries:["Afghanistan"]},{code:"ALL",number:"008",digits:2,currency:"Lek",countries:["Albania"]},{code:"AMD",number:"051",digits:2,currency:"Armenian Dram",countries:["Armenia"]},{code:"ANG",number:"532",digits:2,currency:"Netherlands Antillean Guilder",countries:["Curaçao","Sint Maarten (Dutch Part)"]},{code:"AOA",number:"973",digits:2,currency:"Kwanza",countries:["Angola"]},{code:"ARS",number:"032",digits:2,currency:"Argentine Peso",countries:["Argentina"]},{code:"AUD",number:"036",digits:2,currency:"Australian Dollar",countries:["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},{code:"AWG",number:"533",digits:2,currency:"Aruban Florin",countries:["Aruba"]},{code:"AZN",number:"944",digits:2,currency:"Azerbaijan Manat",countries:["Azerbaijan"]},{code:"BAM",number:"977",digits:2,currency:"Convertible Mark",countries:["Bosnia and Herzegovina"]},{code:"BBD",number:"052",digits:2,currency:"Barbados Dollar",countries:["Barbados"]},{code:"BDT",number:"050",digits:2,currency:"Taka",countries:["Bangladesh"]},{code:"BGN",number:"975",digits:2,currency:"Bulgarian Lev",countries:["Bulgaria"]},{code:"BHD",number:"048",digits:3,currency:"Bahraini Dinar",countries:["Bahrain"]},{code:"BIF",number:"108",digits:0,currency:"Burundi Franc",countries:["Burundi"]},{code:"BMD",number:"060",digits:2,currency:"Bermudian Dollar",countries:["Bermuda"]},{code:"BND",number:"096",digits:2,currency:"Brunei Dollar",countries:["Brunei Darussalam"]},{code:"BOB",number:"068",digits:2,currency:"Boliviano",countries:["Bolivia (Plurinational State Of)"]},{code:"BOV",number:"984",digits:2,currency:"Mvdol",countries:["Bolivia (Plurinational State Of)"]},{code:"BRL",number:"986",digits:2,currency:"Brazilian Real",countries:["Brazil"]},{code:"BSD",number:"044",digits:2,currency:"Bahamian Dollar",countries:["Bahamas (The)"]},{code:"BTN",number:"064",digits:2,currency:"Ngultrum",countries:["Bhutan"]},{code:"BWP",number:"072",digits:2,currency:"Pula",countries:["Botswana"]},{code:"BYN",number:"933",digits:2,currency:"Belarusian Ruble",countries:["Belarus"]},{code:"BZD",number:"084",digits:2,currency:"Belize Dollar",countries:["Belize"]},{code:"CAD",number:"124",digits:2,currency:"Canadian Dollar",countries:["Canada"]},{code:"CDF",number:"976",digits:2,currency:"Congolese Franc",countries:["Congo (The Democratic Republic of The)"]},{code:"CHE",number:"947",digits:2,currency:"WIR Euro",countries:["Switzerland"]},{code:"CHF",number:"756",digits:2,currency:"Swiss Franc",countries:["Liechtenstein","Switzerland"]},{code:"CHW",number:"948",digits:2,currency:"WIR Franc",countries:["Switzerland"]},{code:"CLF",number:"990",digits:4,currency:"Unidad de Fomento",countries:["Chile"]},{code:"CLP",number:"152",digits:0,currency:"Chilean Peso",countries:["Chile"]},{code:"CNY",number:"156",digits:2,currency:"Yuan Renminbi",countries:["China"]},{code:"COP",number:"170",digits:2,currency:"Colombian Peso",countries:["Colombia"]},{code:"COU",number:"970",digits:2,currency:"Unidad de Valor Real",countries:["Colombia"]},{code:"CRC",number:"188",digits:2,currency:"Costa Rican Colon",countries:["Costa Rica"]},{code:"CUC",number:"931",digits:2,currency:"Peso Convertible",countries:["Cuba"]},{code:"CUP",number:"192",digits:2,currency:"Cuban Peso",countries:["Cuba"]},{code:"CVE",number:"132",digits:2,currency:"Cabo Verde Escudo",countries:["Cabo Verde"]},{code:"CZK",number:"203",digits:2,currency:"Czech Koruna",countries:["Czechia"]},{code:"DJF",number:"262",digits:0,currency:"Djibouti Franc",countries:["Djibouti"]},{code:"DKK",number:"208",digits:2,currency:"Danish Krone",countries:["Denmark","Faroe Islands (The)","Greenland"]},{code:"DOP",number:"214",digits:2,currency:"Dominican Peso",countries:["Dominican Republic (The)"]},{code:"DZD",number:"012",digits:2,currency:"Algerian Dinar",countries:["Algeria"]},{code:"EGP",number:"818",digits:2,currency:"Egyptian Pound",countries:["Egypt"]},{code:"ERN",number:"232",digits:2,currency:"Nakfa",countries:["Eritrea"]},{code:"ETB",number:"230",digits:2,currency:"Ethiopian Birr",countries:["Ethiopia"]},{code:"EUR",number:"978",digits:2,currency:"Euro",countries:["Åland Islands","Andorra","Austria","Belgium","Croatia","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","Réunion","Saint Barthélemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},{code:"FJD",number:"242",digits:2,currency:"Fiji Dollar",countries:["Fiji"]},{code:"FKP",number:"238",digits:2,currency:"Falkland Islands Pound",countries:["Falkland Islands (The) [Malvinas]"]},{code:"GBP",number:"826",digits:2,currency:"Pound Sterling",countries:["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},{code:"GEL",number:"981",digits:2,currency:"Lari",countries:["Georgia"]},{code:"GHS",number:"936",digits:2,currency:"Ghana Cedi",countries:["Ghana"]},{code:"GIP",number:"292",digits:2,currency:"Gibraltar Pound",countries:["Gibraltar"]},{code:"GMD",number:"270",digits:2,currency:"Dalasi",countries:["Gambia (The)"]},{code:"GNF",number:"324",digits:0,currency:"Guinean Franc",countries:["Guinea"]},{code:"GTQ",number:"320",digits:2,currency:"Quetzal",countries:["Guatemala"]},{code:"GYD",number:"328",digits:2,currency:"Guyana Dollar",countries:["Guyana"]},{code:"HKD",number:"344",digits:2,currency:"Hong Kong Dollar",countries:["Hong Kong"]},{code:"HNL",number:"340",digits:2,currency:"Lempira",countries:["Honduras"]},{code:"HTG",number:"332",digits:2,currency:"Gourde",countries:["Haiti"]},{code:"HUF",number:"348",digits:2,currency:"Forint",countries:["Hungary"]},{code:"IDR",number:"360",digits:2,currency:"Rupiah",countries:["Indonesia"]},{code:"ILS",number:"376",digits:2,currency:"New Israeli Sheqel",countries:["Israel"]},{code:"INR",number:"356",digits:2,currency:"Indian Rupee",countries:["Bhutan","India"]},{code:"IQD",number:"368",digits:3,currency:"Iraqi Dinar",countries:["Iraq"]},{code:"IRR",number:"364",digits:2,currency:"Iranian Rial",countries:["Iran (Islamic Republic Of)"]},{code:"ISK",number:"352",digits:0,currency:"Iceland Krona",countries:["Iceland"]},{code:"JMD",number:"388",digits:2,currency:"Jamaican Dollar",countries:["Jamaica"]},{code:"JOD",number:"400",digits:3,currency:"Jordanian Dinar",countries:["Jordan"]},{code:"JPY",number:"392",digits:0,currency:"Yen",countries:["Japan"]},{code:"KES",number:"404",digits:2,currency:"Kenyan Shilling",countries:["Kenya"]},{code:"KGS",number:"417",digits:2,currency:"Som",countries:["Kyrgyzstan"]},{code:"KHR",number:"116",digits:2,currency:"Riel",countries:["Cambodia"]},{code:"KMF",number:"174",digits:0,currency:"Comorian Franc ",countries:["Comoros (The)"]},{code:"KPW",number:"408",digits:2,currency:"North Korean Won",countries:["Korea (The Democratic People’s Republic Of)"]},{code:"KRW",number:"410",digits:0,currency:"Won",countries:["Korea (The Republic Of)"]},{code:"KWD",number:"414",digits:3,currency:"Kuwaiti Dinar",countries:["Kuwait"]},{code:"KYD",number:"136",digits:2,currency:"Cayman Islands Dollar",countries:["Cayman Islands (The)"]},{code:"KZT",number:"398",digits:2,currency:"Tenge",countries:["Kazakhstan"]},{code:"LAK",number:"418",digits:2,currency:"Lao Kip",countries:["Lao People’s Democratic Republic (The)"]},{code:"LBP",number:"422",digits:2,currency:"Lebanese Pound",countries:["Lebanon"]},{code:"LKR",number:"144",digits:2,currency:"Sri Lanka Rupee",countries:["Sri Lanka"]},{code:"LRD",number:"430",digits:2,currency:"Liberian Dollar",countries:["Liberia"]},{code:"LSL",number:"426",digits:2,currency:"Loti",countries:["Lesotho"]},{code:"LYD",number:"434",digits:3,currency:"Libyan Dinar",countries:["Libya"]},{code:"MAD",number:"504",digits:2,currency:"Moroccan Dirham",countries:["Morocco","Western Sahara"]},{code:"MDL",number:"498",digits:2,currency:"Moldovan Leu",countries:["Moldova (The Republic Of)"]},{code:"MGA",number:"969",digits:2,currency:"Malagasy Ariary",countries:["Madagascar"]},{code:"MKD",number:"807",digits:2,currency:"Denar",countries:["North Macedonia"]},{code:"MMK",number:"104",digits:2,currency:"Kyat",countries:["Myanmar"]},{code:"MNT",number:"496",digits:2,currency:"Tugrik",countries:["Mongolia"]},{code:"MOP",number:"446",digits:2,currency:"Pataca",countries:["Macao"]},{code:"MRU",number:"929",digits:2,currency:"Ouguiya",countries:["Mauritania"]},{code:"MUR",number:"480",digits:2,currency:"Mauritius Rupee",countries:["Mauritius"]},{code:"MVR",number:"462",digits:2,currency:"Rufiyaa",countries:["Maldives"]},{code:"MWK",number:"454",digits:2,currency:"Malawi Kwacha",countries:["Malawi"]},{code:"MXN",number:"484",digits:2,currency:"Mexican Peso",countries:["Mexico"]},{code:"MXV",number:"979",digits:2,currency:"Mexican Unidad de Inversion (UDI)",countries:["Mexico"]},{code:"MYR",number:"458",digits:2,currency:"Malaysian Ringgit",countries:["Malaysia"]},{code:"MZN",number:"943",digits:2,currency:"Mozambique Metical",countries:["Mozambique"]},{code:"NAD",number:"516",digits:2,currency:"Namibia Dollar",countries:["Namibia"]},{code:"NGN",number:"566",digits:2,currency:"Naira",countries:["Nigeria"]},{code:"NIO",number:"558",digits:2,currency:"Cordoba Oro",countries:["Nicaragua"]},{code:"NOK",number:"578",digits:2,currency:"Norwegian Krone",countries:["Bouvet Island","Norway","Svalbard and Jan Mayen"]},{code:"NPR",number:"524",digits:2,currency:"Nepalese Rupee",countries:["Nepal"]},{code:"NZD",number:"554",digits:2,currency:"New Zealand Dollar",countries:["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},{code:"OMR",number:"512",digits:3,currency:"Rial Omani",countries:["Oman"]},{code:"PAB",number:"590",digits:2,currency:"Balboa",countries:["Panama"]},{code:"PEN",number:"604",digits:2,currency:"Sol",countries:["Peru"]},{code:"PGK",number:"598",digits:2,currency:"Kina",countries:["Papua New Guinea"]},{code:"PHP",number:"608",digits:2,currency:"Philippine Peso",countries:["Philippines (The)"]},{code:"PKR",number:"586",digits:2,currency:"Pakistan Rupee",countries:["Pakistan"]},{code:"PLN",number:"985",digits:2,currency:"Zloty",countries:["Poland"]},{code:"PYG",number:"600",digits:0,currency:"Guarani",countries:["Paraguay"]},{code:"QAR",number:"634",digits:2,currency:"Qatari Rial",countries:["Qatar"]},{code:"RON",number:"946",digits:2,currency:"Romanian Leu",countries:["Romania"]},{code:"RSD",number:"941",digits:2,currency:"Serbian Dinar",countries:["Serbia"]},{code:"RUB",number:"643",digits:2,currency:"Russian Ruble",countries:["Russian Federation (The)"]},{code:"RWF",number:"646",digits:0,currency:"Rwanda Franc",countries:["Rwanda"]},{code:"SAR",number:"682",digits:2,currency:"Saudi Riyal",countries:["Saudi Arabia"]},{code:"SBD",number:"090",digits:2,currency:"Solomon Islands Dollar",countries:["Solomon Islands"]},{code:"SCR",number:"690",digits:2,currency:"Seychelles Rupee",countries:["Seychelles"]},{code:"SDG",number:"938",digits:2,currency:"Sudanese Pound",countries:["Sudan (The)"]},{code:"SEK",number:"752",digits:2,currency:"Swedish Krona",countries:["Sweden"]},{code:"SGD",number:"702",digits:2,currency:"Singapore Dollar",countries:["Singapore"]},{code:"SHP",number:"654",digits:2,currency:"Saint Helena Pound",countries:["Saint Helena, Ascension and Tristan Da Cunha"]},{code:"SLE",number:"925",digits:2,currency:"Leone",countries:["Sierra Leone"]},{code:"SOS",number:"706",digits:2,currency:"Somali Shilling",countries:["Somalia"]},{code:"SRD",number:"968",digits:2,currency:"Surinam Dollar",countries:["Suriname"]},{code:"SSP",number:"728",digits:2,currency:"South Sudanese Pound",countries:["South Sudan"]},{code:"STN",number:"930",digits:2,currency:"Dobra",countries:["Sao Tome and Principe"]},{code:"SVC",number:"222",digits:2,currency:"El Salvador Colon",countries:["El Salvador"]},{code:"SYP",number:"760",digits:2,currency:"Syrian Pound",countries:["Syrian Arab Republic"]},{code:"SZL",number:"748",digits:2,currency:"Lilangeni",countries:["Eswatini"]},{code:"THB",number:"764",digits:2,currency:"Baht",countries:["Thailand"]},{code:"TJS",number:"972",digits:2,currency:"Somoni",countries:["Tajikistan"]},{code:"TMT",number:"934",digits:2,currency:"Turkmenistan New Manat",countries:["Turkmenistan"]},{code:"TND",number:"788",digits:3,currency:"Tunisian Dinar",countries:["Tunisia"]},{code:"TOP",number:"776",digits:2,currency:"Pa’anga",countries:["Tonga"]},{code:"TRY",number:"949",digits:2,currency:"Turkish Lira",countries:["Türki̇ye"]},{code:"TTD",number:"780",digits:2,currency:"Trinidad and Tobago Dollar",countries:["Trinidad and Tobago"]},{code:"TWD",number:"901",digits:2,currency:"New Taiwan Dollar",countries:["Taiwan (Province of China)"]},{code:"TZS",number:"834",digits:2,currency:"Tanzanian Shilling",countries:["Tanzania, United Republic Of"]},{code:"UAH",number:"980",digits:2,currency:"Hryvnia",countries:["Ukraine"]},{code:"UGX",number:"800",digits:0,currency:"Uganda Shilling",countries:["Uganda"]},{code:"USD",number:"840",digits:2,currency:"US Dollar",countries:["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (u.s.)"]},{code:"USN",number:"997",digits:2,currency:"US Dollar (Next day)",countries:["United States of America (The)"]},{code:"UYI",number:"940",digits:0,currency:"Uruguay Peso en Unidades Indexadas (UI)",countries:["Uruguay"]},{code:"UYU",number:"858",digits:2,currency:"Peso Uruguayo",countries:["Uruguay"]},{code:"UYW",number:"927",digits:4,currency:"Unidad Previsional",countries:["Uruguay"]},{code:"UZS",number:"860",digits:2,currency:"Uzbekistan Sum",countries:["Uzbekistan"]},{code:"VED",number:"926",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VES",number:"928",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VND",number:"704",digits:0,currency:"Dong",countries:["Viet Nam"]},{code:"VUV",number:"548",digits:0,currency:"Vatu",countries:["Vanuatu"]},{code:"WST",number:"882",digits:2,currency:"Tala",countries:["Samoa"]},{code:"XAF",number:"950",digits:0,currency:"CFA Franc BEAC",countries:["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},{code:"XAG",number:"961",digits:0,currency:"Silver",countries:["Zz11_silver"]},{code:"XAU",number:"959",digits:0,currency:"Gold",countries:["Zz08_gold"]},{code:"XBA",number:"955",digits:0,currency:"Bond Markets Unit European Composite Unit (EURCO)",countries:["Zz01_bond Markets Unit European_eurco"]},{code:"XBB",number:"956",digits:0,currency:"Bond Markets Unit European Monetary Unit (E.M.U.-6)",countries:["Zz02_bond Markets Unit European_emu-6"]},{code:"XBC",number:"957",digits:0,currency:"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",countries:["Zz03_bond Markets Unit European_eua-9"]},{code:"XBD",number:"958",digits:0,currency:"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",countries:["Zz04_bond Markets Unit European_eua-17"]},{code:"XCD",number:"951",digits:2,currency:"East Caribbean Dollar",countries:["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},{code:"XDR",number:"960",digits:0,currency:"SDR (Special Drawing Right)",countries:["International Monetary Fund (Imf) "]},{code:"XOF",number:"952",digits:0,currency:"CFA Franc BCEAO",countries:["Benin","Burkina Faso","Côte D'ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},{code:"XPD",number:"964",digits:0,currency:"Palladium",countries:["Zz09_palladium"]},{code:"XPF",number:"953",digits:0,currency:"CFP Franc",countries:["French Polynesia","New Caledonia","Wallis and Futuna"]},{code:"XPT",number:"962",digits:0,currency:"Platinum",countries:["Zz10_platinum"]},{code:"XSU",number:"994",digits:0,currency:"Sucre",countries:['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']},{code:"XTS",number:"963",digits:0,currency:"Codes specifically reserved for testing purposes",countries:["Zz06_testing_code"]},{code:"XUA",number:"965",digits:0,currency:"ADB Unit of Account",countries:["Member Countries of the African Development Bank Group"]},{code:"XXX",number:"999",digits:0,currency:"The codes assigned for transactions where no currency is involved",countries:["Zz07_no_currency"]},{code:"YER",number:"886",digits:2,currency:"Yemeni Rial",countries:["Yemen"]},{code:"ZAR",number:"710",digits:2,currency:"Rand",countries:["Lesotho","Namibia","South Africa"]},{code:"ZMW",number:"967",digits:2,currency:"Zambian Kwacha",countries:["Zambia"]},{code:"ZWG",number:"924",digits:2,currency:"Zimbabwe Gold",countries:["Zimbabwe"]}]),ey}var ty,v2;function cQ(){return v2||(v2=1,ty="2024-06-25"),ty}var y2;function fQ(){if(y2)return Ka;y2=1;var r=oQ(),e=lQ(),t=uQ(),n=cQ(),i=function(c){return c=c.toUpperCase(),r(t,function(h){return h.code===c})},a=function(c){return c=c.toLowerCase(),t.filter(function(h){return(h.countries.map(function(f){return f.toLowerCase()})||[]).indexOf(c)>-1})},s=function(c){return r(t,function(h){return h.number===String(c)})},o=function(){return t.map(function(c){return c.code})},l=function(){var c=t.map(function(h){return h.number});return c.filter(function(h){if(h)return h})},u=function(){var c=t.filter(function(h){return h.countries}).map(function(h){return h.countries});return e(Array.prototype.concat.apply([],c))};return Ka.code=i,Ka.country=a,Ka.number=s,Ka.codes=o,Ka.numbers=l,Ka.countries=u,Ka.publishDate=n,Ka.data=t,Ka}var A2=fQ();class RD{formatCurrencyForDisplay(e,t){const n={amount:t||0,currency:e,precision:this.getPrecisionForCurrency(e)};return sQ(n).toFormat(this.getSpecialFormat(e))}getPrecisionForCurrency(e){const t=e,n=A2.code(t);return n?n.digits:2}getSpecialFormat(e){const t=e;if(A2.code(t)?.code==="CLP")return"USD0,0"}}const b2=new RD;class OD{constructor(e,t,n,i){this.presentmentCurrency=void 0,this.presentmentCurrency=i,this.partnerCurrency=n,this.rateFrom=e,this.rateTo=t}code(){return this.presentmentCurrency?this.presentmentCurrency:this.partnerCurrency}conversionRequired(){return this.presentmentCurrency!==void 0&&this.code()!==this.partnerCurrency}getConvertedSubunits(e){return this.conversionRequired()?Math.ceil(this.subunits(this.units(e,this.partnerCurrency)/this.rateFrom*this.rateTo,this.code())):e}units(e,t){return e/Math.pow(10,b2.getPrecisionForCurrency(t))}subunits(e,t){return e*Math.pow(10,b2.getPrecisionForCurrency(t))}}const dQ=async(r,e)=>{const t=await $e.getShadowGraphqlClient().query({query:N3(e?.assets?.metadata||!1),errorPolicy:"all",variables:{ids:r}});if(t.error)throw t.error;if(t.errors)throw t.errors.forEach(i=>console.error(i)),new Error("Unable to read workflows. Consult GraphQL errors.");if(t.data.workflows===void 0||t.data.workflows.length!==r.length)throw new Error(`Unable to read workflows: ${t.errors??"Length mismatch in response"}`);const n=vo(t.data.workflows);return n.forEach(i=>{i.finalizeStepConfig||(i.finalizeStepConfig={}),i.finalizeStepConfig.termsMarkdown=i.finalizeStepConfig.termsMarkdown||i.partner.termsMarkdown}),n},hQ=async(r,e)=>{const n=(await e).find(i=>i.id===r);if(!n)throw new Error(`Workflow not found: ${r}`);return n},qb=async(r,e)=>{const t=r.map(o=>Cd.get({id:o,options:e})),n=r.filter((o,l)=>t[l]===void 0);if(n.length===0)return Promise.all(t);const i=dQ(n,e),a=n.map(o=>Cd.set({id:o,options:e},hQ(o,i))),s=t.filter(o=>o!==void 0);return await Promise.all(s.concat(a))},BD=async(r,e)=>(await qb([r],e))[0],pQ=async r=>{const e=await $e.getShadowGraphqlClient().query({query:pF,variables:{ids:r},errorPolicy:"all",fetchPolicy:"no-cache"});return e.errors&&console.error(e.errors),e.data.integrationProducts||[]};class gQ{constructor(e){this.activeIntegration=void 0,this.updateTransactionState=async t=>{try{return $e.getShadowGraphqlClient().mutate({...t,mutation:C3})}catch(n){throw console.error(n),new uo("Critical - Unable to synchronize workflow state with server.")}},this.options=e,this.options.applicationKey&&HO(this.options.applicationKey),console.debug("------------------------"),console.debug("Spiff Commerce Core SDK"),console.debug("Version: 40.3.18"),console.debug(`Application Key Provided: ${!!this.options.applicationKey}`),console.debug("------------------------")}configure(e){_s.setHubUrl(e.hubUrl),_s.setServerUrl(e.serverUrl),_s.setServicesApiUrl(e.servicesApiUrl),this.marketplaceThemeInstallId=e.marketplaceThemeInstallId,this.marketplaceThemeInstallConfigurationId=e.marketplaceThemeInstallConfigurationId,this.userPoolClientId=e.userPoolClientId,this.userPoolRegion=e.userPoolRegion,this.spiffRegion=e.spiffRegion,e.bearerAuthenticationToken&&$k(e.bearerAuthenticationToken),this.options.applicationKey&&this.getIntegration(),this.spiffRegion&&this.userPoolRegion&&this.userPoolClientId&&_f.init(this.spiffRegion,this.userPoolRegion,this.userPoolClientId)}getAssetManager(){return Qn}async getBetaEnabled(){return this.options.enableBetaFeatures?!0:(await this.getIntegration()).partner.beta===!0}getFlowService(){if(!jO())throw new Error("Application key required to use Flow Service.");return new kI}async getCurrencyContext(e){const n=(await this.getIntegration()).partner.currencyCode,a=await $e.getShadowGraphqlClient().query({query:j3,errorPolicy:"all",fetchPolicy:"cache-first",variables:{from:n,to:e}}),{rateFrom:s,rateTo:o}=a.data.currencyConversion;return new OD(s,o,n,e)}async getIntegration(){if(this.activeIntegration)return this.activeIntegration;if(!this.options.applicationKey)throw new Error("Cannot get current Integration without specifying an Application Key.");return this.activeIntegration=MD(this.options.applicationKey),this.activeIntegration}async canUseAddon(e){try{return(await this.getIntegration()).partner.activeAddons?.includes(e)??!1}catch(t){return console.error(t),!1}}clearCustomer(){this.customer=void 0}clearCustomerForTransaction(e){const t=xr.getMap("transactionCustomerIds");t?.has(e)&&(t.delete(e),xr.setMap("transactionCustomerIds",t))}async customerHasBundleTemplates(e){const i=(await $e.getShadowGraphqlClient().query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:e}})).data.customer;return i.id?i.hasBundleTemplates??!1:!1}getStakeholderTypeForTransaction(e){const t=this.customer?.stakeholders?.find(n=>n.transaction?.id===e);if(t)return t.type}async getOrCreateCustomer(e){this.customer=void 0;const t=$e.getShadowGraphqlClient(),i=(await t.query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:e}})).data.customer;if(!i.id){const o=(await t.mutate({mutation:X9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{details:{emailAddress:e}}})).data?.customerCreate;if(!o)throw new Error("Unable to create customer.");return this.storeCustomer(o),this.customer=o,{customer:o,isAuthenticated:!1}}this.storeCustomer(i);const a=await this.reloadLoggedInCustomer();return{customer:this.customer||i,isAuthenticated:a}}getCustomer(){return this.customer}async reloadLoggedInCustomer(){const e=localStorage.getItem("last-refreshed-cognito-tokens"),t=localStorage.getItem("cognito-tokens"),n=localStorage.getItem("cognito-email");if(!e||!t||!n)return!1;const i=JSON.parse(t),a=new Date().getTime()/1e3;if(!i.ExpiresIn||i.ExpiresIn<a-parseInt(e)){const l=await _f.refreshTokens();if(l?.AuthenticationResult)localStorage.setItem("last-refreshed-cognito-tokens",`${new Date().getTime()/1e3}`),i.AccessToken=l.AuthenticationResult.AccessToken,localStorage.setItem("cognito-tokens",JSON.stringify(i));else return this.logOut(),console.error("Failed to refresh tokens."),!1}const o=(await $e.getShadowGraphqlClient().query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:n}})).data.customer;return o.id?(this.customer=o,!0):(console.error("Failed to get customer."),!1)}async generateVerificationCode(e){await $e.getShadowGraphqlClient().mutate({mutation:J9,variables:{emailAddress:e}}),await _f.generateCode(e)}async verifyCode(e,t){const n=(await this.getIntegration()).partner.id||"",i=await _f.verifyCode(e,t,n);if(i?.AuthenticationResult){localStorage.setItem("last-refreshed-cognito-tokens",`${new Date().getTime()/1e3}`),localStorage.setItem("cognito-tokens",JSON.stringify(i.AuthenticationResult)),localStorage.setItem("cognito-email",e);const s=(await $e.getShadowGraphqlClient().query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:e}})).data.customer;if(!s.id)throw new Error("Failed to get customer.");return this.customer=s,!0}else throw new Error}async logOut(){localStorage.removeItem("last-refreshed-cognito-tokens"),localStorage.removeItem("cognito-tokens"),localStorage.removeItem("cognito-email"),this.clearCustomer()}async loggedInBearerToken(){const e=localStorage.getItem("last-refreshed-cognito-tokens"),t=localStorage.getItem("cognito-tokens");if(!e||!t)throw new Error("No token data in storage.");const n=JSON.parse(t),i=new Date().getTime()/1e3,a=!n?.AccessToken||Cg(n.AccessToken);if(!n.ExpiresIn||n.ExpiresIn<i-parseInt(e)||a){const s=await _f.refreshTokens();if(s?.AuthenticationResult)localStorage.setItem("last-refreshed-cognito-tokens",`${new Date().getTime()/1e3}`),n.AccessToken=s.AuthenticationResult.AccessToken,localStorage.setItem("cognito-tokens",JSON.stringify(n));else throw this.logOut(),new Error("Failed to refresh tokens.")}if(!n.AccessToken)throw new Error("No bearer token in storage.");return n.AccessToken}async getCustomerMetafields(){if(!this.customer?.id)throw new Error("Customer must be logged in before calling this function.");return(await $e.getShadowGraphqlClient().query({query:K9,variables:{id:this.customer.id}})).data.metafields}async getNewBundle(e,t,n){const a=(await $e.getShadowGraphqlClient().mutate({mutation:UU(n?.graphql?.productCollection?.eagerFetchProducts||!1),variables:{collectionId:e,initialMetadata:t?Object.entries(t).map((u,c)=>({key:u[0],value:u[1]})):void 0,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},fetchPolicy:"no-cache"})).data?.bundleCreate;if(!a?.id)throw new Error("Unable to create bundle");const s=xr.getMap("bundlePartnerIds")||new Map;s.set(a.id,a.partner.id),xr.setMap("bundlePartnerIds",s);const o=xr.getMap("bundleOwnerIds")||new Map;o.set(a.id,a.bundleOwnerId),xr.setMap("bundleOwnerIds",o);const l=new AE(this,a,void 0,void 0,a.bundleOwnerId,{eagerFetchProducts:n?.graphql?.productCollection?.eagerFetchProducts});return await l.getInitializationPromise(),l}async getExistingBundle(e,t,n,i,a){const o=xr.getMap("bundleOwnerIds")?.get(e),l={};try{const g=await this.loggedInBearerToken();l.Authorization=`Bearer ${g}`}catch{const y=Object.entries(localStorage).find(([C,k])=>C.startsWith("CognitoIdentityServiceProvider")&&C.endsWith("idToken"))?.[0]||"",A=localStorage.getItem(y);A&&!Cg(A)&&(l.Authorization=`Bearer ${A}`)}const u={bundleOwnerId:o,...l,...i?.graphql?.additionalHeaders},c=await $e.getShadowGraphqlClient().query({query:BU(i?.graphql?.productCollection?.eagerFetchProducts||!1),variables:{id:e},fetchPolicy:"no-cache",context:{headers:u}});if(!c.data?.bundles||c.data?.bundles.length===0||!c.data?.bundles[0])throw new Error(`Unable to find bundle: ${e}`);const h=c.data?.bundles[0],f=xr.getMap("bundlePartnerIds")||new Map;f.set(h.id,h.partner.id),xr.setMap("bundlePartnerIds",f);const d=new AE(this,h,t,n,o,{additionalHeaders:i?.graphql?.additionalHeaders,eagerFetchProducts:i?.graphql?.productCollection?.eagerFetchProducts,existingGlobalPropertyState:c.data.globalPropertyState,readonly:i?.readonly},a);return await d.getInitializationPromise(),d}async duplicateBundle(e,t,n,i){const s={...await ND(e),...i?.graphql?.additionalHeaders},l=(await $e.getShadowGraphqlClient().mutate({mutation:VU(),variables:{id:e,template:t,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId,duplicateTransactions:n},context:{headers:s},fetchPolicy:"no-cache"})).data?.bundleDuplicate;if(!l?.id)throw new Error("Unable to duplicate bundle");const u=xr.getMap("bundlePartnerIds")||new Map;u.set(l.id,l.partner.id),xr.setMap("bundlePartnerIds",u);const c=xr.getMap("bundleOwnerIds")||new Map;return c.set(l.id,l.bundleOwnerId),xr.setMap("bundleOwnerIds",c),async()=>await this.getExistingBundle(l.id,void 0,void 0,{graphql:{productCollection:{eagerFetchProducts:i?.graphql?.productCollection?.eagerFetchProducts||!1}}})}async getBundlesForCustomer(e){if(!this.customer?.id)throw new Error("Customer not authenticated.");const{includeMetadata:t,...n}=e;return(await $e.getShadowGraphqlClient().query({query:JU(t??!1),variables:{...n,id:this.customer.id},fetchPolicy:"no-cache"})).data.customerBundlesFeed}async getBundleStakeholders(){if(!this.customer)throw new Error("Customer not authenticated.");const e=await $e.getShadowGraphqlClient().query({query:MU,variables:{id:this.customer.id},fetchPolicy:"no-cache"});if(!e.data?.customers||e.data.customers.length===0)throw new Error("Unable to find customer.");const n=e.data.customers[0].bundleStakeholders||[],i=xr.getMap("bundlePartnerIds")||new Map;return n.forEach(a=>{a.bundle?.id&&a.bundle.partner?.id&&i.set(a.bundle.id,a.bundle.partner.id)}),xr.setMap("bundlePartnerIds",i),n}async getWorkflowExperience(e,t){if(!e)throw new Error("getWorkflowExperience has been called without an options object! This is not supported.");const n=await this.getWorkflowExperiences([e],e.graphql),i=n[0],a=i.getWorkflow();return t&&!a&&console.error("No workflow instantiated when trying to create preview service."),t&&a&&await i.getWorkflowManager().injectIntoPreviewService(t(a)),n[0]}async getWorkflowExperiences(e,t,n,i){if(e.length===0)throw new uo("No options provided!");const a=e.map((Y,X)=>({option:Y,index:X})),s=a.filter(Y=>Y.option.type==="transaction"),o=a.filter(Y=>Y.option.type==="integration"||Y.option.type==="external"||Y.option.type==="blank"),l=50,u=oA(s,l),c=oA(o,l);let h=0;const f=$e.getShadowGraphqlClient(),d=async Y=>{if(Y.length===0)return[];const X=Y.map(oe=>oe.option.transactionId),J=await f.query({query:w3,variables:{ids:X},errorPolicy:"all",fetchPolicy:"no-cache"}),Q=J.data.transactions;if(h=h+Q.length,i&&i(h,s.length),Q.length!==Y.length){const oe=J.errors?.[0]?.message||"Unknown error";throw new uo(`Not all transactions were found: ${oe}`)}return!this.activeIntegration&&Q[0].integrationProduct?.integration&&(this.activeIntegration=Promise.resolve(Q[0].integrationProduct.integration)),Q.map((oe,se)=>({transaction:oe,workflowId:oe.workflowId,readOnly:Y.find(he=>he.option.transactionId===oe.id)?.option.readOnly??!1,index:Y[se].index}))},g=async Y=>{if(Y.length===0)return[];const X=await f.mutate({mutation:b3,variables:{inputs:Y.map(Q=>({integrationProductId:Q.option.type==="integration"?Q.option.integrationProductId:void 0,externalIntegrationId:Q.option.type==="external"?Q.option.externalIntegrationId:void 0,externalProductId:Q.option.type==="external"?Q.option.externalProductId:void 0,workflowId:Q.option.workflowId,designName:Q.option.designName,claim:!0,quantity:Q.option.quantity,recipient:Q.option.recipient})),marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},errorPolicy:"all",fetchPolicy:"no-cache"}),J=X.data?.transactionCreateMany;if(!J||J.length===0){const Q=X.errors?.[0]?.message||"Unknown error";throw new uo(`Failed to create transactions: ${Q}`)}return h=h+J.length,i&&i(h,s.length),J.map((Q,oe)=>({transaction:Q,workflowId:Q.workflowId,readOnly:!1,index:Y[oe].index}))},v=(await Promise.all([...u.map(d),...c.map(g)])).flat(),y=[...new Set(v.map(Y=>Y.transaction.integrationProductId))].filter(Y=>Y!==void 0),A=[...new Set(v.map(Y=>Y.workflowId))].filter(Y=>Y!==void 0),[C,k]=await Promise.all([(async()=>y.length>0?await pQ(y):[])(),(async()=>A.length>0?await qb(A,t):[])()]),T=new Map(C.map(Y=>[Y.id,Y])),S=new Map(k.map(Y=>[Y.id,Y])),R=v.map(async Y=>{const{transaction:X,workflowId:J,readOnly:Q,index:oe}=Y,se=J?S.get(J):void 0,he=e[oe];if(X.integrationProductId){const K=T.get(X.integrationProductId);X.integrationProduct=K,X.product=K?.product,X.integrationProduct||console.error("failed to find transaction's product")}const ye=xr.getMap("transactionOwnerIds")||new Map;!ye.get(X.id)&&X.transactionOwnerId&&(ye.set(X.id,X.transactionOwnerId),xr.setMap("transactionOwnerIds",ye));const Ue=ye.get(X.id)||void 0,Oe=new Z9({onMutate:()=>({context:{transactionOwnerId:Ue,bundleOwnerId:t?.bundleOwnerId}}),onQuery:()=>({context:{transactionOwnerId:Ue,bundleOwnerId:t?.bundleOwnerId}})}),Te={workflow:se,transaction:X,singleVariantsRenderable:he?.workflowConfiguration?.singleVariantsRenderable,stateMutationFunc:Q?async()=>{throw new nn("State mutation is forbidden in read only mode!")}:async K=>this.updateTransactionState({...K,context:{transactionOwnerId:Ue,bundleOwnerId:t?.bundleOwnerId}}),graphQlClient:()=>Oe,readOnly:Q,isReloadedTransaction:he.type==="transaction"};if(he.type==="transaction"&&X.workflowState){const K=JSON.parse(X.workflowState);await rA(K),Te.reloadedState=K}else if(!Q&&he.workflowState){const K=JSON.parse(he.workflowState);await rA(K),Te.reloadedState=K}return Te.delayWorkflowStateSync=!0,{experienceOptions:Te,index:oe,options:he}}),G=(await Promise.all(R)).sort((Y,X)=>Y.index-X.index);let $=[];for(const Y of G){const{experienceOptions:X,options:J}=Y,Q=new bI(this,X);await Q.getWorkflowManager().getInitializationPromise(),n&&n(),J.type!=="transaction"&&this.customer&&await Q.attachCustomerDetails({email:this.customer.emailAddress}),$=[...$,Q],Q.getWorkflowManager().setWorkflowStateSyncEnabled(!0)}return $}storeCustomer(e){const t=xr.getMap("partnerCustomerIds")||new Map;t.set(e.partner.id,e.id),xr.setMap("partnerCustomerIds",t)}async getIntegrationProductById(e,t){const a=(await $e.getShadowGraphqlClient().query({query:I3(t),variables:{ids:[e]},fetchPolicy:"no-cache",errorPolicy:"all"})).data?.integrationProducts;if(!a||a.length===0||!a[0]?.id)throw new Error("Integration product not found.");return new cA(a[0])}async getIntegrationProductFromExternalIds(e,t,n){const s=(await $e.getShadowGraphqlClient().query({query:D3(n),variables:{externalProductId:t,externalIntegrationId:e},fetchPolicy:"no-cache",errorPolicy:"all"})).data?.integrationProductFromExternalIds;if(!s?.id)throw new Error("Integration product not found.");return new cA(s)}async getIntegrationProduct(e){return e.type==="integration"?this.getIntegrationProductById(e.integrationProductId):this.getIntegrationProductFromExternalIds(e.externalIntegrationId,e.externalProductId)}async getShareActionsForTransaction(e){const n=(xr.getMap("transactionOwnerIds")||new Map).get(e)||void 0,i=await $e.getShadowGraphqlClient().query({query:F3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:e},context:{transactionOwnerId:n}});if(!i.data.transactions||i.data.transactions.length!==1)throw new Error(`Failed to fetch share actions for transaction: ${e}`);return i.data.transactions[0].transactionShareActions}async placeOrder(e){const t=await $e.getShadowGraphqlClient().mutate({mutation:H3,variables:{orderItems:e}});if(t.errors)throw new Error(t.errors[0].message);if(!t.data)throw new Error("Failed to create order: No order data in response.");return{id:t.data.orderCreate.id,internalId:t.data.orderCreate.internalId}}}const MD=async(r,e)=>(await $e.getShadowGraphqlClient().query({query:U3,errorPolicy:"all",fetchPolicy:"no-cache",context:{headers:{"x-application-key":r},skipIntegrationCheck:!0},variables:{themeConfigurationId:e}})).data.currentIntegration,mQ=async r=>{const t=await $e.getShadowGraphqlClient().query({query:k3,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:r}});if(t.data.transactions.length!==0)return t.data.transactions[0]},vQ=async(r,e)=>(await $e.getShadowGraphqlClient().query({query:L3,errorPolicy:"all",variables:{themeConfigurationId:r,themeInstallId:e}})).data?.marketplaceThemeInstallConfiguration,yQ=async r=>(await $e.getShadowGraphqlClient().query({query:z3,errorPolicy:"all",variables:{id:r}})).data?.bundles?.[0]?.marketplaceThemeInstallConfiguration,AQ=async r=>(await $e.getShadowGraphqlClient().query({query:V3,errorPolicy:"all",variables:{id:r}})).data?.transactions?.[0]?.marketplaceThemeInstallConfiguration;async function _D(){const r={};try{const e=await this.loggedInBearerToken();r.Authorization=`Bearer ${e}`}catch{const n=Object.entries(localStorage).find(([a,s])=>a.startsWith("CognitoIdentityServiceProvider")&&a.endsWith("idToken"))?.[0]||"",i=localStorage.getItem(n);i&&!Cg(i)&&(r.Authorization=`Bearer ${i}`)}return r}async function ND(r){const t=xr.getMap("bundleOwnerIds")?.get(r),n=await _D();return{bundleOwnerId:t,...n}}async function bQ(r){const t=xr.getMap("transactionOwnerIds")?.get(r),n=await _D();return{transactionOwnerId:t,...n}}const wQ=async r=>{const e=await ND(r),t=await $e.getShadowGraphqlClient().mutate({mutation:s9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r},context:{headers:e}});if(t.data?.bundleDelete!==r)throw new Error(`Failed to delete bundle: ${t.errors}`)},CQ=async r=>{const e=await bQ(r),t=await $e.getShadowGraphqlClient().mutate({mutation:o9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{ids:[r]},context:{headers:e}});if(!t.data?.transactions||t.data.transactions.length!==1||t.data.transactions[0].id!==r)throw new Error(`Failed to find transaction to read bundle id: ${JSON.stringify(t.errors)}`);return t.data.transactions[0].bundle?.id};function LD(r,e,t,n){const i=t.width*r.zoom,a=t.height*r.zoom;if(n){const o=r,l=Math.max(e.width/t.width,e.height/t.height);o.zoom=Math.max(l,r.zoom);const u=t.width*o.zoom,c=t.height*o.zoom;return o.x=Np(r.x,e.width-u,0),o.y=Np(r.y,e.height-c,0),o}const s=r;return s.x=Np(s.x,-i,e.width),s.y=Np(s.y,-a,e.height),s}function Np(r,e,t){return Math.min(Math.max(r,e),t)}class UD{constructor(e,t){this.minZoomScale=[.03],this.maxZoomScale=[20],this._debouncedUpdateFrameOffsets=AI(this.updateFrameOffsets,200),this.targetElements=[],this.onFrameDataChangeListeners=[],this.onZoomChangeListeners=[],this.forceImageCover=e,this.initialZoom=t,this.thresholdSettings={useThreshold:!1,invertThreshold:!1,threshold:128,thresholdSaturation:.5}}connectWorkflowManager(e,t){t&&e.addStepSpecificStorageCallback(async n=>{if(n){const i=n;if(i.currentFrameSources){let a=!1;for(let s=0;s<i.currentFrameSources.length;s++){const o=i.currentFrameSources[s],l=await nh(o),u=this.frameData?this.frameData[s]:void 0;xd(l,u)||(this.frameData||(this.frameData=new Array(i.currentFrameSources.length)),this.frameData[s]=l,a=!0)}a&&(this.onFrameDataChangeListeners.forEach(s=>s(this.frameData)),this.frameData&&this.imageData&&(this.recalculateOffsets(this.imageData),this.updateOffsets(this.offsets),this.recalculateZoomLimits(this.imageData,this.frameData)))}}},t),this.workflowManager=e,this.stepName=t}setTargetElements(e){this.targetElements=e}getFrameData(){return this.frameData}setFrameData(e){if(!e){this.frameData=void 0;return}e.forEach((t,n)=>{const i=Uu.get(t);i&&(this.frameData||(this.frameData=new Array(e.length)),this.frameData[n]=i)})}getImageData(){return this.imageData}getImageSrc(){if(this.imageData){if(this.imageData.svg){const e=Gg(this.imageData.svg,this.imageData.colors||{},!1);return Hg(e)}return this.imageData.src}}getOffsets(){return this.offsets}setOffsets(e){this.offsets=e}setZoom(e,t,n,i){if(this.imageData&&this.offsets&&this.frameData){(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length));const a=this.frameData.map((s,o)=>{const l=(t[o]-this.offsets[o].x)/this.offsets[o].zoom,u=(n[o]-this.offsets[o].y)/this.offsets[o].zoom,c=t[o]-l*e[o],h=n[o]-u*e[o];return{x:c,y:h,zoom:this.imageData.width*e[o]/this.imageData.width}});this.updateOffsets(a,i),this.onZoomChangeListeners.forEach(s=>s(e))}}setPatternData(e,t=!0){this.imageData=e,e&&this.frameData&&((t||!this.offsets)&&this.recalculateOffsets(e),this.updateOffsets(this.offsets,void 0,!0)),this.imageData&&this.frameData&&this.recalculateZoomLimits(this.imageData,this.frameData)}updateOffsets(e,t,n){const i=this.imageData;if(!i||!this.frameData)return;if(this.frameData.length!==e.length)throw new nn("Frame data and offsets are not the same length. This is a bug. Please report it.");if(!this.offsets.some((s,o)=>!(e[o].x===s.x&&e[o].y===s.y&&e[o].zoom===s.zoom))&&!n){t&&t();return}(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((s,o)=>{this.offsets[o]=LD(e[o],s,this.imageData,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,i,this.frameData,this.thresholdSettings,t)}getThresholdSettings(){return this.thresholdSettings}setThresholdSettings(e){this.thresholdSettings=e,this.imageData&&this.frameData&&this._debouncedUpdateFrameOffsets(this.offsets,this.imageData,this.frameData,e)}onFrameDataChanged(e){e(this.frameData),this.onFrameDataChangeListeners.push(e)}onZoom(e){this.onZoomChangeListeners.push(e)}updateFrameOffsets(e,t,n,i,a){if(!n||n.length===0||n.some(l=>!l))throw new nn("Frame data not set. This is a bug");if(!this.workflowManager)throw new nn("No workflow manager set, cannot update offsets.");const s=this.workflowManager.getRegionElements(this.stepName||""),o=this.workflowManager.getCommandDispatcher();this.targetElements.forEach((l,u)=>{let c=s.find(h=>h.id===l)?.regionIndex??u;c>=e.length&&(c=u);try{o(new Rn([new aL(l,t,e[c]),new sL(l,i.useThreshold,i.invertThreshold,i.threshold,i.thresholdSaturation)]))}catch{}}),this.stepName&&this.workflowManager.updateStorage(this.stepName,{frameOffsetsList:e}),a&&a()}recalculateZoomLimits(e,t){(this.minZoomScale.length!==t.length||this.maxZoomScale.length!==t.length)&&(this.minZoomScale=new Array(t.length),this.maxZoomScale=new Array(t.length)),t.forEach((n,i)=>{const a=Math.max(n.width/e.width,n.height/e.height);this.forceImageCover?(this.minZoomScale[i]=a,this.maxZoomScale[i]=a*2.5):(this.minZoomScale[i]=a/10,this.maxZoomScale[i]=a*2.5)})}recalculateOffsets(e){this.frameData&&((!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((t,n)=>{this.offsets[n]=g1(e,t,this.initialZoom&&!this.forceImageCover?{scale:this.initialZoom}:void 0,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,e,this.frameData,this.thresholdSettings))}}class xQ{traversableScenes(){throw new Error("Method not implemented.")}updateRecipient(e,t,n,i,a,s,o,l,u,c,h,f,d,g,v,y,A){throw new Error("Method not implemented.")}approveTransaction(e){throw new Error("Method not implemented.")}rejectTransaction(e){throw new Error("Method not implemented.")}getClient(){return this.client??{}}getWorkflowExperience(){return{}}setClient(e){this.client=e}getInitializationPromise(){return Promise.resolve()}isInitialized(){return!0}getInformationResults(){return[]}async reset(){}updateStateWithServer(e){}async outstandingRequestsPromise(){}async updateStateWithServerImmediate(e){}addPoller(e){}addConfirmCallback(e){}addEditedCallback(e){}addElementsCallback(e){}addInformationResultCallback(e){}addInitCallback(e){}addMakingAdjustmentsCallback(e){}addMandatoryCallback(e){}addMetadataCallback(e){}addSelectionCallback(e){}addStepSpecificStorageCallback(e,t){}addStorageCallback(e){}getCommandDispatcher(){return e=>{}}getLayouts(){return[]}getLayoutPreviewService(){return{getAll:()=>new Map}}getPreviewService(){}getModelContainer(){}getRegionElements(e){return[]}getSerializedStep(e,t){}getStepSpecificServices(e){}getTransaction(){return{id:""}}getTransactionCustomer(){}setTransactionCustomer(){}setTransactionCustomerDetails(){}getInitialOptionIds(){return new Promise(()=>new Set)}getWorkflow(){return{id:"",name:"",panels:[],steps:[],showModelOnFinishStep:!1,allowProofDownload:!1,introduction:"",stepGroups:[]}}markStepsAsInitialised(e){}markUpdateCompleted(e){}markUpdatePending(){return"123"}getWorkflowSelections(){return{}}getStepSelections(){return{}}setCurrentAdjustingStepId(e){}setEditedStatus(e,t){}setInformationResults(e){}setMandatoryFulfilled(e,t){}async setSelectionsAndElements(e,t,n){}toggleDesignConfirmed(){}updateMetadata(e,t){}async updateStorage(e,t){}injectIntoPreviewService(e){return Promise.resolve()}ejectFromPreviewService(){}setWorkflowStateSyncEnabled(e){}async updateTransactionShareActions(){}addValidationCallback(e){}setStepError(e,t,n){}getStepErrors(e){}getValidationErrors(){return{steps:new Map}}async updateTransactionStakeholders(){}getStepTags(e){return[]}}var VD=(r=>(r.SelectFrame="SelectFrame",r.SelectImage="SelectImage",r.Position="Position",r))(VD||{});class zD extends Wi{constructor(e,t,n){super(e,t,n);const i=t.data;this.frameService=new UD(i.forceImageCover,i.initialZoomLevel),this.frameService.connectWorkflowManager(e,t.stepName)}selectVariant(e){const t=this.manager.getRegionElements(this.step.stepName);return lo.selectVariant(this.step,e.getResource(),t,this.manager,n=>this.setUpdateState(n))}onFrameDataChanged(e){this.frameService&&this.frameService.onFrameDataChanged(t=>{t&&e(t)})}async selectImage(e,t=!0,n=!0){if(await lo.selectImage(this.step,e,this.manager,n),t){const i=this.manager.getStepStorage(this.step.stepName)?.framePatternData||{};this.manager.updateStorage(this.step.stepName,{framePatternData:{...i,originalAssetKey:e.key,backgroundRemovedAssetKey:void 0,useOriginalAsset:void 0}})}}async canUseAdvancedImageManipulation(){return this.manager.getClient().canUseAddon(Ng.AdvancedImageManipulation)}async canRemoveBackground(){return await this.canUseAdvancedImageManipulation()&&this.hasOriginalImageSelection()&&!!this.frameService?.getImageData()?.src&&!this.frameService?.getImageData()?.svg}async removeBackgroundFromImageSelection(e=!0){if(!await this.canUseAdvancedImageManipulation())throw new Error("The current Integration does not have access to the Background Remover. Please call canUseAdvancedImageManipulation to ensure you disable this feature when appropriate.");const t=await this.getOriginalImageSelection();if(!t)throw new Error("You must supply an image selection before attempting to remove the background.");const n=await Qn.removeBackgroundFromAsset(t);e&&await lo.selectImage(this.step,n,this.manager,!1);const i=this.manager.getStepStorage(this.step.stepName)?.framePatternData||{};return this.manager.updateStorage(this.step.stepName,{framePatternData:{...i,backgroundRemovedAssetKey:n.key,useOriginalAsset:!e}}),n}async vectorize(e,t=void 0){const n=e??await this.getOriginalImageSelection();if(!n)throw new Error("You must supply an image selection before attempting to vectorize the image.");const i=await Qn.vectorizeAsset(n,t);await this.selectImage(i,e!==void 0);const a=this.manager.getStepStorage(this.step.stepName)?.framePatternData||{};return this.manager.updateStorage(this.step.stepName,{framePatternData:{...a,vectorizedAssetKey:i.key,useOriginalAsset:!1}}),i}async getBackgroundRemovedImageSelection(){const e=this.manager.getStepStorage(this.step.stepName)?.framePatternData?.backgroundRemovedAssetKey;if(e)return Qn.getLocalOrFromServer(e)}async getVectorizedImageSelection(){const e=this.manager.getStepStorage(this.step.stepName)?.framePatternData?.vectorizedAssetKey;if(e)return Qn.getLocalOrFromServer(e)}hasOriginalImageSelection(){return!!this.manager.getStepStorage(this.step.stepName)?.framePatternData?.originalAssetKey}hasBackgroundRemovedImageSelection(){return!!this.getFrameStepStorage()?.framePatternData?.backgroundRemovedAssetKey}hasVectorizedImageSelection(){return!!this.getFrameStepStorage()?.framePatternData?.vectorizedAssetKey}async changeColors(e){await lo.changeColors(this.step,this.manager,e)}getImageData(){if(this.frameService)return this.frameService.getImageData()}async getColorOption(){return await ft.ensureFullOption(this.step.data.colorOption)}getAvailableColors(){return this.step.data.colorPickerEnabled?lo.availableColors(this.step,this.manager):Promise.resolve([])}isColorPickerEnabled(){return this.step.data.colorPickerEnabled??!1}async getOriginalImageColors(){const e=this.getImageData();return e?.svg?(await Oa(e.svg)).colors:void 0}getShouldVectorize(){return this.step.data.shouldVectorize??!1}getVectorizeMaxColors(){return this.step.data.vectorizeMaxColors}getMaxAllowedColors(){return this.step.data.maxColors}getUniqueColorCount(){return lo.getUniqueColorCount(this.step,this.manager)}getCurrentFrameStep(e,t,n,i){return i&&i.length>1&&e===void 0?"SelectFrame":t||n||this.getImageData()?"Position":"SelectImage"}getFrameService(){return this.frameService}hasOverlayImageKey(){return this.step.data.overlayImageKey}hasOverlayImageUrl(){return this.step.data.overlayImageUrl}getWhitelistedExtensions(){return[...this.step.data.whitelistedExtensions,...this.step.data.whitelistedExtensions.includes(".jpg")?[".jpeg"]:[]]}async getOriginalImageSelection(){const e=this.manager.getStepStorage(this.step.stepName)?.framePatternData?.originalAssetKey;if(e)return Qn.getLocalOrFromServer(e)}getUseOriginalImageSelection(){return this.getFrameStepStorage()?.framePatternData?.useOriginalAsset??!1}async setUseOriginalImageSelection(e){const t=this.getFrameStepStorage()?.framePatternData||{};if(t.useOriginalAsset===e)return;const n=await this.getOriginalImageSelection();if(!n)throw new Error("You must provide an image selection before calling setUseOriginalImageSelection");if(e)await this.selectImage(n,!1,!1);else{const i=await this.getBackgroundRemovedImageSelection();if(!i)throw new Error("You must call removeBackgroundFromImageSelection before attempting to apply the image.");await this.selectImage(i,!1,!1)}this.manager.updateStorage(this.step.stepName,{framePatternData:{...t,useOriginalAsset:e}})}getFrameStepStorage(){return this.manager.getStepStorage(this.step.stepName)}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}const SQ=Fe`
2707
+ ${kl(s)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const a of e.split("/"))a?.length!==0&&a!=="."&&(a===".."?t.pop():t.push(a));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return El(n).replace(/%2F/g,"/")}return e}validateResolvedCredentials(e){if(typeof e!="object"||typeof e.accessKeyId!="string"||typeof e.secretAccessKey!="string")throw new Error("Resolved credential object is not valid")}formatDate(e){const t=Mj(e).replace(/[\-:]/g,"");return{longDate:t,shortDate:t.slice(0,8)}}getCanonicalHeaderList(e){return Object.keys(e).sort().join(";")}}class WE extends Nj{headerFormatter=new Dj;constructor({applyChecksum:e,credentials:t,region:n,service:i,sha256:a,uriEscapePath:s=!0}){super({applyChecksum:e,credentials:t,region:n,service:i,sha256:a,uriEscapePath:s})}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:i=3600,unsignableHeaders:a,unhoistableHeaders:s,signableHeaders:o,hoistableHeaders:l,signingRegion:u,signingService:c}=t,h=await this.credentialProvider();this.validateResolvedCredentials(h);const f=u??await this.regionProvider(),{longDate:d,shortDate:g}=this.formatDate(n);if(i>Fj)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const v=Qv(g,f,c??this.service),y=Oj(qE(e),{unhoistableHeaders:s,hoistableHeaders:l});h.sessionToken&&(y.query[iD]=h.sessionToken),y.query[hj]=qv,y.query[pj]=`${h.accessKeyId}/${v}`,y.query[rD]=d,y.query[mj]=i.toString(10);const A=jE(y,a,o);return y.query[gj]=this.getCanonicalHeaderList(A),y.query[nD]=await this.getSignature(d,v,this.getSigningKey(h,f,g,c),this.createCanonicalRequest(y,A,await Yv(e,this.sha256))),y}async sign(e,t){return typeof e=="string"?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:i,signingRegion:a,signingService:s}){const o=a??await this.regionProvider(),{shortDate:l,longDate:u}=this.formatDate(n),c=Qv(l,o,s??this.service),h=await Yv({headers:{},body:t},this.sha256),f=new this.sha256;f.update(e);const d=kl(await f.digest()),g=[Sj,u,c,i,d,h].join(`
2708
+ `);return this.signString(g,{signingDate:n,signingRegion:o,signingService:s})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:i}){return this.signEvent({headers:this.headerFormatter.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:i,priorSignature:e.priorSignature}).then(s=>({message:e.message,signature:s}))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:i}={}){const a=await this.credentialProvider();this.validateResolvedCredentials(a);const s=n??await this.regionProvider(),{shortDate:o}=this.formatDate(t),l=new this.sha256(await this.getSigningKey(a,s,o,i));return l.update(Pd(e)),kl(await l.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:i,signingRegion:a,signingService:s}={}){const o=await this.credentialProvider();this.validateResolvedCredentials(o);const l=a??await this.regionProvider(),u=qE(e),{longDate:c,shortDate:h}=this.formatDate(t),f=Qv(h,l,s??this.service);u.headers[sD]=c,o.sessionToken&&(u.headers[bj]=o.sessionToken);const d=await Yv(u,this.sha256);!Rj(vA,u.headers)&&this.applyChecksum&&(u.headers[vA]=d);const g=jE(u,i,n),v=await this.getSignature(c,f,this.getSigningKey(o,l,h,s),this.createCanonicalRequest(u,g,d));return u.headers[aD]=`${qv} Credential=${o.accessKeyId}/${f}, SignedHeaders=${this.getCanonicalHeaderList(g)}, Signature=${v}`,u}async getSignature(e,t,n,i){const a=await this.createStringToSign(e,t,i,qv),s=new this.sha256(await n);return s.update(Pd(a)),kl(await s.digest())}getSigningKey(e,t,n,i){return Tj(this.sha256,e,n,t,i||this.service)}}const Lj=r=>{let e=r.credentials,t=!!r.credentials,n;Object.defineProperty(r,"credentials",{set(u){u&&u!==e&&u!==n&&(t=!0),e=u;const c=Uj(r,{credentials:e,credentialDefaultProvider:r.credentialDefaultProvider}),h=Vj(r,c);if(t&&!h.attributed){const f=typeof e=="object"&&e!==null;n=async d=>{const v=await h(d);return f&&(!v.$source||Object.keys(v.$source).length===0)?Kz(v,"CREDENTIALS_CODE","e"):v},n.memoized=h.memoized,n.configBound=h.configBound,n.attributed=!0}else n=h},get(){return n},enumerable:!0,configurable:!0}),r.credentials=e;const{signingEscapePath:i=!0,systemClockOffset:a=r.systemClockOffset||0,sha256:s}=r;let o;return r.signer?o=sd(r.signer):r.regionInfoProvider?o=()=>sd(r.region)().then(async u=>[await r.regionInfoProvider(u,{useFipsEndpoint:await r.useFipsEndpoint(),useDualstackEndpoint:await r.useDualstackEndpoint()})||{},u]).then(([u,c])=>{const{signingRegion:h,signingService:f}=u;r.signingRegion=r.signingRegion||h||c,r.signingName=r.signingName||f||r.serviceId;const d={...r,credentials:r.credentials,region:r.signingRegion,service:r.signingName,sha256:s,uriEscapePath:i},g=r.signerConstructor||WE;return new g(d)}):o=async u=>{u=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await sd(r.region)(),properties:{}},u);const c=u.signingRegion,h=u.signingName;r.signingRegion=r.signingRegion||c,r.signingName=r.signingName||h||r.serviceId;const f={...r,credentials:r.credentials,region:r.signingRegion,service:r.signingName,sha256:s,uriEscapePath:i},d=r.signerConstructor||WE;return new d(f)},Object.assign(r,{systemClockOffset:a,signingEscapePath:i,signer:o})};function Uj(r,{credentials:e,credentialDefaultProvider:t}){let n;return e?e?.memoized?n=e:n=wz(e,bz,_I):t?n=sd(t(Object.assign({},r,{parentClientConfig:r}))):n=async()=>{throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.")},n.memoized=!0,n}function Vj(r,e){if(e.configBound)return e;const t=async n=>e({...n,callerClientConfig:r});return t.memoized=e.memoized,t.configBound=!0,t}const zj=async(r,e,t)=>({operation:xc(e).operation,region:await Ls(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});function Hj(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"cognito-idp",region:r.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Ur(r){return{schemeId:"smithy.api#noAuth"}}const jj=r=>{const e=[];switch(r.operation){case"AssociateSoftwareToken":{e.push(Ur());break}case"ChangePassword":{e.push(Ur());break}case"CompleteWebAuthnRegistration":{e.push(Ur());break}case"ConfirmDevice":{e.push(Ur());break}case"ConfirmForgotPassword":{e.push(Ur());break}case"ConfirmSignUp":{e.push(Ur());break}case"DeleteUser":{e.push(Ur());break}case"DeleteUserAttributes":{e.push(Ur());break}case"DeleteWebAuthnCredential":{e.push(Ur());break}case"ForgetDevice":{e.push(Ur());break}case"ForgotPassword":{e.push(Ur());break}case"GetDevice":{e.push(Ur());break}case"GetTokensFromRefreshToken":{e.push(Ur());break}case"GetUser":{e.push(Ur());break}case"GetUserAttributeVerificationCode":{e.push(Ur());break}case"GetUserAuthFactors":{e.push(Ur());break}case"GlobalSignOut":{e.push(Ur());break}case"InitiateAuth":{e.push(Ur());break}case"ListDevices":{e.push(Ur());break}case"ListWebAuthnCredentials":{e.push(Ur());break}case"ResendConfirmationCode":{e.push(Ur());break}case"RespondToAuthChallenge":{e.push(Ur());break}case"RevokeToken":{e.push(Ur());break}case"SetUserMFAPreference":{e.push(Ur());break}case"SetUserSettings":{e.push(Ur());break}case"SignUp":{e.push(Ur());break}case"StartWebAuthnRegistration":{e.push(Ur());break}case"UpdateAuthEventFeedback":{e.push(Ur());break}case"UpdateDeviceStatus":{e.push(Ur());break}case"UpdateUserAttributes":{e.push(Ur());break}case"VerifySoftwareToken":{e.push(Ur());break}case"VerifyUserAttribute":{e.push(Ur());break}default:e.push(Hj(r))}return e},Gj=r=>{const e=Lj(r);return Object.assign(e,{authSchemePreference:Ls(r.authSchemePreference??[])})},$j=r=>Object.assign(r,{useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"cognito-idp"}),lD={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}},qj="3.1026.0",Wj={version:qj},Qj=r=>new TextEncoder().encode(r);var Yj=typeof Buffer<"u"&&Buffer.from?function(r){return Buffer.from(r,"utf8")}:Qj;function _d(r){return r instanceof Uint8Array?r:typeof r=="string"?Yj(r):ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(r)}function yA(r){return typeof r=="string"?r.length===0:r.byteLength===0}var uD={name:"SHA-256"},QE={name:"HMAC",hash:uD},Xj=new Uint8Array([227,176,196,66,152,252,28,20,154,251,244,200,153,111,185,36,39,174,65,228,100,155,147,76,164,149,153,27,120,82,184,85]);const Jj={};function rg(){return typeof window<"u"?window:typeof self<"u"?self:Jj}var Kj=(function(){function r(e){this.toHash=new Uint8Array(0),this.secret=e,this.reset()}return r.prototype.update=function(e){if(!yA(e)){var t=_d(e),n=new Uint8Array(this.toHash.byteLength+t.byteLength);n.set(this.toHash,0),n.set(t,this.toHash.byteLength),this.toHash=n}},r.prototype.digest=function(){var e=this;return this.key?this.key.then(function(t){return rg().crypto.subtle.sign(QE,t,e.toHash).then(function(n){return new Uint8Array(n)})}):yA(this.toHash)?Promise.resolve(Xj):Promise.resolve().then(function(){return rg().crypto.subtle.digest(uD,e.toHash)}).then(function(t){return Promise.resolve(new Uint8Array(t))})},r.prototype.reset=function(){var e=this;this.toHash=new Uint8Array(0),this.secret&&this.secret!==void 0&&(this.key=new Promise(function(t,n){rg().crypto.subtle.importKey("raw",_d(e.secret),QE,!1,["sign"]).then(t,n)}),this.key.catch(function(){}))},r})(),ma=64,Zj=32,eG=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),tG=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],rG=Math.pow(2,53)-1,ng=(function(){function r(){this.state=Int32Array.from(tG),this.temp=new Int32Array(64),this.buffer=new Uint8Array(64),this.bufferLength=0,this.bytesHashed=0,this.finished=!1}return r.prototype.update=function(e){if(this.finished)throw new Error("Attempted to update an already finished hash.");var t=0,n=e.byteLength;if(this.bytesHashed+=n,this.bytesHashed*8>rG)throw new Error("Cannot hash more than 2^53 - 1 bits");for(;n>0;)this.buffer[this.bufferLength++]=e[t++],n--,this.bufferLength===ma&&(this.hashBuffer(),this.bufferLength=0)},r.prototype.digest=function(){if(!this.finished){var e=this.bytesHashed*8,t=new DataView(this.buffer.buffer,this.buffer.byteOffset,this.buffer.byteLength),n=this.bufferLength;if(t.setUint8(this.bufferLength++,128),n%ma>=ma-8){for(var i=this.bufferLength;i<ma;i++)t.setUint8(i,0);this.hashBuffer(),this.bufferLength=0}for(var i=this.bufferLength;i<ma-8;i++)t.setUint8(i,0);t.setUint32(ma-8,Math.floor(e/4294967296),!0),t.setUint32(ma-4,e),this.hashBuffer(),this.finished=!0}for(var a=new Uint8Array(Zj),i=0;i<8;i++)a[i*4]=this.state[i]>>>24&255,a[i*4+1]=this.state[i]>>>16&255,a[i*4+2]=this.state[i]>>>8&255,a[i*4+3]=this.state[i]>>>0&255;return a},r.prototype.hashBuffer=function(){for(var e=this,t=e.buffer,n=e.state,i=n[0],a=n[1],s=n[2],o=n[3],l=n[4],u=n[5],c=n[6],h=n[7],f=0;f<ma;f++){if(f<16)this.temp[f]=(t[f*4]&255)<<24|(t[f*4+1]&255)<<16|(t[f*4+2]&255)<<8|t[f*4+3]&255;else{var d=this.temp[f-2],g=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10;d=this.temp[f-15];var v=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3;this.temp[f]=(g+this.temp[f-7]|0)+(v+this.temp[f-16]|0)}var y=(((l>>>6|l<<26)^(l>>>11|l<<21)^(l>>>25|l<<7))+(l&u^~l&c)|0)+(h+(eG[f]+this.temp[f]|0)|0)|0,A=((i>>>2|i<<30)^(i>>>13|i<<19)^(i>>>22|i<<10))+(i&a^i&s^a&s)|0;h=c,c=u,u=l,l=o+y|0,o=s,s=a,a=i,i=y+A|0}n[0]+=i,n[1]+=a,n[2]+=s,n[3]+=o,n[4]+=l,n[5]+=u,n[6]+=c,n[7]+=h},r})(),nG=(function(){function r(e){this.secret=e,this.hash=new ng,this.reset()}return r.prototype.update=function(e){if(!(yA(e)||this.error))try{this.hash.update(_d(e))}catch(t){this.error=t}},r.prototype.digestSync=function(){if(this.error)throw this.error;return this.outer?(this.outer.finished||this.outer.update(this.hash.digest()),this.outer.digest()):this.hash.digest()},r.prototype.digest=function(){return Rs(this,void 0,void 0,function(){return Os(this,function(e){return[2,this.digestSync()]})})},r.prototype.reset=function(){if(this.hash=new ng,this.secret){this.outer=new ng;var e=iG(this.secret),t=new Uint8Array(ma);t.set(e);for(var n=0;n<ma;n++)e[n]^=54,t[n]^=92;this.hash.update(e),this.outer.update(t);for(var n=0;n<e.byteLength;n++)e[n]=0}},r})();function iG(r){var e=_d(r);if(e.byteLength>ma){var t=new ng;t.update(e),e=t.digest()}var n=new Uint8Array(ma);return n.set(e),n}var aG=["decrypt","digest","encrypt","exportKey","generateKey","importKey","sign","verify"];function sG(r){if(oG(r)&&typeof r.crypto.subtle=="object"){var e=r.crypto.subtle;return lG(e)}return!1}function oG(r){if(typeof r=="object"&&typeof r.crypto=="object"){var e=r.crypto.getRandomValues;return typeof e=="function"}return!1}function lG(r){return r&&aG.every(function(e){return typeof r[e]=="function"})}var uG=(function(){function r(e){sG(rg())?this.hash=new Kj(e):this.hash=new nG(e)}return r.prototype.update=function(e,t){this.hash.update(_d(e))},r.prototype.digest=function(){return this.hash.digest()},r.prototype.reset=function(){this.hash.reset()},r})();const cG=({serviceId:r,clientVersion:e})=>async t=>{const n=typeof window<"u"?window.navigator:void 0,i=n?.userAgent??"",a=n?.userAgentData?.platform??YE.os(i)??"other",s=void 0,o=n?.userAgentData?.brands??[],l=o[o.length-1],u=l?.brand??YE.browser(i)??"unknown",c=l?.version??"unknown",h=[["aws-sdk-js",e],["ua","2.1"],[`os/${a}`,s],["lang/js"],["md/browser",`${u}_${c}`]];r&&h.push([`api/${r}`,e]);const f=await t?.userAgentAppId?.();return f&&h.push([`app/${f}`]),h},YE={os(r){if(/iPhone|iPad|iPod/.test(r))return"iOS";if(/Macintosh|Mac OS X/.test(r))return"macOS";if(/Windows NT/.test(r))return"Windows";if(/Android/.test(r))return"Android";if(/Linux/.test(r))return"Linux"},browser(r){if(/EdgiOS|EdgA|Edg\//.test(r))return"Microsoft Edge";if(/Firefox\//.test(r))return"Firefox";if(/Chrome\//.test(r))return"Chrome";if(/Safari\//.test(r))return"Safari"}},fG=r=>()=>Promise.reject(r),XE=typeof TextEncoder=="function"?new TextEncoder:null,dG=r=>{if(typeof r=="string"){if(XE)return XE.encode(r).byteLength;let e=r.length;for(let t=e-1;t>=0;t--){const n=r.charCodeAt(t);n>127&&n<=2047?e++:n>2047&&n<=65535&&(e+=2),n>=56320&&n<=57343&&t--}return e}else{if(typeof r.byteLength=="number")return r.byteLength;if(typeof r.size=="number")return r.size}throw new Error(`Body Length computation failed for ${r}`)},hG=["in-region","cross-region","mobile","standard","legacy"],pG=({defaultsMode:r}={})=>dj(async()=>{const e=typeof r=="function"?await r():r;switch(e?.toLowerCase()){case"auto":return Promise.resolve(gG()?"mobile":"standard");case"mobile":case"in-region":case"cross-region":case"standard":case"legacy":return Promise.resolve(e?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${hG.join(", ")}, got ${e}`)}}),gG=()=>{const r=window?.navigator;if(r?.connection){const{effectiveType:e,rtt:t,downlink:n}=r?.connection;if(typeof e=="string"&&e!=="4g"||Number(t)>100||Number(n)<10)return!0}return r?.userAgentData?.mobile||typeof r?.maxTouchPoints=="number"&&r?.maxTouchPoints>1};class mG{queryCompat;errorRegistry;constructor(e=!1){this.queryCompat=e}resolveRestContentType(e,t){const n=t.getMemberSchemas(),i=Object.values(n).find(a=>!!a.getMergedTraits().httpPayload);if(i){const a=i.getMergedTraits().mediaType;return a||(i.isStringSchema()?"text/plain":i.isBlobSchema()?"application/octet-stream":e)}else if(!t.isUnitSchema()&&Object.values(n).find(s=>{const{httpQuery:o,httpQueryParams:l,httpHeader:u,httpLabel:c,httpPrefixHeaders:h}=s.getMergedTraits();return!o&&!l&&!u&&!c&&h===void 0}))return e}async getErrorSchemaOrThrowBaseException(e,t,n,i,a,s){let o=e;e.includes("#")&&([,o]=e.split("#"));const l={$metadata:a,$fault:n.statusCode<500?"client":"server"};if(!this.errorRegistry)throw new Error("@aws-sdk/core/protocols - error handler not initialized.");try{return{errorSchema:s?.(this.errorRegistry,o)??this.errorRegistry.getSchema(e),errorMetadata:l}}catch{i.message=i.message??i.Message??"UnknownError";const c=this.errorRegistry,h=c.getBaseException();if(h){const g=c.getErrorCtor(h)??Error;throw this.decorateServiceException(Object.assign(new g({name:o}),l),i)}const f=i,d=f?.message??f?.Message??f?.Error?.Message??f?.Error?.message;throw this.decorateServiceException(Object.assign(new Error(d),{name:o},l),i)}}compose(e,t,n){let i=n;t.includes("#")&&([i]=t.split("#"));const a=ra.for(i),s=ra.for("smithy.ts.sdk.synthetic."+n);e.copyFrom(a),e.copyFrom(s),this.errorRegistry=e}decorateServiceException(e,t={}){if(this.queryCompat){const n=e.Message??t.Message,i=LE(e,t);n&&(i.message=n),i.Error={...i.Error,Type:i.Error?.Type,Code:i.Error?.Code,Message:i.Error?.message??i.Error?.Message??n};const a=i.$metadata.requestId;return a&&(i.RequestId=a),i}return LE(e,t)}setQueryCompatError(e,t){const n=t.headers?.["x-amzn-query-error"];if(e!==void 0&&n!=null){const[i,a]=n.split(";"),s=Object.entries(e),o={Code:i,Type:a};Object.assign(e,o);for(const[l,u]of s)o[l==="message"?"Message":l]=u;delete o.__type,e.Error=o}}queryCompatOutput(e,t){e.Error&&(t.Error=e.Error),e.Type&&(t.Type=e.Type),e.Code&&(t.Code=e.Code)}findQueryCompatibleError(e,t){try{return e.getSchema(t)}catch{return e.find(i=>vi.of(i).getMergedTraits().awsQueryError?.[0]===t)}}}class U1{serdeContext;setSerdeContext(e){this.serdeContext=e}}class vG{from;to;keys;constructor(e,t){this.from=e,this.to=t,this.keys=new Set(Object.keys(this.from).filter(n=>n!=="__type"))}mark(e){this.keys.delete(e)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){const e=this.keys.values().next().value,t=this.from[e];this.to.$unknown=[e,t]}}}function yG(r,e,t){if(t?.source){const n=t.source;if(typeof e=="number"&&(e>Number.MAX_SAFE_INTEGER||e<Number.MIN_SAFE_INTEGER||n!==String(e)))return n.includes(".")?new ts(n,"bigDecimal"):BigInt(n)}return e}const AG=(r,e)=>hA(r,e).then(t=>(e?.utf8Encoder??im)(t)),bG=(r,e)=>AG(r,e).then(t=>{if(t.length)try{return JSON.parse(t)}catch(n){throw n?.name==="SyntaxError"&&Object.defineProperty(n,"$responseBodyText",{value:t}),n}return{}}),wG=(r,e)=>{const t=(a,s)=>Object.keys(a).find(o=>o.toLowerCase()===s.toLowerCase()),n=a=>{let s=a;return typeof s=="number"&&(s=s.toString()),s.indexOf(",")>=0&&(s=s.split(",")[0]),s.indexOf(":")>=0&&(s=s.split(":")[0]),s.indexOf("#")>=0&&(s=s.split("#")[1]),s},i=t(r.headers,"x-amzn-errortype");if(i!==void 0)return n(r.headers[i]);if(e&&typeof e=="object"){const a=t(e,"code");if(a&&e[a]!==void 0)return n(e[a]);if(e.__type!==void 0)return n(e.__type)}};class CG extends U1{settings;constructor(e){super(),this.settings=e}async read(e,t){return this._read(e,typeof t=="string"?JSON.parse(t,yG):await bG(t,this.serdeContext))}readObject(e,t){return this._read(e,t)}_read(e,t){const n=t!==null&&typeof t=="object",i=vi.of(e);if(n){if(i.isStructSchema()){const s=t,o=i.isUnionSchema(),l={};let u;const{jsonName:c}=this.settings;c&&(u={});let h;o&&(h=new vG(s,l));for(const[f,d]of i.structIterator()){let g=f;c&&(g=d.getMergedTraits().jsonName??g,u[g]=f),o&&h.mark(g),s[g]!=null&&(l[f]=this._read(d,s[g]))}if(o)h.writeUnknown();else if(typeof s.__type=="string")for(const[f,d]of Object.entries(s)){const g=c?u[f]??f:f;g in l||(l[g]=d)}return l}if(Array.isArray(t)&&i.isListSchema()){const s=i.getValueSchema(),o=[];for(const l of t)o.push(this._read(s,l));return o}if(i.isMapSchema()){const s=i.getValueSchema(),o={};for(const[l,u]of Object.entries(t))o[l]=this._read(s,u);return o}}if(i.isBlobSchema()&&typeof t=="string")return nm(t);const a=i.getMergedTraits().mediaType;if(i.isStringSchema()&&typeof t=="string"&&a)return a==="application/json"||a.endsWith("+json")?go.from(t):t;if(i.isTimestampSchema()&&t!=null)switch(MI(i,this.settings)){case 5:return ZV(t);case 6:return OI(t);case 7:return nz(t);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",t),new Date(t)}if(i.isBigIntegerSchema()&&(typeof t=="number"||typeof t=="string"))return BigInt(t);if(i.isBigDecimalSchema()&&t!=null){if(t instanceof ts)return t;const s=t;return s.type==="bigDecimal"&&"string"in s?new ts(s.string,s.type):new ts(String(t),"bigDecimal")}if(i.isNumericSchema()&&typeof t=="string"){switch(t){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return t}if(i.isDocumentSchema())if(n){const s=Array.isArray(t)?[]:{};for(const[o,l]of Object.entries(t))l instanceof ts?s[o]=l:s[o]=this._read(i,l);return s}else return structuredClone(t);return t}}const JE="Ν";class xG{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(e,t)=>{if(t instanceof ts){const n=`${JE+"nv"+this.counter++}_`+t.string;return this.values.set(`"${n}"`,t.string),n}if(typeof t=="bigint"){const n=t.toString(),i=`${JE+"b"+this.counter++}_`+n;return this.values.set(`"${i}"`,n),i}return t}}replaceInJson(e){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===0)return e;for(const[t,n]of this.values)e=e.replace(t,n);return e}}class SG extends U1{settings;buffer;useReplacer=!1;rootSchema;constructor(e){super(),this.settings=e}write(e,t){this.rootSchema=vi.of(e),this.buffer=this._write(this.rootSchema,t)}writeDiscriminatedDocument(e,t){this.write(e,t),typeof this.buffer=="object"&&(this.buffer.__type=vi.of(e).getName(!0))}flush(){const{rootSchema:e,useReplacer:t}=this;if(this.rootSchema=void 0,this.useReplacer=!1,e?.isStructSchema()||e?.isDocumentSchema()){if(!t)return JSON.stringify(this.buffer);const n=new xG;return n.replaceInJson(JSON.stringify(this.buffer,n.createReplacer(),0))}return this.buffer}_write(e,t,n){const i=t!==null&&typeof t=="object",a=vi.of(e);if(i){if(a.isStructSchema()){const s=t,o={},{jsonName:l}=this.settings;let u;l&&(u={});for(const[c,h]of a.structIterator()){const f=this._write(h,s[c],a);if(f!==void 0){let d=c;l&&(d=h.getMergedTraits().jsonName??c,u[c]=d),o[d]=f}}if(a.isUnionSchema()&&Object.keys(o).length===0){const{$unknown:c}=s;if(Array.isArray(c)){const[h,f]=c;o[h]=this._write(15,f)}}else if(typeof s.__type=="string")for(const[c,h]of Object.entries(s)){const f=l?u[c]??c:c;f in o||(o[f]=this._write(15,h))}return o}if(Array.isArray(t)&&a.isListSchema()){const s=a.getValueSchema(),o=[],l=!!a.getMergedTraits().sparse;for(const u of t)(l||u!=null)&&o.push(this._write(s,u));return o}if(a.isMapSchema()){const s=a.getValueSchema(),o={},l=!!a.getMergedTraits().sparse;for(const[u,c]of Object.entries(t))(l||c!=null)&&(o[u]=this._write(s,c));return o}if(t instanceof Uint8Array&&(a.isBlobSchema()||a.isDocumentSchema()))return a===this.rootSchema?t:(this.serdeContext?.base64Encoder??Eg)(t);if(t instanceof Date&&(a.isTimestampSchema()||a.isDocumentSchema()))switch(MI(a,this.settings)){case 5:return t.toISOString().replace(".000Z","Z");case 6:return JV(t);case 7:return t.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",t),t.getTime()/1e3}t instanceof ts&&(this.useReplacer=!0)}if(!(t===null&&n?.isStructSchema())){if(a.isStringSchema()){if(typeof t>"u"&&a.isIdempotencyToken())return BI();const s=a.getMergedTraits().mediaType;return t!=null&&s&&(s==="application/json"||s.endsWith("+json"))?go.from(t):t}if(typeof t=="number"&&a.isNumericSchema())return Math.abs(t)===1/0||isNaN(t)?String(t):t;if(typeof t=="string"&&a.isBlobSchema())return a===this.rootSchema?t:(this.serdeContext?.base64Encoder??Eg)(t);if(typeof t=="bigint"&&(this.useReplacer=!0),a.isDocumentSchema())if(i){const s=Array.isArray(t)?[]:{};for(const[o,l]of Object.entries(t))l instanceof ts?(this.useReplacer=!0,s[o]=l):s[o]=this._write(a,l);return s}else return structuredClone(t);return t}}}class EG extends U1{settings;constructor(e){super(),this.settings=e}createSerializer(){const e=new SG(this.settings);return e.setSerdeContext(this.serdeContext),e}createDeserializer(){const e=new CG(this.settings);return e.setSerdeContext(this.serdeContext),e}}class kG extends pz{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a}){super({defaultNamespace:e,errorTypeRegistries:t}),this.serviceTarget=n,this.codec=a??new EG({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!i,this.mixin=new mG(this.awsQueryCompatible)}async serializeRequest(e,t,n){const i=await super.serializeRequest(e,t,n);return i.path.endsWith("/")||(i.path+="/"),Object.assign(i.headers,{"content-type":`application/x-amz-json-${this.getJsonRpcVersion()}`,"x-amz-target":`${this.serviceTarget}.${e.name}`}),this.awsQueryCompatible&&(i.headers["x-amzn-query-mode"]="true"),(eg(e.input)==="unit"||!i.body)&&(i.body="{}"),i}getPayloadCodec(){return this.codec}async handleError(e,t,n,i,a){this.awsQueryCompatible&&this.mixin.setQueryCompatError(i,n);const s=wG(n,i)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,s,this.options.defaultNamespace);const{errorSchema:o,errorMetadata:l}=await this.mixin.getErrorSchemaOrThrowBaseException(s,this.options.defaultNamespace,n,i,a,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),u=vi.of(o),c=i.message??i.Message??"UnknownError",h=this.compositeErrorRegistry.getErrorCtor(o)??Error,f=new h(c),d={};for(const[g,v]of u.structIterator())i[g]!=null&&(d[g]=this.codec.createDeserializer().readObject(v,i[g]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(i,d),this.mixin.decorateServiceException(Object.assign(f,l,{$fault:u.getMergedTraits().error,message:c},d),i)}}class FG extends kG{constructor({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a}){super({defaultNamespace:e,errorTypeRegistries:t,serviceTarget:n,awsQueryCompatible:i,jsonCodec:a})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}const cD=(r,e=!1)=>{if(e){for(const t of r.split("."))if(!cD(t))return!1;return!0}return!(!ah(r)||r.length<3||r.length>63||r!==r.toLowerCase()||O1(r))},KE=":",TG="/",IG=r=>{const e=r.split(KE);if(e.length<6)return null;const[t,n,i,a,s,...o]=e;if(t!=="arn"||n===""||i===""||o.join(KE)==="")return null;const l=o.map(u=>u.split(TG)).flat();return{partition:n,service:i,region:a,accountId:s,resourceId:l}},DG=[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-east-2":{description:"Asia Pacific (Taipei)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"ap-southeast-6":{description:"Asia Pacific (New Zealand)"},"ap-southeast-7":{description:"Asia Pacific (Thailand)"},"aws-global":{description:"aws global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"mx-central-1":{description:"Mexico (Central)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"aws-cn global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-eusc",outputs:{dnsSuffix:"amazonaws.eu",dualStackDnsSuffix:"api.amazonwebservices.eu",implicitGlobalRegion:"eusc-de-east-1",name:"aws-eusc",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eusc\\-(de)\\-\\w+\\-\\d+$",regions:{"eusc-de-east-1":{description:"AWS European Sovereign Cloud (Germany)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"api.aws.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"aws-iso global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"api.aws.scloud",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"aws-iso-b global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"},"us-isob-west-1":{description:"US ISOB West"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"api.cloud-aws.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"aws-iso-e-global":{description:"aws-iso-e global region"},"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"api.aws.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{"aws-iso-f-global":{description:"aws-iso-f global region"},"us-isof-east-1":{description:"US ISOF EAST"},"us-isof-south-1":{description:"US ISOF SOUTH"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"aws-us-gov global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}}],PG={partitions:DG};let RG=PG;const OG=r=>{const{partitions:e}=RG;for(const n of e){const{regions:i,outputs:a}=n;for(const[s,o]of Object.entries(i))if(s===r)return{...a,...o}}for(const n of e){const{regionRegex:i,outputs:a}=n;if(new RegExp(i).test(r))return{...a}}const t=e.find(n=>n.id==="aws");if(!t)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...t.outputs}},fD={isVirtualHostableS3Bucket:cD,parseArn:IG,partition:OG};Od.aws=fD;const dD="required",Ii="fn",Di="argv",Sc="ref",ZE=!0,e2="isSet",Nd="booleanEquals",Du="error",Ja="endpoint",Ts="tree",V1="PartitionResult",z1="getAttr",Mf="stringEquals",t2={[dD]:!1,type:"string"},r2={[dD]:!0,default:!1,type:"boolean"},n2={[Sc]:"Endpoint"},hD={[Ii]:Nd,[Di]:[{[Sc]:"UseFIPS"},!0]},pD={[Ii]:Nd,[Di]:[{[Sc]:"UseDualStack"},!0]},ti={},Xf={[Sc]:"Region"},i2={[Ii]:z1,[Di]:[{[Sc]:V1},"supportsFIPS"]},gD={[Sc]:V1},a2={[Ii]:Nd,[Di]:[!0,{[Ii]:z1,[Di]:[gD,"supportsDualStack"]}]},s2=[hD],o2=[pD],l2=[Xf],BG={parameters:{Region:t2,UseDualStack:r2,UseFIPS:r2,Endpoint:t2},rules:[{conditions:[{[Ii]:e2,[Di]:[n2]}],rules:[{conditions:s2,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:Du},{conditions:o2,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:Du},{endpoint:{url:n2,properties:ti,headers:ti},type:Ja}],type:Ts},{conditions:[{[Ii]:e2,[Di]:l2}],rules:[{conditions:[{[Ii]:"aws.partition",[Di]:l2,assign:V1}],rules:[{conditions:[hD,pD],rules:[{conditions:[{[Ii]:Nd,[Di]:[ZE,i2]},a2],rules:[{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-east-1"]}],endpoint:{url:"https://cognito-idp-fips.us-east-1.amazonaws.com",properties:ti,headers:ti},type:Ja},{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-east-2"]}],endpoint:{url:"https://cognito-idp-fips.us-east-2.amazonaws.com",properties:ti,headers:ti},type:Ja},{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-west-1"]}],endpoint:{url:"https://cognito-idp-fips.us-west-1.amazonaws.com",properties:ti,headers:ti},type:Ja},{conditions:[{[Ii]:Mf,[Di]:[Xf,"us-west-2"]}],endpoint:{url:"https://cognito-idp-fips.us-west-2.amazonaws.com",properties:ti,headers:ti},type:Ja},{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:Du}],type:Ts},{conditions:s2,rules:[{conditions:[{[Ii]:Nd,[Di]:[i2,ZE]}],rules:[{endpoint:{url:"https://cognito-idp-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts},{error:"FIPS is enabled but this partition does not support FIPS",type:Du}],type:Ts},{conditions:o2,rules:[{conditions:[a2],rules:[{conditions:[{[Ii]:Mf,[Di]:["aws",{[Ii]:z1,[Di]:[gD,"name"]}]}],endpoint:{url:"https://cognito-idp.{Region}.amazonaws.com",properties:ti,headers:ti},type:Ja},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts},{error:"DualStack is enabled but this partition does not support DualStack",type:Du}],type:Ts},{endpoint:{url:"https://cognito-idp.{Region}.{PartitionResult#dnsSuffix}",properties:ti,headers:ti},type:Ja}],type:Ts}],type:Ts},{error:"Invalid Configuration: Missing Region",type:Du}]},MG=BG,_G=new Ez({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),NG=(r,e={})=>_G.get(r,()=>Gz(MG,{endpointParams:r,logger:e.logger}));Od.aws=fD;class xt extends zu{constructor(e){super(e),Object.setPrototypeOf(this,xt.prototype)}}class H1 extends xt{name="AccessDeniedException";$fault="client";constructor(e){super({name:"AccessDeniedException",$fault:"client",...e}),Object.setPrototypeOf(this,H1.prototype)}}class j1 extends xt{name="InternalErrorException";$fault="server";constructor(e){super({name:"InternalErrorException",$fault:"server",...e}),Object.setPrototypeOf(this,j1.prototype)}}class G1 extends xt{name="InvalidParameterException";$fault="client";reasonCode;constructor(e){super({name:"InvalidParameterException",$fault:"client",...e}),Object.setPrototypeOf(this,G1.prototype),this.reasonCode=e.reasonCode}}class $1 extends xt{name="NotAuthorizedException";$fault="client";constructor(e){super({name:"NotAuthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,$1.prototype)}}class q1 extends xt{name="ResourceNotFoundException";$fault="client";constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,q1.prototype)}}class W1 extends xt{name="TooManyRequestsException";$fault="client";constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),Object.setPrototypeOf(this,W1.prototype)}}class Q1 extends xt{name="UserImportInProgressException";$fault="client";constructor(e){super({name:"UserImportInProgressException",$fault:"client",...e}),Object.setPrototypeOf(this,Q1.prototype)}}class Y1 extends xt{name="InternalServerException";$fault="server";constructor(e){super({name:"InternalServerException",$fault:"server",...e}),Object.setPrototypeOf(this,Y1.prototype)}}class X1 extends xt{name="LimitExceededException";$fault="client";constructor(e){super({name:"LimitExceededException",$fault:"client",...e}),Object.setPrototypeOf(this,X1.prototype)}}class J1 extends xt{name="UserNotFoundException";$fault="client";constructor(e){super({name:"UserNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,J1.prototype)}}class K1 extends xt{name="InvalidLambdaResponseException";$fault="client";constructor(e){super({name:"InvalidLambdaResponseException",$fault:"client",...e}),Object.setPrototypeOf(this,K1.prototype)}}class Z1 extends xt{name="TooManyFailedAttemptsException";$fault="client";constructor(e){super({name:"TooManyFailedAttemptsException",$fault:"client",...e}),Object.setPrototypeOf(this,Z1.prototype)}}class eb extends xt{name="UnexpectedLambdaException";$fault="client";constructor(e){super({name:"UnexpectedLambdaException",$fault:"client",...e}),Object.setPrototypeOf(this,eb.prototype)}}class tb extends xt{name="UserLambdaValidationException";$fault="client";constructor(e){super({name:"UserLambdaValidationException",$fault:"client",...e}),Object.setPrototypeOf(this,tb.prototype)}}class rb extends xt{name="CodeDeliveryFailureException";$fault="client";constructor(e){super({name:"CodeDeliveryFailureException",$fault:"client",...e}),Object.setPrototypeOf(this,rb.prototype)}}class nb extends xt{name="InvalidPasswordException";$fault="client";constructor(e){super({name:"InvalidPasswordException",$fault:"client",...e}),Object.setPrototypeOf(this,nb.prototype)}}class ib extends xt{name="InvalidSmsRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidSmsRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,ib.prototype)}}class ab extends xt{name="InvalidSmsRoleTrustRelationshipException";$fault="client";constructor(e){super({name:"InvalidSmsRoleTrustRelationshipException",$fault:"client",...e}),Object.setPrototypeOf(this,ab.prototype)}}class sb extends xt{name="PreconditionNotMetException";$fault="client";constructor(e){super({name:"PreconditionNotMetException",$fault:"client",...e}),Object.setPrototypeOf(this,sb.prototype)}}class ob extends xt{name="UnsupportedUserStateException";$fault="client";constructor(e){super({name:"UnsupportedUserStateException",$fault:"client",...e}),Object.setPrototypeOf(this,ob.prototype)}}class lb extends xt{name="UsernameExistsException";$fault="client";constructor(e){super({name:"UsernameExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,lb.prototype)}}class ub extends xt{name="AliasExistsException";$fault="client";constructor(e){super({name:"AliasExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,ub.prototype)}}class cb extends xt{name="InvalidUserPoolConfigurationException";$fault="client";constructor(e){super({name:"InvalidUserPoolConfigurationException",$fault:"client",...e}),Object.setPrototypeOf(this,cb.prototype)}}class fb extends xt{name="InvalidEmailRoleAccessPolicyException";$fault="client";constructor(e){super({name:"InvalidEmailRoleAccessPolicyException",$fault:"client",...e}),Object.setPrototypeOf(this,fb.prototype)}}class db extends xt{name="MFAMethodNotFoundException";$fault="client";constructor(e){super({name:"MFAMethodNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,db.prototype)}}class hb extends xt{name="PasswordResetRequiredException";$fault="client";constructor(e){super({name:"PasswordResetRequiredException",$fault:"client",...e}),Object.setPrototypeOf(this,hb.prototype)}}class pb extends xt{name="UnsupportedOperationException";$fault="client";constructor(e){super({name:"UnsupportedOperationException",$fault:"client",...e}),Object.setPrototypeOf(this,pb.prototype)}}class gb extends xt{name="UserNotConfirmedException";$fault="client";constructor(e){super({name:"UserNotConfirmedException",$fault:"client",...e}),Object.setPrototypeOf(this,gb.prototype)}}class mb extends xt{name="UserPoolAddOnNotEnabledException";$fault="client";constructor(e){super({name:"UserPoolAddOnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,mb.prototype)}}class vb extends xt{name="CodeMismatchException";$fault="client";constructor(e){super({name:"CodeMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,vb.prototype)}}class yb extends xt{name="ExpiredCodeException";$fault="client";constructor(e){super({name:"ExpiredCodeException",$fault:"client",...e}),Object.setPrototypeOf(this,yb.prototype)}}class Ab extends xt{name="PasswordHistoryPolicyViolationException";$fault="client";constructor(e){super({name:"PasswordHistoryPolicyViolationException",$fault:"client",...e}),Object.setPrototypeOf(this,Ab.prototype)}}class bb extends xt{name="SoftwareTokenMFANotFoundException";$fault="client";constructor(e){super({name:"SoftwareTokenMFANotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,bb.prototype)}}class wb extends xt{name="ConcurrentModificationException";$fault="client";constructor(e){super({name:"ConcurrentModificationException",$fault:"client",...e}),Object.setPrototypeOf(this,wb.prototype)}}class Cb extends xt{name="ForbiddenException";$fault="client";constructor(e){super({name:"ForbiddenException",$fault:"client",...e}),Object.setPrototypeOf(this,Cb.prototype)}}class xb extends xt{name="WebAuthnChallengeNotFoundException";$fault="client";constructor(e){super({name:"WebAuthnChallengeNotFoundException",$fault:"client",...e}),Object.setPrototypeOf(this,xb.prototype)}}class Sb extends xt{name="WebAuthnClientMismatchException";$fault="client";constructor(e){super({name:"WebAuthnClientMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,Sb.prototype)}}class Eb extends xt{name="WebAuthnCredentialNotSupportedException";$fault="client";constructor(e){super({name:"WebAuthnCredentialNotSupportedException",$fault:"client",...e}),Object.setPrototypeOf(this,Eb.prototype)}}class kb extends xt{name="WebAuthnNotEnabledException";$fault="client";constructor(e){super({name:"WebAuthnNotEnabledException",$fault:"client",...e}),Object.setPrototypeOf(this,kb.prototype)}}class Fb extends xt{name="WebAuthnOriginNotAllowedException";$fault="client";constructor(e){super({name:"WebAuthnOriginNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Fb.prototype)}}class Tb extends xt{name="WebAuthnRelyingPartyMismatchException";$fault="client";constructor(e){super({name:"WebAuthnRelyingPartyMismatchException",$fault:"client",...e}),Object.setPrototypeOf(this,Tb.prototype)}}class Ib extends xt{name="DeviceKeyExistsException";$fault="client";constructor(e){super({name:"DeviceKeyExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ib.prototype)}}class Db extends xt{name="GroupExistsException";$fault="client";constructor(e){super({name:"GroupExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Db.prototype)}}class Pb extends xt{name="DuplicateProviderException";$fault="client";constructor(e){super({name:"DuplicateProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Pb.prototype)}}class Rb extends xt{name="ManagedLoginBrandingExistsException";$fault="client";constructor(e){super({name:"ManagedLoginBrandingExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Rb.prototype)}}class Ob extends xt{name="TermsExistsException";$fault="client";constructor(e){super({name:"TermsExistsException",$fault:"client",...e}),Object.setPrototypeOf(this,Ob.prototype)}}class Bb extends xt{name="FeatureUnavailableInTierException";$fault="client";constructor(e){super({name:"FeatureUnavailableInTierException",$fault:"client",...e}),Object.setPrototypeOf(this,Bb.prototype)}}class Mb extends xt{name="TierChangeNotAllowedException";$fault="client";constructor(e){super({name:"TierChangeNotAllowedException",$fault:"client",...e}),Object.setPrototypeOf(this,Mb.prototype)}}class _b extends xt{name="UserPoolTaggingException";$fault="client";constructor(e){super({name:"UserPoolTaggingException",$fault:"client",...e}),Object.setPrototypeOf(this,_b.prototype)}}class Nb extends xt{name="InvalidOAuthFlowException";$fault="client";constructor(e){super({name:"InvalidOAuthFlowException",$fault:"client",...e}),Object.setPrototypeOf(this,Nb.prototype)}}class Lb extends xt{name="ScopeDoesNotExistException";$fault="client";constructor(e){super({name:"ScopeDoesNotExistException",$fault:"client",...e}),Object.setPrototypeOf(this,Lb.prototype)}}class Ub extends xt{name="UnsupportedIdentityProviderException";$fault="client";constructor(e){super({name:"UnsupportedIdentityProviderException",$fault:"client",...e}),Object.setPrototypeOf(this,Ub.prototype)}}class Vb extends xt{name="RefreshTokenReuseException";$fault="client";constructor(e){super({name:"RefreshTokenReuseException",$fault:"client",...e}),Object.setPrototypeOf(this,Vb.prototype)}}class zb extends xt{name="UnauthorizedException";$fault="client";constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),Object.setPrototypeOf(this,zb.prototype)}}class Hb extends xt{name="UnsupportedTokenTypeException";$fault="client";constructor(e){super({name:"UnsupportedTokenTypeException",$fault:"client",...e}),Object.setPrototypeOf(this,Hb.prototype)}}class jb extends xt{name="WebAuthnConfigurationMissingException";$fault="client";constructor(e){super({name:"WebAuthnConfigurationMissingException",$fault:"client",...e}),Object.setPrototypeOf(this,jb.prototype)}}class Gb extends xt{name="EnableSoftwareTokenMFAException";$fault="client";constructor(e){super({name:"EnableSoftwareTokenMFAException",$fault:"client",...e}),Object.setPrototypeOf(this,Gb.prototype)}}const LG="AvailableChallenges",UG="AccessDeniedException",VG="AliasExistsException",zG="AnalyticsEndpointId",HG="AuthFlow",mD="AnalyticsMetadata",jG="AnalyticsMetadataType",GG="AuthParameters",$G="AuthParametersType",vD="AuthenticationResult",qG="AuthenticationResultType",WG="AccessToken",QG="CodeDeliveryFailureException",yD="ClientId",YG="ClientIdType",AD="ClientMetadata",XG="CodeMismatchException",JG="ConcurrentModificationException",$b="ChallengeName",bD="ChallengeParameters",KG="ChallengeResponses",ZG="ChallengeResponsesType",e$="DeviceGroupKey",t$="DeviceKey",r$="DeviceKeyExistsException",n$="DuplicateProviderException",i$="ExpiredCodeException",a$="EncodedData",s$="ExpiresIn",o$="EnableSoftwareTokenMFAException",l$="ForbiddenException",u$="FeatureUnavailableInTierException",c$="GroupExistsException",f$="IpAddress",d$="InitiateAuthRequest",h$="InitiateAuthResponse",p$="InitiateAuth",g$="InternalErrorException",m$="InvalidEmailRoleAccessPolicyException",v$="InvalidLambdaResponseException",y$="InvalidOAuthFlowException",A$="InvalidParameterException",b$="InvalidPasswordException",w$="InternalServerException",C$="InvalidSmsRoleAccessPolicyException",x$="InvalidSmsRoleTrustRelationshipException",S$="IdToken",E$="InvalidUserPoolConfigurationException",k$="LimitExceededException",F$="MFAMethodNotFoundException",T$="ManagedLoginBrandingExistsException",I$="NotAuthorizedException",D$="NewDeviceMetadata",P$="NewDeviceMetadataType",R$="PasswordHistoryPolicyViolationException",O$="PreconditionNotMetException",B$="PasswordResetRequiredException",M$="ResourceNotFoundException",_$="RefreshToken",N$="RespondToAuthChallenge",L$="RespondToAuthChallengeRequest",U$="RespondToAuthChallengeResponse",V$="RefreshTokenReuseException",om="Session",z$="ScopeDoesNotExistException",H$="SessionType",j$="SoftwareTokenMFANotFoundException",G$="TierChangeNotAllowedException",$$="TermsExistsException",q$="TooManyFailedAttemptsException",W$="TooManyRequestsException",Q$="TokenModelType",Y$="TokenType",X$="UserContextDataType",wD="UserContextData",J$="UnauthorizedException",K$="UsernameExistsException",Z$="UserImportInProgressException",eq="UnsupportedIdentityProviderException",tq="UnexpectedLambdaException",rq="UserLambdaValidationException",nq="UserNotConfirmedException",iq="UserNotFoundException",aq="UnsupportedOperationException",sq="UserPoolAddOnNotEnabledException",oq="UserPoolTaggingException",lq="UnsupportedTokenTypeException",uq="UnsupportedUserStateException",cq="WebAuthnClientMismatchException",fq="WebAuthnConfigurationMissingException",dq="WebAuthnChallengeNotFoundException",hq="WebAuthnCredentialNotSupportedException",pq="WebAuthnNotEnabledException",gq="WebAuthnOriginNotAllowedException",mq="WebAuthnRelyingPartyMismatchException",Ot="client",Ft="error",Bt="httpError",Tt="message",vq="reasonCode",CD="smithy.ts.sdk.synthetic.com.amazonaws.cognitoidentityprovider",xD="server",at="com.amazonaws.cognitoidentityprovider",SD=ra.for(CD);var yq=[-3,CD,"CognitoIdentityProviderServiceException",0,[],[]];SD.registerError(yq,xt);const kt=ra.for(at);var Aq=[-3,at,UG,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Aq,H1);var bq=[-3,at,VG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(bq,ub);var wq=[-3,at,QG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(wq,rb);var Cq=[-3,at,XG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Cq,vb);var xq=[-3,at,JG,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(xq,wb);var Sq=[-3,at,r$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Sq,Ib);var Eq=[-3,at,n$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Eq,Pb);var kq=[-3,at,o$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(kq,Gb);var Fq=[-3,at,i$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Fq,yb);var Tq=[-3,at,u$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Tq,Bb);var Iq=[-3,at,l$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Iq,Cb);var Dq=[-3,at,c$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Dq,Db);var Pq=[-3,at,g$,{[Ft]:xD},[Tt],[0]];kt.registerError(Pq,j1);var Rq=[-3,at,w$,{[Ft]:xD},[Tt],[0]];kt.registerError(Rq,Y1);var Oq=[-3,at,m$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Oq,fb);var Bq=[-3,at,v$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Bq,K1);var Mq=[-3,at,y$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Mq,Nb);var _q=[-3,at,A$,{[Ft]:Ot,[Bt]:400},[Tt,vq],[0,0]];kt.registerError(_q,G1);var Nq=[-3,at,b$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Nq,nb);var Lq=[-3,at,C$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Lq,ib);var Uq=[-3,at,x$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Uq,ab);var Vq=[-3,at,E$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Vq,cb);var zq=[-3,at,k$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(zq,X1);var Hq=[-3,at,T$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Hq,Rb);var jq=[-3,at,F$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(jq,db);var Gq=[-3,at,I$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Gq,$1);var $q=[-3,at,R$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError($q,Ab);var qq=[-3,at,B$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(qq,hb);var Wq=[-3,at,O$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Wq,sb);var Qq=[-3,at,V$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Qq,Vb);var Yq=[-3,at,M$,{[Ft]:Ot,[Bt]:404},[Tt],[0]];kt.registerError(Yq,q1);var Xq=[-3,at,z$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Xq,Lb);var Jq=[-3,at,j$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Jq,bb);var Kq=[-3,at,$$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(Kq,Ob);var Zq=[-3,at,G$,{[Ft]:Ot,[Bt]:403},[Tt],[0]];kt.registerError(Zq,Mb);var eW=[-3,at,q$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(eW,Z1);var tW=[-3,at,W$,{[Ft]:Ot,[Bt]:429},[Tt],[0]];kt.registerError(tW,W1);var rW=[-3,at,J$,{[Ft]:Ot,[Bt]:401},[Tt],[0]];kt.registerError(rW,zb);var nW=[-3,at,tq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(nW,eb);var iW=[-3,at,eq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(iW,Ub);var aW=[-3,at,aq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(aW,pb);var sW=[-3,at,lq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(sW,Hb);var oW=[-3,at,uq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(oW,ob);var lW=[-3,at,Z$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(lW,Q1);var uW=[-3,at,rq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(uW,tb);var cW=[-3,at,K$,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(cW,lb);var fW=[-3,at,nq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(fW,gb);var dW=[-3,at,iq,{[Ft]:Ot,[Bt]:404},[Tt],[0]];kt.registerError(dW,J1);var hW=[-3,at,sq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(hW,mb);var pW=[-3,at,oq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(pW,_b);var gW=[-3,at,dq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(gW,xb);var mW=[-3,at,cq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(mW,Sb);var vW=[-3,at,fq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(vW,jb);var yW=[-3,at,hq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(yW,Eb);var AW=[-3,at,pq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(AW,kb);var bW=[-3,at,gq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(bW,Fb);var wW=[-3,at,mq,{[Ft]:Ot,[Bt]:400},[Tt],[0]];kt.registerError(wW,Tb);const CW=[SD,kt];var ED=[0,at,YG,8,0],lm=[0,at,H$,8,0],Xv=[0,at,Q$,8,0],kD=[3,at,jG,0,[zG],[0]],FD=[3,at,qG,0,[WG,s$,Y$,_$,S$,D$],[[()=>Xv,0],1,0,[()=>Xv,0],[()=>Xv,0],()=>EW]],xW=[3,at,d$,0,[HG,yD,GG,AD,mD,wD,om],[0,[()=>ED,0],[()=>TW,0],128,()=>kD,[()=>TD,0],[()=>lm,0]],2],SW=[3,at,h$,0,[$b,om,bD,vD,LG],[0,[()=>lm,0],128,[()=>FD,0],64]],EW=[3,at,P$,0,[t$,e$],[0,0]],kW=[3,at,L$,0,[yD,$b,om,KG,mD,wD,AD],[[()=>ED,0],0,[()=>lm,0],[()=>IW,0],()=>kD,[()=>TD,0],128],2],FW=[3,at,U$,0,[$b,om,bD,vD],[0,[()=>lm,0],128,[()=>FD,0]]],TD=[3,at,X$,8,[f$,a$],[0,0]],TW=[2,at,$G,8,0,0],IW=[2,at,ZG,8,0,0],DW=[9,at,p$,0,()=>xW,()=>SW],PW=[9,at,N$,0,()=>kW,()=>FW];const RW=r=>({apiVersion:"2016-04-18",base64Decoder:r?.base64Decoder??nm,base64Encoder:r?.base64Encoder??Eg,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??NG,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??jj,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new fj},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new vz}],logger:r?.logger??new eD,protocol:r?.protocol??FG,protocolSettings:r?.protocolSettings??{defaultNamespace:"com.amazonaws.cognitoidentityprovider",errorTypeRegistries:CW,xmlNamespace:"http://cognito-idp.amazonaws.com/doc/2016-04-18/",version:"2016-04-18",serviceTarget:"AWSCognitoIdentityProviderService"},serviceId:r?.serviceId??"Cognito Identity Provider",urlParser:r?.urlParser??dc,utf8Decoder:r?.utf8Decoder??Il,utf8Encoder:r?.utf8Encoder??im}),OW=r=>{const e=pG(r),t=()=>e().then(QH),n=RW(r);return{...n,...r,runtime:"browser",defaultsMode:e,bodyLengthChecker:r?.bodyLengthChecker??dG,credentialDefaultProvider:r?.credentialDefaultProvider??(i=>()=>Promise.reject(new Error("Credential is missing"))),defaultUserAgentProvider:r?.defaultUserAgentProvider??cG({serviceId:n.serviceId,clientVersion:Wj.version}),maxAttempts:r?.maxAttempts??ld,region:r?.region??fG("Region is missing"),requestHandler:P1.create(r?.requestHandler??t),retryMode:r?.retryMode??(async()=>(await t()).retryMode||LH),sha256:r?.sha256??uG,streamCollector:r?.streamCollector??TV,useDualstackEndpoint:r?.useDualstackEndpoint??(()=>Promise.resolve(vH)),useFipsEndpoint:r?.useFipsEndpoint??(()=>Promise.resolve(yH))}},BW=r=>({setRegion(e){r.region=e},region(){return r.region}}),MW=r=>({region:r.region()}),_W=r=>{const e=r.httpAuthSchemes;let t=r.httpAuthSchemeProvider,n=r.credentials;return{setHttpAuthScheme(i){const a=e.findIndex(s=>s.schemeId===i.schemeId);a===-1?e.push(i):e.splice(a,1,i)},httpAuthSchemes(){return e},setHttpAuthSchemeProvider(i){t=i},httpAuthSchemeProvider(){return t},setCredentials(i){n=i},credentials(){return n}}},NW=r=>({httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}),LW=(r,e)=>{const t=Object.assign(BW(r),ZH(r),tV(r),_W(r));return e.forEach(n=>n.configure(t)),Object.assign(r,MW(t),ej(t),rV(t),NW(t))};class UW extends qH{config;constructor(...[e]){const t=OW(e||{});super(t),this.initConfig=t;const n=$j(t),i=Sz(n),a=$H(i),s=wH(a),o=s,l=NH(o),u=Gj(l),c=LW(u,e?.extensions||[]);this.config=c,this.middlewareStack.use(UV(this.config)),this.middlewareStack.use(mH(this.config)),this.middlewareStack.use(lj(this.config)),this.middlewareStack.use(SH(this.config)),this.middlewareStack.use(sV(this.config)),this.middlewareStack.use(uV(this.config)),this.middlewareStack.use(dV(this.config)),this.middlewareStack.use(vV(this.config,{httpAuthSchemeParametersProvider:zj,identityProviderConfigProvider:async h=>new mz({"aws.auth#sigv4":h.credentials})})),this.middlewareStack.use(CV(this.config))}destroy(){super.destroy()}}class u2 extends N1.classBuilder().ep(lD).m(function(e,t,n,i){return[JI(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","InitiateAuth",{}).n("CognitoIdentityProviderClient","InitiateAuthCommand").sc(DW).build(){}class VW extends N1.classBuilder().ep(lD).m(function(e,t,n,i){return[JI(n,e.getEndpointParameterInstructions())]}).s("AWSCognitoIdentityProviderService","RespondToAuthChallenge",{}).n("CognitoIdentityProviderClient","RespondToAuthChallengeCommand").sc(PW).build(){}class zW{init(e,t,n){this.cognitoClient=new UW({region:t}),this.spiffRegion=e,this.userPoolClientId=n}async generateCode(e){const t=await this.cognitoClient?.send(new u2({AuthFlow:"CUSTOM_AUTH",ClientId:this.userPoolClientId,AuthParameters:{USERNAME:e}}));t?.ChallengeName==="CUSTOM_CHALLENGE"&&(this.challengeSession=t.Session)}async verifyCode(e,t,n){const i=await this.cognitoClient?.send(new VW({ClientId:this.userPoolClientId,ChallengeName:"CUSTOM_CHALLENGE",Session:this.challengeSession,ChallengeResponses:{USERNAME:e,ANSWER:t},ClientMetadata:{partnerId:n,environment:(this.spiffRegion||"").toLowerCase()}}));return i?.ChallengeName==="CUSTOM_CHALLENGE"&&(this.challengeSession=i.Session),i}async refreshTokens(){const e=localStorage.getItem("cognito-tokens");if(!e)throw new Error("Failed to find existing tokens.");const t=JSON.parse(e);return await this.cognitoClient?.send(new u2({AuthFlow:"REFRESH_TOKEN_AUTH",ClientId:this.userPoolClientId,AuthParameters:{REFRESH_TOKEN:t.RefreshToken||""}}))}}const _f=new zW;var HW={defaultAmount:0,defaultCurrency:"USD",defaultPrecision:2},jW={globalLocale:"en-US",globalFormat:"$0,0.00",globalRoundingMode:"HALF_EVEN",globalFormatRoundingMode:"HALF_AWAY_FROM_ZERO",globalExchangeRatesApi:{endpoint:void 0,headers:void 0,propertyPath:void 0}};function cd(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?cd=function(e){return typeof e}:cd=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cd(r)}function c2(r){return GW(r)||$W(r)||qW(r)||WW()}function GW(r){if(Array.isArray(r))return r}function $W(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function qW(r,e){if(r){if(typeof r=="string")return f2(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f2(r,e)}}function f2(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function WW(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2709
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var QW={normalizePrecision:function(e){var t=e.reduce(function(n,i){return Math.max(n.getPrecision(),i.getPrecision())});return e.map(function(n){return n.getPrecision()!==t?n.convertPrecision(t):n})},minimum:function(e){var t=c2(e),n=t[0],i=t.slice(1),a=n;return i.forEach(function(s){a=a.lessThan(s)?a:s}),a},maximum:function(e){var t=c2(e),n=t[0],i=t.slice(1),a=n;return i.forEach(function(s){a=a.greaterThan(s)?a:s}),a}};function ID(r){return!isNaN(parseInt(r))&&isFinite(r)}function YW(r){return ID(r)&&r<=100&&r>=0}function XW(r){return r.length>0&&r.every(function(e){return e>=0})&&r.some(function(e){return e>0})}function d2(r){return r%2===0}function h2(r){return ID(r)&&!Number.isInteger(r)}function JW(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=r.toString();if(e.indexOf("e-")>0)return parseInt(e.split("e-")[1]);var t=e.split(".")[1];return t?t.length:0}function Nf(r){return Math.abs(r)%1===.5}function KW(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return new Promise(function(t,n){var i=Object.assign(new XMLHttpRequest,{onreadystatechange:function(){i.readyState===4&&(i.status>=200&&i.status<400?t(JSON.parse(i.responseText)):n(new Error(i.statusText)))},onerror:function(){n(new Error("Network error"))}});i.open("GET",r,!0),ZW(i,e.headers),i.send()})}function ZW(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};for(var t in e)r.setRequestHeader(t,e[t]);return r}function Jf(r){return typeof r>"u"}function DD(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:".",t={};return Object.entries(r).forEach(function(n){if(cd(n[1])==="object"){var i=DD(n[1]);Object.entries(i).forEach(function(a){t[n[0]+e+a[0]]=a[1]})}else t[n[0]]=n[1]}),t}function eQ(r){return!!r&&(cd(r)==="object"||typeof r=="function")&&typeof r.then=="function"}function PD(){var r=function(n,i){var a=function(l){return Math.pow(10,JW(l))},s=Math.max(a(n),a(i));return Math.round(n*s)*Math.round(i*s)/(s*s)},e={HALF_ODD:function(n){var i=Math.round(n);return Nf(n)&&d2(i)?i-1:i},HALF_EVEN:function(n){var i=Math.round(n);return Nf(n)?d2(i)?i:i-1:i},HALF_UP:function(n){return Math.round(n)},HALF_DOWN:function(n){return Nf(n)?Math.floor(n):Math.round(n)},HALF_TOWARDS_ZERO:function(n){return Nf(n)?Math.sign(n)*Math.floor(Math.abs(n)):Math.round(n)},HALF_AWAY_FROM_ZERO:function(n){return Nf(n)?Math.sign(n)*Math.ceil(Math.abs(n)):Math.round(n)},DOWN:function(n){return Math.floor(n)}};return{add:function(n,i){return n+i},subtract:function(n,i){return n-i},multiply:function(n,i){return h2(n)||h2(i)?r(n,i):n*i},divide:function(n,i){return n/i},modulo:function(n,i){return n%i},round:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"HALF_EVEN";return e[i](n)}}}var tQ=PD();function rQ(r){var e=/^(?:(\$|USD)?0(?:(,)0)?(\.)?(0+)?|0(?:(,)0)?(\.)?(0+)?\s?(dollar)?)$/gm.exec(r);return{getMatches:function(){return e!==null?e.slice(1).filter(function(n){return!Jf(n)}):[]},getMinimumFractionDigits:function(){var n=function(a){return a==="."};return Jf(this.getMatches().find(n))?0:this.getMatches()[tQ.add(this.getMatches().findIndex(n),1)].split("").length},getCurrencyDisplay:function(){var n={USD:"code",dollar:"name",$:"symbol"};return n[this.getMatches().find(function(i){return i==="USD"||i==="dollar"||i==="$"})]},getStyle:function(){return Jf(this.getCurrencyDisplay(this.getMatches()))?"decimal":"currency"},getUseGrouping:function(){return!Jf(this.getMatches().find(function(n){return n===","}))}}}function nQ(r){var e=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;for(var s in a)i=i.replace("{{".concat(s,"}}"),a[s]);return i},t=function(i,a){return KW(e(r.endpoint,{from:i,to:a}),{headers:r.headers})};return{getExchangeRate:function(i,a){return(eQ(r.endpoint)?r.endpoint:t(i,a)).then(function(s){return DD(s)[e(r.propertyPath,{from:i,to:a})]})}}}function Ld(r,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Error;if(!r)throw new t(e)}function iQ(r){Ld(YW(r),"You must provide a numeric value between 0 and 100.",RangeError)}function aQ(r){Ld(XW(r),"You must provide a non-empty array of numeric values greater than 0.",TypeError)}function Jv(r){Ld(Number.isInteger(r),"You must provide an integer.",TypeError)}var En=PD(),sQ=function r(e){var t=Object.assign({},{amount:r.defaultAmount,currency:r.defaultCurrency,precision:r.defaultPrecision},e),n=t.amount,i=t.currency,a=t.precision;Jv(n),Jv(a);var s=r.globalLocale,o=r.globalFormat,l=r.globalRoundingMode,u=r.globalFormatRoundingMode,c=Object.assign({},r.globalExchangeRatesApi),h=function(g){var v=Object.assign({},Object.assign({},{amount:n,currency:i,precision:a},g),Object.assign({},{locale:this.locale},g));return Object.assign(r({amount:v.amount,currency:v.currency,precision:v.precision}),{locale:v.locale})},f=function(g){Ld(this.hasSameCurrency(g),"You must provide a Dinero instance with the same currency.",TypeError)};return{getAmount:function(){return n},getCurrency:function(){return i},getLocale:function(){return this.locale||s},setLocale:function(g){return h.call(this,{locale:g})},getPrecision:function(){return a},convertPrecision:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u;Jv(g);var y=this.getPrecision(),A=g>y,C=A?En.multiply:En.divide,k=A?[g,y]:[y,g],T=Math.pow(10,En.subtract.apply(En,k));return h.call(this,{amount:En.round(C(this.getAmount(),T),v),precision:g})},add:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return h.call(this,{amount:En.add(v[0].getAmount(),v[1].getAmount()),precision:v[0].getPrecision()})},subtract:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return h.call(this,{amount:En.subtract(v[0].getAmount(),v[1].getAmount()),precision:v[0].getPrecision()})},multiply:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return h.call(this,{amount:En.round(En.multiply(this.getAmount(),g),v)})},divide:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return h.call(this,{amount:En.round(En.divide(this.getAmount(),g),v)})},percentage:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l;return iQ(g),this.multiply(En.divide(g,100),v)},allocate:function(g){var v=this;aQ(g);for(var y=g.reduce(function(T,S){return En.add(T,S)}),A=this.getAmount(),C=g.map(function(T){var S=Math.floor(En.divide(En.multiply(v.getAmount(),T),y));return A=En.subtract(A,S),h.call(v,{amount:S})}),k=0;A>0;)g[k]>0&&(C[k]=C[k].add(h.call(this,{amount:1})),A=En.subtract(A,1)),k+=1;return C},convert:function(g){var v=this,y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},A=y.endpoint,C=A===void 0?c.endpoint:A,k=y.propertyPath,T=k===void 0?c.propertyPath||"rates.{{to}}":k,S=y.headers,R=S===void 0?c.headers:S,B=y.roundingMode,G=B===void 0?l:B,$=Object.assign({},{endpoint:C,propertyPath:T,headers:R,roundingMode:G});return nQ($).getExchangeRate(this.getCurrency(),g).then(function(Y){return Ld(!Jf(Y),'No rate was found for the destination currency "'.concat(g,'".'),TypeError),h.call(v,{amount:En.round(En.multiply(v.getAmount(),parseFloat(Y)),$.roundingMode),currency:g})})},equalsTo:function(g){return this.hasSameAmount(g)&&this.hasSameCurrency(g)},lessThan:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()<v[1].getAmount()},lessThanOrEqual:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()<=v[1].getAmount()},greaterThan:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()>v[1].getAmount()},greaterThanOrEqual:function(g){f.call(this,g);var v=r.normalizePrecision([this,g]);return v[0].getAmount()>=v[1].getAmount()},isZero:function(){return this.getAmount()===0},isPositive:function(){return this.getAmount()>=0},isNegative:function(){return this.getAmount()<0},hasSubUnits:function(){return En.modulo(this.getAmount(),Math.pow(10,a))!==0},hasCents:function(){return En.modulo(this.getAmount(),Math.pow(10,a))!==0},hasSameCurrency:function(g){return this.getCurrency()===g.getCurrency()},hasSameAmount:function(g){var v=r.normalizePrecision([this,g]);return v[0].getAmount()===v[1].getAmount()},toFormat:function(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:o,v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,y=rQ(g);return this.toRoundedUnit(y.getMinimumFractionDigits(),v).toLocaleString(this.getLocale(),{currencyDisplay:y.getCurrencyDisplay(),useGrouping:y.getUseGrouping(),minimumFractionDigits:y.getMinimumFractionDigits(),style:y.getStyle(),currency:this.getCurrency()})},toUnit:function(){return En.divide(this.getAmount(),Math.pow(10,a))},toRoundedUnit:function(g){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,y=Math.pow(10,g);return En.divide(En.round(En.multiply(this.toUnit(),y),v),y)},toObject:function(){return{amount:n,currency:i,precision:a}},toJSON:function(){return this.toObject()}}},oQ=Object.assign(sQ,HW,jW,QW),Ka={},Kv,p2;function lQ(){if(p2)return Kv;p2=1;function r(t){return t}function e(t,a,s){for(var a=a||r,s=s||t,o=0,l=t.length;o<l;o+=1)if(a.call(s,t[o],o))return t[o]}return Kv=e,Kv}var Zv={exports:{}},g2;function uQ(){if(g2)return Zv.exports;g2=1;var r=Zv.exports=function(e,t){if(typeof e=="function"||t)return r.by(e,t);for(var n={object:[],function:[],string:{},number:{},boolean:{},undefined:{}},i=[],a=0;a<e.length;a++){var s=e[a],o=s==="__proto__"?n.objects:n[typeof s]||n.objects;Array.isArray(o)?o.indexOf(s)<0&&(o.push(s),i.push(s)):Object.hasOwnProperty.call(o,s)||(o[s]=!0,i.push(s))}return i};return r.by=function(e,t){if(typeof e=="function"){var n=t;t=e,e=n}for(var i=[],a=0;a<e.length;a++){for(var s=e[a],o=!1,l=0;l<i.length;l++){var u=i[l];if(t.call(i,s,u)){o=!0;break}}o||i.push(s)}return i},Zv.exports}var ey,m2;function cQ(){return m2||(m2=1,ey=[{code:"AED",number:"784",digits:2,currency:"UAE Dirham",countries:["United Arab Emirates (The)"]},{code:"AFN",number:"971",digits:2,currency:"Afghani",countries:["Afghanistan"]},{code:"ALL",number:"008",digits:2,currency:"Lek",countries:["Albania"]},{code:"AMD",number:"051",digits:2,currency:"Armenian Dram",countries:["Armenia"]},{code:"ANG",number:"532",digits:2,currency:"Netherlands Antillean Guilder",countries:["Curaçao","Sint Maarten (Dutch Part)"]},{code:"AOA",number:"973",digits:2,currency:"Kwanza",countries:["Angola"]},{code:"ARS",number:"032",digits:2,currency:"Argentine Peso",countries:["Argentina"]},{code:"AUD",number:"036",digits:2,currency:"Australian Dollar",countries:["Australia","Christmas Island","Cocos (Keeling) Islands (The)","Heard Island and Mcdonald Islands","Kiribati","Nauru","Norfolk Island","Tuvalu"]},{code:"AWG",number:"533",digits:2,currency:"Aruban Florin",countries:["Aruba"]},{code:"AZN",number:"944",digits:2,currency:"Azerbaijan Manat",countries:["Azerbaijan"]},{code:"BAM",number:"977",digits:2,currency:"Convertible Mark",countries:["Bosnia and Herzegovina"]},{code:"BBD",number:"052",digits:2,currency:"Barbados Dollar",countries:["Barbados"]},{code:"BDT",number:"050",digits:2,currency:"Taka",countries:["Bangladesh"]},{code:"BGN",number:"975",digits:2,currency:"Bulgarian Lev",countries:["Bulgaria"]},{code:"BHD",number:"048",digits:3,currency:"Bahraini Dinar",countries:["Bahrain"]},{code:"BIF",number:"108",digits:0,currency:"Burundi Franc",countries:["Burundi"]},{code:"BMD",number:"060",digits:2,currency:"Bermudian Dollar",countries:["Bermuda"]},{code:"BND",number:"096",digits:2,currency:"Brunei Dollar",countries:["Brunei Darussalam"]},{code:"BOB",number:"068",digits:2,currency:"Boliviano",countries:["Bolivia (Plurinational State Of)"]},{code:"BOV",number:"984",digits:2,currency:"Mvdol",countries:["Bolivia (Plurinational State Of)"]},{code:"BRL",number:"986",digits:2,currency:"Brazilian Real",countries:["Brazil"]},{code:"BSD",number:"044",digits:2,currency:"Bahamian Dollar",countries:["Bahamas (The)"]},{code:"BTN",number:"064",digits:2,currency:"Ngultrum",countries:["Bhutan"]},{code:"BWP",number:"072",digits:2,currency:"Pula",countries:["Botswana"]},{code:"BYN",number:"933",digits:2,currency:"Belarusian Ruble",countries:["Belarus"]},{code:"BZD",number:"084",digits:2,currency:"Belize Dollar",countries:["Belize"]},{code:"CAD",number:"124",digits:2,currency:"Canadian Dollar",countries:["Canada"]},{code:"CDF",number:"976",digits:2,currency:"Congolese Franc",countries:["Congo (The Democratic Republic of The)"]},{code:"CHE",number:"947",digits:2,currency:"WIR Euro",countries:["Switzerland"]},{code:"CHF",number:"756",digits:2,currency:"Swiss Franc",countries:["Liechtenstein","Switzerland"]},{code:"CHW",number:"948",digits:2,currency:"WIR Franc",countries:["Switzerland"]},{code:"CLF",number:"990",digits:4,currency:"Unidad de Fomento",countries:["Chile"]},{code:"CLP",number:"152",digits:0,currency:"Chilean Peso",countries:["Chile"]},{code:"CNY",number:"156",digits:2,currency:"Yuan Renminbi",countries:["China"]},{code:"COP",number:"170",digits:2,currency:"Colombian Peso",countries:["Colombia"]},{code:"COU",number:"970",digits:2,currency:"Unidad de Valor Real",countries:["Colombia"]},{code:"CRC",number:"188",digits:2,currency:"Costa Rican Colon",countries:["Costa Rica"]},{code:"CUC",number:"931",digits:2,currency:"Peso Convertible",countries:["Cuba"]},{code:"CUP",number:"192",digits:2,currency:"Cuban Peso",countries:["Cuba"]},{code:"CVE",number:"132",digits:2,currency:"Cabo Verde Escudo",countries:["Cabo Verde"]},{code:"CZK",number:"203",digits:2,currency:"Czech Koruna",countries:["Czechia"]},{code:"DJF",number:"262",digits:0,currency:"Djibouti Franc",countries:["Djibouti"]},{code:"DKK",number:"208",digits:2,currency:"Danish Krone",countries:["Denmark","Faroe Islands (The)","Greenland"]},{code:"DOP",number:"214",digits:2,currency:"Dominican Peso",countries:["Dominican Republic (The)"]},{code:"DZD",number:"012",digits:2,currency:"Algerian Dinar",countries:["Algeria"]},{code:"EGP",number:"818",digits:2,currency:"Egyptian Pound",countries:["Egypt"]},{code:"ERN",number:"232",digits:2,currency:"Nakfa",countries:["Eritrea"]},{code:"ETB",number:"230",digits:2,currency:"Ethiopian Birr",countries:["Ethiopia"]},{code:"EUR",number:"978",digits:2,currency:"Euro",countries:["Åland Islands","Andorra","Austria","Belgium","Croatia","Cyprus","Estonia","European Union","Finland","France","French Guiana","French Southern Territories (The)","Germany","Greece","Guadeloupe","Holy See (The)","Ireland","Italy","Latvia","Lithuania","Luxembourg","Malta","Martinique","Mayotte","Monaco","Montenegro","Netherlands (The)","Portugal","Réunion","Saint Barthélemy","Saint Martin (French Part)","Saint Pierre and Miquelon","San Marino","Slovakia","Slovenia","Spain"]},{code:"FJD",number:"242",digits:2,currency:"Fiji Dollar",countries:["Fiji"]},{code:"FKP",number:"238",digits:2,currency:"Falkland Islands Pound",countries:["Falkland Islands (The) [Malvinas]"]},{code:"GBP",number:"826",digits:2,currency:"Pound Sterling",countries:["Guernsey","Isle of Man","Jersey","United Kingdom of Great Britain and Northern Ireland (The)"]},{code:"GEL",number:"981",digits:2,currency:"Lari",countries:["Georgia"]},{code:"GHS",number:"936",digits:2,currency:"Ghana Cedi",countries:["Ghana"]},{code:"GIP",number:"292",digits:2,currency:"Gibraltar Pound",countries:["Gibraltar"]},{code:"GMD",number:"270",digits:2,currency:"Dalasi",countries:["Gambia (The)"]},{code:"GNF",number:"324",digits:0,currency:"Guinean Franc",countries:["Guinea"]},{code:"GTQ",number:"320",digits:2,currency:"Quetzal",countries:["Guatemala"]},{code:"GYD",number:"328",digits:2,currency:"Guyana Dollar",countries:["Guyana"]},{code:"HKD",number:"344",digits:2,currency:"Hong Kong Dollar",countries:["Hong Kong"]},{code:"HNL",number:"340",digits:2,currency:"Lempira",countries:["Honduras"]},{code:"HTG",number:"332",digits:2,currency:"Gourde",countries:["Haiti"]},{code:"HUF",number:"348",digits:2,currency:"Forint",countries:["Hungary"]},{code:"IDR",number:"360",digits:2,currency:"Rupiah",countries:["Indonesia"]},{code:"ILS",number:"376",digits:2,currency:"New Israeli Sheqel",countries:["Israel"]},{code:"INR",number:"356",digits:2,currency:"Indian Rupee",countries:["Bhutan","India"]},{code:"IQD",number:"368",digits:3,currency:"Iraqi Dinar",countries:["Iraq"]},{code:"IRR",number:"364",digits:2,currency:"Iranian Rial",countries:["Iran (Islamic Republic Of)"]},{code:"ISK",number:"352",digits:0,currency:"Iceland Krona",countries:["Iceland"]},{code:"JMD",number:"388",digits:2,currency:"Jamaican Dollar",countries:["Jamaica"]},{code:"JOD",number:"400",digits:3,currency:"Jordanian Dinar",countries:["Jordan"]},{code:"JPY",number:"392",digits:0,currency:"Yen",countries:["Japan"]},{code:"KES",number:"404",digits:2,currency:"Kenyan Shilling",countries:["Kenya"]},{code:"KGS",number:"417",digits:2,currency:"Som",countries:["Kyrgyzstan"]},{code:"KHR",number:"116",digits:2,currency:"Riel",countries:["Cambodia"]},{code:"KMF",number:"174",digits:0,currency:"Comorian Franc ",countries:["Comoros (The)"]},{code:"KPW",number:"408",digits:2,currency:"North Korean Won",countries:["Korea (The Democratic People’s Republic Of)"]},{code:"KRW",number:"410",digits:0,currency:"Won",countries:["Korea (The Republic Of)"]},{code:"KWD",number:"414",digits:3,currency:"Kuwaiti Dinar",countries:["Kuwait"]},{code:"KYD",number:"136",digits:2,currency:"Cayman Islands Dollar",countries:["Cayman Islands (The)"]},{code:"KZT",number:"398",digits:2,currency:"Tenge",countries:["Kazakhstan"]},{code:"LAK",number:"418",digits:2,currency:"Lao Kip",countries:["Lao People’s Democratic Republic (The)"]},{code:"LBP",number:"422",digits:2,currency:"Lebanese Pound",countries:["Lebanon"]},{code:"LKR",number:"144",digits:2,currency:"Sri Lanka Rupee",countries:["Sri Lanka"]},{code:"LRD",number:"430",digits:2,currency:"Liberian Dollar",countries:["Liberia"]},{code:"LSL",number:"426",digits:2,currency:"Loti",countries:["Lesotho"]},{code:"LYD",number:"434",digits:3,currency:"Libyan Dinar",countries:["Libya"]},{code:"MAD",number:"504",digits:2,currency:"Moroccan Dirham",countries:["Morocco","Western Sahara"]},{code:"MDL",number:"498",digits:2,currency:"Moldovan Leu",countries:["Moldova (The Republic Of)"]},{code:"MGA",number:"969",digits:2,currency:"Malagasy Ariary",countries:["Madagascar"]},{code:"MKD",number:"807",digits:2,currency:"Denar",countries:["North Macedonia"]},{code:"MMK",number:"104",digits:2,currency:"Kyat",countries:["Myanmar"]},{code:"MNT",number:"496",digits:2,currency:"Tugrik",countries:["Mongolia"]},{code:"MOP",number:"446",digits:2,currency:"Pataca",countries:["Macao"]},{code:"MRU",number:"929",digits:2,currency:"Ouguiya",countries:["Mauritania"]},{code:"MUR",number:"480",digits:2,currency:"Mauritius Rupee",countries:["Mauritius"]},{code:"MVR",number:"462",digits:2,currency:"Rufiyaa",countries:["Maldives"]},{code:"MWK",number:"454",digits:2,currency:"Malawi Kwacha",countries:["Malawi"]},{code:"MXN",number:"484",digits:2,currency:"Mexican Peso",countries:["Mexico"]},{code:"MXV",number:"979",digits:2,currency:"Mexican Unidad de Inversion (UDI)",countries:["Mexico"]},{code:"MYR",number:"458",digits:2,currency:"Malaysian Ringgit",countries:["Malaysia"]},{code:"MZN",number:"943",digits:2,currency:"Mozambique Metical",countries:["Mozambique"]},{code:"NAD",number:"516",digits:2,currency:"Namibia Dollar",countries:["Namibia"]},{code:"NGN",number:"566",digits:2,currency:"Naira",countries:["Nigeria"]},{code:"NIO",number:"558",digits:2,currency:"Cordoba Oro",countries:["Nicaragua"]},{code:"NOK",number:"578",digits:2,currency:"Norwegian Krone",countries:["Bouvet Island","Norway","Svalbard and Jan Mayen"]},{code:"NPR",number:"524",digits:2,currency:"Nepalese Rupee",countries:["Nepal"]},{code:"NZD",number:"554",digits:2,currency:"New Zealand Dollar",countries:["Cook Islands (The)","New Zealand","Niue","Pitcairn","Tokelau"]},{code:"OMR",number:"512",digits:3,currency:"Rial Omani",countries:["Oman"]},{code:"PAB",number:"590",digits:2,currency:"Balboa",countries:["Panama"]},{code:"PEN",number:"604",digits:2,currency:"Sol",countries:["Peru"]},{code:"PGK",number:"598",digits:2,currency:"Kina",countries:["Papua New Guinea"]},{code:"PHP",number:"608",digits:2,currency:"Philippine Peso",countries:["Philippines (The)"]},{code:"PKR",number:"586",digits:2,currency:"Pakistan Rupee",countries:["Pakistan"]},{code:"PLN",number:"985",digits:2,currency:"Zloty",countries:["Poland"]},{code:"PYG",number:"600",digits:0,currency:"Guarani",countries:["Paraguay"]},{code:"QAR",number:"634",digits:2,currency:"Qatari Rial",countries:["Qatar"]},{code:"RON",number:"946",digits:2,currency:"Romanian Leu",countries:["Romania"]},{code:"RSD",number:"941",digits:2,currency:"Serbian Dinar",countries:["Serbia"]},{code:"RUB",number:"643",digits:2,currency:"Russian Ruble",countries:["Russian Federation (The)"]},{code:"RWF",number:"646",digits:0,currency:"Rwanda Franc",countries:["Rwanda"]},{code:"SAR",number:"682",digits:2,currency:"Saudi Riyal",countries:["Saudi Arabia"]},{code:"SBD",number:"090",digits:2,currency:"Solomon Islands Dollar",countries:["Solomon Islands"]},{code:"SCR",number:"690",digits:2,currency:"Seychelles Rupee",countries:["Seychelles"]},{code:"SDG",number:"938",digits:2,currency:"Sudanese Pound",countries:["Sudan (The)"]},{code:"SEK",number:"752",digits:2,currency:"Swedish Krona",countries:["Sweden"]},{code:"SGD",number:"702",digits:2,currency:"Singapore Dollar",countries:["Singapore"]},{code:"SHP",number:"654",digits:2,currency:"Saint Helena Pound",countries:["Saint Helena, Ascension and Tristan Da Cunha"]},{code:"SLE",number:"925",digits:2,currency:"Leone",countries:["Sierra Leone"]},{code:"SOS",number:"706",digits:2,currency:"Somali Shilling",countries:["Somalia"]},{code:"SRD",number:"968",digits:2,currency:"Surinam Dollar",countries:["Suriname"]},{code:"SSP",number:"728",digits:2,currency:"South Sudanese Pound",countries:["South Sudan"]},{code:"STN",number:"930",digits:2,currency:"Dobra",countries:["Sao Tome and Principe"]},{code:"SVC",number:"222",digits:2,currency:"El Salvador Colon",countries:["El Salvador"]},{code:"SYP",number:"760",digits:2,currency:"Syrian Pound",countries:["Syrian Arab Republic"]},{code:"SZL",number:"748",digits:2,currency:"Lilangeni",countries:["Eswatini"]},{code:"THB",number:"764",digits:2,currency:"Baht",countries:["Thailand"]},{code:"TJS",number:"972",digits:2,currency:"Somoni",countries:["Tajikistan"]},{code:"TMT",number:"934",digits:2,currency:"Turkmenistan New Manat",countries:["Turkmenistan"]},{code:"TND",number:"788",digits:3,currency:"Tunisian Dinar",countries:["Tunisia"]},{code:"TOP",number:"776",digits:2,currency:"Pa’anga",countries:["Tonga"]},{code:"TRY",number:"949",digits:2,currency:"Turkish Lira",countries:["Türki̇ye"]},{code:"TTD",number:"780",digits:2,currency:"Trinidad and Tobago Dollar",countries:["Trinidad and Tobago"]},{code:"TWD",number:"901",digits:2,currency:"New Taiwan Dollar",countries:["Taiwan (Province of China)"]},{code:"TZS",number:"834",digits:2,currency:"Tanzanian Shilling",countries:["Tanzania, United Republic Of"]},{code:"UAH",number:"980",digits:2,currency:"Hryvnia",countries:["Ukraine"]},{code:"UGX",number:"800",digits:0,currency:"Uganda Shilling",countries:["Uganda"]},{code:"USD",number:"840",digits:2,currency:"US Dollar",countries:["American Samoa","Bonaire, Sint Eustatius and Saba","British Indian Ocean Territory (The)","Ecuador","El Salvador","Guam","Haiti","Marshall Islands (The)","Micronesia (Federated States Of)","Northern Mariana Islands (The)","Palau","Panama","Puerto Rico","Timor-Leste","Turks and Caicos Islands (The)","United States Minor Outlying Islands (The)","United States of America (The)","Virgin Islands (British)","Virgin Islands (u.s.)"]},{code:"USN",number:"997",digits:2,currency:"US Dollar (Next day)",countries:["United States of America (The)"]},{code:"UYI",number:"940",digits:0,currency:"Uruguay Peso en Unidades Indexadas (UI)",countries:["Uruguay"]},{code:"UYU",number:"858",digits:2,currency:"Peso Uruguayo",countries:["Uruguay"]},{code:"UYW",number:"927",digits:4,currency:"Unidad Previsional",countries:["Uruguay"]},{code:"UZS",number:"860",digits:2,currency:"Uzbekistan Sum",countries:["Uzbekistan"]},{code:"VED",number:"926",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VES",number:"928",digits:2,currency:"Bolívar Soberano",countries:["Venezuela (Bolivarian Republic Of)"]},{code:"VND",number:"704",digits:0,currency:"Dong",countries:["Viet Nam"]},{code:"VUV",number:"548",digits:0,currency:"Vatu",countries:["Vanuatu"]},{code:"WST",number:"882",digits:2,currency:"Tala",countries:["Samoa"]},{code:"XAF",number:"950",digits:0,currency:"CFA Franc BEAC",countries:["Cameroon","Central African Republic (The)","Chad","Congo (The)","Equatorial Guinea","Gabon"]},{code:"XAG",number:"961",digits:0,currency:"Silver",countries:["Zz11_silver"]},{code:"XAU",number:"959",digits:0,currency:"Gold",countries:["Zz08_gold"]},{code:"XBA",number:"955",digits:0,currency:"Bond Markets Unit European Composite Unit (EURCO)",countries:["Zz01_bond Markets Unit European_eurco"]},{code:"XBB",number:"956",digits:0,currency:"Bond Markets Unit European Monetary Unit (E.M.U.-6)",countries:["Zz02_bond Markets Unit European_emu-6"]},{code:"XBC",number:"957",digits:0,currency:"Bond Markets Unit European Unit of Account 9 (E.U.A.-9)",countries:["Zz03_bond Markets Unit European_eua-9"]},{code:"XBD",number:"958",digits:0,currency:"Bond Markets Unit European Unit of Account 17 (E.U.A.-17)",countries:["Zz04_bond Markets Unit European_eua-17"]},{code:"XCD",number:"951",digits:2,currency:"East Caribbean Dollar",countries:["Anguilla","Antigua and Barbuda","Dominica","Grenada","Montserrat","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines"]},{code:"XDR",number:"960",digits:0,currency:"SDR (Special Drawing Right)",countries:["International Monetary Fund (Imf) "]},{code:"XOF",number:"952",digits:0,currency:"CFA Franc BCEAO",countries:["Benin","Burkina Faso","Côte D'ivoire","Guinea-Bissau","Mali","Niger (The)","Senegal","Togo"]},{code:"XPD",number:"964",digits:0,currency:"Palladium",countries:["Zz09_palladium"]},{code:"XPF",number:"953",digits:0,currency:"CFP Franc",countries:["French Polynesia","New Caledonia","Wallis and Futuna"]},{code:"XPT",number:"962",digits:0,currency:"Platinum",countries:["Zz10_platinum"]},{code:"XSU",number:"994",digits:0,currency:"Sucre",countries:['Sistema Unitario De Compensacion Regional De Pagos "Sucre"']},{code:"XTS",number:"963",digits:0,currency:"Codes specifically reserved for testing purposes",countries:["Zz06_testing_code"]},{code:"XUA",number:"965",digits:0,currency:"ADB Unit of Account",countries:["Member Countries of the African Development Bank Group"]},{code:"XXX",number:"999",digits:0,currency:"The codes assigned for transactions where no currency is involved",countries:["Zz07_no_currency"]},{code:"YER",number:"886",digits:2,currency:"Yemeni Rial",countries:["Yemen"]},{code:"ZAR",number:"710",digits:2,currency:"Rand",countries:["Lesotho","Namibia","South Africa"]},{code:"ZMW",number:"967",digits:2,currency:"Zambian Kwacha",countries:["Zambia"]},{code:"ZWG",number:"924",digits:2,currency:"Zimbabwe Gold",countries:["Zimbabwe"]}]),ey}var ty,v2;function fQ(){return v2||(v2=1,ty="2024-06-25"),ty}var y2;function dQ(){if(y2)return Ka;y2=1;var r=lQ(),e=uQ(),t=cQ(),n=fQ(),i=function(c){return c=c.toUpperCase(),r(t,function(h){return h.code===c})},a=function(c){return c=c.toLowerCase(),t.filter(function(h){return(h.countries.map(function(f){return f.toLowerCase()})||[]).indexOf(c)>-1})},s=function(c){return r(t,function(h){return h.number===String(c)})},o=function(){return t.map(function(c){return c.code})},l=function(){var c=t.map(function(h){return h.number});return c.filter(function(h){if(h)return h})},u=function(){var c=t.filter(function(h){return h.countries}).map(function(h){return h.countries});return e(Array.prototype.concat.apply([],c))};return Ka.code=i,Ka.country=a,Ka.number=s,Ka.codes=o,Ka.numbers=l,Ka.countries=u,Ka.publishDate=n,Ka.data=t,Ka}var A2=dQ();class RD{formatCurrencyForDisplay(e,t){const n={amount:t||0,currency:e,precision:this.getPrecisionForCurrency(e)};return oQ(n).toFormat(this.getSpecialFormat(e))}getPrecisionForCurrency(e){const t=e,n=A2.code(t);return n?n.digits:2}getSpecialFormat(e){const t=e;if(A2.code(t)?.code==="CLP")return"USD0,0"}}const b2=new RD;class OD{constructor(e,t,n,i){this.presentmentCurrency=void 0,this.presentmentCurrency=i,this.partnerCurrency=n,this.rateFrom=e,this.rateTo=t}code(){return this.presentmentCurrency?this.presentmentCurrency:this.partnerCurrency}conversionRequired(){return this.presentmentCurrency!==void 0&&this.code()!==this.partnerCurrency}getConvertedSubunits(e){return this.conversionRequired()?Math.ceil(this.subunits(this.units(e,this.partnerCurrency)/this.rateFrom*this.rateTo,this.code())):e}units(e,t){return e/Math.pow(10,b2.getPrecisionForCurrency(t))}subunits(e,t){return e*Math.pow(10,b2.getPrecisionForCurrency(t))}}const hQ=async(r,e)=>{const t=await $e.getShadowGraphqlClient().query({query:N3(e?.assets?.metadata||!1),errorPolicy:"all",variables:{ids:r}});if(t.error)throw t.error;if(t.errors)throw t.errors.forEach(i=>console.error(i)),new Error("Unable to read workflows. Consult GraphQL errors.");if(t.data.workflows===void 0||t.data.workflows.length!==r.length)throw new Error(`Unable to read workflows: ${t.errors??"Length mismatch in response"}`);const n=vo(t.data.workflows);return n.forEach(i=>{i.finalizeStepConfig||(i.finalizeStepConfig={}),i.finalizeStepConfig.termsMarkdown=i.finalizeStepConfig.termsMarkdown||i.partner.termsMarkdown}),n},pQ=async(r,e)=>{const n=(await e).find(i=>i.id===r);if(!n)throw new Error(`Workflow not found: ${r}`);return n},qb=async(r,e)=>{const t=r.map(o=>Cd.get({id:o,options:e})),n=r.filter((o,l)=>t[l]===void 0);if(n.length===0)return Promise.all(t);const i=hQ(n,e),a=n.map(o=>Cd.set({id:o,options:e},pQ(o,i))),s=t.filter(o=>o!==void 0);return await Promise.all(s.concat(a))},BD=async(r,e)=>(await qb([r],e))[0],gQ=async r=>{const e=await $e.getShadowGraphqlClient().query({query:pF,variables:{ids:r},errorPolicy:"all",fetchPolicy:"no-cache"});return e.errors&&console.error(e.errors),e.data.integrationProducts||[]};class mQ{constructor(e){this.activeIntegration=void 0,this.updateTransactionState=async t=>{try{return $e.getShadowGraphqlClient().mutate({...t,mutation:C3})}catch(n){throw console.error(n),new uo("Critical - Unable to synchronize workflow state with server.")}},this.options=e,this.options.applicationKey&&HO(this.options.applicationKey),console.debug("------------------------"),console.debug("Spiff Commerce Core SDK"),console.debug("Version: 40.3.19"),console.debug(`Application Key Provided: ${!!this.options.applicationKey}`),console.debug("------------------------")}configure(e){_s.setHubUrl(e.hubUrl),_s.setServerUrl(e.serverUrl),_s.setServicesApiUrl(e.servicesApiUrl),this.marketplaceThemeInstallId=e.marketplaceThemeInstallId,this.marketplaceThemeInstallConfigurationId=e.marketplaceThemeInstallConfigurationId,this.userPoolClientId=e.userPoolClientId,this.userPoolRegion=e.userPoolRegion,this.spiffRegion=e.spiffRegion,e.bearerAuthenticationToken&&$k(e.bearerAuthenticationToken),this.options.applicationKey&&this.getIntegration(),this.spiffRegion&&this.userPoolRegion&&this.userPoolClientId&&_f.init(this.spiffRegion,this.userPoolRegion,this.userPoolClientId)}getAssetManager(){return Qn}async getBetaEnabled(){return this.options.enableBetaFeatures?!0:(await this.getIntegration()).partner.beta===!0}getFlowService(){if(!jO())throw new Error("Application key required to use Flow Service.");return new kI}async getCurrencyContext(e){const n=(await this.getIntegration()).partner.currencyCode,a=await $e.getShadowGraphqlClient().query({query:j3,errorPolicy:"all",fetchPolicy:"cache-first",variables:{from:n,to:e}}),{rateFrom:s,rateTo:o}=a.data.currencyConversion;return new OD(s,o,n,e)}async getIntegration(){if(this.activeIntegration)return this.activeIntegration;if(!this.options.applicationKey)throw new Error("Cannot get current Integration without specifying an Application Key.");return this.activeIntegration=MD(this.options.applicationKey),this.activeIntegration}async canUseAddon(e){try{return(await this.getIntegration()).partner.activeAddons?.includes(e)??!1}catch(t){return console.error(t),!1}}clearCustomer(){this.customer=void 0}clearCustomerForTransaction(e){const t=xr.getMap("transactionCustomerIds");t?.has(e)&&(t.delete(e),xr.setMap("transactionCustomerIds",t))}async customerHasBundleTemplates(e){const i=(await $e.getShadowGraphqlClient().query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:e}})).data.customer;return i.id?i.hasBundleTemplates??!1:!1}getStakeholderTypeForTransaction(e){const t=this.customer?.stakeholders?.find(n=>n.transaction?.id===e);if(t)return t.type}async getOrCreateCustomer(e){this.customer=void 0;const t=$e.getShadowGraphqlClient(),i=(await t.query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:e}})).data.customer;if(!i.id){const o=(await t.mutate({mutation:J9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{details:{emailAddress:e}}})).data?.customerCreate;if(!o)throw new Error("Unable to create customer.");return this.storeCustomer(o),this.customer=o,{customer:o,isAuthenticated:!1}}this.storeCustomer(i);const a=await this.reloadLoggedInCustomer();return{customer:this.customer||i,isAuthenticated:a}}getCustomer(){return this.customer}async reloadLoggedInCustomer(){const e=localStorage.getItem("last-refreshed-cognito-tokens"),t=localStorage.getItem("cognito-tokens"),n=localStorage.getItem("cognito-email");if(!e||!t||!n)return!1;const i=JSON.parse(t),a=new Date().getTime()/1e3;if(!i.ExpiresIn||i.ExpiresIn<a-parseInt(e)){const l=await _f.refreshTokens();if(l?.AuthenticationResult)localStorage.setItem("last-refreshed-cognito-tokens",`${new Date().getTime()/1e3}`),i.AccessToken=l.AuthenticationResult.AccessToken,localStorage.setItem("cognito-tokens",JSON.stringify(i));else return this.logOut(),console.error("Failed to refresh tokens."),!1}const o=(await $e.getShadowGraphqlClient().query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:n}})).data.customer;return o.id?(this.customer=o,!0):(console.error("Failed to get customer."),!1)}async generateVerificationCode(e){await $e.getShadowGraphqlClient().mutate({mutation:K9,variables:{emailAddress:e}}),await _f.generateCode(e)}async verifyCode(e,t){const n=(await this.getIntegration()).partner.id||"",i=await _f.verifyCode(e,t,n);if(i?.AuthenticationResult){localStorage.setItem("last-refreshed-cognito-tokens",`${new Date().getTime()/1e3}`),localStorage.setItem("cognito-tokens",JSON.stringify(i.AuthenticationResult)),localStorage.setItem("cognito-email",e);const s=(await $e.getShadowGraphqlClient().query({query:Bp,errorPolicy:"all",fetchPolicy:"no-cache",variables:{emailAddress:e}})).data.customer;if(!s.id)throw new Error("Failed to get customer.");return this.customer=s,!0}else throw new Error}async logOut(){localStorage.removeItem("last-refreshed-cognito-tokens"),localStorage.removeItem("cognito-tokens"),localStorage.removeItem("cognito-email"),this.clearCustomer()}async loggedInBearerToken(){const e=localStorage.getItem("last-refreshed-cognito-tokens"),t=localStorage.getItem("cognito-tokens");if(!e||!t)throw new Error("No token data in storage.");const n=JSON.parse(t),i=new Date().getTime()/1e3,a=!n?.AccessToken||Cg(n.AccessToken);if(!n.ExpiresIn||n.ExpiresIn<i-parseInt(e)||a){const s=await _f.refreshTokens();if(s?.AuthenticationResult)localStorage.setItem("last-refreshed-cognito-tokens",`${new Date().getTime()/1e3}`),n.AccessToken=s.AuthenticationResult.AccessToken,localStorage.setItem("cognito-tokens",JSON.stringify(n));else throw this.logOut(),new Error("Failed to refresh tokens.")}if(!n.AccessToken)throw new Error("No bearer token in storage.");return n.AccessToken}async getCustomerMetafields(){if(!this.customer?.id)throw new Error("Customer must be logged in before calling this function.");return(await $e.getShadowGraphqlClient().query({query:Z9,variables:{id:this.customer.id}})).data.metafields}async getNewBundle(e,t,n){const a=(await $e.getShadowGraphqlClient().mutate({mutation:UU(n?.graphql?.productCollection?.eagerFetchProducts||!1),variables:{collectionId:e,initialMetadata:t?Object.entries(t).map((u,c)=>({key:u[0],value:u[1]})):void 0,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},fetchPolicy:"no-cache"})).data?.bundleCreate;if(!a?.id)throw new Error("Unable to create bundle");const s=xr.getMap("bundlePartnerIds")||new Map;s.set(a.id,a.partner.id),xr.setMap("bundlePartnerIds",s);const o=xr.getMap("bundleOwnerIds")||new Map;o.set(a.id,a.bundleOwnerId),xr.setMap("bundleOwnerIds",o);const l=new AE(this,a,void 0,void 0,a.bundleOwnerId,{eagerFetchProducts:n?.graphql?.productCollection?.eagerFetchProducts});return await l.getInitializationPromise(),l}async getExistingBundle(e,t,n,i,a){const o=xr.getMap("bundleOwnerIds")?.get(e),l={};try{const g=await this.loggedInBearerToken();l.Authorization=`Bearer ${g}`}catch{const y=Object.entries(localStorage).find(([C,k])=>C.startsWith("CognitoIdentityServiceProvider")&&C.endsWith("idToken"))?.[0]||"",A=localStorage.getItem(y);A&&!Cg(A)&&(l.Authorization=`Bearer ${A}`)}const u={bundleOwnerId:o,...l,...i?.graphql?.additionalHeaders},c=await $e.getShadowGraphqlClient().query({query:BU(i?.graphql?.productCollection?.eagerFetchProducts||!1),variables:{id:e},fetchPolicy:"no-cache",context:{headers:u}});if(!c.data?.bundles||c.data?.bundles.length===0||!c.data?.bundles[0])throw new Error(`Unable to find bundle: ${e}`);const h=c.data?.bundles[0],f=xr.getMap("bundlePartnerIds")||new Map;f.set(h.id,h.partner.id),xr.setMap("bundlePartnerIds",f);const d=new AE(this,h,t,n,o,{additionalHeaders:i?.graphql?.additionalHeaders,eagerFetchProducts:i?.graphql?.productCollection?.eagerFetchProducts,existingGlobalPropertyState:c.data.globalPropertyState,readonly:i?.readonly},a);return await d.getInitializationPromise(),d}async duplicateBundle(e,t,n,i){const s={...await ND(e),...i?.graphql?.additionalHeaders},l=(await $e.getShadowGraphqlClient().mutate({mutation:VU(),variables:{id:e,template:t,marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId,duplicateTransactions:n},context:{headers:s},fetchPolicy:"no-cache"})).data?.bundleDuplicate;if(!l?.id)throw new Error("Unable to duplicate bundle");const u=xr.getMap("bundlePartnerIds")||new Map;u.set(l.id,l.partner.id),xr.setMap("bundlePartnerIds",u);const c=xr.getMap("bundleOwnerIds")||new Map;return c.set(l.id,l.bundleOwnerId),xr.setMap("bundleOwnerIds",c),async()=>await this.getExistingBundle(l.id,void 0,void 0,{graphql:{productCollection:{eagerFetchProducts:i?.graphql?.productCollection?.eagerFetchProducts||!1}}})}async getBundlesForCustomer(e){if(!this.customer?.id)throw new Error("Customer not authenticated.");const{includeMetadata:t,...n}=e;return(await $e.getShadowGraphqlClient().query({query:JU(t??!1),variables:{...n,id:this.customer.id},fetchPolicy:"no-cache"})).data.customerBundlesFeed}async getBundleStakeholders(){if(!this.customer)throw new Error("Customer not authenticated.");const e=await $e.getShadowGraphqlClient().query({query:MU,variables:{id:this.customer.id},fetchPolicy:"no-cache"});if(!e.data?.customers||e.data.customers.length===0)throw new Error("Unable to find customer.");const n=e.data.customers[0].bundleStakeholders||[],i=xr.getMap("bundlePartnerIds")||new Map;return n.forEach(a=>{a.bundle?.id&&a.bundle.partner?.id&&i.set(a.bundle.id,a.bundle.partner.id)}),xr.setMap("bundlePartnerIds",i),n}async getWorkflowExperience(e,t){if(!e)throw new Error("getWorkflowExperience has been called without an options object! This is not supported.");const n=await this.getWorkflowExperiences([e],e.graphql),i=n[0],a=i.getWorkflow();return t&&!a&&console.error("No workflow instantiated when trying to create preview service."),t&&a&&await i.getWorkflowManager().injectIntoPreviewService(t(a)),n[0]}async getWorkflowExperiences(e,t,n,i){if(e.length===0)throw new uo("No options provided!");const a=e.map((Y,X)=>({option:Y,index:X})),s=a.filter(Y=>Y.option.type==="transaction"),o=a.filter(Y=>Y.option.type==="integration"||Y.option.type==="external"||Y.option.type==="blank"),l=50,u=oA(s,l),c=oA(o,l);let h=0;const f=$e.getShadowGraphqlClient(),d=async Y=>{if(Y.length===0)return[];const X=Y.map(oe=>oe.option.transactionId),J=await f.query({query:w3,variables:{ids:X},errorPolicy:"all",fetchPolicy:"no-cache"}),Q=J.data.transactions;if(h=h+Q.length,i&&i(h,s.length),Q.length!==Y.length){const oe=J.errors?.[0]?.message||"Unknown error";throw new uo(`Not all transactions were found: ${oe}`)}return!this.activeIntegration&&Q[0].integrationProduct?.integration&&(this.activeIntegration=Promise.resolve(Q[0].integrationProduct.integration)),Q.map((oe,se)=>({transaction:oe,workflowId:oe.workflowId,readOnly:Y.find(he=>he.option.transactionId===oe.id)?.option.readOnly??!1,index:Y[se].index}))},g=async Y=>{if(Y.length===0)return[];const X=await f.mutate({mutation:b3,variables:{inputs:Y.map(Q=>({integrationProductId:Q.option.type==="integration"?Q.option.integrationProductId:void 0,externalIntegrationId:Q.option.type==="external"?Q.option.externalIntegrationId:void 0,externalProductId:Q.option.type==="external"?Q.option.externalProductId:void 0,workflowId:Q.option.workflowId,designName:Q.option.designName,claim:!0,quantity:Q.option.quantity,recipient:Q.option.recipient})),marketplaceThemeInstallId:this.marketplaceThemeInstallId,marketplaceThemeInstallConfigurationId:this.marketplaceThemeInstallConfigurationId},errorPolicy:"all",fetchPolicy:"no-cache"}),J=X.data?.transactionCreateMany;if(!J||J.length===0){const Q=X.errors?.[0]?.message||"Unknown error";throw new uo(`Failed to create transactions: ${Q}`)}return h=h+J.length,i&&i(h,s.length),J.map((Q,oe)=>({transaction:Q,workflowId:Q.workflowId,readOnly:!1,index:Y[oe].index}))},v=(await Promise.all([...u.map(d),...c.map(g)])).flat(),y=[...new Set(v.map(Y=>Y.transaction.integrationProductId))].filter(Y=>Y!==void 0),A=[...new Set(v.map(Y=>Y.workflowId))].filter(Y=>Y!==void 0),[C,k]=await Promise.all([(async()=>y.length>0?await gQ(y):[])(),(async()=>A.length>0?await qb(A,t):[])()]),T=new Map(C.map(Y=>[Y.id,Y])),S=new Map(k.map(Y=>[Y.id,Y])),R=v.map(async Y=>{const{transaction:X,workflowId:J,readOnly:Q,index:oe}=Y,se=J?S.get(J):void 0,he=e[oe];if(X.integrationProductId){const K=T.get(X.integrationProductId);X.integrationProduct=K,X.product=K?.product,X.integrationProduct||console.error("failed to find transaction's product")}const ye=xr.getMap("transactionOwnerIds")||new Map;!ye.get(X.id)&&X.transactionOwnerId&&(ye.set(X.id,X.transactionOwnerId),xr.setMap("transactionOwnerIds",ye));const Ue=ye.get(X.id)||void 0,Oe=new eV({onMutate:()=>({context:{transactionOwnerId:Ue,bundleOwnerId:t?.bundleOwnerId}}),onQuery:()=>({context:{transactionOwnerId:Ue,bundleOwnerId:t?.bundleOwnerId}})}),Te={workflow:se,transaction:X,singleVariantsRenderable:he?.workflowConfiguration?.singleVariantsRenderable,stateMutationFunc:Q?async()=>{throw new nn("State mutation is forbidden in read only mode!")}:async K=>this.updateTransactionState({...K,context:{transactionOwnerId:Ue,bundleOwnerId:t?.bundleOwnerId}}),graphQlClient:()=>Oe,readOnly:Q,isReloadedTransaction:he.type==="transaction"};if(he.type==="transaction"&&X.workflowState){const K=JSON.parse(X.workflowState);await rA(K),Te.reloadedState=K}else if(!Q&&he.workflowState){const K=JSON.parse(he.workflowState);await rA(K),Te.reloadedState=K}return Te.delayWorkflowStateSync=!0,{experienceOptions:Te,index:oe,options:he}}),G=(await Promise.all(R)).sort((Y,X)=>Y.index-X.index);let $=[];for(const Y of G){const{experienceOptions:X,options:J}=Y,Q=new bI(this,X);await Q.getWorkflowManager().getInitializationPromise(),n&&n(),J.type!=="transaction"&&this.customer&&await Q.attachCustomerDetails({email:this.customer.emailAddress}),$=[...$,Q],Q.getWorkflowManager().setWorkflowStateSyncEnabled(!0)}return $}storeCustomer(e){const t=xr.getMap("partnerCustomerIds")||new Map;t.set(e.partner.id,e.id),xr.setMap("partnerCustomerIds",t)}async getIntegrationProductById(e,t){const a=(await $e.getShadowGraphqlClient().query({query:I3(t),variables:{ids:[e]},fetchPolicy:"no-cache",errorPolicy:"all"})).data?.integrationProducts;if(!a||a.length===0||!a[0]?.id)throw new Error("Integration product not found.");return new cA(a[0])}async getIntegrationProductFromExternalIds(e,t,n){const s=(await $e.getShadowGraphqlClient().query({query:D3(n),variables:{externalProductId:t,externalIntegrationId:e},fetchPolicy:"no-cache",errorPolicy:"all"})).data?.integrationProductFromExternalIds;if(!s?.id)throw new Error("Integration product not found.");return new cA(s)}async getIntegrationProduct(e){return e.type==="integration"?this.getIntegrationProductById(e.integrationProductId):this.getIntegrationProductFromExternalIds(e.externalIntegrationId,e.externalProductId)}async getShareActionsForTransaction(e){const n=(xr.getMap("transactionOwnerIds")||new Map).get(e)||void 0,i=await $e.getShadowGraphqlClient().query({query:F3,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:e},context:{transactionOwnerId:n}});if(!i.data.transactions||i.data.transactions.length!==1)throw new Error(`Failed to fetch share actions for transaction: ${e}`);return i.data.transactions[0].transactionShareActions}async placeOrder(e){const t=await $e.getShadowGraphqlClient().mutate({mutation:H3,variables:{orderItems:e}});if(t.errors)throw new Error(t.errors[0].message);if(!t.data)throw new Error("Failed to create order: No order data in response.");return{id:t.data.orderCreate.id,internalId:t.data.orderCreate.internalId}}}const MD=async(r,e)=>(await $e.getShadowGraphqlClient().query({query:U3,errorPolicy:"all",fetchPolicy:"no-cache",context:{headers:{"x-application-key":r},skipIntegrationCheck:!0},variables:{themeConfigurationId:e}})).data.currentIntegration,vQ=async r=>{const t=await $e.getShadowGraphqlClient().query({query:k3,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:r}});if(t.data.transactions.length!==0)return t.data.transactions[0]},yQ=async(r,e)=>(await $e.getShadowGraphqlClient().query({query:L3,errorPolicy:"all",variables:{themeConfigurationId:r,themeInstallId:e}})).data?.marketplaceThemeInstallConfiguration,AQ=async r=>(await $e.getShadowGraphqlClient().query({query:z3,errorPolicy:"all",variables:{id:r}})).data?.bundles?.[0]?.marketplaceThemeInstallConfiguration,bQ=async r=>(await $e.getShadowGraphqlClient().query({query:V3,errorPolicy:"all",variables:{id:r}})).data?.transactions?.[0]?.marketplaceThemeInstallConfiguration;async function _D(){const r={};try{const e=await this.loggedInBearerToken();r.Authorization=`Bearer ${e}`}catch{const n=Object.entries(localStorage).find(([a,s])=>a.startsWith("CognitoIdentityServiceProvider")&&a.endsWith("idToken"))?.[0]||"",i=localStorage.getItem(n);i&&!Cg(i)&&(r.Authorization=`Bearer ${i}`)}return r}async function ND(r){const t=xr.getMap("bundleOwnerIds")?.get(r),n=await _D();return{bundleOwnerId:t,...n}}async function wQ(r){const t=xr.getMap("transactionOwnerIds")?.get(r),n=await _D();return{transactionOwnerId:t,...n}}const CQ=async r=>{const e=await ND(r),t=await $e.getShadowGraphqlClient().mutate({mutation:s9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r},context:{headers:e}});if(t.data?.bundleDelete!==r)throw new Error(`Failed to delete bundle: ${t.errors}`)},xQ=async r=>{const e=await wQ(r),t=await $e.getShadowGraphqlClient().mutate({mutation:o9,errorPolicy:"all",fetchPolicy:"no-cache",variables:{ids:[r]},context:{headers:e}});if(!t.data?.transactions||t.data.transactions.length!==1||t.data.transactions[0].id!==r)throw new Error(`Failed to find transaction to read bundle id: ${JSON.stringify(t.errors)}`);return t.data.transactions[0].bundle?.id};function LD(r,e,t,n){const i=t.width*r.zoom,a=t.height*r.zoom;if(n){const o=r,l=Math.max(e.width/t.width,e.height/t.height);o.zoom=Math.max(l,r.zoom);const u=t.width*o.zoom,c=t.height*o.zoom;return o.x=Np(r.x,e.width-u,0),o.y=Np(r.y,e.height-c,0),o}const s=r;return s.x=Np(s.x,-i,e.width),s.y=Np(s.y,-a,e.height),s}function Np(r,e,t){return Math.min(Math.max(r,e),t)}class UD{constructor(e,t){this.minZoomScale=[.03],this.maxZoomScale=[20],this._debouncedUpdateFrameOffsets=AI(this.updateFrameOffsets,200),this.targetElements=[],this.onFrameDataChangeListeners=[],this.onZoomChangeListeners=[],this.forceImageCover=e,this.initialZoom=t,this.thresholdSettings={useThreshold:!1,invertThreshold:!1,threshold:128,thresholdSaturation:.5}}connectWorkflowManager(e,t){t&&e.addStepSpecificStorageCallback(async n=>{if(n){const i=n;if(i.currentFrameSources){let a=!1;for(let s=0;s<i.currentFrameSources.length;s++){const o=i.currentFrameSources[s],l=await nh(o),u=this.frameData?this.frameData[s]:void 0;xd(l,u)||(this.frameData||(this.frameData=new Array(i.currentFrameSources.length)),this.frameData[s]=l,a=!0)}a&&(this.onFrameDataChangeListeners.forEach(s=>s(this.frameData)),this.frameData&&this.imageData&&(this.recalculateOffsets(this.imageData),this.updateOffsets(this.offsets),this.recalculateZoomLimits(this.imageData,this.frameData)))}}},t),this.workflowManager=e,this.stepName=t}setTargetElements(e){this.targetElements=e}getFrameData(){return this.frameData}setFrameData(e){if(!e){this.frameData=void 0;return}e.forEach((t,n)=>{const i=Uu.get(t);i&&(this.frameData||(this.frameData=new Array(e.length)),this.frameData[n]=i)})}getImageData(){return this.imageData}getImageSrc(){if(this.imageData){if(this.imageData.svg){const e=Gg(this.imageData.svg,this.imageData.colors||{},!1);return Hg(e)}return this.imageData.src}}getOffsets(){return this.offsets}setOffsets(e){this.offsets=e}setZoom(e,t,n,i){if(this.imageData&&this.offsets&&this.frameData){(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length));const a=this.frameData.map((s,o)=>{const l=(t[o]-this.offsets[o].x)/this.offsets[o].zoom,u=(n[o]-this.offsets[o].y)/this.offsets[o].zoom,c=t[o]-l*e[o],h=n[o]-u*e[o];return{x:c,y:h,zoom:this.imageData.width*e[o]/this.imageData.width}});this.updateOffsets(a,i),this.onZoomChangeListeners.forEach(s=>s(e))}}setPatternData(e,t=!0){this.imageData=e,e&&this.frameData&&((t||!this.offsets)&&this.recalculateOffsets(e),this.updateOffsets(this.offsets,void 0,!0)),this.imageData&&this.frameData&&this.recalculateZoomLimits(this.imageData,this.frameData)}updateOffsets(e,t,n){const i=this.imageData;if(!i||!this.frameData)return;if(this.frameData.length!==e.length)throw new nn("Frame data and offsets are not the same length. This is a bug. Please report it.");if(!this.offsets.some((s,o)=>!(e[o].x===s.x&&e[o].y===s.y&&e[o].zoom===s.zoom))&&!n){t&&t();return}(!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((s,o)=>{this.offsets[o]=LD(e[o],s,this.imageData,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,i,this.frameData,this.thresholdSettings,t)}getThresholdSettings(){return this.thresholdSettings}setThresholdSettings(e){this.thresholdSettings=e,this.imageData&&this.frameData&&this._debouncedUpdateFrameOffsets(this.offsets,this.imageData,this.frameData,e)}onFrameDataChanged(e){e(this.frameData),this.onFrameDataChangeListeners.push(e)}onZoom(e){this.onZoomChangeListeners.push(e)}updateFrameOffsets(e,t,n,i,a){if(!n||n.length===0||n.some(l=>!l))throw new nn("Frame data not set. This is a bug");if(!this.workflowManager)throw new nn("No workflow manager set, cannot update offsets.");const s=this.workflowManager.getRegionElements(this.stepName||""),o=this.workflowManager.getCommandDispatcher();this.targetElements.forEach((l,u)=>{let c=s.find(h=>h.id===l)?.regionIndex??u;c>=e.length&&(c=u);try{o(new Rn([new aL(l,t,e[c]),new sL(l,i.useThreshold,i.invertThreshold,i.threshold,i.thresholdSaturation)]))}catch{}}),this.stepName&&this.workflowManager.updateStorage(this.stepName,{frameOffsetsList:e}),a&&a()}recalculateZoomLimits(e,t){(this.minZoomScale.length!==t.length||this.maxZoomScale.length!==t.length)&&(this.minZoomScale=new Array(t.length),this.maxZoomScale=new Array(t.length)),t.forEach((n,i)=>{const a=Math.max(n.width/e.width,n.height/e.height);this.forceImageCover?(this.minZoomScale[i]=a,this.maxZoomScale[i]=a*2.5):(this.minZoomScale[i]=a/10,this.maxZoomScale[i]=a*2.5)})}recalculateOffsets(e){this.frameData&&((!this.offsets||this.offsets.length!==this.frameData.length)&&(this.offsets=new Array(this.frameData.length)),this.frameData.forEach((t,n)=>{this.offsets[n]=g1(e,t,this.initialZoom&&!this.forceImageCover?{scale:this.initialZoom}:void 0,this.forceImageCover)}),this._debouncedUpdateFrameOffsets(this.offsets,e,this.frameData,this.thresholdSettings))}}class SQ{traversableScenes(){throw new Error("Method not implemented.")}updateRecipient(e,t,n,i,a,s,o,l,u,c,h,f,d,g,v,y,A){throw new Error("Method not implemented.")}approveTransaction(e){throw new Error("Method not implemented.")}rejectTransaction(e){throw new Error("Method not implemented.")}getClient(){return this.client??{}}getWorkflowExperience(){return{}}setClient(e){this.client=e}getInitializationPromise(){return Promise.resolve()}isInitialized(){return!0}getInformationResults(){return[]}async reset(){}updateStateWithServer(e){}async outstandingRequestsPromise(){}async updateStateWithServerImmediate(e){}addPoller(e){}addConfirmCallback(e){}addEditedCallback(e){}addElementsCallback(e){}addInformationResultCallback(e){}addInitCallback(e){}addMakingAdjustmentsCallback(e){}addMandatoryCallback(e){}addMetadataCallback(e){}addSelectionCallback(e){}addStepSpecificStorageCallback(e,t){}addStorageCallback(e){}getCommandDispatcher(){return e=>{}}getLayouts(){return[]}getLayoutPreviewService(){return{getAll:()=>new Map}}getPreviewService(){}getModelContainer(){}getRegionElements(e){return[]}getSerializedStep(e,t){}getStepSpecificServices(e){}getTransaction(){return{id:""}}getTransactionCustomer(){}setTransactionCustomer(){}setTransactionCustomerDetails(){}getInitialOptionIds(){return new Promise(()=>new Set)}getWorkflow(){return{id:"",name:"",panels:[],steps:[],showModelOnFinishStep:!1,allowProofDownload:!1,introduction:"",stepGroups:[]}}markStepsAsInitialised(e){}markUpdateCompleted(e){}markUpdatePending(){return"123"}getWorkflowSelections(){return{}}getStepSelections(){return{}}setCurrentAdjustingStepId(e){}setEditedStatus(e,t){}setInformationResults(e){}setMandatoryFulfilled(e,t){}async setSelectionsAndElements(e,t,n){}toggleDesignConfirmed(){}updateMetadata(e,t){}async updateStorage(e,t){}injectIntoPreviewService(e){return Promise.resolve()}ejectFromPreviewService(){}setWorkflowStateSyncEnabled(e){}async updateTransactionShareActions(){}addValidationCallback(e){}setStepError(e,t,n){}getStepErrors(e){}getValidationErrors(){return{steps:new Map}}async updateTransactionStakeholders(){}getStepTags(e){return[]}}var VD=(r=>(r.SelectFrame="SelectFrame",r.SelectImage="SelectImage",r.Position="Position",r))(VD||{});class zD extends Wi{constructor(e,t,n){super(e,t,n);const i=t.data;this.frameService=new UD(i.forceImageCover,i.initialZoomLevel),this.frameService.connectWorkflowManager(e,t.stepName)}selectVariant(e){const t=this.manager.getRegionElements(this.step.stepName);return lo.selectVariant(this.step,e.getResource(),t,this.manager,n=>this.setUpdateState(n))}onFrameDataChanged(e){this.frameService&&this.frameService.onFrameDataChanged(t=>{t&&e(t)})}async selectImage(e,t=!0,n=!0){if(await lo.selectImage(this.step,e,this.manager,n),t){const i=this.manager.getStepStorage(this.step.stepName)?.framePatternData||{};this.manager.updateStorage(this.step.stepName,{framePatternData:{...i,originalAssetKey:e.key,backgroundRemovedAssetKey:void 0,useOriginalAsset:void 0}})}}async canUseAdvancedImageManipulation(){return this.manager.getClient().canUseAddon(Ng.AdvancedImageManipulation)}async canRemoveBackground(){return await this.canUseAdvancedImageManipulation()&&this.hasOriginalImageSelection()&&!!this.frameService?.getImageData()?.src&&!this.frameService?.getImageData()?.svg}async removeBackgroundFromImageSelection(e=!0){if(!await this.canUseAdvancedImageManipulation())throw new Error("The current Integration does not have access to the Background Remover. Please call canUseAdvancedImageManipulation to ensure you disable this feature when appropriate.");const t=await this.getOriginalImageSelection();if(!t)throw new Error("You must supply an image selection before attempting to remove the background.");const n=await Qn.removeBackgroundFromAsset(t);e&&await lo.selectImage(this.step,n,this.manager,!1);const i=this.manager.getStepStorage(this.step.stepName)?.framePatternData||{};return this.manager.updateStorage(this.step.stepName,{framePatternData:{...i,backgroundRemovedAssetKey:n.key,useOriginalAsset:!e}}),n}async vectorize(e,t=void 0){const n=e??await this.getOriginalImageSelection();if(!n)throw new Error("You must supply an image selection before attempting to vectorize the image.");const i=await Qn.vectorizeAsset(n,t);await this.selectImage(i,e!==void 0);const a=this.manager.getStepStorage(this.step.stepName)?.framePatternData||{};return this.manager.updateStorage(this.step.stepName,{framePatternData:{...a,vectorizedAssetKey:i.key,useOriginalAsset:!1}}),i}async getBackgroundRemovedImageSelection(){const e=this.manager.getStepStorage(this.step.stepName)?.framePatternData?.backgroundRemovedAssetKey;if(e)return Qn.getLocalOrFromServer(e)}async getVectorizedImageSelection(){const e=this.manager.getStepStorage(this.step.stepName)?.framePatternData?.vectorizedAssetKey;if(e)return Qn.getLocalOrFromServer(e)}hasOriginalImageSelection(){return!!this.manager.getStepStorage(this.step.stepName)?.framePatternData?.originalAssetKey}hasBackgroundRemovedImageSelection(){return!!this.getFrameStepStorage()?.framePatternData?.backgroundRemovedAssetKey}hasVectorizedImageSelection(){return!!this.getFrameStepStorage()?.framePatternData?.vectorizedAssetKey}async changeColors(e){await lo.changeColors(this.step,this.manager,e)}getImageData(){if(this.frameService)return this.frameService.getImageData()}async getColorOption(){return await ft.ensureFullOption(this.step.data.colorOption)}getAvailableColors(){return this.step.data.colorPickerEnabled?lo.availableColors(this.step,this.manager):Promise.resolve([])}isColorPickerEnabled(){return this.step.data.colorPickerEnabled??!1}async getOriginalImageColors(){const e=this.getImageData();return e?.svg?(await Oa(e.svg)).colors:void 0}getShouldVectorize(){return this.step.data.shouldVectorize??!1}getVectorizeMaxColors(){return this.step.data.vectorizeMaxColors}getMaxAllowedColors(){return this.step.data.maxColors}getUniqueColorCount(){return lo.getUniqueColorCount(this.step,this.manager)}getCurrentFrameStep(e,t,n,i){return i&&i.length>1&&e===void 0?"SelectFrame":t||n||this.getImageData()?"Position":"SelectImage"}getFrameService(){return this.frameService}hasOverlayImageKey(){return this.step.data.overlayImageKey}hasOverlayImageUrl(){return this.step.data.overlayImageUrl}getWhitelistedExtensions(){return[...this.step.data.whitelistedExtensions,...this.step.data.whitelistedExtensions.includes(".jpg")?[".jpeg"]:[]]}async getOriginalImageSelection(){const e=this.manager.getStepStorage(this.step.stepName)?.framePatternData?.originalAssetKey;if(e)return Qn.getLocalOrFromServer(e)}getUseOriginalImageSelection(){return this.getFrameStepStorage()?.framePatternData?.useOriginalAsset??!1}async setUseOriginalImageSelection(e){const t=this.getFrameStepStorage()?.framePatternData||{};if(t.useOriginalAsset===e)return;const n=await this.getOriginalImageSelection();if(!n)throw new Error("You must provide an image selection before calling setUseOriginalImageSelection");if(e)await this.selectImage(n,!1,!1);else{const i=await this.getBackgroundRemovedImageSelection();if(!i)throw new Error("You must call removeBackgroundFromImageSelection before attempting to apply the image.");await this.selectImage(i,!1,!1)}this.manager.updateStorage(this.step.stepName,{framePatternData:{...t,useOriginalAsset:e}})}getFrameStepStorage(){return this.manager.getStepStorage(this.step.stepName)}isVariantCategoriesEnabled(){return this.step.data.enableVariantCategories??!1}}const EQ=ke`
2704
2710
  query GetLoggedInCustomer($email: String!) {
2705
2711
  customer(emailAddress: $email) {
2706
2712
  id
2707
2713
  defaultTemplateBundleId
2708
2714
  }
2709
2715
  }
2710
- `,Wb=Fe`
2716
+ `,Wb=ke`
2711
2717
  query GetCustomerTransactions(
2712
2718
  $id: String!
2713
2719
  $limit: Int!
@@ -2744,21 +2750,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2744
2750
  total
2745
2751
  }
2746
2752
  }
2747
- `,EQ=Fe`
2753
+ `,kQ=ke`
2748
2754
  mutation SetTransactionDesignName($id: String!, $name: String!) {
2749
2755
  transactionUpdate(id: $id, designName: $name) {
2750
2756
  id
2751
2757
  designName
2752
2758
  }
2753
2759
  }
2754
- `,kQ=Fe`
2760
+ `,FQ=ke`
2755
2761
  mutation DuplicateTransaction($id: String!, $template: Boolean!) {
2756
2762
  transactionDuplicate(id: $id, template: $template) {
2757
2763
  id
2758
2764
  workflowViewerLink
2759
2765
  }
2760
2766
  }
2761
- `,FQ=Fe`
2767
+ `,TQ=ke`
2762
2768
  query GetCustomerBundles($id: String!, $limit: Int!, $offset: Int!) {
2763
2769
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset) {
2764
2770
  items {
@@ -2773,7 +2779,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2773
2779
  total
2774
2780
  }
2775
2781
  }
2776
- `,TQ=Fe`
2782
+ `,IQ=ke`
2777
2783
  query GetTransactionsForBundle($id: String!) {
2778
2784
  bundles(ids: [$id]) {
2779
2785
  id
@@ -2794,21 +2800,21 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2794
2800
  }
2795
2801
  }
2796
2802
  }
2797
- `,IQ=Fe`
2803
+ `,DQ=ke`
2798
2804
  mutation SetBundleName($id: String!, $name: String!) {
2799
2805
  bundleUpdate(id: $id, name: $name) {
2800
2806
  id
2801
2807
  name
2802
2808
  }
2803
2809
  }
2804
- `,DQ=Fe`
2810
+ `,PQ=ke`
2805
2811
  mutation DuplicateBundle($id: String!, $template: Boolean!) {
2806
2812
  bundleDuplicate(id: $id, template: $template) {
2807
2813
  id
2808
2814
  workflowViewerLink
2809
2815
  }
2810
2816
  }
2811
- `,PQ=Fe`
2817
+ `,RQ=ke`
2812
2818
  query GetBundleTemplates($id: String!, $limit: Int!, $offset: Int!) {
2813
2819
  customerBundlesFeed(id: $id, limit: $limit, offset: $offset, template: true) {
2814
2820
  items {
@@ -2821,7 +2827,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2821
2827
  total
2822
2828
  }
2823
2829
  }
2824
- `,RQ=async(r,e,t)=>await $e.getShadowGraphqlClient().mutate({mutation:IQ,errorPolicy:"all",variables:{id:r,name:e},context:t}),OQ=async(r,e)=>await $e.getShadowGraphqlClient().mutate({mutation:EQ,errorPolicy:"all",variables:{id:r,name:e}}),BQ=async(r,e)=>await $e.getShadowGraphqlClient().mutate({mutation:DQ,errorPolicy:"all",variables:{id:r,template:e}}),MQ=async(r,e)=>await $e.getShadowGraphqlClient().mutate({mutation:kQ,errorPolicy:"all",variables:{id:r,template:e}}),_Q=async r=>(await $e.getShadowGraphqlClient().query({query:SQ,errorPolicy:"all",variables:{email:r}})).data.customer,NQ=async(r,e,t)=>await $e.getShadowGraphqlClient().query({query:FQ,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:t,limit:e}}),LQ=async(r,e)=>await $e.getShadowGraphqlClient().query({query:TQ,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r},context:e}),UQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:Wb,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"isAnyOf",values:["Created","DesignCompleted","ExternallyOrdered"]},template:{value:"false"}},offset:t,limit:e}}))?.data.customerTransactionsFeed?.items||[],VQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:Wb,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"equals",value:"Ordered"},template:{value:"false"}},offset:t,limit:e}}))?.data.customerTransactionsFeed?.items||[],zQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:Wb,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",template:{value:"true"}},offset:t,limit:e}}))?.data.customerTransactionsFeed?.items||[],HQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:PQ,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:t,limit:e}}))?.data.customerBundlesFeed?.items||[],HD=Fe`
2830
+ `,OQ=async(r,e,t)=>await $e.getShadowGraphqlClient().mutate({mutation:DQ,errorPolicy:"all",variables:{id:r,name:e},context:t}),BQ=async(r,e)=>await $e.getShadowGraphqlClient().mutate({mutation:kQ,errorPolicy:"all",variables:{id:r,name:e}}),MQ=async(r,e)=>await $e.getShadowGraphqlClient().mutate({mutation:PQ,errorPolicy:"all",variables:{id:r,template:e}}),_Q=async(r,e)=>await $e.getShadowGraphqlClient().mutate({mutation:FQ,errorPolicy:"all",variables:{id:r,template:e}}),NQ=async r=>(await $e.getShadowGraphqlClient().query({query:EQ,errorPolicy:"all",variables:{email:r}})).data.customer,LQ=async(r,e,t)=>await $e.getShadowGraphqlClient().query({query:TQ,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:t,limit:e}}),UQ=async(r,e)=>await $e.getShadowGraphqlClient().query({query:IQ,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r},context:e}),VQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:Wb,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"isAnyOf",values:["Created","DesignCompleted","ExternallyOrdered"]},template:{value:"false"}},offset:t,limit:e}}))?.data.customerTransactionsFeed?.items||[],zQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:Wb,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",status:{operator:"equals",value:"Ordered"},template:{value:"false"}},offset:t,limit:e}}))?.data.customerTransactionsFeed?.items||[],HQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:Wb,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,quicksearch:"",filters:{link:"and",template:{value:"true"}},offset:t,limit:e}}))?.data.customerTransactionsFeed?.items||[],jQ=async(r,e,t)=>(await $e.getShadowGraphqlClient().query({query:RQ,errorPolicy:"all",fetchPolicy:"no-cache",variables:{id:r,offset:t,limit:e}}))?.data.customerBundlesFeed?.items||[],HD=ke`
2825
2831
  fragment AddressValidationResultFields on AddressValidationResult {
2826
2832
  addressComplete
2827
2833
  address {
@@ -2843,7 +2849,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2843
2849
  }
2844
2850
  missingComponentTypes
2845
2851
  }
2846
- `,Qb=Fe`
2852
+ `,Qb=ke`
2847
2853
  ${HD}
2848
2854
  fragment AddressValidationJobFields on AddressValidationJob {
2849
2855
  id
@@ -2855,14 +2861,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2855
2861
  ...AddressValidationResultFields
2856
2862
  }
2857
2863
  }
2858
- `,jQ=Fe`
2864
+ `,GQ=ke`
2859
2865
  ${Qb}
2860
2866
  query GetAddressValidationJobs($ids: [String!]!) {
2861
2867
  addressValidationJobs(ids: $ids) {
2862
2868
  ...AddressValidationJobFields
2863
2869
  }
2864
2870
  }
2865
- `,GQ=Fe`
2871
+ `,$Q=ke`
2866
2872
  ${Qb}
2867
2873
  query GetRecipientsWithAddressValidationJobs($ids: [String!]!) {
2868
2874
  recipients(ids: $ids) {
@@ -2872,27 +2878,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2872
2878
  }
2873
2879
  }
2874
2880
  }
2875
- `,$Q=Fe`
2881
+ `,qQ=ke`
2876
2882
  ${HD}
2877
2883
  mutation ValidateRecipientAddress($id: String!) {
2878
2884
  recipientValidate(id: $id) {
2879
2885
  ...AddressValidationResultFields
2880
2886
  }
2881
2887
  }
2882
- `,qQ=Fe`
2888
+ `,WQ=ke`
2883
2889
  ${Qb}
2884
2890
  mutation BatchValidateRecipientAddress($ids: [String!]!) {
2885
2891
  recipientValidateBatch(ids: $ids) {
2886
2892
  ...AddressValidationJobFields
2887
2893
  }
2888
2894
  }
2889
- `,WQ=Fe`
2895
+ `,QQ=ke`
2890
2896
  mutation OverrideRecipientAddress($id: String!) {
2891
2897
  recipientOverrideAddress(id: $id) {
2892
2898
  id
2893
2899
  }
2894
2900
  }
2895
- `;var jD=(r=>(r.Confirmed="Confirmed",r.Plausible="Plausible",r.Unlikely="Unlikely",r))(jD||{}),GD=(r=>(r.Created="Created",r.Processing="Processing",r.Completed="Completed",r.Failed="Failed",r.Cancelled="Cancelled",r))(GD||{});const QQ=async r=>{const e=r.map(n=>n.getTransaction().recipient?.id).filter(n=>!!n),t=await $e.getShadowGraphqlClient().query({query:GQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{ids:e}});return r.map(n=>{const i=n.getTransaction().recipient?.id;if(i)return t.data?.recipients?.find(a=>a.id===i)?.addressValidationJob})},YQ=async r=>(await $e.getShadowGraphqlClient().query({query:jQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{ids:r}})).data?.addressValidationJobs,XQ=async r=>r.getTransaction().recipient?.id?(await $e.getShadowGraphqlClient().mutate({mutation:$Q,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:r.getTransaction().recipient.id}})).data?.recipientValidate:void 0,JQ=async r=>{const e=r.map(n=>n.getTransaction().recipient?.id).filter(n=>!!n),t=await $e.getShadowGraphqlClient().mutate({mutation:qQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{ids:e}});return r.map(n=>{const i=n.getTransaction().recipient?.id;if(i)return t.data?.recipientValidateBatch?.find(a=>a.entityId===i)})},KQ=async r=>{const e=r.getTransaction().recipient?.id;if(!e)return;(await $e.getShadowGraphqlClient().mutate({mutation:WQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:e}})).data?.recipientOverrideAddress?.id&&(r.getTransaction().addressValidationStatus=UA.Overridden)},ZQ=Fe`
2901
+ `;var jD=(r=>(r.Confirmed="Confirmed",r.Plausible="Plausible",r.Unlikely="Unlikely",r))(jD||{}),GD=(r=>(r.Created="Created",r.Processing="Processing",r.Completed="Completed",r.Failed="Failed",r.Cancelled="Cancelled",r))(GD||{});const YQ=async r=>{const e=r.map(n=>n.getTransaction().recipient?.id).filter(n=>!!n),t=await $e.getShadowGraphqlClient().query({query:$Q,errorPolicy:"all",fetchPolicy:"network-only",variables:{ids:e}});return r.map(n=>{const i=n.getTransaction().recipient?.id;if(i)return t.data?.recipients?.find(a=>a.id===i)?.addressValidationJob})},XQ=async r=>(await $e.getShadowGraphqlClient().query({query:GQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{ids:r}})).data?.addressValidationJobs,JQ=async r=>r.getTransaction().recipient?.id?(await $e.getShadowGraphqlClient().mutate({mutation:qQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:r.getTransaction().recipient.id}})).data?.recipientValidate:void 0,KQ=async r=>{const e=r.map(n=>n.getTransaction().recipient?.id).filter(n=>!!n),t=await $e.getShadowGraphqlClient().mutate({mutation:WQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{ids:e}});return r.map(n=>{const i=n.getTransaction().recipient?.id;if(i)return t.data?.recipientValidateBatch?.find(a=>a.entityId===i)})},ZQ=async r=>{const e=r.getTransaction().recipient?.id;if(!e)return;(await $e.getShadowGraphqlClient().mutate({mutation:QQ,errorPolicy:"all",fetchPolicy:"network-only",variables:{id:e}})).data?.recipientOverrideAddress?.id&&(r.getTransaction().addressValidationStatus=UA.Overridden)},eY=ke`
2896
2902
  query GetIntegrationProductsForIds($ids: [String!]!) {
2897
2903
  integrationProducts(ids: $ids) {
2898
2904
  id
@@ -2902,5 +2908,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2902
2908
  }
2903
2909
  }
2904
2910
  }
2905
- `,eY=async r=>(await $e.getShadowGraphqlClient().query({query:ZQ,variables:{ids:r}})).data.integrationProducts;exports.AddonHandle=Ng;exports.AddressValidationJobStatus=GD;exports.AddressValidationResultConfirmationLevel=jD;exports.AddressValidationStatus=UA;exports.ArrayInput=Y9;exports.AspectType=zn;exports.AssetNotFoundError=So;exports.AssetType=yd;exports.BringForwardCommand=fL;exports.BringToBackCommand=cL;exports.BringToFrontCommand=uL;exports.BundleDesignCreationCartAddMode=Ok;exports.CanvasCommand=Fn;exports.CollectionProduct=Wf;exports.ColorOptionGlobalPropertyHandle=lA;exports.CommandContext=zT;exports.ConversionDataType=td;exports.CreateElementCommand=ai;exports.CreateLayoutCommand=y1;exports.CurrencyContext=OD;exports.CurrencyService=RD;exports.DeleteElementCommand=_l;exports.DigitalContentStepHandle=mI;exports.FileUploadGlobalPropertyHandle=wI;exports.FlowExecutionNodeResult=Qf;exports.FlowExecutionResult=FI;exports.FlowService=kI;exports.FontAlignmentCommand=WT;exports.FontColorCommand=$T;exports.FontSizeCommand=qT;exports.FontSourceCommand=nA;exports.FrameService=UD;exports.FrameStep=VD;exports.FrameStepHandle=zD;exports.GlobalPropertyHandle=rm;exports.GroupCommand=Rn;exports.IllustrationStepHandle=lI;exports.InformationMessageType=ih;exports.InformationStepHandle=gI;exports.IntegrationProduct=cA;exports.IntegrationType=Mk;exports.LayoutElementFactory=tL;exports.LayoutElementType=Zt;exports.LayoutNotFoundError=Ai;exports.LayoutRenderingPurpose=rc;exports.MaterialStepHandle=uI;exports.MisconfigurationError=ns;exports.MockWorkflowManager=xQ;exports.ModelStepHandle=cI;exports.ModuleStepHandle=vI;exports.MoveCommand=rL;exports.ObjectInput=D1;exports.ObjectInputType=TI;exports.OptionGlobalPropertyHandle=F1;exports.OptionNotFoundError=Ad;exports.ParseError=wl;exports.PictureStepHandle=fI;exports.ProductCameraRig=_k;exports.ProductCollection=T1;exports.ProductCollectionProductSortKey=EI;exports.ProductWorkflow=Qu;exports.PromiseQueue=Xg;exports.QuestionStepHandle=dI;exports.QueueablePromise=Yg;exports.ResizeCommand=iL;exports.ResourceNotFoundError=nc;exports.RotateCommand=nL;exports.ScaleAxis=gi;exports.SendBackwardsCommand=dL;exports.ShapeStepHandle=hI;exports.ShareActionType=Bk;exports.SpiffCommerceClient=gQ;exports.StakeholderType=VA;exports.StepAspectType=Rk;exports.StepHandle=Wi;exports.StepType=Je;exports.TextAlgorithm=Pl;exports.TextChangeCommand=QT;exports.TextGlobalPropertyHandle=CI;exports.TextInput=Q9;exports.TextStepHandle=pI;exports.UnhandledBehaviorError=nn;exports.UnitOfMeasurement=Nk;exports.UpdateImageSourceCommand=oL;exports.Variant=Da;exports.WorkflowExperienceEventType=xg;exports.WorkflowExperienceImpl=bI;exports.amtChannelsForAspect=xI;exports.assetService=Qn;exports.browserColorToHex=nF;exports.cmPerPixel=O_;exports.currentDirection=D_;exports.dataUrlFromExternalUrl=OO;exports.deleteBundle=wQ;exports.designService=Zp;exports.determineCorrectFontSizeAndLines=ad;exports.digitalContentStepService=b1;exports.domParser=os;exports.duplicateBundle=BQ;exports.duplicateTransaction=MQ;exports.fetchAsString=ia;exports.findAngle=x_;exports.findElement=Nn;exports.findPmsColors=JB;exports.frameDataCache=Uu;exports.frameStepService=lo;exports.fromUtf8=Il;exports.generate=Ar;exports.generateCommands=aI;exports.generateSVGWithUnknownColors=Oa;exports.generateStateFromDesignInputSteps=TU;exports.getAddressValidationJobs=YQ;exports.getAttributesFromArrayBuffer=Gd;exports.getAxisAlignedBoundingBox=C_;exports.getBoundedOffsets=LD;exports.getBundleIdForTransaction=CQ;exports.getBundleThemeConfiguration=yQ;exports.getCustomer=_Q;exports.getCustomerBundles=NQ;exports.getElementVertices=P_;exports.getFrameData=nh;exports.getGlobalPropertyStateForBundle=RU;exports.getIntegration=MD;exports.getIntegrationProducts=eY;exports.getNEPoint=T_;exports.getNWPoint=F_;exports.getOrderedTransactions=VQ;exports.getOverrideThemeConfiguration=vQ;exports.getPointOfRotation=k_;exports.getProductCollections=H9;exports.getSEPoint=I_;exports.getSvgElement=Zg;exports.getTemplateBundles=HQ;exports.getTemplateTransactions=zQ;exports.getTransaction=mQ;exports.getTransactionThemeConfiguration=AQ;exports.getTransactionsForBundle=LQ;exports.getTransformedAssetURL=$g;exports.getTrueCoordinates=E_;exports.getUnorderedTransactions=UQ;exports.getValidationJobsForWorkflowExperiences=QQ;exports.getWorkflow=BD;exports.getWorkflows=qb;exports.graphQlManager=$e;exports.illustrationStepService=id;exports.isCloseToValue=S_;exports.loadFont=Ml;exports.matchHexToPms=QB;exports.materialStepService=w1;exports.metafieldManager=Sg;exports.mmPerPixel=R_;exports.modelStepService=C1;exports.modifySVGColors=Gg;exports.moduleStepService=x1;exports.nameBundle=RQ;exports.nameTransaction=OQ;exports.optionService=ft;exports.outlineFontsInSvg=c7;exports.overrideWorkflowExperienceRecipientAddress=KQ;exports.patternImageDataCache=Bs;exports.persistenceService=xr;exports.pictureStepService=S1;exports.pmsToRgb=WB;exports.promiseCache=Cd;exports.questionStepService=E1;exports.registerFetchImplementation=TO;exports.registerWindowImplementation=FO;exports.rehydrateSerializedLayout=rA;exports.rgbToPms=rF;exports.rotateAroundPoint=$f;exports.sanitizeSvgTree=jg;exports.setBearerAuthenticationToken=$k;exports.setCanvasModule=HA;exports.shapeStepService=Vu;exports.shortenUrl=eI;exports.spiffCoreConfiguration=_s;exports.stepAspectValuesToDesignInputSteps=FU;exports.svgColorValueToDefinition=Ly;exports.svgStringDimensions=v1;exports.svgToDataUrl=Hg;exports.textStepService=ui;exports.toUtf8=im;exports.toast=rI;exports.validateWorkflowExperienceRecipient=XQ;exports.validateWorkflowExperienceRecipients=JQ;exports.xmlSerializer=Po;
2906
- //# sourceMappingURL=index-qooTAm19.cjs.map
2911
+ `,tY=async r=>(await $e.getShadowGraphqlClient().query({query:eY,variables:{ids:r}})).data.integrationProducts;exports.AddonHandle=Ng;exports.AddressValidationJobStatus=GD;exports.AddressValidationResultConfirmationLevel=jD;exports.AddressValidationStatus=UA;exports.ArrayInput=X9;exports.AspectType=zn;exports.AssetNotFoundError=So;exports.AssetType=yd;exports.BringForwardCommand=fL;exports.BringToBackCommand=cL;exports.BringToFrontCommand=uL;exports.BundleDesignCreationCartAddMode=Ok;exports.CanvasCommand=Fn;exports.CollectionProduct=Wf;exports.ColorOptionGlobalPropertyHandle=lA;exports.CommandContext=zT;exports.ConversionDataType=td;exports.CreateElementCommand=ai;exports.CreateLayoutCommand=y1;exports.CurrencyContext=OD;exports.CurrencyService=RD;exports.DeleteElementCommand=_l;exports.DigitalContentStepHandle=mI;exports.FileUploadGlobalPropertyHandle=wI;exports.FlowExecutionNodeResult=Qf;exports.FlowExecutionResult=FI;exports.FlowService=kI;exports.FontAlignmentCommand=WT;exports.FontColorCommand=$T;exports.FontSizeCommand=qT;exports.FontSourceCommand=nA;exports.FrameService=UD;exports.FrameStep=VD;exports.FrameStepHandle=zD;exports.GlobalPropertyHandle=rm;exports.GroupCommand=Rn;exports.IllustrationStepHandle=lI;exports.InformationMessageType=ih;exports.InformationStepHandle=gI;exports.IntegrationProduct=cA;exports.IntegrationType=Mk;exports.LayoutElementFactory=tL;exports.LayoutElementType=Zt;exports.LayoutNotFoundError=Ai;exports.LayoutRenderingPurpose=rc;exports.MaterialStepHandle=uI;exports.MisconfigurationError=ns;exports.MockWorkflowManager=SQ;exports.ModelStepHandle=cI;exports.ModuleStepHandle=vI;exports.MoveCommand=rL;exports.ObjectInput=D1;exports.ObjectInputType=TI;exports.OptionGlobalPropertyHandle=F1;exports.OptionNotFoundError=Ad;exports.ParseError=wl;exports.PictureStepHandle=fI;exports.ProductCameraRig=_k;exports.ProductCollection=T1;exports.ProductCollectionProductSortKey=EI;exports.ProductWorkflow=Qu;exports.PromiseQueue=Xg;exports.QuestionStepHandle=dI;exports.QueueablePromise=Yg;exports.ResizeCommand=iL;exports.ResourceNotFoundError=nc;exports.RotateCommand=nL;exports.ScaleAxis=gi;exports.SendBackwardsCommand=dL;exports.ShapeStepHandle=hI;exports.ShareActionType=Bk;exports.SpiffCommerceClient=mQ;exports.StakeholderType=VA;exports.StepAspectType=Rk;exports.StepHandle=Wi;exports.StepType=Je;exports.TextAlgorithm=Pl;exports.TextChangeCommand=QT;exports.TextGlobalPropertyHandle=CI;exports.TextInput=Y9;exports.TextStepHandle=pI;exports.UnhandledBehaviorError=nn;exports.UnitOfMeasurement=Nk;exports.UpdateImageSourceCommand=oL;exports.Variant=Da;exports.WorkflowExperienceEventType=xg;exports.WorkflowExperienceImpl=bI;exports.amtChannelsForAspect=xI;exports.assetService=Qn;exports.browserColorToHex=nF;exports.bundleEmailMutation=l9;exports.cmPerPixel=O_;exports.currentDirection=D_;exports.dataUrlFromExternalUrl=OO;exports.deleteBundle=CQ;exports.designService=Zp;exports.determineCorrectFontSizeAndLines=ad;exports.digitalContentStepService=b1;exports.domParser=os;exports.duplicateBundle=MQ;exports.duplicateTransaction=_Q;exports.fetchAsString=ia;exports.findAngle=x_;exports.findElement=Nn;exports.findPmsColors=JB;exports.frameDataCache=Uu;exports.frameStepService=lo;exports.fromUtf8=Il;exports.generate=Ar;exports.generateCommands=aI;exports.generateSVGWithUnknownColors=Oa;exports.generateStateFromDesignInputSteps=TU;exports.getAddressValidationJobs=XQ;exports.getAttributesFromArrayBuffer=Gd;exports.getAxisAlignedBoundingBox=C_;exports.getBoundedOffsets=LD;exports.getBundleIdForTransaction=xQ;exports.getBundleThemeConfiguration=AQ;exports.getCustomer=NQ;exports.getCustomerBundles=LQ;exports.getElementVertices=P_;exports.getFrameData=nh;exports.getGlobalPropertyStateForBundle=RU;exports.getIntegration=MD;exports.getIntegrationProducts=tY;exports.getNEPoint=T_;exports.getNWPoint=F_;exports.getOrderedTransactions=zQ;exports.getOverrideThemeConfiguration=yQ;exports.getPointOfRotation=k_;exports.getProductCollections=j9;exports.getSEPoint=I_;exports.getSvgElement=Zg;exports.getTemplateBundles=jQ;exports.getTemplateTransactions=HQ;exports.getTransaction=vQ;exports.getTransactionThemeConfiguration=bQ;exports.getTransactionsForBundle=UQ;exports.getTransformedAssetURL=$g;exports.getTrueCoordinates=E_;exports.getUnorderedTransactions=VQ;exports.getValidationJobsForWorkflowExperiences=YQ;exports.getWorkflow=BD;exports.getWorkflows=qb;exports.graphQlManager=$e;exports.illustrationStepService=id;exports.isCloseToValue=S_;exports.loadFont=Ml;exports.matchHexToPms=QB;exports.materialStepService=w1;exports.metafieldManager=Sg;exports.mmPerPixel=R_;exports.modelStepService=C1;exports.modifySVGColors=Gg;exports.moduleStepService=x1;exports.nameBundle=OQ;exports.nameTransaction=BQ;exports.optionService=ft;exports.outlineFontsInSvg=c7;exports.overrideWorkflowExperienceRecipientAddress=ZQ;exports.patternImageDataCache=Bs;exports.persistenceService=xr;exports.pictureStepService=S1;exports.pmsToRgb=WB;exports.promiseCache=Cd;exports.questionStepService=E1;exports.registerFetchImplementation=TO;exports.registerWindowImplementation=FO;exports.rehydrateSerializedLayout=rA;exports.rgbToPms=rF;exports.rotateAroundPoint=$f;exports.sanitizeSvgTree=jg;exports.setBearerAuthenticationToken=$k;exports.setCanvasModule=HA;exports.shapeStepService=Vu;exports.shortenUrl=eI;exports.spiffCoreConfiguration=_s;exports.stepAspectValuesToDesignInputSteps=FU;exports.svgColorValueToDefinition=Ly;exports.svgStringDimensions=v1;exports.svgToDataUrl=Hg;exports.textStepService=ui;exports.toUtf8=im;exports.toast=rI;exports.validateWorkflowExperienceRecipient=JQ;exports.validateWorkflowExperienceRecipients=KQ;exports.xmlSerializer=Po;
2912
+ //# sourceMappingURL=index-4uG9SDUO.cjs.map