commerce-sdk-isomorphic 1.11.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/index.cjs.d.ts +830 -11
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +830 -11
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/lib/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nanoid as e}from"nanoid";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var n,i,a=function(e){return e&&e.Math==Math&&e},o=a("object"==typeof globalThis&&globalThis)||a("object"==typeof window&&window)||a("object"==typeof self&&self)||a("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s=function(e){try{return!!e()}catch(e){return!0}},c=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=Function.prototype.call,h=d?u.bind(u):function(){return u.apply(u,arguments)},f={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,l={f:p&&!f.call({1:2},1)?function(e){var t=p(this,e);return!!t&&t.enumerable}:f},g=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=Function.prototype,v=b.bind,I=b.call,k=d&&v.bind(I,I),m=d?function(e){return e&&k(e)}:function(e){return e&&function(){return I.apply(e,arguments)}},x=m({}.toString),w=m("".slice),y=function(e){return w(x(e),8,-1)},C=Object,O=m("".split),z=s((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==y(e)?O(e,""):C(e)}:C,P=TypeError,E=function(e){if(null==e)throw P("Can't call method on "+e);return e},q=function(e){return z(E(e))},j=function(e){return"function"==typeof e},S=function(e){return"object"==typeof e?null!==e:j(e)},T=function(e){return j(e)?e:void 0},M=function(e,t){return arguments.length<2?T(o[e]):o[e]&&o[e][t]},R=m({}.isPrototypeOf),_=M("navigator","userAgent")||"",A=o.process,U=o.Deno,B=A&&A.versions||U&&U.version,N=B&&B.v8;N&&(i=(n=N.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!i&&_&&(!(n=_.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=_.match(/Chrome\/(\d+)/))&&(i=+n[1]);var L=i,W=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&L&&L<41})),D=W&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,J=Object,F=D?function(e){return"symbol"==typeof e}:function(e){var t=M("Symbol");return j(t)&&R(t.prototype,J(e))},G=String,H=function(e){try{return G(e)}catch(e){return"Object"}},V=TypeError,$=function(e){if(j(e))return e;throw V(H(e)+" is not a function")},Y=function(e,t){var r=e[t];return null==r?void 0:$(r)},K=TypeError,Q=Object.defineProperty,X=function(e,t){try{Q(o,e,{value:t,configurable:!0,writable:!0})}catch(r){o[e]=t}return t},Z=o["__core-js_shared__"]||X("__core-js_shared__",{}),ee=r((function(e){(e.exports=function(e,t){return Z[e]||(Z[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),te=Object,re=function(e){return te(E(e))},ne=m({}.hasOwnProperty),ie=Object.hasOwn||function(e,t){return ne(re(e),t)},ae=0,oe=Math.random(),se=m(1..toString),ce=function(e){return"Symbol("+(void 0===e?"":e)+")_"+se(++ae+oe,36)},de=ee("wks"),ue=o.Symbol,he=ue&&ue.for,fe=D?ue:ue&&ue.withoutSetter||ce,pe=function(e){if(!ie(de,e)||!W&&"string"!=typeof de[e]){var t="Symbol."+e;W&&ie(ue,e)?de[e]=ue[e]:de[e]=D&&he?he(t):fe(t)}return de[e]},le=TypeError,ge=pe("toPrimitive"),be=function(e,t){if(!S(e)||F(e))return e;var r,n=Y(e,ge);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!S(r)||F(r))return r;throw le("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&j(r=e.toString)&&!S(n=h(r,e)))return n;if(j(r=e.valueOf)&&!S(n=h(r,e)))return n;if("string"!==t&&j(r=e.toString)&&!S(n=h(r,e)))return n;throw K("Can't convert object to primitive value")}(e,t)},ve=function(e){var t=be(e,"string");return F(t)?t:t+""},Ie=o.document,ke=S(Ie)&&S(Ie.createElement),me=function(e){return ke?Ie.createElement(e):{}},xe=!c&&!s((function(){return 7!=Object.defineProperty(me("div"),"a",{get:function(){return 7}}).a})),we=Object.getOwnPropertyDescriptor,ye={f:c?we:function(e,t){if(e=q(e),t=ve(t),xe)try{return we(e,t)}catch(e){}if(ie(e,t))return g(!h(l.f,e,t),e[t])}},Ce=c&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,ze=TypeError,Pe=function(e){if(S(e))return e;throw ze(Oe(e)+" is not an object")},Ee=TypeError,qe=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Se={f:c?Ce?function(e,t,r){if(Pe(e),t=ve(t),Pe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=je(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return qe(e,t,r)}:qe:function(e,t,r){if(Pe(e),t=ve(t),Pe(r),xe)try{return qe(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Ee("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Te=c?function(e,t,r){return Se.f(e,t,g(1,r))}:function(e,t,r){return e[t]=r,e},Me=Function.prototype,Re=c&&Object.getOwnPropertyDescriptor,_e=ie(Me,"name"),Ae={EXISTS:_e,PROPER:_e&&"something"===function(){}.name,CONFIGURABLE:_e&&(!c||c&&Re(Me,"name").configurable)},Ue=m(Function.toString);j(Z.inspectSource)||(Z.inspectSource=function(e){return Ue(e)});var Be,Ne,Le,We=Z.inspectSource,De=o.WeakMap,Je=j(De)&&/native code/.test(We(De)),Fe=ee("keys"),Ge=function(e){return Fe[e]||(Fe[e]=ce(e))},He={},Ve=o.TypeError,$e=o.WeakMap;if(Je||Z.state){var Ye=Z.state||(Z.state=new $e),Ke=m(Ye.get),Qe=m(Ye.has),Xe=m(Ye.set);Be=function(e,t){if(Qe(Ye,e))throw new Ve("Object already initialized");return t.facade=e,Xe(Ye,e,t),t},Ne=function(e){return Ke(Ye,e)||{}},Le=function(e){return Qe(Ye,e)}}else{var Ze=Ge("state");He[Ze]=!0,Be=function(e,t){if(ie(e,Ze))throw new Ve("Object already initialized");return t.facade=e,Te(e,Ze,t),t},Ne=function(e){return ie(e,Ze)?e[Ze]:{}},Le=function(e){return ie(e,Ze)}}var et={set:Be,get:Ne,has:Le,enforce:function(e){return Le(e)?Ne(e):Be(e,{})},getterFor:function(e){return function(t){var r;if(!S(t)||(r=Ne(t)).type!==e)throw Ve("Incompatible receiver, "+e+" required");return r}}},tt=r((function(e){var t=Ae.CONFIGURABLE,r=et.enforce,n=et.get,i=Object.defineProperty,a=c&&!s((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),d=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ie(e,"name")||t&&e.name!==n)&&(c?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ie(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ie(s,"constructor")&&s.constructor?c&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return ie(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=d((function(){return j(this)&&n(this).source||We(this)}),"toString")})),rt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(j(r)&&tt(r,a,n),n.global)i?e[t]=r:X(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Se.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},nt=Math.ceil,it=Math.floor,at=Math.trunc||function(e){var t=+e;return(t>0?it:nt)(t)},ot=function(e){var t=+e;return t!=t||0===t?0:at(t)},st=Math.max,ct=Math.min,dt=function(e,t){var r=ot(e);return r<0?st(r+t,0):ct(r,t)},ut=Math.min,ht=function(e){return e>0?ut(ot(e),9007199254740991):0},ft=function(e){return ht(e.length)},pt=function(e){return function(t,r,n){var i,a=q(t),o=ft(a),s=dt(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},lt={includes:pt(!0),indexOf:pt(!1)},gt=lt.indexOf,bt=m([].push),vt=function(e,t){var r,n=q(e),i=0,a=[];for(r in n)!ie(He,r)&&ie(n,r)&&bt(a,r);for(;t.length>i;)ie(n,r=t[i++])&&(~gt(a,r)||bt(a,r));return a},It=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=It.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(e){return vt(e,kt)}},xt={f:Object.getOwnPropertySymbols},wt=m([].concat),yt=M("Reflect","ownKeys")||function(e){var t=mt.f(Pe(e)),r=xt.f;return r?wt(t,r(e)):t},Ct=function(e,t,r){for(var n=yt(t),i=Se.f,a=ye.f,o=0;o<n.length;o++){var s=n[o];ie(e,s)||r&&ie(r,s)||i(e,s,a(t,s))}},Ot=/#|\.prototype\./,zt=function(e,t){var r=Et[Pt(e)];return r==jt||r!=qt&&(j(t)?s(t):!!t)},Pt=zt.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},Et=zt.data={},qt=zt.NATIVE="N",jt=zt.POLYFILL="P",St=zt,Tt=ye.f,Mt=function(e,t){var r,n,i,a,s,c=e.target,d=e.global,u=e.stat;if(r=d?o:u?o[c]||X(c,{}):(o[c]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(s=Tt(r,n))&&s.value:r[n],!St(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Ct(a,i)}(e.sham||i&&i.sham)&&Te(a,"sham",!0),rt(r,n,a,e)}},Rt=Object.keys||function(e){return vt(e,It)},_t=s((function(){Rt(1)}));Mt({target:"Object",stat:!0,forced:_t},{keys:function(e){return Rt(re(e))}});var At={};At[pe("toStringTag")]="z";var Ut,Bt="[object z]"===String(At),Nt=pe("toStringTag"),Lt=Object,Wt="Arguments"==y(function(){return arguments}()),Dt=Bt?y:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Lt(e),Nt))?r:Wt?y(t):"Object"==(n=y(t))&&j(t.callee)?"Arguments":n},Jt=String,Ft=function(e){if("Symbol"===Dt(e))throw TypeError("Cannot convert a Symbol value to a string");return Jt(e)},Gt={f:c&&!Ce?Object.defineProperties:function(e,t){Pe(e);for(var r,n=q(t),i=Rt(t),a=i.length,o=0;a>o;)Se.f(e,r=i[o++],n[r]);return e}},Ht=M("document","documentElement"),Vt=Ge("IE_PROTO"),$t=function(){},Yt=function(e){return"<script>"+e+"<\/script>"},Kt=function(e){e.write(Yt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Qt=function(){try{Ut=new ActiveXObject("htmlfile")}catch(e){}var e,t;Qt="undefined"!=typeof document?document.domain&&Ut?Kt(Ut):((t=me("iframe")).style.display="none",Ht.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Yt("document.F=Object")),e.close(),e.F):Kt(Ut);for(var r=It.length;r--;)delete Qt.prototype[It[r]];return Qt()};He[Vt]=!0;var Xt=Object.create||function(e,t){var r;return null!==e?($t.prototype=Pe(e),r=new $t,$t.prototype=null,r[Vt]=e):r=Qt(),void 0===t?r:Gt.f(r,t)},Zt=function(e,t,r){var n=ve(t);n in e?Se.f(e,n,g(0,r)):e[n]=r},er=Array,tr=Math.max,rr=function(e,t,r){for(var n=ft(e),i=dt(t,n),a=dt(void 0===r?n:r,n),o=er(tr(a-i,0)),s=0;i<a;i++,s++)Zt(o,s,e[i]);return o.length=s,o},nr=mt.f,ir="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ar={f:function(e){return ir&&"Window"==y(e)?function(e){try{return nr(e)}catch(e){return rr(ir)}}(e):nr(q(e))}},or={f:pe},sr=o,cr=Se.f,dr=Se.f,ur=pe("toStringTag"),hr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ie(e,ur)&&dr(e,ur,{configurable:!0,value:t})},fr=m(m.bind),pr=function(e,t){return $(e),void 0===t?e:d?fr(e,t):function(){return e.apply(t,arguments)}},lr=Array.isArray||function(e){return"Array"==y(e)},gr=function(){},br=[],vr=M("Reflect","construct"),Ir=/^\s*(?:class|function)\b/,kr=m(Ir.exec),mr=!Ir.exec(gr),xr=function(e){if(!j(e))return!1;try{return vr(gr,br,e),!0}catch(e){return!1}},wr=function(e){if(!j(e))return!1;switch(Dt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mr||!!kr(Ir,We(e))}catch(e){return!0}};wr.sham=!0;var yr=!vr||s((function(){var e;return xr(xr.call)||!xr(Object)||!xr((function(){e=!0}))||e}))?wr:xr,Cr=pe("species"),Or=Array,zr=function(e,t){return new(function(e){var t;return lr(e)&&(t=e.constructor,(yr(t)&&(t===Or||lr(t.prototype))||S(t)&&null===(t=t[Cr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},Pr=m([].push),Er=function(e){var t=1==e,r=2==e,n=3==e,i=4==e,a=6==e,o=7==e,s=5==e||a;return function(c,d,u,h){for(var f,p,l=re(c),g=z(l),b=pr(d,u),v=ft(g),I=0,k=h||zr,m=t?k(c,v):r||o?k(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(f=g[I],I,l),e))if(t)m[I]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Pr(m,f)}else switch(e){case 4:return!1;case 7:Pr(m,f)}return a?-1:n||i?i:m}},qr={forEach:Er(0),map:Er(1),filter:Er(2),some:Er(3),every:Er(4),find:Er(5),findIndex:Er(6),filterReject:Er(7)},jr=qr.forEach,Sr=Ge("hidden"),Tr=et.set,Mr=et.getterFor("Symbol"),Rr=Object.prototype,_r=o.Symbol,Ar=_r&&_r.prototype,Ur=o.TypeError,Br=o.QObject,Nr=ye.f,Lr=Se.f,Wr=ar.f,Dr=l.f,Jr=m([].push),Fr=ee("symbols"),Gr=ee("op-symbols"),Hr=ee("wks"),Vr=!Br||!Br.prototype||!Br.prototype.findChild,$r=c&&s((function(){return 7!=Xt(Lr({},"a",{get:function(){return Lr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Nr(Rr,t);n&&delete Rr[t],Lr(e,t,r),n&&e!==Rr&&Lr(Rr,t,n)}:Lr,Yr=function(e,t){var r=Fr[e]=Xt(Ar);return Tr(r,{type:"Symbol",tag:e,description:t}),c||(r.description=t),r},Kr=function(e,t,r){e===Rr&&Kr(Gr,t,r),Pe(e);var n=ve(t);return Pe(r),ie(Fr,n)?(r.enumerable?(ie(e,Sr)&&e[Sr][n]&&(e[Sr][n]=!1),r=Xt(r,{enumerable:g(0,!1)})):(ie(e,Sr)||Lr(e,Sr,g(1,{})),e[Sr][n]=!0),$r(e,n,r)):Lr(e,n,r)},Qr=function(e,t){Pe(e);var r=q(t),n=Rt(r).concat(tn(r));return jr(n,(function(t){c&&!h(Xr,r,t)||Kr(e,t,r[t])})),e},Xr=function(e){var t=ve(e),r=h(Dr,this,t);return!(this===Rr&&ie(Fr,t)&&!ie(Gr,t))&&(!(r||!ie(this,t)||!ie(Fr,t)||ie(this,Sr)&&this[Sr][t])||r)},Zr=function(e,t){var r=q(e),n=ve(t);if(r!==Rr||!ie(Fr,n)||ie(Gr,n)){var i=Nr(r,n);return!i||!ie(Fr,n)||ie(r,Sr)&&r[Sr][n]||(i.enumerable=!0),i}},en=function(e){var t=Wr(q(e)),r=[];return jr(t,(function(e){ie(Fr,e)||ie(He,e)||Jr(r,e)})),r},tn=function(e){var t=e===Rr,r=Wr(t?Gr:q(e)),n=[];return jr(r,(function(e){!ie(Fr,e)||t&&!ie(Rr,e)||Jr(n,Fr[e])})),n};W||(Ar=(_r=function(){if(R(Ar,this))throw Ur("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Ft(arguments[0]):void 0,t=ce(e),r=function(e){this===Rr&&h(r,Gr,e),ie(this,Sr)&&ie(this[Sr],t)&&(this[Sr][t]=!1),$r(this,t,g(1,e))};return c&&Vr&&$r(Rr,t,{configurable:!0,set:r}),Yr(t,e)}).prototype,rt(Ar,"toString",(function(){return Mr(this).tag})),rt(_r,"withoutSetter",(function(e){return Yr(ce(e),e)})),l.f=Xr,Se.f=Kr,Gt.f=Qr,ye.f=Zr,mt.f=ar.f=en,xt.f=tn,or.f=function(e){return Yr(pe(e),e)},c&&(Lr(Ar,"description",{configurable:!0,get:function(){return Mr(this).description}}),rt(Rr,"propertyIsEnumerable",Xr,{unsafe:!0}))),Mt({global:!0,constructor:!0,wrap:!0,forced:!W,sham:!W},{Symbol:_r}),jr(Rt(Hr),(function(e){!function(e){var t=sr.Symbol||(sr.Symbol={});ie(t,e)||cr(t,e,{value:or.f(e)})}(e)})),Mt({target:"Symbol",stat:!0,forced:!W},{useSetter:function(){Vr=!0},useSimple:function(){Vr=!1}}),Mt({target:"Object",stat:!0,forced:!W,sham:!c},{create:function(e,t){return void 0===t?Xt(e):Qr(Xt(e),t)},defineProperty:Kr,defineProperties:Qr,getOwnPropertyDescriptor:Zr}),Mt({target:"Object",stat:!0,forced:!W},{getOwnPropertyNames:en}),function(){var e=M("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=pe("toPrimitive");t&&!t[n]&&rt(t,n,(function(e){return h(r,this)}),{arity:1})}(),hr(_r,"Symbol"),He[Sr]=!0;var rn=W&&!!Symbol.for&&!!Symbol.keyFor,nn=ee("string-to-symbol-registry"),an=ee("symbol-to-string-registry");Mt({target:"Symbol",stat:!0,forced:!rn},{for:function(e){var t=Ft(e);if(ie(nn,t))return nn[t];var r=M("Symbol")(t);return nn[t]=r,an[r]=t,r}});var on=ee("symbol-to-string-registry");Mt({target:"Symbol",stat:!0,forced:!rn},{keyFor:function(e){if(!F(e))throw TypeError(H(e)+" is not a symbol");if(ie(on,e))return on[e]}});var sn=Function.prototype,cn=sn.apply,dn=sn.call,un="object"==typeof Reflect&&Reflect.apply||(d?dn.bind(cn):function(){return dn.apply(cn,arguments)}),hn=m([].slice),fn=M("JSON","stringify"),pn=m(/./.exec),ln=m("".charAt),gn=m("".charCodeAt),bn=m("".replace),vn=m(1..toString),In=/[\uD800-\uDFFF]/g,kn=/^[\uD800-\uDBFF]$/,mn=/^[\uDC00-\uDFFF]$/,xn=!W||s((function(){var e=M("Symbol")();return"[null]"!=fn([e])||"{}"!=fn({a:e})||"{}"!=fn(Object(e))})),wn=s((function(){return'"\\udf06\\ud834"'!==fn("\udf06\ud834")||'"\\udead"'!==fn("\udead")})),yn=function(e,t){var r=hn(arguments),n=t;if((S(t)||void 0!==e)&&!F(e))return lr(t)||(t=function(e,t){if(j(n)&&(t=h(n,this,e,t)),!F(t))return t}),r[1]=t,un(fn,null,r)},Cn=function(e,t,r){var n=ln(r,t-1),i=ln(r,t+1);return pn(kn,e)&&!pn(mn,i)||pn(mn,e)&&!pn(kn,n)?"\\u"+vn(gn(e,0),16):e};fn&&Mt({target:"JSON",stat:!0,arity:3,forced:xn||wn},{stringify:function(e,t,r){var n=hn(arguments),i=un(xn?yn:fn,null,n);return wn&&"string"==typeof i?bn(i,In,Cn):i}});var On=!W||s((function(){xt.f(1)}));Mt({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=xt.f;return t?t(re(e)):[]}});var zn=pe("species"),Pn=function(e){return L>=51||!s((function(){var t=[];return(t.constructor={})[zn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},En=qr.filter,qn=Pn("filter");Mt({target:"Array",proto:!0,forced:!qn},{filter:function(e){return En(this,e,arguments.length>1?arguments[1]:void 0)}});var jn=Bt?{}.toString:function(){return"[object "+Dt(this)+"]"};Bt||rt(Object.prototype,"toString",jn,{unsafe:!0});var Sn=ye.f,Tn=s((function(){Sn(1)}));Mt({target:"Object",stat:!0,forced:!c||Tn,sham:!c},{getOwnPropertyDescriptor:function(e,t){return Sn(q(e),t)}});var Mn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Rn=me("span").classList,_n=Rn&&Rn.constructor&&Rn.constructor.prototype,An=_n===Object.prototype?void 0:_n,Un=function(e,t){var r=[][e];return!!r&&s((function(){r.call(null,t||function(){return 1},1)}))},Bn=qr.forEach,Nn=Un("forEach")?[].forEach:function(e){return Bn(this,e,arguments.length>1?arguments[1]:void 0)},Ln=function(e){if(e&&e.forEach!==Nn)try{Te(e,"forEach",Nn)}catch(t){e.forEach=Nn}};for(var Wn in Mn)Mn[Wn]&&Ln(o[Wn]&&o[Wn].prototype);Ln(An),Mt({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(e){for(var t,r,n=q(e),i=ye.f,a=yt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&Zt(o,t,r);return o}});var Dn=Gt.f;Mt({target:"Object",stat:!0,forced:Object.defineProperties!==Dn,sham:!c},{defineProperties:Dn});var Jn=Se.f;Mt({target:"Object",stat:!0,forced:Object.defineProperty!==Jn,sham:!c},{defineProperty:Jn});var Fn,Gn=pe("match"),Hn=TypeError,Vn=function(e){if(function(e){var t;return S(e)&&(void 0!==(t=e[Gn])?!!t:"RegExp"==y(e))}(e))throw Hn("The method doesn't accept regular expressions");return e},$n=pe("match"),Yn=ye.f,Kn=m("".startsWith),Qn=m("".slice),Xn=Math.min,Zn=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[$n]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ei=!(Zn||(Fn=Yn(String.prototype,"startsWith"),!Fn||Fn.writable));Mt({target:"String",proto:!0,forced:!ei&&!Zn},{startsWith:function(e){var t=Ft(E(this));Vn(e);var r=ht(Xn(arguments.length>1?arguments[1]:void 0,t.length)),n=Ft(e);return Kn?Kn(t,n,r):Qn(t,r,r+n.length)===n}});var ti=function(){var e=Pe(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ri=RegExp.prototype,ni=Ae.PROPER,ii=RegExp.prototype.toString,ai=s((function(){return"/a/b"!=ii.call({source:"a",flags:"b"})})),oi=ni&&"toString"!=ii.name;function si(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function ci(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){si(a,n,i,o,s,"next",e)}function s(e){si(a,n,i,o,s,"throw",e)}o(void 0)}))}}function di(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ui(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function hi(e,t,r){return t&&ui(e.prototype,t),r&&ui(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fi(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(ai||oi)&&rt(RegExp.prototype,"toString",(function(){var e=Pe(this);return"/"+Ft(e.source)+"/"+Ft(function(e){var t=e.flags;return void 0!==t||"flags"in ri||ie(e,"flags")||!R(ri,e)?t:h(ti,e)}(e))}),{unsafe:!0});var pi=Object.prototype,li=pi.hasOwnProperty,gi="function"==typeof Symbol?Symbol:{},bi=gi.iterator||"@@iterator",vi=gi.asyncIterator||"@@asyncIterator",Ii=gi.toStringTag||"@@toStringTag";function ki(e,t,r,n){var i=t&&t.prototype instanceof wi?t:wi,a=Object.create(i.prototype),o=new _i(n||[]);return a._invoke=function(e,t,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return Ui()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=Ti(o,r);if(s){if(s===xi)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=mi(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===xi)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),a}function mi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var xi={};function wi(){}function yi(){}function Ci(){}var Oi={};Oi[bi]=function(){return this};var zi=Object.getPrototypeOf,Pi=zi&&zi(zi(Ai([])));Pi&&Pi!==pi&&li.call(Pi,bi)&&(Oi=Pi);var Ei=Ci.prototype=wi.prototype=Object.create(Oi);function qi(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function ji(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===yi||"GeneratorFunction"===(t.displayName||t.name))}function Si(e,t){var r;this._invoke=function(n,i){function a(){return new t((function(r,a){!function r(n,i,a,o){var s=mi(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&li.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function Ti(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,Ti(e,t),"throw"===t.method))return xi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return xi}var n=mi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,xi;var i=n.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,xi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,xi)}function Mi(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Ri(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _i(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Mi,this),this.reset(!0)}function Ai(e){if(e){var t=e[bi];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(li.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Ui}}function Ui(){return{value:void 0,done:!0}}yi.prototype=Ei.constructor=Ci,Ci.constructor=yi,Ci[Ii]=yi.displayName="GeneratorFunction",qi(Si.prototype),Si.prototype[vi]=function(){return this},qi(Ei),Ei[Ii]="Generator",Ei[bi]=function(){return this},Ei.toString=function(){return"[object Generator]"},_i.prototype={constructor:_i,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ri),!e)for(var t in this)"t"===t.charAt(0)&&li.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return a.type="throw",a.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var o=li.call(i,"catchLoc"),s=li.call(i,"finallyLoc");if(o&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&li.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,xi):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),xi},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),Ri(r),xi}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;Ri(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Ai(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),xi}};var Bi={wrap:ki,isGeneratorFunction:ji,AsyncIterator:Si,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Ci):(e.__proto__=Ci,Ii in e||(e[Ii]="GeneratorFunction")),e.prototype=Object.create(Ei),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new Si(ki(e,t,r,n),i);return ji(t)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Ai},Ni=Se.f,Li=pe("unscopables"),Wi=Array.prototype;null==Wi[Li]&&Ni(Wi,Li,{configurable:!0,value:Xt(null)});var Di,Ji,Fi,Gi=function(e){Wi[Li][e]=!0},Hi={},Vi=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),$i=Ge("IE_PROTO"),Yi=Object,Ki=Yi.prototype,Qi=Vi?Yi.getPrototypeOf:function(e){var t=re(e);if(ie(t,$i))return t[$i];var r=t.constructor;return j(r)&&t instanceof r?r.prototype:t instanceof Yi?Ki:null},Xi=pe("iterator"),Zi=!1;[].keys&&("next"in(Fi=[].keys())?(Ji=Qi(Qi(Fi)))!==Object.prototype&&(Di=Ji):Zi=!0),(null==Di||s((function(){var e={};return Di[Xi].call(e)!==e})))&&(Di={}),j(Di[Xi])||rt(Di,Xi,(function(){return this}));var ea={IteratorPrototype:Di,BUGGY_SAFARI_ITERATORS:Zi},ta=ea.IteratorPrototype,ra=function(){return this},na=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Xt(ta,{next:g(+!n,r)}),hr(e,i,!1),Hi[i]=ra,e},ia=String,aa=TypeError,oa=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=m(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Pe(r),function(e){if("object"==typeof e||j(e))return e;throw aa("Can't set "+ia(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),sa=Ae.PROPER,ca=Ae.CONFIGURABLE,da=ea.IteratorPrototype,ua=ea.BUGGY_SAFARI_ITERATORS,ha=pe("iterator"),fa=function(){return this},pa=function(e,t,r,n,i,a,o){na(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!ua&&e in l)return l[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",p=!1,l=e.prototype,g=l[ha]||l["@@iterator"]||i&&l[i],b=!ua&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Qi(v.call(new e)))!==Object.prototype&&s.next&&(Qi(s)!==da&&(oa?oa(s,da):j(s[ha])||rt(s,ha,fa)),hr(s,f,!0)),sa&&"values"==i&&g&&"values"!==g.name&&(ca?Te(l,"name","values"):(p=!0,b=function(){return h(g,this)})),i)if(c={values:u("values"),keys:a?b:u("keys"),entries:u("entries")},o)for(d in c)(ua||p||!(d in l))&&rt(l,d,c[d]);else Mt({target:t,proto:!0,forced:ua||p},c);return l[ha]!==b&&rt(l,ha,b,{name:i}),Hi[t]=b,c},la=Se.f,ga=et.set,ba=et.getterFor("Array Iterator"),va=pa(Array,"Array",(function(e,t){ga(this,{type:"Array Iterator",target:q(e),index:0,kind:t})}),(function(){var e=ba(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),Ia=Hi.Arguments=Hi.Array;if(Gi("keys"),Gi("values"),Gi("entries"),c&&"values"!==Ia.name)try{la(Ia,"name",{value:"values"})}catch(e){}var ka=m("".charAt),ma=m("".charCodeAt),xa=m("".slice),wa=function(e){return function(t,r){var n,i,a=Ft(E(t)),o=ot(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=ma(a,o))<55296||n>56319||o+1===s||(i=ma(a,o+1))<56320||i>57343?e?ka(a,o):n:e?xa(a,o,o+2):i-56320+(n-55296<<10)+65536}},ya={codeAt:wa(!1),charAt:wa(!0)},Ca=ya.charAt,Oa=et.set,za=et.getterFor("String Iterator");pa(String,"String",(function(e){Oa(this,{type:"String Iterator",string:Ft(e),index:0})}),(function(){var e,t=za(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Ca(r,n),t.index+=e.length,{value:e,done:!1})}));var Pa=pe("iterator"),Ea=pe("toStringTag"),qa=va.values,ja=function(e,t){if(e){if(e[Pa]!==qa)try{Te(e,Pa,qa)}catch(t){e[Pa]=qa}if(e[Ea]||Te(e,Ea,t),Mn[t])for(var r in va)if(e[r]!==va[r])try{Te(e,r,va[r])}catch(t){e[r]=va[r]}}};for(var Sa in Mn)ja(o[Sa]&&o[Sa].prototype,Sa);ja(An,"DOMTokenList");var Ta=pe("iterator"),Ma=!s((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ta]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Ra=function(e,t,r){for(var n in t)rt(e,n,t[n],r);return e},_a=TypeError,Aa=function(e,t){if(R(t,e))return e;throw _a("Incorrect invocation")},Ua=pe("iterator"),Ba=function(e){if(null!=e)return Y(e,Ua)||Y(e,"@@iterator")||Hi[Dt(e)]},Na=TypeError,La=function(e,t){var r=arguments.length<2?Ba(e):t;if($(r))return Pe(h(r,e));throw Na(H(e)+" is not iterable")},Wa=TypeError,Da=function(e,t){if(e<t)throw Wa("Not enough arguments");return e},Ja=Math.floor,Fa=function(e,t){var r=e.length,n=Ja(r/2);return r<8?Ga(e,t):Ha(e,Fa(rr(e,0,n),t),Fa(rr(e,n),t),t)},Ga=function(e,t){for(var r,n,i=e.length,a=1;a<i;){for(n=a,r=e[a];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==a++&&(e[n]=r)}return e},Ha=function(e,t,r,n){for(var i=t.length,a=r.length,o=0,s=0;o<i||s<a;)e[o+s]=o<i&&s<a?n(t[o],r[s])<=0?t[o++]:r[s++]:o<i?t[o++]:r[s++];return e},Va=Fa,$a=pe("iterator"),Ya=et.set,Ka=et.getterFor("URLSearchParams"),Qa=et.getterFor("URLSearchParamsIterator"),Xa=Object.getOwnPropertyDescriptor,Za=function(e){if(!c)return o[e];var t=Xa(o,e);return t&&t.value},eo=Za("fetch"),to=Za("Request"),ro=Za("Headers"),no=to&&to.prototype,io=ro&&ro.prototype,ao=o.RegExp,oo=o.TypeError,so=o.decodeURIComponent,co=o.encodeURIComponent,uo=m("".charAt),ho=m([].join),fo=m([].push),po=m("".replace),lo=m([].shift),go=m([].splice),bo=m("".split),vo=m("".slice),Io=/\+/g,ko=Array(4),mo=function(e){return ko[e-1]||(ko[e-1]=ao("((?:%[\\da-f]{2}){"+e+"})","gi"))},xo=function(e){try{return so(e)}catch(t){return e}},wo=function(e){var t=po(e,Io," "),r=4;try{return so(t)}catch(e){for(;r;)t=po(t,mo(r--),xo);return t}},yo=/[!'()~]|%20/g,Co={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Oo=function(e){return Co[e]},zo=function(e){return po(co(e),yo,Oo)},Po=na((function(e,t){Ya(this,{type:"URLSearchParamsIterator",iterator:La(Ka(e).entries),kind:t})}),"Iterator",(function(){var e=Qa(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),Eo=function(e){this.entries=[],this.url=null,void 0!==e&&(S(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===uo(e,0)?vo(e,1):e:Ft(e)))};Eo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=Ba(e);if(c)for(r=(t=La(e,c)).next;!(n=h(r,t)).done;){if(a=(i=La(Pe(n.value))).next,(o=h(a,i)).done||(s=h(a,i)).done||!h(a,i).done)throw oo("Expected sequence with length 2");fo(this.entries,{key:Ft(o.value),value:Ft(s.value)})}else for(var d in e)ie(e,d)&&fo(this.entries,{key:d,value:Ft(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=bo(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=bo(t,"="),fo(this.entries,{key:wo(lo(r)),value:wo(ho(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],fo(r,zo(e.key)+"="+zo(e.value));return ho(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var qo=function(){Aa(this,jo);var e=arguments.length>0?arguments[0]:void 0;Ya(this,new Eo(e))},jo=qo.prototype;if(Ra(jo,{append:function(e,t){Da(arguments.length,2);var r=Ka(this);fo(r.entries,{key:Ft(e),value:Ft(t)}),r.updateURL()},delete:function(e){Da(arguments.length,1);for(var t=Ka(this),r=t.entries,n=Ft(e),i=0;i<r.length;)r[i].key===n?go(r,i,1):i++;t.updateURL()},get:function(e){Da(arguments.length,1);for(var t=Ka(this).entries,r=Ft(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Da(arguments.length,1);for(var t=Ka(this).entries,r=Ft(e),n=[],i=0;i<t.length;i++)t[i].key===r&&fo(n,t[i].value);return n},has:function(e){Da(arguments.length,1);for(var t=Ka(this).entries,r=Ft(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Da(arguments.length,1);for(var r,n=Ka(this),i=n.entries,a=!1,o=Ft(e),s=Ft(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?go(i,c--,1):(a=!0,r.value=s));a||fo(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=Ka(this);Va(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Ka(this).entries,n=pr(e,arguments.length>1?arguments[1]:void 0),i=0;i<r.length;)n((t=r[i++]).value,t.key,this)},keys:function(){return new Po(this,"keys")},values:function(){return new Po(this,"values")},entries:function(){return new Po(this,"entries")}},{enumerable:!0}),rt(jo,$a,jo.entries,{name:"entries"}),rt(jo,"toString",(function(){return Ka(this).serialize()}),{enumerable:!0}),hr(qo,"URLSearchParams"),Mt({global:!0,constructor:!0,forced:!Ma},{URLSearchParams:qo}),!Ma&&j(ro)){var So=m(io.has),To=m(io.set),Mo=function(e){if(S(e)){var t,r=e.body;if("URLSearchParams"===Dt(r))return t=e.headers?new ro(e.headers):new ro,So(t,"content-type")||To(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Xt(e,{body:g(0,Ft(r)),headers:g(0,t)})}return e};if(j(eo)&&Mt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return eo(e,arguments.length>1?Mo(arguments[1]):{})}}),j(to)){var Ro=function(e){return Aa(this,no),new to(e,arguments.length>1?Mo(arguments[1]):{})};no.constructor=Ro,Ro.prototype=no,Mt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ro})}}var _o={URLSearchParams:qo,getState:Ka};function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Uo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Bo=hi((function e(t){if(di(this,e),fi(this,"baseUri",void 0),fi(this,"proxy",void 0),fi(this,"headers",void 0),fi(this,"parameters",void 0),fi(this,"fetchOptions",void 0),fi(this,"transformRequest",void 0),fi(this,"throwOnBadResponse",void 0),this.headers=Uo({},t.headers),this.parameters=Uo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Uo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function No(e){return(No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}fi(Bo,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),Mt({global:!0},{globalThis:o});var Lo="object"===("undefined"==typeof window?"undefined":No(window))&&"object"===No(window.document),Wo="object"===("undefined"==typeof process?"undefined":No(process))&&"object"===No(process.versions)&&"string"==typeof process.versions.node,Do=Lo?window:globalThis,Jo="function"==typeof Do.fetch,Fo=function(){if(Wo)return require("node-fetch").default;if(!Jo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Do.fetch}(),Go=Function,Ho=m([].concat),Vo=m([].join),$o={},Yo=function(e,t,r){if(!ie($o,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";$o[t]=Go("C,a","return new C("+Vo(n,",")+")")}return $o[t](e,r)},Ko=d?Go.bind:function(e){var t=$(this),r=t.prototype,n=hn(arguments,1),i=function(){var r=Ho(n,hn(arguments));return this instanceof i?Yo(t,r.length,r):t.apply(e,r)};return S(r)&&(i.prototype=r),i},Qo=TypeError,Xo=function(e){if(yr(e))return e;throw Qo(H(e)+" is not a constructor")},Zo=M("Reflect","construct"),es=Object.prototype,ts=[].push,rs=s((function(){function e(){}return!(Zo((function(){}),[],e)instanceof e)})),ns=!s((function(){Zo((function(){}))})),is=rs||ns;Mt({target:"Reflect",stat:!0,forced:is,sham:is},{construct:function(e,t){Xo(e),Pe(t);var r=arguments.length<3?e:Xo(arguments[2]);if(ns&&!rs)return Zo(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return un(ts,n,t),new(un(Ko,e,n))}var i=r.prototype,a=Xt(S(i)?i:es),o=un(e,a,t);return S(o)?o:a}});var as=TypeError,os=function(e){if(e>9007199254740991)throw as("Maximum allowed index exceeded");return e},ss=pe("isConcatSpreadable"),cs=L>=51||!s((function(){var e=[];return e[ss]=!1,e.concat()[0]!==e})),ds=Pn("concat"),us=function(e){if(!S(e))return!1;var t=e[ss];return void 0!==t?!!t:lr(e)};function hs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fs(e,t){return(fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ps(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fs(e,t)}function ls(e,t){if(t&&("object"===No(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hs(e)}function gs(e){return(gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bs(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function vs(e,t,r){return(vs=bs()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&fs(i,r.prototype),i}).apply(null,arguments)}function Is(e){var t="function"==typeof Map?new Map:void 0;return(Is=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return vs(e,arguments,gs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),fs(n,e)})(e)}function ks(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gs(e);if(t){var i=gs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ls(this,r)}}Mt({target:"Array",proto:!0,arity:1,forced:!cs||!ds},{concat:function(e){var t,r,n,i,a,o=re(this),s=zr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(us(a=-1===t?o:arguments[t]))for(i=ft(a),os(c+i),r=0;r<i;r++,c++)r in a&&Zt(s,c,a[r]);else os(c+1),Zt(s,c++,a);return s.length=c,s}});var ms,xs,ws=function(e){ps(r,Is(Error));var t=ks(r);function r(e){var n;return di(this,r),fi(hs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return hi(r)}(),ys=o.RegExp,Cs=s((function(){var e=ys("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Os=Cs||s((function(){return!ys("a","y").sticky})),zs={BROKEN_CARET:Cs||s((function(){var e=ys("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Os,UNSUPPORTED_Y:Cs},Ps=o.RegExp,Es=s((function(){var e=Ps(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),qs=o.RegExp,js=s((function(){var e=qs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ss=et.get,Ts=ee("native-string-replace",String.prototype.replace),Ms=RegExp.prototype.exec,Rs=Ms,_s=m("".charAt),As=m("".indexOf),Us=m("".replace),Bs=m("".slice),Ns=(xs=/b*/g,h(Ms,ms=/a/,"a"),h(Ms,xs,"a"),0!==ms.lastIndex||0!==xs.lastIndex),Ls=zs.BROKEN_CARET,Ws=void 0!==/()??/.exec("")[1];(Ns||Ws||Ls||Es||js)&&(Rs=function(e){var t,r,n,i,a,o,s,c=this,d=Ss(c),u=Ft(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=h(Rs,f,u),c.lastIndex=f.lastIndex,t;var p=d.groups,l=Ls&&c.sticky,g=h(ti,c),b=c.source,v=0,I=u;if(l&&(g=Us(g,"y",""),-1===As(g,"g")&&(g+="g"),I=Bs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==_s(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ws&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ns&&(n=c.lastIndex),i=h(Ms,l?r:c,I),l?i?(i.input=Bs(i.input,v),i[0]=Bs(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Ns&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),Ws&&i&&i.length>1&&h(Ts,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&p)for(i.groups=o=Xt(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var Ds=Rs;Mt({target:"RegExp",proto:!0,forced:/./.exec!==Ds},{exec:Ds});var Js=pe("species"),Fs=RegExp.prototype,Gs=function(e,t,r,n){var i=pe(e),a=!s((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!s((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Js]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var c=m(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=m(e),s=t.exec;return s===Ds||s===Fs.exec?a&&!i?{done:!0,value:c(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));rt(String.prototype,e,d[0]),rt(Fs,i,d[1])}n&&Te(Fs[i],"sham",!0)},Hs=ya.charAt,Vs=function(e,t,r){return t+(r?Hs(e,t).length:1)},$s=Math.floor,Ys=m("".charAt),Ks=m("".replace),Qs=m("".slice),Xs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Zs=/\$([$&'`]|\d{1,2})/g,ec=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Zs;return void 0!==i&&(i=re(i),c=Xs),Ks(a,c,(function(a,c){var d;switch(Ys(c,0)){case"$":return"$";case"&":return e;case"`":return Qs(t,0,r);case"'":return Qs(t,o);case"<":d=i[Qs(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var h=$s(u/10);return 0===h?a:h<=s?void 0===n[h-1]?Ys(c,1):n[h-1]+Ys(c,1):a}d=n[u-1]}return void 0===d?"":d}))},tc=TypeError,rc=function(e,t){var r=e.exec;if(j(r)){var n=h(r,e,t);return null!==n&&Pe(n),n}if("RegExp"===y(e))return h(Ds,e,t);throw tc("RegExp#exec called on incompatible receiver")},nc=pe("replace"),ic=Math.max,ac=Math.min,oc=m([].concat),sc=m([].push),cc=m("".indexOf),dc=m("".slice),uc="$0"==="a".replace(/./,"$0"),hc=!!/./[nc]&&""===/./[nc]("a","$0");Gs("replace",(function(e,t,r){var n=hc?"$":"$0";return[function(e,r){var n=E(this),i=null==e?void 0:Y(e,nc);return i?h(i,e,n,r):h(t,Ft(n),e,r)},function(e,i){var a=Pe(this),o=Ft(e);if("string"==typeof i&&-1===cc(i,n)&&-1===cc(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=j(i);c||(i=Ft(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var h=[];;){var f=rc(a,o);if(null===f)break;if(sc(h,f),!d)break;""===Ft(f[0])&&(a.lastIndex=Vs(o,ht(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<h.length;b++){for(var v=Ft((f=h[b])[0]),I=ic(ac(ot(f.index),o.length),0),k=[],m=1;m<f.length;m++)sc(k,void 0===(p=f[m])?p:String(p));var x=f.groups;if(c){var w=oc([v],k,I,o);void 0!==x&&sc(w,x);var y=Ft(un(i,void 0,w))}else y=ec(v,o,I,k,x,i);I>=g&&(l+=dc(o,g,I)+y,g=I+v.length)}return l+dc(o,g)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!uc||hc);var fc,pc=function(e,t,r){return r.get&&tt(r.get,t,{getter:!0}),r.set&&tt(r.set,t,{setter:!0}),Se.f(e,t,r)},lc=Object.assign,gc=Object.defineProperty,bc=m([].concat),vc=!lc||s((function(){if(c&&1!==lc({b:1},lc(gc({},"a",{enumerable:!0,get:function(){gc(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=lc({},e)[r]||"abcdefghijklmnopqrst"!=Rt(lc({},t)).join("")}))?function(e,t){for(var r=re(e),n=arguments.length,i=1,a=xt.f,o=l.f;n>i;)for(var s,d=z(arguments[i++]),u=a?bc(Rt(d),a(d)):Rt(d),f=u.length,p=0;f>p;)s=u[p++],c&&!h(o,d,s)||(r[s]=d[s]);return r}:lc,Ic=function(e,t,r){var n,i;Pe(e);try{if(!(n=Y(e,"return"))){if("throw"===t)throw r;return r}n=h(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Pe(n),r},kc=function(e,t,r,n){try{return n?t(Pe(r)[0],r[1]):t(r)}catch(t){Ic(e,"throw",t)}},mc=pe("iterator"),xc=Array.prototype,wc=function(e){return void 0!==e&&(Hi.Array===e||xc[mc]===e)},yc=Array,Cc=function(e){var t=re(e),r=yr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=pr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,f,p=Ba(t),l=0;if(!p||this===yc&&wc(p))for(o=ft(t),s=r?new this(o):yc(o);o>l;l++)f=a?i(t[l],l):t[l],Zt(s,l,f);else for(u=(d=La(t,p)).next,s=r?new this:[];!(c=h(u,d)).done;l++)f=a?kc(d,i,[c.value,l],!0):c.value,Zt(s,l,f);return s.length=l,s},Oc=/[^\0-\u007E]/,zc=/[.\u3002\uFF0E\uFF61]/g,Pc="Overflow: input needs wider integers to process",Ec=RangeError,qc=m(zc.exec),jc=Math.floor,Sc=String.fromCharCode,Tc=m("".charCodeAt),Mc=m([].join),Rc=m([].push),_c=m("".replace),Ac=m("".split),Uc=m("".toLowerCase),Bc=function(e){return e+22+75*(e<26)},Nc=function(e,t,r){var n=0;for(e=r?jc(e/700):e>>1,e+=jc(e/t);e>455;)e=jc(e/35),n+=36;return jc(n+36*e/(e+38))},Lc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Tc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Tc(e,r++);56320==(64512&a)?Rc(t,((1023&i)<<10)+(1023&a)+65536):(Rc(t,i),r--)}else Rc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Rc(n,Sc(r));var c=n.length,d=c;for(c&&Rc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var h=d+1;if(u-a>jc((2147483647-o)/h))throw Ec(Pc);for(o+=(u-a)*h,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ec(Pc);if(r==a){for(var f=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(f<l)break;var g=f-l,b=36-l;Rc(n,Sc(Bc(l+g%b))),f=jc(g/b),p+=36}Rc(n,Sc(Bc(f))),s=Nc(o,h,d==c),o=0,d++}}o++,a++}return Mc(n,"")},Wc=ya.codeAt,Dc=et.set,Jc=et.getterFor("URL"),Fc=_o.URLSearchParams,Gc=_o.getState,Hc=o.URL,Vc=o.TypeError,$c=o.parseInt,Yc=Math.floor,Kc=Math.pow,Qc=m("".charAt),Xc=m(/./.exec),Zc=m([].join),ed=m(1..toString),td=m([].pop),rd=m([].push),nd=m("".replace),id=m([].shift),ad=m("".split),od=m("".slice),sd=m("".toLowerCase),cd=m([].unshift),dd=/[a-z]/i,ud=/[\d+-.a-z]/i,hd=/\d/,fd=/^0x/i,pd=/^[0-7]+$/,ld=/^\d+$/,gd=/^[\da-f]+$/i,bd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,vd=/[\0\t\n\r #/:<>?@[\\\]^|]/,Id=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,kd=/[\t\n\r]/g,md=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)cd(t,e%256),e=Yc(e/256);return Zc(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=ed(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},xd={},wd=vc({},xd,{" ":1,'"':1,"<":1,">":1,"`":1}),yd=vc({},wd,{"#":1,"?":1,"{":1,"}":1}),Cd=vc({},yd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Od=function(e,t){var r=Wc(e,0);return r>32&&r<127&&!ie(t,e)?e:encodeURIComponent(e)},zd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Pd=function(e,t){var r;return 2==e.length&&Xc(dd,Qc(e,0))&&(":"==(r=Qc(e,1))||!t&&"|"==r)},Ed=function(e){var t;return e.length>1&&Pd(od(e,0,2))&&(2==e.length||"/"===(t=Qc(e,2))||"\\"===t||"?"===t||"#"===t)},qd=function(e){return"."===e||"%2e"===sd(e)},jd={},Sd={},Td={},Md={},Rd={},_d={},Ad={},Ud={},Bd={},Nd={},Ld={},Wd={},Dd={},Jd={},Fd={},Gd={},Hd={},Vd={},$d={},Yd={},Kd={},Qd=function(e,t,r){var n,i,a,o=Ft(e);if(t){if(i=this.parse(o))throw Vc(i);this.searchParams=null}else{if(void 0!==r&&(n=new Qd(r,!0)),i=this.parse(o,null,n))throw Vc(i);(a=Gc(new Fc)).bindURL(this),this.searchParams=a}};Qd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||jd,u=0,h="",f=!1,p=!1,l=!1;for(e=Ft(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=nd(e,Id,"")),e=nd(e,kd,""),n=Cc(e);u<=n.length;){switch(i=n[u],d){case jd:if(!i||!Xc(dd,i)){if(t)return"Invalid scheme";d=Td;continue}h+=sd(i),d=Sd;break;case Sd:if(i&&(Xc(ud,i)||"+"==i||"-"==i||"."==i))h+=sd(i);else{if(":"!=i){if(t)return"Invalid scheme";h="",d=Td,u=0;continue}if(t&&(c.isSpecial()!=ie(zd,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&zd[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Jd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Md:c.isSpecial()?d=Ud:"/"==n[u+1]?(d=Rd,u++):(c.cannotBeABaseURL=!0,rd(c.path,""),d=$d)}break;case Td:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=rr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Kd;break}d="file"==r.scheme?Jd:_d;continue;case Md:if("/"!=i||"/"!=n[u+1]){d=_d;continue}d=Bd,u++;break;case Rd:if("/"==i){d=Nd;break}d=Vd;continue;case _d:if(c.scheme=r.scheme,i==fc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Ad;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query="",d=Yd;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.path.length--,d=Vd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query,c.fragment="",d=Kd}break;case Ad:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Vd;continue}d=Nd}else d=Bd;break;case Ud:if(d=Bd,"/"!=i||"/"!=Qc(h,u+1))continue;u++;break;case Bd:if("/"!=i&&"\\"!=i){d=Nd;continue}break;case Nd:if("@"==i){f&&(h="%40"+h),f=!0,a=Cc(h);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=Od(b,Cd);l?c.password+=v:c.username+=v}else l=!0}h=""}else if(i==fc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Cc(h).length+1,h="",d=Ld}else h+=i;break;case Ld:case Wd:if(t&&"file"==c.scheme){d=Gd;continue}if(":"!=i||p){if(i==fc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",d=Hd,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),h+=i}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Dd,t==Wd)return}break;case Dd:if(!Xc(hd,i)){if(i==fc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=h){var I=$c(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===zd[c.scheme]?null:I,h=""}if(t)return;d=Hd;continue}return"Invalid port"}h+=i;break;case Jd:if(c.scheme="file","/"==i||"\\"==i)d=Fd;else{if(!r||"file"!=r.scheme){d=Vd;continue}if(i==fc)c.host=r.host,c.path=rr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=rr(r.path),c.query="",d=Yd;else{if("#"!=i){Ed(Zc(rr(n,u),""))||(c.host=r.host,c.path=rr(r.path),c.shortenPath()),d=Vd;continue}c.host=r.host,c.path=rr(r.path),c.query=r.query,c.fragment="",d=Kd}}break;case Fd:if("/"==i||"\\"==i){d=Gd;break}r&&"file"==r.scheme&&!Ed(Zc(rr(n,u),""))&&(Pd(r.path[0],!0)?rd(c.path,r.path[0]):c.host=r.host),d=Vd;continue;case Gd:if(i==fc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Pd(h))d=Vd;else if(""==h){if(c.host="",t)return;d=Hd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Hd}continue}h+=i;break;case Hd:if(c.isSpecial()){if(d=Vd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=fc&&(d=Vd,"/"!=i))continue}else c.fragment="",d=Kd;else c.query="",d=Yd;break;case Vd:if(i==fc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=sd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||rd(c.path,"")):qd(h)?"/"==i||"\\"==i&&c.isSpecial()||rd(c.path,""):("file"==c.scheme&&!c.path.length&&Pd(h)&&(c.host&&(c.host=""),h=Qc(h,0)+":"),rd(c.path,h)),h="","file"==c.scheme&&(i==fc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)id(c.path);"?"==i?(c.query="",d=Yd):"#"==i&&(c.fragment="",d=Kd)}else h+=Od(i,yd);break;case $d:"?"==i?(c.query="",d=Yd):"#"==i?(c.fragment="",d=Kd):i!=fc&&(c.path[0]+=Od(i,xd));break;case Yd:t||"#"!=i?i!=fc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":Od(i,xd)):(c.fragment="",d=Kd);break;case Kd:i!=fc&&(c.fragment+=Od(i,wd))}u++}},parseHost:function(e){var t,r,n;if("["==Qc(e,0)){if("]"!=Qc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,h=0,f=function(){return Qc(e,h)};if(":"==f()){if(":"!=Qc(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&Xc(gd,f());)t=16*t+$c(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,d>6)return;for(n=0;f();){if(i=null,n>0){if(!("."==f()&&n<4))return;h++}if(!Xc(hd,f()))return;for(;Xc(hd,f());){if(a=$c(f(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;h++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[d++]=t}else{if(null!==u)return;h++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(od(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Ac(_c(Uc(e),zc,"."),".");for(t=0;t<i.length;t++)r=i[t],Rc(n,qc(Oc,r)?"xn--"+Lc(r):r);return Mc(n,".")}(e),Xc(bd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=ad(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=c[n]))return e;if(a=10,i.length>1&&"0"==Qc(i,0)&&(a=Xc(fd,i)?16:8,i=od(i,8==a?1:2)),""===i)o=0;else{if(!Xc(10==a?ld:8==a?pd:gd,i))return e;o=$c(i,a)}rd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Kc(256,5-t))return null}else if(o>255)return null;for(s=td(r),n=0;n<r.length;n++)s+=r[n]*Kc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Xc(vd,e))return"Invalid host";for(t="",r=Cc(e),n=0;n<r.length;n++)t+=Od(r[n],xd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ie(zd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Pd(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,i=e.host,a=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==i?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=md(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Zc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Vc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Xd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+md(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ft(e)+":",jd)},getUsername:function(){return this.username},setUsername:function(e){var t=Cc(Ft(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Od(t[r],Cd)}},getPassword:function(){return this.password},setPassword:function(e){var t=Cc(Ft(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Od(t[r],Cd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?md(e):md(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ld)},getHostname:function(){var e=this.host;return null===e?"":md(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Wd)},getPort:function(){var e=this.port;return null===e?"":Ft(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Ft(e))?this.port=null:this.parse(e,Dd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Zc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Hd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Ft(e))?this.query=null:("?"==Qc(e,0)&&(e=od(e,1)),this.query="",this.parse(e,Yd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Ft(e))?("#"==Qc(e,0)&&(e=od(e,1)),this.fragment="",this.parse(e,Kd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Xd=function(e){var t=Aa(this,Zd),r=Da(arguments.length,1)>1?arguments[1]:void 0,n=Dc(t,new Qd(e,!1,r));c||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Zd=Xd.prototype,eu=function(e,t){return{get:function(){return Jc(this)[e]()},set:t&&function(e){return Jc(this)[t](e)},configurable:!0,enumerable:!0}};if(c&&(pc(Zd,"href",eu("serialize","setHref")),pc(Zd,"origin",eu("getOrigin")),pc(Zd,"protocol",eu("getProtocol","setProtocol")),pc(Zd,"username",eu("getUsername","setUsername")),pc(Zd,"password",eu("getPassword","setPassword")),pc(Zd,"host",eu("getHost","setHost")),pc(Zd,"hostname",eu("getHostname","setHostname")),pc(Zd,"port",eu("getPort","setPort")),pc(Zd,"pathname",eu("getPathname","setPathname")),pc(Zd,"search",eu("getSearch","setSearch")),pc(Zd,"searchParams",eu("getSearchParams")),pc(Zd,"hash",eu("getHash","setHash"))),rt(Zd,"toJSON",(function(){return Jc(this).serialize()}),{enumerable:!0}),rt(Zd,"toString",(function(){return Jc(this).serialize()}),{enumerable:!0}),Hc){var tu=Hc.createObjectURL,ru=Hc.revokeObjectURL;tu&&rt(Xd,"createObjectURL",pr(tu,Hc)),ru&&rt(Xd,"revokeObjectURL",pr(ru,Hc))}function nu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gs(e);if(t){var i=gs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return ls(this,r)}}hr(Xd,"URL"),Mt({global:!0,constructor:!0,forced:!Ma,sham:!c},{URL:Xd});var iu=function(e){ps(r,Is(URL));var t=nu(r);function r(e,n,i){var a;return di(this,r),(a=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==i?void 0:i.pathParams))).addQueryParams(null==i?void 0:i.queryParams),null!=i&&i.origin&&a.replaceOrigin(null==i?void 0:i.origin),a}return hi(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(),au="commerce-sdk-isomorphic@1.11.0";function ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function su(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ou(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var cu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=su({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r,n,i,a,o,s,c,d,u,h,f,p,l,g,b,v,I,k,m,x,w,y,C,O,z,P,E,q,j,S,T,M,R,_,A;return hi(e,[{key:"createBasket",value:(A=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=32,Fo(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"transferBasket",value:(_=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Fo(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new ws(u);case 40:return e.next=42,u.text();case 42:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"mergeBasket",value:(R=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=32,Fo(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=41,Fo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(P=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(O=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(y=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addItemToBasket",value:(w=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeItemFromBasket",value:(x=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateItemInBasket",value:(m=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Fo(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new ws(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(k=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Fo(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new ws(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(f=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=50,Fo(s.toString(),d);case 50:if(u=e.sent,!r){e.next=55;break}return e.abrupt("return",u);case 55:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=59;break}throw new ws(u);case 59:return e.next=61,u.text();case 61:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=40,Fo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function du(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function uu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?du(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):du(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var hu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=uu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r,n,i;return hi(e,[{key:"getShopperContext",value:(i=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=30,Fo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=30,Fo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=30,Fo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new ws(u);case 37:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=30,Fo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fu(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(hu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var lu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r,n,i,a,o,s,c,d,u,h,f,p,l,g,b,v,I,k,m,x,w,y,C,O,z,P,E,q,j,S,T;return hi(e,[{key:"registerCustomer",value:(T=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Fo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(S=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Fo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeCustomer",value:(j=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.clientId){e.next=17;break}o.clientId=n.clientId,e.next=22;break;case 17:if(void 0===i.clientId){e.next=21;break}o.clientId=i.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(q=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Fo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Fo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new ws(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(P=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Fo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Fo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getExternalProfile",value:(O=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getCustomer",value:(C=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(y=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"createCustomerAddress",value:(w=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomerAddress",value:(x=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeCustomerAddress",value:(m=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateCustomerAddress",value:(k=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Fo(s.toString(),d);case 44:if(u=e.sent,!r){e.next=49;break}return e.abrupt("return",u);case 49:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new ws(u);case 53:return e.next=55,u.text();case 55:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ws(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=56,Fo(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=63;break}throw new ws(u);case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=56,Fo(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=56,Fo(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ws(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=32,Fo(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ws(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Fo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ws(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function gu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gu(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var vu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r;return hi(e,[{key:"retrieveResults",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=bu(bu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=40,Fo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=bu(bu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Iu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Iu(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(vu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var mu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=ku({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r;return hi(e,[{key:"getPages",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=ku(ku({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Fo(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new ws(u);case 52:return e.next=54,u.text();case 54:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=ku(ku({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Fo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xu(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var yu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=wu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t;return hi(e,[{key:"getGiftCertificate",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=wu(wu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=wu(wu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Fo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ws(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Cu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cu(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(yu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var zu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=Ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r,n,i,a,o,s,c,d,u,h,f,p,l,g,b,v;return hi(e,[{key:"authenticateCustomer",value:(v=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Fo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===i.redirect_uri){e.next=21;break}o.redirect_uri=i.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===i.response_type){e.next=30;break}o.response_type=i.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===i.client_id){e.next=39;break}o.client_id=i.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==i.scope&&(o.scope=i.scope),void 0!==n.state?o.state=n.state:void 0!==i.state&&(o.state=i.state),void 0!==n.usid?o.usid=n.usid:void 0!==i.usid&&(o.usid=i.usid),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===i.code_challenge){e.next=53;break}o.code_challenge=i.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=62,Fo(s.toString(),d);case 62:if(u=e.sent,!r){e.next=67;break}return e.abrupt("return",u);case 67:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=69;break}throw new ws(u);case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=83,Fo(s.toString(),d);case 83:if(u=e.sent,!r){e.next=88;break}return e.abrupt("return",u);case 88:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=90;break}throw new ws(u);case 90:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ws(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=21,Fo(s.toString(),d);case 21:if(u=e.sent,!r){e.next=26;break}return e.abrupt("return",u);case 26:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=30;break}throw new ws(u);case 30:return e.next=32,u.text();case 32:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 34:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Fo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ws(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Eu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var qu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=Eu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r,n,i,a,o,s;return hi(e,[{key:"createOrder",value:(s=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Fo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ws(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Fo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ws(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Fo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ws(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ju(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Su(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ju(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ju(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(qu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Tu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=Su({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r,n,i;return hi(e,[{key:"getProducts",value:(i=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Fo(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Fo(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ws(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Fo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Fo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ws(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mu(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fi(Tu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var _u=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=Ru({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r;return hi(e,[{key:"getPromotions",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ru(Ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Fo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ws(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Ru(Ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Fo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();fi(_u,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Au=TypeError,Uu=function(e,t){if(!delete e[t])throw Au("Cannot delete property "+H(t)+" of "+H(e))},Bu=_.match(/firefox\/(\d+)/i),Nu=!!Bu&&+Bu[1],Lu=/MSIE|Trident/.test(_),Wu=_.match(/AppleWebKit\/(\d+)\./),Du=!!Wu&&+Wu[1],Ju=[],Fu=m(Ju.sort),Gu=m(Ju.push),Hu=s((function(){Ju.sort(void 0)})),Vu=s((function(){Ju.sort(null)})),$u=Un("sort"),Yu=!s((function(){if(L)return L<70;if(!(Nu&&Nu>3)){if(Lu)return!0;if(Du)return Du<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Ju.push({k:t+n,v:r})}for(Ju.sort((function(e,t){return t.v-e.v})),n=0;n<Ju.length;n++)t=Ju[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function Ku(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ku(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ku(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Mt({target:"Array",proto:!0,forced:Hu||!Vu||!$u||!Yu},{sort:function(e){void 0!==e&&$(e);var t=re(this);if(Yu)return void 0===e?Fu(t):Fu(t,e);var r,n,i=[],a=ft(t);for(n=0;n<a;n++)n in t&&Gu(i,t[n]);for(Va(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Ft(t)>Ft(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Uu(t,n++);return t}});var Xu=function(){function e(t){di(this,e),fi(this,"clientConfig",void 0);var r=Qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Bo(r)}var t,r;return hi(e,[{key:"productSearch",value:(r=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.q?o.q=n.q:void 0!==i.q&&(o.q=i.q),void 0!==n.refine?o.refine=n.refine:void 0!==i.refine&&(o.refine=i.refine),void 0!==n.sort?o.sort=n.sort:void 0!==i.sort&&(o.sort=i.sort),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qu(Qu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Qu(Qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Fo(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new ws(u);case 46:return e.next=48,u.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=ci(Bi.mark((function e(t,r){var n,i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter: ".concat(e))})),s=new iu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qu(Qu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],au].join(" ")),d=Qu(Qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Fo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ws(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();fi(Xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var Zu=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Gs("search",(function(e,t,r){return[function(t){var r=E(this),n=null==t?void 0:Y(t,e);return n?h(n,t,r):new RegExp(t)[e](Ft(r))},function(e){var n=Pe(this),i=Ft(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;Zu(o,0)||(n.lastIndex=0);var s=rc(n,i);return Zu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var eh=pe("iterator"),th=!1;try{var rh=0,nh={next:function(){return{done:!!rh++}},return:function(){th=!0}};nh[eh]=function(){return this},Array.from(nh,(function(){throw 2}))}catch(e){}var ih,ah,oh,sh=function(e,t){if(!t&&!th)return!1;var r=!1;try{var n={};n[eh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},ch="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,dh=Se.f,uh=et.enforce,hh=et.get,fh=o.Int8Array,ph=fh&&fh.prototype,lh=o.Uint8ClampedArray,gh=lh&&lh.prototype,bh=fh&&Qi(fh),vh=ph&&Qi(ph),Ih=Object.prototype,kh=o.TypeError,mh=pe("toStringTag"),xh=ce("TYPED_ARRAY_TAG"),wh=ch&&!!oa&&"Opera"!==Dt(o.opera),yh=!1,Ch={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Oh={BigInt64Array:8,BigUint64Array:8},zh=function(e){var t=Qi(e);if(S(t)){var r=hh(t);return r&&ie(r,"TypedArrayConstructor")?r.TypedArrayConstructor:zh(t)}},Ph=function(e){if(!S(e))return!1;var t=Dt(e);return ie(Ch,t)||ie(Oh,t)};for(ih in Ch)(oh=(ah=o[ih])&&ah.prototype)?uh(oh).TypedArrayConstructor=ah:wh=!1;for(ih in Oh)(oh=(ah=o[ih])&&ah.prototype)&&(uh(oh).TypedArrayConstructor=ah);if((!wh||!j(bh)||bh===Function.prototype)&&(bh=function(){throw kh("Incorrect invocation")},wh))for(ih in Ch)o[ih]&&oa(o[ih],bh);if((!wh||!vh||vh===Ih)&&(vh=bh.prototype,wh))for(ih in Ch)o[ih]&&oa(o[ih].prototype,vh);if(wh&&Qi(gh)!==vh&&oa(gh,vh),c&&!ie(vh,mh))for(ih in yh=!0,dh(vh,mh,{get:function(){return S(this)?this[xh]:void 0}}),Ch)o[ih]&&Te(o[ih],xh,ih);var Eh={NATIVE_ARRAY_BUFFER_VIEWS:wh,TYPED_ARRAY_TAG:yh&&xh,aTypedArray:function(e){if(Ph(e))return e;throw kh("Target is not a typed array")},aTypedArrayConstructor:function(e){if(j(e)&&(!oa||R(bh,e)))return e;throw kh(H(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(c){if(r)for(var i in Ch){var a=o[i];if(a&&ie(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}vh[e]&&!r||rt(vh,e,r?t:wh&&ph[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(c){if(oa){if(r)for(n in Ch)if((i=o[n])&&ie(i,e))try{delete i[e]}catch(e){}if(bh[e]&&!r)return;try{return rt(bh,e,r?t:wh&&bh[e]||t)}catch(e){}}for(n in Ch)!(i=o[n])||i[e]&&!r||rt(i,e,t)}},getTypedArrayConstructor:zh,isView:function(e){if(!S(e))return!1;var t=Dt(e);return"DataView"===t||ie(Ch,t)||ie(Oh,t)},isTypedArray:Ph,TypedArray:bh,TypedArrayPrototype:vh},qh=Eh.NATIVE_ARRAY_BUFFER_VIEWS,jh=o.ArrayBuffer,Sh=o.Int8Array,Th=!qh||!s((function(){Sh(1)}))||!s((function(){new Sh(-1)}))||!sh((function(e){new Sh,new Sh(null),new Sh(1.5),new Sh(e)}),!0)||s((function(){return 1!==new Sh(new jh(2),1,void 0).length})),Mh=RangeError,Rh=function(e){if(void 0===e)return 0;var t=ot(e),r=ht(t);if(t!==r)throw Mh("Wrong length or index");return r},_h=Array,Ah=Math.abs,Uh=Math.pow,Bh=Math.floor,Nh=Math.log,Lh=Math.LN2,Wh=function(e,t,r){var n,i,a,o=_h(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Uh(2,-24)-Uh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Ah(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Bh(Nh(e)/Lh),e*(a=Uh(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*Uh(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*Uh(2,t),n+=d):(i=e*Uh(2,d-1)*Uh(2,t),n=0));t>=8;)o[f++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},Dh=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,c=n-1,d=e[c--],u=127&d;for(d>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:d?-1/0:1/0;r+=Uh(2,t),u-=o}return(d?-1:1)*r*Uh(2,u-t)},Jh=function(e){for(var t=re(this),r=ft(t),n=arguments.length,i=dt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:dt(a,r);o>i;)t[i++]=e;return t},Fh=mt.f,Gh=Se.f,Hh=Ae.PROPER,Vh=Ae.CONFIGURABLE,$h=et.get,Yh=et.set,Kh=o.ArrayBuffer,Qh=Kh,Xh=Qh&&Qh.prototype,Zh=o.DataView,ef=Zh&&Zh.prototype,tf=Object.prototype,rf=o.Array,nf=o.RangeError,af=m(Jh),of=m([].reverse),sf=Wh,cf=Dh,df=function(e){return[255&e]},uf=function(e){return[255&e,e>>8&255]},hf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},ff=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},pf=function(e){return sf(e,23,4)},lf=function(e){return sf(e,52,8)},gf=function(e,t){Gh(e.prototype,t,{get:function(){return $h(this)[t]}})},bf=function(e,t,r,n){var i=Rh(r),a=$h(e);if(i+t>a.byteLength)throw nf("Wrong index");var o=$h(a.buffer).bytes,s=i+a.byteOffset,c=rr(o,s,s+t);return n?c:of(c)},vf=function(e,t,r,n,i,a){var o=Rh(r),s=$h(e);if(o+t>s.byteLength)throw nf("Wrong index");for(var c=$h(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),h=0;h<t;h++)c[d+h]=u[a?h:t-h-1]};if(ch){var If=Hh&&"ArrayBuffer"!==Kh.name;if(s((function(){Kh(1)}))&&s((function(){new Kh(-1)}))&&!s((function(){return new Kh,new Kh(1.5),new Kh(NaN),If&&!Vh})))If&&Vh&&Te(Kh,"name","ArrayBuffer");else{(Qh=function(e){return Aa(this,Xh),new Kh(Rh(e))}).prototype=Xh;for(var kf,mf=Fh(Kh),xf=0;mf.length>xf;)(kf=mf[xf++])in Qh||Te(Qh,kf,Kh[kf]);Xh.constructor=Qh}oa&&Qi(ef)!==tf&&oa(ef,tf);var wf=new Zh(new Qh(2)),yf=m(ef.setInt8);wf.setInt8(0,2147483648),wf.setInt8(1,2147483649),!wf.getInt8(0)&&wf.getInt8(1)||Ra(ef,{setInt8:function(e,t){yf(this,e,t<<24>>24)},setUint8:function(e,t){yf(this,e,t<<24>>24)}},{unsafe:!0})}else Xh=(Qh=function(e){Aa(this,Xh);var t=Rh(e);Yh(this,{bytes:af(rf(t),0),byteLength:t}),c||(this.byteLength=t)}).prototype,ef=(Zh=function(e,t,r){Aa(this,ef),Aa(e,Xh);var n=$h(e).byteLength,i=ot(t);if(i<0||i>n)throw nf("Wrong offset");if(i+(r=void 0===r?n-i:ht(r))>n)throw nf("Wrong length");Yh(this,{buffer:e,byteLength:r,byteOffset:i}),c||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,c&&(gf(Qh,"byteLength"),gf(Zh,"buffer"),gf(Zh,"byteLength"),gf(Zh,"byteOffset")),Ra(ef,{getInt8:function(e){return bf(this,1,e)[0]<<24>>24},getUint8:function(e){return bf(this,1,e)[0]},getInt16:function(e){var t=bf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=bf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return ff(bf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return ff(bf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return cf(bf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return cf(bf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){vf(this,1,e,df,t)},setUint8:function(e,t){vf(this,1,e,df,t)},setInt16:function(e,t){vf(this,2,e,uf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){vf(this,2,e,uf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){vf(this,4,e,hf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){vf(this,4,e,hf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){vf(this,4,e,pf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){vf(this,8,e,lf,t,arguments.length>2?arguments[2]:void 0)}});hr(Qh,"ArrayBuffer"),hr(Zh,"DataView");var Cf={ArrayBuffer:Qh,DataView:Zh},Of=Math.floor,zf=Number.isInteger||function(e){return!S(e)&&isFinite(e)&&Of(e)===e},Pf=RangeError,Ef=RangeError,qf=function(e,t){var r=function(e){var t=ot(e);if(t<0)throw Pf("The argument can't be less than 0");return t}(e);if(r%t)throw Ef("Wrong offset");return r},jf=Eh.aTypedArrayConstructor,Sf=function(e){var t,r,n,i,a,o,s=Xo(this),c=re(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,p=Ba(c);if(p&&!wc(p))for(o=(a=La(c,p)).next,c=[];!(i=h(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=pr(u,arguments[2])),r=ft(c),n=new(jf(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},Tf=pe("species"),Mf=function(e){var t=M(e),r=Se.f;c&&t&&!t[Tf]&&r(t,Tf,{configurable:!0,get:function(){return this}})};r((function(e){var t=mt.f,r=qr.forEach,n=et.get,i=et.set,a=et.enforce,s=Se.f,d=ye.f,u=Math.round,f=o.RangeError,p=Cf.ArrayBuffer,l=p.prototype,b=Cf.DataView,v=Eh.NATIVE_ARRAY_BUFFER_VIEWS,I=Eh.TYPED_ARRAY_TAG,k=Eh.TypedArray,m=Eh.TypedArrayPrototype,x=Eh.aTypedArrayConstructor,w=Eh.isTypedArray,y=function(e,t){x(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){s(e,t,{get:function(){return n(this)[t]}})},O=function(e){var t;return R(l,e)||"ArrayBuffer"==(t=Dt(e))||"SharedArrayBuffer"==t},z=function(e,t){return w(e)&&!F(t)&&t in e&&zf(+t)&&t>=0},P=function(e,t){return t=ve(t),z(e,t)?g(2,e[t]):d(e,t)},E=function(e,t,r){return t=ve(t),!(z(e,t)&&S(r)&&ie(r,"value"))||ie(r,"get")||ie(r,"set")||r.configurable||ie(r,"writable")&&!r.writable||ie(r,"enumerable")&&!r.enumerable?s(e,t,r):(e[t]=r.value,e)};c?(v||(ye.f=P,Se.f=E,C(m,"buffer"),C(m,"byteOffset"),C(m,"byteLength"),C(m,"length")),Mt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:P,defineProperty:E}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,g=e+(d?"Clamped":"")+"Array",x="get"+e,C="set"+e,z=o[g],P=z,E=P&&P.prototype,q={},T=function(e,t){s(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[x](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),i.view[C](t*l+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?Th&&(P=c((function(e,t,r,n){return Aa(e,E),function(e,t,r){var n,i;return oa&&j(n=t.constructor)&&n!==r&&S(i=n.prototype)&&i!==r.prototype&&oa(e,i),e}(S(t)?O(t)?void 0!==n?new z(t,qf(r,l),n):void 0!==r?new z(t,qf(r,l)):new z(t):w(t)?y(P,t):h(Sf,P,t):new z(Rh(t)),e,P)})),oa&&oa(P,k),r(t(z),(function(e){e in P||Te(P,e,z[e])})),P.prototype=E):(P=c((function(e,t,r,n){Aa(e,E);var a,o,s,c=0,d=0;if(S(t)){if(!O(t))return w(t)?y(P,t):h(Sf,P,t);a=t,d=qf(r,l);var u=t.byteLength;if(void 0===n){if(u%l)throw f("Wrong length");if((o=u-d)<0)throw f("Wrong length")}else if((o=ht(n)*l)+d>u)throw f("Wrong length");s=o/l}else s=Rh(t),a=new p(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new b(a)});c<s;)T(e,c++)})),oa&&oa(P,k),E=P.prototype=Xt(m)),E.constructor!==P&&Te(E,"constructor",P),a(E).TypedArrayConstructor=P,I&&Te(E,I,g);var M=P!=z;q[g]=P,Mt({global:!0,constructor:!0,forced:M,sham:!v},q),"BYTES_PER_ELEMENT"in P||Te(P,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Te(E,"BYTES_PER_ELEMENT",l),Mf(g)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Rf=Math.min,_f=m([].copyWithin||function(e,t){var r=re(this),n=ft(r),i=dt(e,n),a=dt(t,n),o=arguments.length>2?arguments[2]:void 0,s=Rf((void 0===o?n:dt(o,n))-a,n-i),c=1;for(a<i&&i<a+s&&(c=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Uu(r,i),i+=c,a+=c;return r}),Af=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("copyWithin",(function(e,t){return _f(Af(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Uf=qr.every,Bf=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("every",(function(e){return Uf(Bf(this),e,arguments.length>1?arguments[1]:void 0)}));var Nf=TypeError,Lf=function(e){var t=be(e,"number");if("number"==typeof t)throw Nf("Can't convert number to bigint");return BigInt(t)},Wf=Eh.aTypedArray,Df=Eh.exportTypedArrayMethod,Jf=m("".slice);Df("fill",(function(e){var t=arguments.length;Wf(this);var r="Big"===Jf(Dt(this),0,3)?Lf(e):+e;return h(Jh,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),s((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Ff=pe("species"),Gf=function(e,t){var r,n=Pe(e).constructor;return void 0===n||null==(r=Pe(n)[Ff])?t:Xo(r)},Hf=Eh.aTypedArrayConstructor,Vf=Eh.getTypedArrayConstructor,$f=function(e){return Hf(Gf(e,Vf(e)))},Yf=function(e,t){return function(e,t){for(var r=0,n=ft(t),i=new e(n);n>r;)i[r]=t[r++];return i}($f(e),t)},Kf=qr.filter,Qf=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("filter",(function(e){var t=Kf(Qf(this),e,arguments.length>1?arguments[1]:void 0);return Yf(this,t)}));var Xf=qr.find,Zf=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("find",(function(e){return Xf(Zf(this),e,arguments.length>1?arguments[1]:void 0)}));var ep=qr.findIndex,tp=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("findIndex",(function(e){return ep(tp(this),e,arguments.length>1?arguments[1]:void 0)}));var rp=qr.forEach,np=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("forEach",(function(e){rp(np(this),e,arguments.length>1?arguments[1]:void 0)}));var ip=lt.includes,ap=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("includes",(function(e){return ip(ap(this),e,arguments.length>1?arguments[1]:void 0)}));var op=lt.indexOf,sp=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("indexOf",(function(e){return op(sp(this),e,arguments.length>1?arguments[1]:void 0)}));var cp=pe("iterator"),dp=o.Uint8Array,up=m(va.values),hp=m(va.keys),fp=m(va.entries),pp=Eh.aTypedArray,lp=Eh.exportTypedArrayMethod,gp=dp&&dp.prototype,bp=!s((function(){gp[cp].call([1])})),vp=!!gp&&gp.values&&gp[cp]===gp.values&&"values"===gp.values.name,Ip=function(){return up(pp(this))};lp("entries",(function(){return fp(pp(this))}),bp),lp("keys",(function(){return hp(pp(this))}),bp),lp("values",Ip,bp||!vp,{name:"values"}),lp(cp,Ip,bp||!vp,{name:"values"});var kp=Eh.aTypedArray,mp=Eh.exportTypedArrayMethod,xp=m([].join);mp("join",(function(e){return xp(kp(this),e)}));var wp=Math.min,yp=[].lastIndexOf,Cp=!!yp&&1/[1].lastIndexOf(1,-0)<0,Op=Un("lastIndexOf"),zp=Cp||!Op?function(e){if(Cp)return un(yp,this,arguments)||0;var t=q(this),r=ft(t),n=r-1;for(arguments.length>1&&(n=wp(n,ot(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:yp,Pp=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return un(zp,Pp(this),t>1?[e,arguments[1]]:[e])}));var Ep=qr.map,qp=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("map",(function(e){return Ep(qp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new($f(e))(t)}))}));var jp=TypeError,Sp=function(e){return function(t,r,n,i){$(r);var a=re(t),o=z(a),s=ft(a),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){i=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw jp("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(i=r(i,o[c],c,a));return i}},Tp={left:Sp(!1),right:Sp(!0)},Mp=Tp.left,Rp=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Mp(Rp(this),e,t,t>1?arguments[1]:void 0)}));var _p=Tp.right,Ap=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return _p(Ap(this),e,t,t>1?arguments[1]:void 0)}));var Up=Eh.aTypedArray,Bp=Eh.exportTypedArrayMethod,Np=Math.floor;Bp("reverse",(function(){for(var e,t=Up(this).length,r=Np(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Lp=o.RangeError,Wp=o.Int8Array,Dp=Wp&&Wp.prototype,Jp=Dp&&Dp.set,Fp=Eh.aTypedArray,Gp=Eh.exportTypedArrayMethod,Hp=!s((function(){var e=new Uint8ClampedArray(2);return h(Jp,e,{length:1,0:3},1),3!==e[1]})),Vp=Hp&&Eh.NATIVE_ARRAY_BUFFER_VIEWS&&s((function(){var e=new Wp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Gp("set",(function(e){Fp(this);var t=qf(arguments.length>1?arguments[1]:void 0,1),r=re(e);if(Hp)return h(Jp,this,r,t);var n=this.length,i=ft(r),a=0;if(i+t>n)throw Lp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Hp||Vp);var $p=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("slice",(function(e,t){for(var r=hn($p(this),e,t),n=$f(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),s((function(){new Int8Array(1).slice()})));var Yp=qr.some,Kp=Eh.aTypedArray;(0,Eh.exportTypedArrayMethod)("some",(function(e){return Yp(Kp(this),e,arguments.length>1?arguments[1]:void 0)}));var Qp=Eh.aTypedArray,Xp=Eh.exportTypedArrayMethod,Zp=o.Uint16Array,el=Zp&&m(Zp.prototype.sort),tl=!(!el||s((function(){el(new Zp(2),null)}))&&s((function(){el(new Zp(2),{})}))),rl=!!el&&!s((function(){if(L)return L<74;if(Nu)return Nu<67;if(Lu)return!0;if(Du)return Du<602;var e,t,r=new Zp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(el(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Xp("sort",(function(e){return void 0!==e&&$(e),rl?el(this,e):Va(Qp(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!rl||tl);var nl=o.Int8Array,il=Eh.aTypedArray,al=Eh.exportTypedArrayMethod,ol=[].toLocaleString,sl=!!nl&&s((function(){ol.call(new nl(1))}));al("toLocaleString",(function(){return un(ol,sl?hn(il(this)):il(this),hn(arguments))}),s((function(){return[1,2].toLocaleString()!=new nl([1,2]).toLocaleString()}))||!s((function(){nl.prototype.toLocaleString.call([1,2])})));var cl=Eh.exportTypedArrayMethod,dl=o.Uint8Array,ul=dl&&dl.prototype||{},hl=[].toString,fl=m([].join);s((function(){hl.call({})}))&&(hl=function(){return fl(this)});var pl=ul.toString!=hl;cl("toString",hl,pl);var ll,gl,bl,vl,Il="process"==y(o.process),kl=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),ml=o.setImmediate,xl=o.clearImmediate,wl=o.process,yl=o.Dispatch,Cl=o.Function,Ol=o.MessageChannel,zl=o.String,Pl=0,El={};try{ll=o.location}catch(e){}var ql=function(e){if(ie(El,e)){var t=El[e];delete El[e],t()}},jl=function(e){return function(){ql(e)}},Sl=function(e){ql(e.data)},Tl=function(e){o.postMessage(zl(e),ll.protocol+"//"+ll.host)};ml&&xl||(ml=function(e){Da(arguments.length,1);var t=j(e)?e:Cl(e),r=hn(arguments,1);return El[++Pl]=function(){un(t,void 0,r)},gl(Pl),Pl},xl=function(e){delete El[e]},Il?gl=function(e){wl.nextTick(jl(e))}:yl&&yl.now?gl=function(e){yl.now(jl(e))}:Ol&&!kl?(vl=(bl=new Ol).port2,bl.port1.onmessage=Sl,gl=pr(vl.postMessage,vl)):o.addEventListener&&j(o.postMessage)&&!o.importScripts&&ll&&"file:"!==ll.protocol&&!s(Tl)?(gl=Tl,o.addEventListener("message",Sl,!1)):gl="onreadystatechange"in me("script")?function(e){Ht.appendChild(me("script")).onreadystatechange=function(){Ht.removeChild(this),ql(e)}}:function(e){setTimeout(jl(e),0)});var Ml,Rl,_l,Al,Ul,Bl,Nl,Ll,Wl={set:ml,clear:xl},Dl=/ipad|iphone|ipod/i.test(_)&&void 0!==o.Pebble,Jl=/web0s(?!.*chrome)/i.test(_),Fl=ye.f,Gl=Wl.set,Hl=o.MutationObserver||o.WebKitMutationObserver,Vl=o.document,$l=o.process,Yl=o.Promise,Kl=Fl(o,"queueMicrotask"),Ql=Kl&&Kl.value;Ql||(Ml=function(){var e,t;for(Il&&(e=$l.domain)&&e.exit();Rl;){t=Rl.fn,Rl=Rl.next;try{t()}catch(e){throw Rl?Al():_l=void 0,e}}_l=void 0,e&&e.enter()},kl||Il||Jl||!Hl||!Vl?!Dl&&Yl&&Yl.resolve?((Nl=Yl.resolve(void 0)).constructor=Yl,Ll=pr(Nl.then,Nl),Al=function(){Ll(Ml)}):Il?Al=function(){$l.nextTick(Ml)}:(Gl=pr(Gl,o),Al=function(){Gl(Ml)}):(Ul=!0,Bl=Vl.createTextNode(""),new Hl(Ml).observe(Bl,{characterData:!0}),Al=function(){Bl.data=Ul=!Ul}));var Xl=Ql||function(e){var t={fn:e,next:void 0};_l&&(_l.next=t),Rl||(Rl=t,Al()),_l=t},Zl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},eg=function(){this.head=null,this.tail=null};eg.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var tg=eg,rg=o.Promise,ng="object"==typeof window&&"object"!=typeof Deno;rg&&rg.prototype;var ig,ag,og,sg=pe("species"),cg=!1,dg=j(o.PromiseRejectionEvent),ug={CONSTRUCTOR:St("Promise",(function(){var e=We(rg),t=e!==String(rg);if(!t&&66===L)return!0;if(L>=51&&/native code/.test(e))return!1;var r=new rg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[sg]=n,!(cg=r.then((function(){}))instanceof n)||!t&&ng&&!dg})),REJECTION_EVENT:dg,SUBCLASSING:cg},hg=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=$(t),this.reject=$(r)},fg={f:function(e){return new hg(e)}},pg=Wl.set,lg=ug.CONSTRUCTOR,gg=ug.REJECTION_EVENT,bg=ug.SUBCLASSING,vg=et.getterFor("Promise"),Ig=et.set,kg=rg&&rg.prototype,mg=rg,xg=kg,wg=o.TypeError,yg=o.document,Cg=o.process,Og=fg.f,zg=Og,Pg=!!(yg&&yg.createEvent&&o.dispatchEvent),Eg=function(e){var t;return!(!S(e)||!j(t=e.then))&&t},qg=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&Rg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(wg("Promise-chain cycle")):(n=Eg(r))?h(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},jg=function(e,t){e.notified||(e.notified=!0,Xl((function(){for(var r,n=e.reactions;r=n.get();)qg(r,e);e.notified=!1,t&&!e.rejection&&Tg(e)})))},Sg=function(e,t,r){var n,i;Pg?((n=yg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),o.dispatchEvent(n)):n={promise:t,reason:r},!gg&&(i=o["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=o.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Tg=function(e){h(pg,o,(function(){var t,r=e.facade,n=e.value;if(Mg(e)&&(t=Zl((function(){Il?Cg.emit("unhandledRejection",n,r):Sg("unhandledrejection",r,n)})),e.rejection=Il||Mg(e)?2:1,t.error))throw t.value}))},Mg=function(e){return 1!==e.rejection&&!e.parent},Rg=function(e){h(pg,o,(function(){var t=e.facade;Il?Cg.emit("rejectionHandled",t):Sg("rejectionhandled",t,e.value)}))},_g=function(e,t,r){return function(n){e(t,n,r)}},Ag=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,jg(e,!0))},Ug=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw wg("Promise can't be resolved itself");var n=Eg(t);n?Xl((function(){var r={done:!1};try{h(n,t,_g(Ug,r,e),_g(Ag,r,e))}catch(t){Ag(r,t,e)}})):(e.value=t,e.state=1,jg(e,!1))}catch(t){Ag({done:!1},t,e)}}};if(lg&&(xg=(mg=function(e){Aa(this,xg),$(e),h(ig,this);var t=vg(this);try{e(_g(Ug,t),_g(Ag,t))}catch(e){Ag(t,e)}}).prototype,(ig=function(e){Ig(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new tg,rejection:!1,state:0,value:void 0})}).prototype=rt(xg,"then",(function(e,t){var r=vg(this),n=Og(Gf(this,mg));return r.parent=!0,n.ok=!j(e)||e,n.fail=j(t)&&t,n.domain=Il?Cg.domain:void 0,0==r.state?r.reactions.add(n):Xl((function(){qg(n,r)})),n.promise})),ag=function(){var e=new ig,t=vg(e);this.promise=e,this.resolve=_g(Ug,t),this.reject=_g(Ag,t)},fg.f=Og=function(e){return e===mg||void 0===e?new ag(e):zg(e)},j(rg)&&kg!==Object.prototype)){og=kg.then,bg||rt(kg,"then",(function(e,t){var r=this;return new mg((function(e,t){h(og,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete kg.constructor}catch(e){}oa&&oa(kg,xg)}Mt({global:!0,constructor:!0,wrap:!0,forced:lg},{Promise:mg}),hr(mg,"Promise",!1),Mf("Promise");var Bg=TypeError,Ng=function(e,t){this.stopped=e,this.result=t},Lg=Ng.prototype,Wg=function(e,t,r){var n,i,a,o,s,c,d,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),b=pr(t,u),v=function(e){return n&&Ic(n,"normal",e),new Ng(!0,e)},I=function(e){return f?(Pe(e),g?b(e[0],e[1],v):b(e[0],e[1])):g?b(e,v):b(e)};if(p)n=e.iterator;else if(l)n=e;else{if(!(i=Ba(e)))throw Bg(H(e)+" is not iterable");if(wc(i)){for(a=0,o=ft(e);o>a;a++)if((s=I(e[a]))&&R(Lg,s))return s;return new Ng(!1)}n=La(e,i)}for(c=p?e.next:n.next;!(d=h(c,n)).done;){try{s=I(d.value)}catch(e){Ic(n,"throw",e)}if("object"==typeof s&&s&&R(Lg,s))return s}return new Ng(!1)},Dg=ug.CONSTRUCTOR||!sh((function(e){rg.all(e).then(void 0,(function(){}))}));Mt({target:"Promise",stat:!0,forced:Dg},{all:function(e){var t=this,r=fg.f(t),n=r.resolve,i=r.reject,a=Zl((function(){var r=$(t.resolve),a=[],o=0,s=1;Wg(e,(function(e){var c=o++,d=!1;s++,h(r,t,e).then((function(e){d||(d=!0,a[c]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var Jg=ug.CONSTRUCTOR,Fg=rg&&rg.prototype;if(Mt({target:"Promise",proto:!0,forced:Jg,real:!0},{catch:function(e){return this.then(void 0,e)}}),j(rg)){var Gg=M("Promise").prototype.catch;Fg.catch!==Gg&&rt(Fg,"catch",Gg,{unsafe:!0})}Mt({target:"Promise",stat:!0,forced:Dg},{race:function(e){var t=this,r=fg.f(t),n=r.reject,i=Zl((function(){var i=$(t.resolve);Wg(e,(function(e){h(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Mt({target:"Promise",stat:!0,forced:ug.CONSTRUCTOR},{reject:function(e){var t=fg.f(this);return h(t.reject,void 0,e),t.promise}});var Hg=ug.CONSTRUCTOR;function Vg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $g(e){return function(e){if(Array.isArray(e))return Vg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Vg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Vg(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Kg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yg(Object(r),!0).forEach((function(t){fi(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}M("Promise"),Mt({target:"Promise",stat:!0,forced:Hg},{resolve:function(e){return function(e,t){if(Pe(e),S(t)&&t.constructor===e)return t;var r=fg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Mt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Wg(e,(function(e,r){Zt(t,e,r)}),{AS_ENTRIES:!0}),t}});var Qg=Lo?btoa:function(e){return Buffer.from(e).toString("base64")},Xg=function(e){var t,r,n=new URL(e),i=new URLSearchParams(n.search),a=null!==(t=i.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=i.get("code"))&&void 0!==r?r:"",usid:a}},Zg=function(){return e(128)},eb=function(){var e=ci(Bi.mark((function e(t){var r,n,i,a,o,s,c;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Lo||!window.crypto){e.next=12;break}return i=new TextEncoder,a=i.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",a);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,$g(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function tb(e,t,r){return rb.apply(this,arguments)}function rb(){return(rb=ci(Bi.mark((function e(t,r,n){var i,a,o,s,c,d,u,h;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,eb(r);case 2:return a=e.sent,(o=new zu(t.clientConfig)).clientConfig.fetchOptions=Kg(Kg({},t.clientConfig.fetchOptions),{},{redirect:Lo?"follow":"manual"}),s={parameters:Kg(Kg({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:a},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(c=e.sent,d=(null===(i=c.headers)||void 0===i?void 0:i.get("location"))||c.url,u=new URL(d),h=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||h.error)){e.next=14;break}throw new ws(c);case 14:return e.abrupt("return",Kg({url:d},Xg(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nb(){return(nb=ci(Bi.mark((function e(t,r,n){var i,a;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i="Basic ".concat(Qg("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:Kg({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(a));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ib(){return(ib=ci(Bi.mark((function e(t,r){var n,i,a;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Zg(),e.next=3,tb(t,n,Kg({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:i.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:i.usid},e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ab(){return(ab=ci(Bi.mark((function e(t,r,n){var i,a,o,s,c,d,u,h,f,p,l,g,b,v;return Bi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Zg(),e.next=3,eb(a);case 3:return o=e.sent,(s=new zu(t.clientConfig)).clientConfig.fetchOptions=Kg(Kg({},t.clientConfig.fetchOptions),{},{redirect:Lo?"follow":"manual"}),c="Basic ".concat(Qg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:Kg({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(u=e.sent,h=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,f=new URL(h),p=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new ws(u);case 16:if(l=Xg(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},!r.clientSecret){e.next=22;break}return b="Basic ".concat(Qg("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),v={headers:{Authorization:b},body:g},e.abrupt("return",t.getAccessToken(v));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ob=Object.freeze({__proto__:null,isBrowser:Lo,isNode:Wo,globalObject:Do,hasFetchAvailable:Jo,fetch:Fo,stringToBase64:Qg,getCodeAndUsidFromUrl:Xg,createCodeVerifier:Zg,generateCodeChallenge:eb,authorize:tb,loginGuestUserPrivate:function(e,t,r){return nb.apply(this,arguments)},loginGuestUser:function(e,t){return ib.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return ab.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(Qg("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});export{Bo as ClientConfig,cu as ShopperBaskets,hu as ShopperContexts,lu as ShopperCustomers,vu as ShopperDiscoverySearch,mu as ShopperExperience,yu as ShopperGiftCertificates,zu as ShopperLogin,qu as ShopperOrders,Tu as ShopperProducts,_u as ShopperPromotions,Xu as ShopperSearch,iu as TemplateURL,ob as helpers};
|
|
1
|
+
import{nanoid as e}from"nanoid";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var n,a,i=function(e){return e&&e.Math==Math&&e},o=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof t&&t)||function(){return this}()||Function("return this")(),s=function(e){try{return!!e()}catch(e){return!0}},c=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),d=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),u=Function.prototype.call,h=d?u.bind(u):function(){return u.apply(u,arguments)},f={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,l={f:p&&!f.call({1:2},1)?function(e){var t=p(this,e);return!!t&&t.enumerable}:f},g=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},b=Function.prototype,v=b.bind,I=b.call,m=d&&v.bind(I,I),k=d?function(e){return e&&m(e)}:function(e){return e&&function(){return I.apply(e,arguments)}},x=k({}.toString),y=k("".slice),w=function(e){return y(x(e),8,-1)},C=Object,O=k("".split),z=s((function(){return!C("z").propertyIsEnumerable(0)}))?function(e){return"String"==w(e)?O(e,""):C(e)}:C,P=TypeError,E=function(e){if(null==e)throw P("Can't call method on "+e);return e},q=function(e){return z(E(e))},j=function(e){return"function"==typeof e},S=function(e){return"object"==typeof e?null!==e:j(e)},T=function(e){return j(e)?e:void 0},M=function(e,t){return arguments.length<2?T(o[e]):o[e]&&o[e][t]},R=k({}.isPrototypeOf),_=M("navigator","userAgent")||"",A=o.process,B=o.Deno,U=A&&A.versions||B&&B.version,N=U&&U.v8;N&&(a=(n=N.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!a&&_&&(!(n=_.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=_.match(/Chrome\/(\d+)/))&&(a=+n[1]);var L=a,W=!!Object.getOwnPropertySymbols&&!s((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&L&&L<41})),D=W&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,F=Object,J=D?function(e){return"symbol"==typeof e}:function(e){var t=M("Symbol");return j(t)&&R(t.prototype,F(e))},G=String,H=function(e){try{return G(e)}catch(e){return"Object"}},V=TypeError,$=function(e){if(j(e))return e;throw V(H(e)+" is not a function")},Y=function(e,t){var r=e[t];return null==r?void 0:$(r)},K=TypeError,Q=Object.defineProperty,X=function(e,t){try{Q(o,e,{value:t,configurable:!0,writable:!0})}catch(r){o[e]=t}return t},Z=o["__core-js_shared__"]||X("__core-js_shared__",{}),ee=r((function(e){(e.exports=function(e,t){return Z[e]||(Z[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.4",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.4/LICENSE",source:"https://github.com/zloirock/core-js"})})),te=Object,re=function(e){return te(E(e))},ne=k({}.hasOwnProperty),ae=Object.hasOwn||function(e,t){return ne(re(e),t)},ie=0,oe=Math.random(),se=k(1..toString),ce=function(e){return"Symbol("+(void 0===e?"":e)+")_"+se(++ie+oe,36)},de=ee("wks"),ue=o.Symbol,he=ue&&ue.for,fe=D?ue:ue&&ue.withoutSetter||ce,pe=function(e){if(!ae(de,e)||!W&&"string"!=typeof de[e]){var t="Symbol."+e;W&&ae(ue,e)?de[e]=ue[e]:de[e]=D&&he?he(t):fe(t)}return de[e]},le=TypeError,ge=pe("toPrimitive"),be=function(e,t){if(!S(e)||J(e))return e;var r,n=Y(e,ge);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!S(r)||J(r))return r;throw le("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&j(r=e.toString)&&!S(n=h(r,e)))return n;if(j(r=e.valueOf)&&!S(n=h(r,e)))return n;if("string"!==t&&j(r=e.toString)&&!S(n=h(r,e)))return n;throw K("Can't convert object to primitive value")}(e,t)},ve=function(e){var t=be(e,"string");return J(t)?t:t+""},Ie=o.document,me=S(Ie)&&S(Ie.createElement),ke=function(e){return me?Ie.createElement(e):{}},xe=!c&&!s((function(){return 7!=Object.defineProperty(ke("div"),"a",{get:function(){return 7}}).a})),ye=Object.getOwnPropertyDescriptor,we={f:c?ye:function(e,t){if(e=q(e),t=ve(t),xe)try{return ye(e,t)}catch(e){}if(ae(e,t))return g(!h(l.f,e,t),e[t])}},Ce=c&&s((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,ze=TypeError,Pe=function(e){if(S(e))return e;throw ze(Oe(e)+" is not an object")},Ee=TypeError,qe=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Se={f:c?Ce?function(e,t,r){if(Pe(e),t=ve(t),Pe(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=je(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return qe(e,t,r)}:qe:function(e,t,r){if(Pe(e),t=ve(t),Pe(r),xe)try{return qe(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Ee("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Te=c?function(e,t,r){return Se.f(e,t,g(1,r))}:function(e,t,r){return e[t]=r,e},Me=Function.prototype,Re=c&&Object.getOwnPropertyDescriptor,_e=ae(Me,"name"),Ae={EXISTS:_e,PROPER:_e&&"something"===function(){}.name,CONFIGURABLE:_e&&(!c||c&&Re(Me,"name").configurable)},Be=k(Function.toString);j(Z.inspectSource)||(Z.inspectSource=function(e){return Be(e)});var Ue,Ne,Le,We=Z.inspectSource,De=o.WeakMap,Fe=j(De)&&/native code/.test(We(De)),Je=ee("keys"),Ge=function(e){return Je[e]||(Je[e]=ce(e))},He={},Ve=o.TypeError,$e=o.WeakMap;if(Fe||Z.state){var Ye=Z.state||(Z.state=new $e),Ke=k(Ye.get),Qe=k(Ye.has),Xe=k(Ye.set);Ue=function(e,t){if(Qe(Ye,e))throw new Ve("Object already initialized");return t.facade=e,Xe(Ye,e,t),t},Ne=function(e){return Ke(Ye,e)||{}},Le=function(e){return Qe(Ye,e)}}else{var Ze=Ge("state");He[Ze]=!0,Ue=function(e,t){if(ae(e,Ze))throw new Ve("Object already initialized");return t.facade=e,Te(e,Ze,t),t},Ne=function(e){return ae(e,Ze)?e[Ze]:{}},Le=function(e){return ae(e,Ze)}}var et={set:Ue,get:Ne,has:Le,enforce:function(e){return Le(e)?Ne(e):Ue(e,{})},getterFor:function(e){return function(t){var r;if(!S(t)||(r=Ne(t)).type!==e)throw Ve("Incompatible receiver, "+e+" required");return r}}},tt=r((function(e){var t=Ae.CONFIGURABLE,r=et.enforce,n=et.get,a=Object.defineProperty,i=c&&!s((function(){return 8!==a((function(){}),"length",{value:8}).length})),o=String(String).split("String"),d=e.exports=function(e,n,s){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),s&&s.getter&&(n="get "+n),s&&s.setter&&(n="set "+n),(!ae(e,"name")||t&&e.name!==n)&&(c?a(e,"name",{value:n,configurable:!0}):e.name=n),i&&s&&ae(s,"arity")&&e.length!==s.arity&&a(e,"length",{value:s.arity});try{s&&ae(s,"constructor")&&s.constructor?c&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return ae(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=d((function(){return j(this)&&n(this).source||We(this)}),"toString")})),rt=function(e,t,r,n){n||(n={});var a=n.enumerable,i=void 0!==n.name?n.name:t;if(j(r)&&tt(r,i,n),n.global)a?e[t]=r:X(t,r);else{try{n.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=r:Se.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},nt=Math.ceil,at=Math.floor,it=Math.trunc||function(e){var t=+e;return(t>0?at:nt)(t)},ot=function(e){var t=+e;return t!=t||0===t?0:it(t)},st=Math.max,ct=Math.min,dt=function(e,t){var r=ot(e);return r<0?st(r+t,0):ct(r,t)},ut=Math.min,ht=function(e){return e>0?ut(ot(e),9007199254740991):0},ft=function(e){return ht(e.length)},pt=function(e){return function(t,r,n){var a,i=q(t),o=ft(i),s=dt(n,o);if(e&&r!=r){for(;o>s;)if((a=i[s++])!=a)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},lt={includes:pt(!0),indexOf:pt(!1)},gt=lt.indexOf,bt=k([].push),vt=function(e,t){var r,n=q(e),a=0,i=[];for(r in n)!ae(He,r)&&ae(n,r)&&bt(i,r);for(;t.length>a;)ae(n,r=t[a++])&&(~gt(i,r)||bt(i,r));return i},It=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mt=It.concat("length","prototype"),kt={f:Object.getOwnPropertyNames||function(e){return vt(e,mt)}},xt={f:Object.getOwnPropertySymbols},yt=k([].concat),wt=M("Reflect","ownKeys")||function(e){var t=kt.f(Pe(e)),r=xt.f;return r?yt(t,r(e)):t},Ct=function(e,t,r){for(var n=wt(t),a=Se.f,i=we.f,o=0;o<n.length;o++){var s=n[o];ae(e,s)||r&&ae(r,s)||a(e,s,i(t,s))}},Ot=/#|\.prototype\./,zt=function(e,t){var r=Et[Pt(e)];return r==jt||r!=qt&&(j(t)?s(t):!!t)},Pt=zt.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},Et=zt.data={},qt=zt.NATIVE="N",jt=zt.POLYFILL="P",St=zt,Tt=we.f,Mt=function(e,t){var r,n,a,i,s,c=e.target,d=e.global,u=e.stat;if(r=d?o:u?o[c]||X(c,{}):(o[c]||{}).prototype)for(n in t){if(i=t[n],a=e.dontCallGetSet?(s=Tt(r,n))&&s.value:r[n],!St(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;Ct(i,a)}(e.sham||a&&a.sham)&&Te(i,"sham",!0),rt(r,n,i,e)}},Rt=Object.keys||function(e){return vt(e,It)},_t=s((function(){Rt(1)}));Mt({target:"Object",stat:!0,forced:_t},{keys:function(e){return Rt(re(e))}});var At={};At[pe("toStringTag")]="z";var Bt,Ut="[object z]"===String(At),Nt=pe("toStringTag"),Lt=Object,Wt="Arguments"==w(function(){return arguments}()),Dt=Ut?w:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Lt(e),Nt))?r:Wt?w(t):"Object"==(n=w(t))&&j(t.callee)?"Arguments":n},Ft=String,Jt=function(e){if("Symbol"===Dt(e))throw TypeError("Cannot convert a Symbol value to a string");return Ft(e)},Gt={f:c&&!Ce?Object.defineProperties:function(e,t){Pe(e);for(var r,n=q(t),a=Rt(t),i=a.length,o=0;i>o;)Se.f(e,r=a[o++],n[r]);return e}},Ht=M("document","documentElement"),Vt=Ge("IE_PROTO"),$t=function(){},Yt=function(e){return"<script>"+e+"<\/script>"},Kt=function(e){e.write(Yt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Qt=function(){try{Bt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Qt="undefined"!=typeof document?document.domain&&Bt?Kt(Bt):((t=ke("iframe")).style.display="none",Ht.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Yt("document.F=Object")),e.close(),e.F):Kt(Bt);for(var r=It.length;r--;)delete Qt.prototype[It[r]];return Qt()};He[Vt]=!0;var Xt=Object.create||function(e,t){var r;return null!==e?($t.prototype=Pe(e),r=new $t,$t.prototype=null,r[Vt]=e):r=Qt(),void 0===t?r:Gt.f(r,t)},Zt=function(e,t,r){var n=ve(t);n in e?Se.f(e,n,g(0,r)):e[n]=r},er=Array,tr=Math.max,rr=function(e,t,r){for(var n=ft(e),a=dt(t,n),i=dt(void 0===r?n:r,n),o=er(tr(i-a,0)),s=0;a<i;a++,s++)Zt(o,s,e[a]);return o.length=s,o},nr=kt.f,ar="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ir={f:function(e){return ar&&"Window"==w(e)?function(e){try{return nr(e)}catch(e){return rr(ar)}}(e):nr(q(e))}},or={f:pe},sr=o,cr=Se.f,dr=Se.f,ur=pe("toStringTag"),hr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ae(e,ur)&&dr(e,ur,{configurable:!0,value:t})},fr=k(k.bind),pr=function(e,t){return $(e),void 0===t?e:d?fr(e,t):function(){return e.apply(t,arguments)}},lr=Array.isArray||function(e){return"Array"==w(e)},gr=function(){},br=[],vr=M("Reflect","construct"),Ir=/^\s*(?:class|function)\b/,mr=k(Ir.exec),kr=!Ir.exec(gr),xr=function(e){if(!j(e))return!1;try{return vr(gr,br,e),!0}catch(e){return!1}},yr=function(e){if(!j(e))return!1;switch(Dt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return kr||!!mr(Ir,We(e))}catch(e){return!0}};yr.sham=!0;var wr=!vr||s((function(){var e;return xr(xr.call)||!xr(Object)||!xr((function(){e=!0}))||e}))?yr:xr,Cr=pe("species"),Or=Array,zr=function(e,t){return new(function(e){var t;return lr(e)&&(t=e.constructor,(wr(t)&&(t===Or||lr(t.prototype))||S(t)&&null===(t=t[Cr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},Pr=k([].push),Er=function(e){var t=1==e,r=2==e,n=3==e,a=4==e,i=6==e,o=7==e,s=5==e||i;return function(c,d,u,h){for(var f,p,l=re(c),g=z(l),b=pr(d,u),v=ft(g),I=0,m=h||zr,k=t?m(c,v):r||o?m(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(f=g[I],I,l),e))if(t)k[I]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return I;case 2:Pr(k,f)}else switch(e){case 4:return!1;case 7:Pr(k,f)}return i?-1:n||a?a:k}},qr={forEach:Er(0),map:Er(1),filter:Er(2),some:Er(3),every:Er(4),find:Er(5),findIndex:Er(6),filterReject:Er(7)},jr=qr.forEach,Sr=Ge("hidden"),Tr=et.set,Mr=et.getterFor("Symbol"),Rr=Object.prototype,_r=o.Symbol,Ar=_r&&_r.prototype,Br=o.TypeError,Ur=o.QObject,Nr=we.f,Lr=Se.f,Wr=ir.f,Dr=l.f,Fr=k([].push),Jr=ee("symbols"),Gr=ee("op-symbols"),Hr=ee("wks"),Vr=!Ur||!Ur.prototype||!Ur.prototype.findChild,$r=c&&s((function(){return 7!=Xt(Lr({},"a",{get:function(){return Lr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Nr(Rr,t);n&&delete Rr[t],Lr(e,t,r),n&&e!==Rr&&Lr(Rr,t,n)}:Lr,Yr=function(e,t){var r=Jr[e]=Xt(Ar);return Tr(r,{type:"Symbol",tag:e,description:t}),c||(r.description=t),r},Kr=function(e,t,r){e===Rr&&Kr(Gr,t,r),Pe(e);var n=ve(t);return Pe(r),ae(Jr,n)?(r.enumerable?(ae(e,Sr)&&e[Sr][n]&&(e[Sr][n]=!1),r=Xt(r,{enumerable:g(0,!1)})):(ae(e,Sr)||Lr(e,Sr,g(1,{})),e[Sr][n]=!0),$r(e,n,r)):Lr(e,n,r)},Qr=function(e,t){Pe(e);var r=q(t),n=Rt(r).concat(tn(r));return jr(n,(function(t){c&&!h(Xr,r,t)||Kr(e,t,r[t])})),e},Xr=function(e){var t=ve(e),r=h(Dr,this,t);return!(this===Rr&&ae(Jr,t)&&!ae(Gr,t))&&(!(r||!ae(this,t)||!ae(Jr,t)||ae(this,Sr)&&this[Sr][t])||r)},Zr=function(e,t){var r=q(e),n=ve(t);if(r!==Rr||!ae(Jr,n)||ae(Gr,n)){var a=Nr(r,n);return!a||!ae(Jr,n)||ae(r,Sr)&&r[Sr][n]||(a.enumerable=!0),a}},en=function(e){var t=Wr(q(e)),r=[];return jr(t,(function(e){ae(Jr,e)||ae(He,e)||Fr(r,e)})),r},tn=function(e){var t=e===Rr,r=Wr(t?Gr:q(e)),n=[];return jr(r,(function(e){!ae(Jr,e)||t&&!ae(Rr,e)||Fr(n,Jr[e])})),n};W||(Ar=(_r=function(){if(R(Ar,this))throw Br("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Jt(arguments[0]):void 0,t=ce(e),r=function(e){this===Rr&&h(r,Gr,e),ae(this,Sr)&&ae(this[Sr],t)&&(this[Sr][t]=!1),$r(this,t,g(1,e))};return c&&Vr&&$r(Rr,t,{configurable:!0,set:r}),Yr(t,e)}).prototype,rt(Ar,"toString",(function(){return Mr(this).tag})),rt(_r,"withoutSetter",(function(e){return Yr(ce(e),e)})),l.f=Xr,Se.f=Kr,Gt.f=Qr,we.f=Zr,kt.f=ir.f=en,xt.f=tn,or.f=function(e){return Yr(pe(e),e)},c&&(Lr(Ar,"description",{configurable:!0,get:function(){return Mr(this).description}}),rt(Rr,"propertyIsEnumerable",Xr,{unsafe:!0}))),Mt({global:!0,constructor:!0,wrap:!0,forced:!W,sham:!W},{Symbol:_r}),jr(Rt(Hr),(function(e){!function(e){var t=sr.Symbol||(sr.Symbol={});ae(t,e)||cr(t,e,{value:or.f(e)})}(e)})),Mt({target:"Symbol",stat:!0,forced:!W},{useSetter:function(){Vr=!0},useSimple:function(){Vr=!1}}),Mt({target:"Object",stat:!0,forced:!W,sham:!c},{create:function(e,t){return void 0===t?Xt(e):Qr(Xt(e),t)},defineProperty:Kr,defineProperties:Qr,getOwnPropertyDescriptor:Zr}),Mt({target:"Object",stat:!0,forced:!W},{getOwnPropertyNames:en}),function(){var e=M("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=pe("toPrimitive");t&&!t[n]&&rt(t,n,(function(e){return h(r,this)}),{arity:1})}(),hr(_r,"Symbol"),He[Sr]=!0;var rn=W&&!!Symbol.for&&!!Symbol.keyFor,nn=ee("string-to-symbol-registry"),an=ee("symbol-to-string-registry");Mt({target:"Symbol",stat:!0,forced:!rn},{for:function(e){var t=Jt(e);if(ae(nn,t))return nn[t];var r=M("Symbol")(t);return nn[t]=r,an[r]=t,r}});var on=ee("symbol-to-string-registry");Mt({target:"Symbol",stat:!0,forced:!rn},{keyFor:function(e){if(!J(e))throw TypeError(H(e)+" is not a symbol");if(ae(on,e))return on[e]}});var sn=Function.prototype,cn=sn.apply,dn=sn.call,un="object"==typeof Reflect&&Reflect.apply||(d?dn.bind(cn):function(){return dn.apply(cn,arguments)}),hn=k([].slice),fn=M("JSON","stringify"),pn=k(/./.exec),ln=k("".charAt),gn=k("".charCodeAt),bn=k("".replace),vn=k(1..toString),In=/[\uD800-\uDFFF]/g,mn=/^[\uD800-\uDBFF]$/,kn=/^[\uDC00-\uDFFF]$/,xn=!W||s((function(){var e=M("Symbol")();return"[null]"!=fn([e])||"{}"!=fn({a:e})||"{}"!=fn(Object(e))})),yn=s((function(){return'"\\udf06\\ud834"'!==fn("\udf06\ud834")||'"\\udead"'!==fn("\udead")})),wn=function(e,t){var r=hn(arguments),n=t;if((S(t)||void 0!==e)&&!J(e))return lr(t)||(t=function(e,t){if(j(n)&&(t=h(n,this,e,t)),!J(t))return t}),r[1]=t,un(fn,null,r)},Cn=function(e,t,r){var n=ln(r,t-1),a=ln(r,t+1);return pn(mn,e)&&!pn(kn,a)||pn(kn,e)&&!pn(mn,n)?"\\u"+vn(gn(e,0),16):e};fn&&Mt({target:"JSON",stat:!0,arity:3,forced:xn||yn},{stringify:function(e,t,r){var n=hn(arguments),a=un(xn?wn:fn,null,n);return yn&&"string"==typeof a?bn(a,In,Cn):a}});var On=!W||s((function(){xt.f(1)}));Mt({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=xt.f;return t?t(re(e)):[]}});var zn=pe("species"),Pn=function(e){return L>=51||!s((function(){var t=[];return(t.constructor={})[zn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},En=qr.filter,qn=Pn("filter");Mt({target:"Array",proto:!0,forced:!qn},{filter:function(e){return En(this,e,arguments.length>1?arguments[1]:void 0)}});var jn=Ut?{}.toString:function(){return"[object "+Dt(this)+"]"};Ut||rt(Object.prototype,"toString",jn,{unsafe:!0});var Sn=we.f,Tn=s((function(){Sn(1)}));Mt({target:"Object",stat:!0,forced:!c||Tn,sham:!c},{getOwnPropertyDescriptor:function(e,t){return Sn(q(e),t)}});var Mn={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Rn=ke("span").classList,_n=Rn&&Rn.constructor&&Rn.constructor.prototype,An=_n===Object.prototype?void 0:_n,Bn=function(e,t){var r=[][e];return!!r&&s((function(){r.call(null,t||function(){return 1},1)}))},Un=qr.forEach,Nn=Bn("forEach")?[].forEach:function(e){return Un(this,e,arguments.length>1?arguments[1]:void 0)},Ln=function(e){if(e&&e.forEach!==Nn)try{Te(e,"forEach",Nn)}catch(t){e.forEach=Nn}};for(var Wn in Mn)Mn[Wn]&&Ln(o[Wn]&&o[Wn].prototype);Ln(An),Mt({target:"Object",stat:!0,sham:!c},{getOwnPropertyDescriptors:function(e){for(var t,r,n=q(e),a=we.f,i=wt(n),o={},s=0;i.length>s;)void 0!==(r=a(n,t=i[s++]))&&Zt(o,t,r);return o}});var Dn=Gt.f;Mt({target:"Object",stat:!0,forced:Object.defineProperties!==Dn,sham:!c},{defineProperties:Dn});var Fn=Se.f;Mt({target:"Object",stat:!0,forced:Object.defineProperty!==Fn,sham:!c},{defineProperty:Fn});var Jn,Gn=pe("match"),Hn=TypeError,Vn=function(e){if(function(e){var t;return S(e)&&(void 0!==(t=e[Gn])?!!t:"RegExp"==w(e))}(e))throw Hn("The method doesn't accept regular expressions");return e},$n=pe("match"),Yn=we.f,Kn=k("".startsWith),Qn=k("".slice),Xn=Math.min,Zn=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[$n]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ea=!(Zn||(Jn=Yn(String.prototype,"startsWith"),!Jn||Jn.writable));Mt({target:"String",proto:!0,forced:!ea&&!Zn},{startsWith:function(e){var t=Jt(E(this));Vn(e);var r=ht(Xn(arguments.length>1?arguments[1]:void 0,t.length)),n=Jt(e);return Kn?Kn(t,n,r):Qn(t,r,r+n.length)===n}});var ta=function(){var e=Pe(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},ra=RegExp.prototype,na=Ae.PROPER,aa=RegExp.prototype.toString,ia=s((function(){return"/a/b"!=aa.call({source:"a",flags:"b"})})),oa=na&&"toString"!=aa.name;function sa(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function ca(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){sa(i,n,a,o,s,"next",e)}function s(e){sa(i,n,a,o,s,"throw",e)}o(void 0)}))}}function da(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ua(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function ha(e,t,r){return t&&ua(e.prototype,t),r&&ua(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function fa(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(ia||oa)&&rt(RegExp.prototype,"toString",(function(){var e=Pe(this);return"/"+Jt(e.source)+"/"+Jt(function(e){var t=e.flags;return void 0!==t||"flags"in ra||ae(e,"flags")||!R(ra,e)?t:h(ta,e)}(e))}),{unsafe:!0});var pa=Object.prototype,la=pa.hasOwnProperty,ga="function"==typeof Symbol?Symbol:{},ba=ga.iterator||"@@iterator",va=ga.asyncIterator||"@@asyncIterator",Ia=ga.toStringTag||"@@toStringTag";function ma(e,t,r,n){var a=t&&t.prototype instanceof ya?t:ya,i=Object.create(a.prototype),o=new _a(n||[]);return i._invoke=function(e,t,r){var n="suspendedStart";return function(a,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw i;return Ba()}for(r.method=a,r.arg=i;;){var o=r.delegate;if(o){var s=Ta(o,r);if(s){if(s===xa)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=ka(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===xa)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(e,r,o),i}function ka(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var xa={};function ya(){}function wa(){}function Ca(){}var Oa={};Oa[ba]=function(){return this};var za=Object.getPrototypeOf,Pa=za&&za(za(Aa([])));Pa&&Pa!==pa&&la.call(Pa,ba)&&(Oa=Pa);var Ea=Ca.prototype=ya.prototype=Object.create(Oa);function qa(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function ja(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===wa||"GeneratorFunction"===(t.displayName||t.name))}function Sa(e,t){var r;this._invoke=function(n,a){function i(){return new t((function(r,i){!function r(n,a,i,o){var s=ka(e[n],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&la.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,o)}),(function(e){r("throw",e,i,o)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,o)}))}o(s.arg)}(n,a,r,i)}))}return r=r?r.then(i,i):i()}}function Ta(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,Ta(e,t),"throw"===t.method))return xa;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return xa}var n=ka(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,xa;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,xa):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,xa)}function Ma(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function Ra(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _a(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ma,this),this.reset(!0)}function Aa(e){if(e){var t=e[ba];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(la.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:Ba}}function Ba(){return{value:void 0,done:!0}}wa.prototype=Ea.constructor=Ca,Ca.constructor=wa,Ca[Ia]=wa.displayName="GeneratorFunction",qa(Sa.prototype),Sa.prototype[va]=function(){return this},qa(Ea),Ea[Ia]="Generator",Ea[ba]=function(){return this},Ea.toString=function(){return"[object Generator]"},_a.prototype={constructor:_a,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(Ra),!e)for(var t in this)"t"===t.charAt(0)&&la.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=la.call(a,"catchLoc"),s=la.call(a,"finallyLoc");if(o&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(o){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&la.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,xa):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),xa},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),Ra(r),xa}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;Ra(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Aa(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),xa}};var Ua={wrap:ma,isGeneratorFunction:ja,AsyncIterator:Sa,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Ca):(e.__proto__=Ca,Ia in e||(e[Ia]="GeneratorFunction")),e.prototype=Object.create(Ea),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,a){void 0===a&&(a=Promise);var i=new Sa(ma(e,t,r,n),a);return ja(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},keys:function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},values:Aa},Na=Se.f,La=pe("unscopables"),Wa=Array.prototype;null==Wa[La]&&Na(Wa,La,{configurable:!0,value:Xt(null)});var Da,Fa,Ja,Ga=function(e){Wa[La][e]=!0},Ha={},Va=!s((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),$a=Ge("IE_PROTO"),Ya=Object,Ka=Ya.prototype,Qa=Va?Ya.getPrototypeOf:function(e){var t=re(e);if(ae(t,$a))return t[$a];var r=t.constructor;return j(r)&&t instanceof r?r.prototype:t instanceof Ya?Ka:null},Xa=pe("iterator"),Za=!1;[].keys&&("next"in(Ja=[].keys())?(Fa=Qa(Qa(Ja)))!==Object.prototype&&(Da=Fa):Za=!0),(null==Da||s((function(){var e={};return Da[Xa].call(e)!==e})))&&(Da={}),j(Da[Xa])||rt(Da,Xa,(function(){return this}));var ei={IteratorPrototype:Da,BUGGY_SAFARI_ITERATORS:Za},ti=ei.IteratorPrototype,ri=function(){return this},ni=function(e,t,r,n){var a=t+" Iterator";return e.prototype=Xt(ti,{next:g(+!n,r)}),hr(e,a,!1),Ha[a]=ri,e},ai=String,ii=TypeError,oi=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=k(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Pe(r),function(e){if("object"==typeof e||j(e))return e;throw ii("Can't set "+ai(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),si=Ae.PROPER,ci=Ae.CONFIGURABLE,di=ei.IteratorPrototype,ui=ei.BUGGY_SAFARI_ITERATORS,hi=pe("iterator"),fi=function(){return this},pi=function(e,t,r,n,a,i,o){ni(r,t,n);var s,c,d,u=function(e){if(e===a&&b)return b;if(!ui&&e in l)return l[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},f=t+" Iterator",p=!1,l=e.prototype,g=l[hi]||l["@@iterator"]||a&&l[a],b=!ui&&g||u(a),v="Array"==t&&l.entries||g;if(v&&(s=Qa(v.call(new e)))!==Object.prototype&&s.next&&(Qa(s)!==di&&(oi?oi(s,di):j(s[hi])||rt(s,hi,fi)),hr(s,f,!0)),si&&"values"==a&&g&&"values"!==g.name&&(ci?Te(l,"name","values"):(p=!0,b=function(){return h(g,this)})),a)if(c={values:u("values"),keys:i?b:u("keys"),entries:u("entries")},o)for(d in c)(ui||p||!(d in l))&&rt(l,d,c[d]);else Mt({target:t,proto:!0,forced:ui||p},c);return l[hi]!==b&&rt(l,hi,b,{name:a}),Ha[t]=b,c},li=Se.f,gi=et.set,bi=et.getterFor("Array Iterator"),vi=pi(Array,"Array",(function(e,t){gi(this,{type:"Array Iterator",target:q(e),index:0,kind:t})}),(function(){var e=bi(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),Ii=Ha.Arguments=Ha.Array;if(Ga("keys"),Ga("values"),Ga("entries"),c&&"values"!==Ii.name)try{li(Ii,"name",{value:"values"})}catch(e){}var mi=k("".charAt),ki=k("".charCodeAt),xi=k("".slice),yi=function(e){return function(t,r){var n,a,i=Jt(E(t)),o=ot(r),s=i.length;return o<0||o>=s?e?"":void 0:(n=ki(i,o))<55296||n>56319||o+1===s||(a=ki(i,o+1))<56320||a>57343?e?mi(i,o):n:e?xi(i,o,o+2):a-56320+(n-55296<<10)+65536}},wi={codeAt:yi(!1),charAt:yi(!0)},Ci=wi.charAt,Oi=et.set,zi=et.getterFor("String Iterator");pi(String,"String",(function(e){Oi(this,{type:"String Iterator",string:Jt(e),index:0})}),(function(){var e,t=zi(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Ci(r,n),t.index+=e.length,{value:e,done:!1})}));var Pi=pe("iterator"),Ei=pe("toStringTag"),qi=vi.values,ji=function(e,t){if(e){if(e[Pi]!==qi)try{Te(e,Pi,qi)}catch(t){e[Pi]=qi}if(e[Ei]||Te(e,Ei,t),Mn[t])for(var r in vi)if(e[r]!==vi[r])try{Te(e,r,vi[r])}catch(t){e[r]=vi[r]}}};for(var Si in Mn)ji(o[Si]&&o[Si].prototype,Si);ji(An,"DOMTokenList");var Ti=pe("iterator"),Mi=!s((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[Ti]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host})),Ri=function(e,t,r){for(var n in t)rt(e,n,t[n],r);return e},_i=TypeError,Ai=function(e,t){if(R(t,e))return e;throw _i("Incorrect invocation")},Bi=pe("iterator"),Ui=function(e){if(null!=e)return Y(e,Bi)||Y(e,"@@iterator")||Ha[Dt(e)]},Ni=TypeError,Li=function(e,t){var r=arguments.length<2?Ui(e):t;if($(r))return Pe(h(r,e));throw Ni(H(e)+" is not iterable")},Wi=TypeError,Di=function(e,t){if(e<t)throw Wi("Not enough arguments");return e},Fi=Math.floor,Ji=function(e,t){var r=e.length,n=Fi(r/2);return r<8?Gi(e,t):Hi(e,Ji(rr(e,0,n),t),Ji(rr(e,n),t),t)},Gi=function(e,t){for(var r,n,a=e.length,i=1;i<a;){for(n=i,r=e[i];n&&t(e[n-1],r)>0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Hi=function(e,t,r,n){for(var a=t.length,i=r.length,o=0,s=0;o<a||s<i;)e[o+s]=o<a&&s<i?n(t[o],r[s])<=0?t[o++]:r[s++]:o<a?t[o++]:r[s++];return e},Vi=Ji,$i=pe("iterator"),Yi=et.set,Ki=et.getterFor("URLSearchParams"),Qi=et.getterFor("URLSearchParamsIterator"),Xi=Object.getOwnPropertyDescriptor,Zi=function(e){if(!c)return o[e];var t=Xi(o,e);return t&&t.value},eo=Zi("fetch"),to=Zi("Request"),ro=Zi("Headers"),no=to&&to.prototype,ao=ro&&ro.prototype,io=o.RegExp,oo=o.TypeError,so=o.decodeURIComponent,co=o.encodeURIComponent,uo=k("".charAt),ho=k([].join),fo=k([].push),po=k("".replace),lo=k([].shift),go=k([].splice),bo=k("".split),vo=k("".slice),Io=/\+/g,mo=Array(4),ko=function(e){return mo[e-1]||(mo[e-1]=io("((?:%[\\da-f]{2}){"+e+"})","gi"))},xo=function(e){try{return so(e)}catch(t){return e}},yo=function(e){var t=po(e,Io," "),r=4;try{return so(t)}catch(e){for(;r;)t=po(t,ko(r--),xo);return t}},wo=/[!'()~]|%20/g,Co={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Oo=function(e){return Co[e]},zo=function(e){return po(co(e),wo,Oo)},Po=ni((function(e,t){Yi(this,{type:"URLSearchParamsIterator",iterator:Li(Ki(e).entries),kind:t})}),"Iterator",(function(){var e=Qi(this),t=e.kind,r=e.iterator.next(),n=r.value;return r.done||(r.value="keys"===t?n.key:"values"===t?n.value:[n.key,n.value]),r}),!0),Eo=function(e){this.entries=[],this.url=null,void 0!==e&&(S(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===uo(e,0)?vo(e,1):e:Jt(e)))};Eo.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,a,i,o,s,c=Ui(e);if(c)for(r=(t=Li(e,c)).next;!(n=h(r,t)).done;){if(i=(a=Li(Pe(n.value))).next,(o=h(i,a)).done||(s=h(i,a)).done||!h(i,a).done)throw oo("Expected sequence with length 2");fo(this.entries,{key:Jt(o.value),value:Jt(s.value)})}else for(var d in e)ae(e,d)&&fo(this.entries,{key:d,value:Jt(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=bo(e,"&"),a=0;a<n.length;)(t=n[a++]).length&&(r=bo(t,"="),fo(this.entries,{key:yo(lo(r)),value:yo(ho(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],fo(r,zo(e.key)+"="+zo(e.value));return ho(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var qo=function(){Ai(this,jo);var e=arguments.length>0?arguments[0]:void 0;Yi(this,new Eo(e))},jo=qo.prototype;if(Ri(jo,{append:function(e,t){Di(arguments.length,2);var r=Ki(this);fo(r.entries,{key:Jt(e),value:Jt(t)}),r.updateURL()},delete:function(e){Di(arguments.length,1);for(var t=Ki(this),r=t.entries,n=Jt(e),a=0;a<r.length;)r[a].key===n?go(r,a,1):a++;t.updateURL()},get:function(e){Di(arguments.length,1);for(var t=Ki(this).entries,r=Jt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Di(arguments.length,1);for(var t=Ki(this).entries,r=Jt(e),n=[],a=0;a<t.length;a++)t[a].key===r&&fo(n,t[a].value);return n},has:function(e){Di(arguments.length,1);for(var t=Ki(this).entries,r=Jt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Di(arguments.length,1);for(var r,n=Ki(this),a=n.entries,i=!1,o=Jt(e),s=Jt(t),c=0;c<a.length;c++)(r=a[c]).key===o&&(i?go(a,c--,1):(i=!0,r.value=s));i||fo(a,{key:o,value:s}),n.updateURL()},sort:function(){var e=Ki(this);Vi(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=Ki(this).entries,n=pr(e,arguments.length>1?arguments[1]:void 0),a=0;a<r.length;)n((t=r[a++]).value,t.key,this)},keys:function(){return new Po(this,"keys")},values:function(){return new Po(this,"values")},entries:function(){return new Po(this,"entries")}},{enumerable:!0}),rt(jo,$i,jo.entries,{name:"entries"}),rt(jo,"toString",(function(){return Ki(this).serialize()}),{enumerable:!0}),hr(qo,"URLSearchParams"),Mt({global:!0,constructor:!0,forced:!Mi},{URLSearchParams:qo}),!Mi&&j(ro)){var So=k(ao.has),To=k(ao.set),Mo=function(e){if(S(e)){var t,r=e.body;if("URLSearchParams"===Dt(r))return t=e.headers?new ro(e.headers):new ro,So(t,"content-type")||To(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Xt(e,{body:g(0,Jt(r)),headers:g(0,t)})}return e};if(j(eo)&&Mt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return eo(e,arguments.length>1?Mo(arguments[1]):{})}}),j(to)){var Ro=function(e){return Ai(this,no),new to(e,arguments.length>1?Mo(arguments[1]):{})};no.constructor=Ro,Ro.prototype=no,Mt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ro})}}var _o={URLSearchParams:qo,getState:Ki};function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ao(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ao(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Uo=ha((function e(t){if(da(this,e),fa(this,"baseUri",void 0),fa(this,"proxy",void 0),fa(this,"headers",void 0),fa(this,"parameters",void 0),fa(this,"fetchOptions",void 0),fa(this,"transformRequest",void 0),fa(this,"throwOnBadResponse",void 0),this.headers=Bo({},t.headers),this.parameters=Bo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Bo({credentials:"omit"},t.fetchOptions),this.transformRequest=t.transformRequest||e.defaults.transformRequest,t.baseUri&&(this.baseUri=t.baseUri),t.proxy&&(this.proxy=t.proxy),this.throwOnBadResponse=!!t.throwOnBadResponse}));function No(e){return(No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}fa(Uo,"defaults",{transformRequest:function(e,t){switch(t["Content-Type"]){case"application/json":return JSON.stringify(e);case"application/x-www-form-urlencoded":return new URLSearchParams(e);default:return e}}}),Mt({global:!0},{globalThis:o});var Lo="object"===("undefined"==typeof window?"undefined":No(window))&&"object"===No(window.document),Wo="object"===("undefined"==typeof process?"undefined":No(process))&&"object"===No(process.versions)&&"string"==typeof process.versions.node,Do=Lo?window:globalThis,Fo="function"==typeof Do.fetch,Jo=function(){if(Wo)return require("node-fetch").default;if(!Fo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Do.fetch}(),Go=Function,Ho=k([].concat),Vo=k([].join),$o={},Yo=function(e,t,r){if(!ae($o,t)){for(var n=[],a=0;a<t;a++)n[a]="a["+a+"]";$o[t]=Go("C,a","return new C("+Vo(n,",")+")")}return $o[t](e,r)},Ko=d?Go.bind:function(e){var t=$(this),r=t.prototype,n=hn(arguments,1),a=function(){var r=Ho(n,hn(arguments));return this instanceof a?Yo(t,r.length,r):t.apply(e,r)};return S(r)&&(a.prototype=r),a},Qo=TypeError,Xo=function(e){if(wr(e))return e;throw Qo(H(e)+" is not a constructor")},Zo=M("Reflect","construct"),es=Object.prototype,ts=[].push,rs=s((function(){function e(){}return!(Zo((function(){}),[],e)instanceof e)})),ns=!s((function(){Zo((function(){}))})),as=rs||ns;Mt({target:"Reflect",stat:!0,forced:as,sham:as},{construct:function(e,t){Xo(e),Pe(t);var r=arguments.length<3?e:Xo(arguments[2]);if(ns&&!rs)return Zo(e,t,r);if(e==r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return un(ts,n,t),new(un(Ko,e,n))}var a=r.prototype,i=Xt(S(a)?a:es),o=un(e,i,t);return S(o)?o:i}});var is=TypeError,os=function(e){if(e>9007199254740991)throw is("Maximum allowed index exceeded");return e},ss=pe("isConcatSpreadable"),cs=L>=51||!s((function(){var e=[];return e[ss]=!1,e.concat()[0]!==e})),ds=Pn("concat"),us=function(e){if(!S(e))return!1;var t=e[ss];return void 0!==t?!!t:lr(e)};function hs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fs(e,t){return(fs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ps(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fs(e,t)}function ls(e,t){if(t&&("object"===No(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return hs(e)}function gs(e){return(gs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function bs(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function vs(e,t,r){return(vs=bs()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&fs(a,r.prototype),a}).apply(null,arguments)}function Is(e){var t="function"==typeof Map?new Map:void 0;return(Is=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return vs(e,arguments,gs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),fs(n,e)})(e)}function ms(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gs(e);if(t){var a=gs(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return ls(this,r)}}Mt({target:"Array",proto:!0,arity:1,forced:!cs||!ds},{concat:function(e){var t,r,n,a,i,o=re(this),s=zr(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(us(i=-1===t?o:arguments[t]))for(a=ft(i),os(c+a),r=0;r<a;r++,c++)r in i&&Zt(s,c,i[r]);else os(c+1),Zt(s,c++,i);return s.length=c,s}});var ks,xs,ys=function(e){ps(r,Is(Error));var t=ms(r);function r(e){var n;return da(this,r),fa(hs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ha(r)}(),ws=o.RegExp,Cs=s((function(){var e=ws("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Os=Cs||s((function(){return!ws("a","y").sticky})),zs={BROKEN_CARET:Cs||s((function(){var e=ws("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Os,UNSUPPORTED_Y:Cs},Ps=o.RegExp,Es=s((function(){var e=Ps(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),qs=o.RegExp,js=s((function(){var e=qs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Ss=et.get,Ts=ee("native-string-replace",String.prototype.replace),Ms=RegExp.prototype.exec,Rs=Ms,_s=k("".charAt),As=k("".indexOf),Bs=k("".replace),Us=k("".slice),Ns=(xs=/b*/g,h(Ms,ks=/a/,"a"),h(Ms,xs,"a"),0!==ks.lastIndex||0!==xs.lastIndex),Ls=zs.BROKEN_CARET,Ws=void 0!==/()??/.exec("")[1];(Ns||Ws||Ls||Es||js)&&(Rs=function(e){var t,r,n,a,i,o,s,c=this,d=Ss(c),u=Jt(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=h(Rs,f,u),c.lastIndex=f.lastIndex,t;var p=d.groups,l=Ls&&c.sticky,g=h(ta,c),b=c.source,v=0,I=u;if(l&&(g=Bs(g,"y",""),-1===As(g,"g")&&(g+="g"),I=Us(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==_s(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),Ws&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ns&&(n=c.lastIndex),a=h(Ms,l?r:c,I),l?a?(a.input=Us(a.input,v),a[0]=Us(a[0],v),a.index=c.lastIndex,c.lastIndex+=a[0].length):c.lastIndex=0:Ns&&a&&(c.lastIndex=c.global?a.index+a[0].length:n),Ws&&a&&a.length>1&&h(Ts,a[0],r,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(a[i]=void 0)})),a&&p)for(a.groups=o=Xt(null),i=0;i<p.length;i++)o[(s=p[i])[0]]=a[s[1]];return a});var Ds=Rs;Mt({target:"RegExp",proto:!0,forced:/./.exec!==Ds},{exec:Ds});var Fs=pe("species"),Js=RegExp.prototype,Gs=function(e,t,r,n){var a=pe(e),i=!s((function(){var t={};return t[a]=function(){return 7},7!=""[e](t)})),o=i&&!s((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Fs]=function(){return r},r.flags="",r[a]=/./[a]),r.exec=function(){return t=!0,null},r[a](""),!t}));if(!i||!o||r){var c=k(/./[a]),d=t(a,""[e],(function(e,t,r,n,a){var o=k(e),s=t.exec;return s===Ds||s===Js.exec?i&&!a?{done:!0,value:c(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));rt(String.prototype,e,d[0]),rt(Js,a,d[1])}n&&Te(Js[a],"sham",!0)},Hs=wi.charAt,Vs=function(e,t,r){return t+(r?Hs(e,t).length:1)},$s=Math.floor,Ys=k("".charAt),Ks=k("".replace),Qs=k("".slice),Xs=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Zs=/\$([$&'`]|\d{1,2})/g,ec=function(e,t,r,n,a,i){var o=r+e.length,s=n.length,c=Zs;return void 0!==a&&(a=re(a),c=Xs),Ks(i,c,(function(i,c){var d;switch(Ys(c,0)){case"$":return"$";case"&":return e;case"`":return Qs(t,0,r);case"'":return Qs(t,o);case"<":d=a[Qs(c,1,-1)];break;default:var u=+c;if(0===u)return i;if(u>s){var h=$s(u/10);return 0===h?i:h<=s?void 0===n[h-1]?Ys(c,1):n[h-1]+Ys(c,1):i}d=n[u-1]}return void 0===d?"":d}))},tc=TypeError,rc=function(e,t){var r=e.exec;if(j(r)){var n=h(r,e,t);return null!==n&&Pe(n),n}if("RegExp"===w(e))return h(Ds,e,t);throw tc("RegExp#exec called on incompatible receiver")},nc=pe("replace"),ac=Math.max,ic=Math.min,oc=k([].concat),sc=k([].push),cc=k("".indexOf),dc=k("".slice),uc="$0"==="a".replace(/./,"$0"),hc=!!/./[nc]&&""===/./[nc]("a","$0");Gs("replace",(function(e,t,r){var n=hc?"$":"$0";return[function(e,r){var n=E(this),a=null==e?void 0:Y(e,nc);return a?h(a,e,n,r):h(t,Jt(n),e,r)},function(e,a){var i=Pe(this),o=Jt(e);if("string"==typeof a&&-1===cc(a,n)&&-1===cc(a,"$<")){var s=r(t,i,o,a);if(s.done)return s.value}var c=j(a);c||(a=Jt(a));var d=i.global;if(d){var u=i.unicode;i.lastIndex=0}for(var h=[];;){var f=rc(i,o);if(null===f)break;if(sc(h,f),!d)break;""===Jt(f[0])&&(i.lastIndex=Vs(o,ht(i.lastIndex),u))}for(var p,l="",g=0,b=0;b<h.length;b++){for(var v=Jt((f=h[b])[0]),I=ac(ic(ot(f.index),o.length),0),m=[],k=1;k<f.length;k++)sc(m,void 0===(p=f[k])?p:String(p));var x=f.groups;if(c){var y=oc([v],m,I,o);void 0!==x&&sc(y,x);var w=Jt(un(a,void 0,y))}else w=ec(v,o,I,m,x,a);I>=g&&(l+=dc(o,g,I)+w,g=I+v.length)}return l+dc(o,g)}]}),!!s((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!uc||hc);var fc,pc=function(e,t,r){return r.get&&tt(r.get,t,{getter:!0}),r.set&&tt(r.set,t,{setter:!0}),Se.f(e,t,r)},lc=Object.assign,gc=Object.defineProperty,bc=k([].concat),vc=!lc||s((function(){if(c&&1!==lc({b:1},lc(gc({},"a",{enumerable:!0,get:function(){gc(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol();return e[r]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=lc({},e)[r]||"abcdefghijklmnopqrst"!=Rt(lc({},t)).join("")}))?function(e,t){for(var r=re(e),n=arguments.length,a=1,i=xt.f,o=l.f;n>a;)for(var s,d=z(arguments[a++]),u=i?bc(Rt(d),i(d)):Rt(d),f=u.length,p=0;f>p;)s=u[p++],c&&!h(o,d,s)||(r[s]=d[s]);return r}:lc,Ic=function(e,t,r){var n,a;Pe(e);try{if(!(n=Y(e,"return"))){if("throw"===t)throw r;return r}n=h(n,e)}catch(e){a=!0,n=e}if("throw"===t)throw r;if(a)throw n;return Pe(n),r},mc=function(e,t,r,n){try{return n?t(Pe(r)[0],r[1]):t(r)}catch(t){Ic(e,"throw",t)}},kc=pe("iterator"),xc=Array.prototype,yc=function(e){return void 0!==e&&(Ha.Array===e||xc[kc]===e)},wc=Array,Cc=function(e){var t=re(e),r=wr(this),n=arguments.length,a=n>1?arguments[1]:void 0,i=void 0!==a;i&&(a=pr(a,n>2?arguments[2]:void 0));var o,s,c,d,u,f,p=Ui(t),l=0;if(!p||this===wc&&yc(p))for(o=ft(t),s=r?new this(o):wc(o);o>l;l++)f=i?a(t[l],l):t[l],Zt(s,l,f);else for(u=(d=Li(t,p)).next,s=r?new this:[];!(c=h(u,d)).done;l++)f=i?mc(d,a,[c.value,l],!0):c.value,Zt(s,l,f);return s.length=l,s},Oc=/[^\0-\u007E]/,zc=/[.\u3002\uFF0E\uFF61]/g,Pc="Overflow: input needs wider integers to process",Ec=RangeError,qc=k(zc.exec),jc=Math.floor,Sc=String.fromCharCode,Tc=k("".charCodeAt),Mc=k([].join),Rc=k([].push),_c=k("".replace),Ac=k("".split),Bc=k("".toLowerCase),Uc=function(e){return e+22+75*(e<26)},Nc=function(e,t,r){var n=0;for(e=r?jc(e/700):e>>1,e+=jc(e/t);e>455;)e=jc(e/35),n+=36;return jc(n+36*e/(e+38))},Lc=function(e){var t,r,n=[],a=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var a=Tc(e,r++);if(a>=55296&&a<=56319&&r<n){var i=Tc(e,r++);56320==(64512&i)?Rc(t,((1023&a)<<10)+(1023&i)+65536):(Rc(t,a),r--)}else Rc(t,a)}return t}(e)).length,i=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Rc(n,Sc(r));var c=n.length,d=c;for(c&&Rc(n,"-");d<a;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=i&&r<u&&(u=r);var h=d+1;if(u-i>jc((2147483647-o)/h))throw Ec(Pc);for(o+=(u-i)*h,i=u,t=0;t<e.length;t++){if((r=e[t])<i&&++o>2147483647)throw Ec(Pc);if(r==i){for(var f=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(f<l)break;var g=f-l,b=36-l;Rc(n,Sc(Uc(l+g%b))),f=jc(g/b),p+=36}Rc(n,Sc(Uc(f))),s=Nc(o,h,d==c),o=0,d++}}o++,i++}return Mc(n,"")},Wc=wi.codeAt,Dc=et.set,Fc=et.getterFor("URL"),Jc=_o.URLSearchParams,Gc=_o.getState,Hc=o.URL,Vc=o.TypeError,$c=o.parseInt,Yc=Math.floor,Kc=Math.pow,Qc=k("".charAt),Xc=k(/./.exec),Zc=k([].join),ed=k(1..toString),td=k([].pop),rd=k([].push),nd=k("".replace),ad=k([].shift),id=k("".split),od=k("".slice),sd=k("".toLowerCase),cd=k([].unshift),dd=/[a-z]/i,ud=/[\d+-.a-z]/i,hd=/\d/,fd=/^0x/i,pd=/^[0-7]+$/,ld=/^\d+$/,gd=/^[\da-f]+$/i,bd=/[\0\t\n\r #%/:<>?@[\\\]^|]/,vd=/[\0\t\n\r #/:<>?@[\\\]^|]/,Id=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,md=/[\t\n\r]/g,kd=function(e){var t,r,n,a;if("number"==typeof e){for(t=[],r=0;r<4;r++)cd(t,e%256),e=Yc(e/256);return Zc(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,a=0,i=0;i<8;i++)0!==e[i]?(a>r&&(t=n,r=a),n=null,a=0):(null===n&&(n=i),++a);return a>r&&(t=n,r=a),t}(e),r=0;r<8;r++)a&&0===e[r]||(a&&(a=!1),n===r?(t+=r?":":"::",a=!0):(t+=ed(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},xd={},yd=vc({},xd,{" ":1,'"':1,"<":1,">":1,"`":1}),wd=vc({},yd,{"#":1,"?":1,"{":1,"}":1}),Cd=vc({},wd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Od=function(e,t){var r=Wc(e,0);return r>32&&r<127&&!ae(t,e)?e:encodeURIComponent(e)},zd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Pd=function(e,t){var r;return 2==e.length&&Xc(dd,Qc(e,0))&&(":"==(r=Qc(e,1))||!t&&"|"==r)},Ed=function(e){var t;return e.length>1&&Pd(od(e,0,2))&&(2==e.length||"/"===(t=Qc(e,2))||"\\"===t||"?"===t||"#"===t)},qd=function(e){return"."===e||"%2e"===sd(e)},jd={},Sd={},Td={},Md={},Rd={},_d={},Ad={},Bd={},Ud={},Nd={},Ld={},Wd={},Dd={},Fd={},Jd={},Gd={},Hd={},Vd={},$d={},Yd={},Kd={},Qd=function(e,t,r){var n,a,i,o=Jt(e);if(t){if(a=this.parse(o))throw Vc(a);this.searchParams=null}else{if(void 0!==r&&(n=new Qd(r,!0)),a=this.parse(o,null,n))throw Vc(a);(i=Gc(new Jc)).bindURL(this),this.searchParams=i}};Qd.prototype={type:"URL",parse:function(e,t,r){var n,a,i,o,s,c=this,d=t||jd,u=0,h="",f=!1,p=!1,l=!1;for(e=Jt(e),t||(c.scheme="",c.username="",c.password="",c.host=null,c.port=null,c.path=[],c.query=null,c.fragment=null,c.cannotBeABaseURL=!1,e=nd(e,Id,"")),e=nd(e,md,""),n=Cc(e);u<=n.length;){switch(a=n[u],d){case jd:if(!a||!Xc(dd,a)){if(t)return"Invalid scheme";d=Td;continue}h+=sd(a),d=Sd;break;case Sd:if(a&&(Xc(ud,a)||"+"==a||"-"==a||"."==a))h+=sd(a);else{if(":"!=a){if(t)return"Invalid scheme";h="",d=Td,u=0;continue}if(t&&(c.isSpecial()!=ae(zd,h)||"file"==h&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=h,t)return void(c.isSpecial()&&zd[c.scheme]==c.port&&(c.port=null));h="","file"==c.scheme?d=Fd:c.isSpecial()&&r&&r.scheme==c.scheme?d=Md:c.isSpecial()?d=Bd:"/"==n[u+1]?(d=Rd,u++):(c.cannotBeABaseURL=!0,rd(c.path,""),d=$d)}break;case Td:if(!r||r.cannotBeABaseURL&&"#"!=a)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==a){c.scheme=r.scheme,c.path=rr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Kd;break}d="file"==r.scheme?Fd:_d;continue;case Md:if("/"!=a||"/"!=n[u+1]){d=_d;continue}d=Ud,u++;break;case Rd:if("/"==a){d=Nd;break}d=Vd;continue;case _d:if(c.scheme=r.scheme,a==fc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query;else if("/"==a||"\\"==a&&c.isSpecial())d=Ad;else if("?"==a)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query="",d=Yd;else{if("#"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.path.length--,d=Vd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=rr(r.path),c.query=r.query,c.fragment="",d=Kd}break;case Ad:if(!c.isSpecial()||"/"!=a&&"\\"!=a){if("/"!=a){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Vd;continue}d=Nd}else d=Ud;break;case Bd:if(d=Ud,"/"!=a||"/"!=Qc(h,u+1))continue;u++;break;case Ud:if("/"!=a&&"\\"!=a){d=Nd;continue}break;case Nd:if("@"==a){f&&(h="%40"+h),f=!0,i=Cc(h);for(var g=0;g<i.length;g++){var b=i[g];if(":"!=b||l){var v=Od(b,Cd);l?c.password+=v:c.username+=v}else l=!0}h=""}else if(a==fc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(f&&""==h)return"Invalid authority";u-=Cc(h).length+1,h="",d=Ld}else h+=a;break;case Ld:case Wd:if(t&&"file"==c.scheme){d=Gd;continue}if(":"!=a||p){if(a==fc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()){if(c.isSpecial()&&""==h)return"Invalid host";if(t&&""==h&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(h))return o;if(h="",d=Hd,t)return;continue}"["==a?p=!0:"]"==a&&(p=!1),h+=a}else{if(""==h)return"Invalid host";if(o=c.parseHost(h))return o;if(h="",d=Dd,t==Wd)return}break;case Dd:if(!Xc(hd,a)){if(a==fc||"/"==a||"?"==a||"#"==a||"\\"==a&&c.isSpecial()||t){if(""!=h){var I=$c(h,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===zd[c.scheme]?null:I,h=""}if(t)return;d=Hd;continue}return"Invalid port"}h+=a;break;case Fd:if(c.scheme="file","/"==a||"\\"==a)d=Jd;else{if(!r||"file"!=r.scheme){d=Vd;continue}if(a==fc)c.host=r.host,c.path=rr(r.path),c.query=r.query;else if("?"==a)c.host=r.host,c.path=rr(r.path),c.query="",d=Yd;else{if("#"!=a){Ed(Zc(rr(n,u),""))||(c.host=r.host,c.path=rr(r.path),c.shortenPath()),d=Vd;continue}c.host=r.host,c.path=rr(r.path),c.query=r.query,c.fragment="",d=Kd}}break;case Jd:if("/"==a||"\\"==a){d=Gd;break}r&&"file"==r.scheme&&!Ed(Zc(rr(n,u),""))&&(Pd(r.path[0],!0)?rd(c.path,r.path[0]):c.host=r.host),d=Vd;continue;case Gd:if(a==fc||"/"==a||"\\"==a||"?"==a||"#"==a){if(!t&&Pd(h))d=Vd;else if(""==h){if(c.host="",t)return;d=Hd}else{if(o=c.parseHost(h))return o;if("localhost"==c.host&&(c.host=""),t)return;h="",d=Hd}continue}h+=a;break;case Hd:if(c.isSpecial()){if(d=Vd,"/"!=a&&"\\"!=a)continue}else if(t||"?"!=a)if(t||"#"!=a){if(a!=fc&&(d=Vd,"/"!=a))continue}else c.fragment="",d=Kd;else c.query="",d=Yd;break;case Vd:if(a==fc||"/"==a||"\\"==a&&c.isSpecial()||!t&&("?"==a||"#"==a)){if(".."===(s=sd(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==a||"\\"==a&&c.isSpecial()||rd(c.path,"")):qd(h)?"/"==a||"\\"==a&&c.isSpecial()||rd(c.path,""):("file"==c.scheme&&!c.path.length&&Pd(h)&&(c.host&&(c.host=""),h=Qc(h,0)+":"),rd(c.path,h)),h="","file"==c.scheme&&(a==fc||"?"==a||"#"==a))for(;c.path.length>1&&""===c.path[0];)ad(c.path);"?"==a?(c.query="",d=Yd):"#"==a&&(c.fragment="",d=Kd)}else h+=Od(a,wd);break;case $d:"?"==a?(c.query="",d=Yd):"#"==a?(c.fragment="",d=Kd):a!=fc&&(c.path[0]+=Od(a,xd));break;case Yd:t||"#"!=a?a!=fc&&("'"==a&&c.isSpecial()?c.query+="%27":c.query+="#"==a?"%23":Od(a,xd)):(c.fragment="",d=Kd);break;case Kd:a!=fc&&(c.fragment+=Od(a,yd))}u++}},parseHost:function(e){var t,r,n;if("["==Qc(e,0)){if("]"!=Qc(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,a,i,o,s,c=[0,0,0,0,0,0,0,0],d=0,u=null,h=0,f=function(){return Qc(e,h)};if(":"==f()){if(":"!=Qc(e,1))return;h+=2,u=++d}for(;f();){if(8==d)return;if(":"!=f()){for(t=r=0;r<4&&Xc(gd,f());)t=16*t+$c(f(),16),h++,r++;if("."==f()){if(0==r)return;if(h-=r,d>6)return;for(n=0;f();){if(a=null,n>0){if(!("."==f()&&n<4))return;h++}if(!Xc(hd,f()))return;for(;Xc(hd,f());){if(i=$c(f(),10),null===a)a=i;else{if(0==a)return;a=10*a+i}if(a>255)return;h++}c[d]=256*c[d]+a,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==f()){if(h++,!f())return}else if(f())return;c[d++]=t}else{if(null!==u)return;h++,u=++d}}if(null!==u)for(o=d-u,d=7;0!=d&&o>0;)s=c[d],c[d--]=c[u+o-1],c[u+--o]=s;else if(8!=d)return;return c}(od(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],a=Ac(_c(Bc(e),zc,"."),".");for(t=0;t<a.length;t++)r=a[t],Rc(n,qc(Oc,r)?"xn--"+Lc(r):r);return Mc(n,".")}(e),Xc(bd,e))return"Invalid host";if(null===(t=function(e){var t,r,n,a,i,o,s,c=id(e,".");if(c.length&&""==c[c.length-1]&&c.length--,(t=c.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(a=c[n]))return e;if(i=10,a.length>1&&"0"==Qc(a,0)&&(i=Xc(fd,a)?16:8,a=od(a,8==i?1:2)),""===a)o=0;else{if(!Xc(10==i?ld:8==i?pd:gd,a))return e;o=$c(a,i)}rd(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Kc(256,5-t))return null}else if(o>255)return null;for(s=td(r),n=0;n<r.length;n++)s+=r[n]*Kc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Xc(vd,e))return"Invalid host";for(t="",r=Cc(e),n=0;n<r.length;n++)t+=Od(r[n],xd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ae(zd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Pd(e[0],!0)||e.length--},serialize:function(){var e=this,t=e.scheme,r=e.username,n=e.password,a=e.host,i=e.port,o=e.path,s=e.query,c=e.fragment,d=t+":";return null!==a?(d+="//",e.includesCredentials()&&(d+=r+(n?":"+n:"")+"@"),d+=kd(a),null!==i&&(d+=":"+i)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Zc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Vc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Xd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+kd(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Jt(e)+":",jd)},getUsername:function(){return this.username},setUsername:function(e){var t=Cc(Jt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Od(t[r],Cd)}},getPassword:function(){return this.password},setPassword:function(e){var t=Cc(Jt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Od(t[r],Cd)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?kd(e):kd(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Ld)},getHostname:function(){var e=this.host;return null===e?"":kd(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Wd)},getPort:function(){var e=this.port;return null===e?"":Jt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Jt(e))?this.port=null:this.parse(e,Dd))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Zc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Hd))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Jt(e))?this.query=null:("?"==Qc(e,0)&&(e=od(e,1)),this.query="",this.parse(e,Yd)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Jt(e))?("#"==Qc(e,0)&&(e=od(e,1)),this.fragment="",this.parse(e,Kd)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Xd=function(e){var t=Ai(this,Zd),r=Di(arguments.length,1)>1?arguments[1]:void 0,n=Dc(t,new Qd(e,!1,r));c||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},Zd=Xd.prototype,eu=function(e,t){return{get:function(){return Fc(this)[e]()},set:t&&function(e){return Fc(this)[t](e)},configurable:!0,enumerable:!0}};if(c&&(pc(Zd,"href",eu("serialize","setHref")),pc(Zd,"origin",eu("getOrigin")),pc(Zd,"protocol",eu("getProtocol","setProtocol")),pc(Zd,"username",eu("getUsername","setUsername")),pc(Zd,"password",eu("getPassword","setPassword")),pc(Zd,"host",eu("getHost","setHost")),pc(Zd,"hostname",eu("getHostname","setHostname")),pc(Zd,"port",eu("getPort","setPort")),pc(Zd,"pathname",eu("getPathname","setPathname")),pc(Zd,"search",eu("getSearch","setSearch")),pc(Zd,"searchParams",eu("getSearchParams")),pc(Zd,"hash",eu("getHash","setHash"))),rt(Zd,"toJSON",(function(){return Fc(this).serialize()}),{enumerable:!0}),rt(Zd,"toString",(function(){return Fc(this).serialize()}),{enumerable:!0}),Hc){var tu=Hc.createObjectURL,ru=Hc.revokeObjectURL;tu&&rt(Xd,"createObjectURL",pr(tu,Hc)),ru&&rt(Xd,"revokeObjectURL",pr(ru,Hc))}function nu(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=gs(e);if(t){var a=gs(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return ls(this,r)}}hr(Xd,"URL"),Mt({global:!0,constructor:!0,forced:!Mi,sham:!c},{URL:Xd});var au=function(e){ps(r,Is(URL));var t=nu(r);function r(e,n,a){var i;return da(this,r),(i=t.call(this,r.renderTemplateUri("".concat(n,"/").concat(e).replace(/\/\/+/g,"/"),null==a?void 0:a.pathParams))).addQueryParams(null==a?void 0:a.queryParams),null!=a&&a.origin&&i.replaceOrigin(null==a?void 0:a.origin),i}return ha(r,[{key:"replaceOrigin",value:function(e){var t=new URL(e);this.protocol=t.protocol,this.host=t.host,this.pathname="".concat(t.pathname,"/").concat(this.pathname).replace(/\/\/+/g,"/")}},{key:"addQueryParams",value:function(e){var t=this;e&&Object.keys(e).forEach((function(r){var n=e[r];if(Array.isArray(n))if("refine"===r)for(var a=0;a<n.length;a+=1)t.searchParams.append(r,String(n[a]));else t.searchParams.append(r,n.join());else t.searchParams.append(r,String(n))}))}}],[{key:"renderTemplateUri",value:function(e,t){return t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e}}]),r}(),iu="commerce-sdk-isomorphic@1.12.0";function ou(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function su(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ou(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ou(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var cu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=su({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T,M,R,_,A;return ha(e,[{key:"createBasket",value:(A=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==a.taxMode&&(o.taxMode=a.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==a.temporary&&(o.temporary=a.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=32,Jo(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ys(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"transferBasket",value:(_=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==a.overrideExisting&&(o.overrideExisting=a.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===a.siteId){e.next=22;break}o.siteId=a.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Jo(s.toString(),d);case 31:if(u=e.sent,!r){e.next=36;break}return e.abrupt("return",u);case 36:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=40;break}throw new ys(u);case 40:return e.next=42,u.text();case 42:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"mergeBasket",value:(R=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==a.createDestinationBasket&&(o.createDestinationBasket=a.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==a.productItemMergeMode&&(o.productItemMergeMode=a.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===a.siteId){e.next=23;break}o.siteId=a.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=32,Jo(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ys(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ys(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(S=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(j=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(q=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==a.useAsShipping&&(o.useAsShipping=a.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=41,Jo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ys(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"addCouponToBasket",value:(E=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(P=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}i.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===a.couponItemId){e.next=29;break}i.couponItemId=a.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(z=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(O=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(w=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}i.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===a.giftCertificateItemId){e.next=29;break}i.giftCertificateItemId=a.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"addItemToBasket",value:(y=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeItemFromBasket",value:(x=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Jo(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new ys(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(m=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ys(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===a.siteId){e.next=40;break}o.siteId=a.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=49,Jo(s.toString(),d);case 49:if(u=e.sent,!r){e.next=54;break}return e.abrupt("return",u);case 54:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=58;break}throw new ys(u);case 58:return e.next=60,u.text();case 60:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(f=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}i.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===a.priceAdjustmentId){e.next=29;break}i.priceAdjustmentId=a.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(h=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ys(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==a.useAsBilling&&(o.useAsBilling=a.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==a.removeExternalTax&&(o.removeExternalTax=a.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===a.siteId){e.next=41;break}o.siteId=a.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=50,Jo(s.toString(),d);case 50:if(u=e.sent,!r){e.next=55;break}return e.abrupt("return",u);case 55:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=59;break}throw new ys(u);case 59:return e.next=61,u.text();case 61:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(i=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(a=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}i.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===a.shipmentId){e.next=29;break}i.shipmentId=a.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==a.exchange&&(o.exchange=a.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===a.siteId){e.next=31;break}o.siteId=a.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=40,Jo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ys(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}i.basketId=n.basketId,e.next=21;break;case 16:if(void 0===a.basketId){e.next=20;break}i.basketId=a.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new au("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=su(su({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=su(su({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ys(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function du(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function uu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?du(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):du(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(cu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var hu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=uu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r,n,a;return ha(e,[{key:"getShopperContext",value:(a=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=30,Jo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ys(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"createShopperContext",value:(n=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=30,Jo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ys(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=30,Jo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new ys(u);case 37:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}i.usid=n.usid,e.next=21;break;case 16:if(void 0===a.usid){e.next=20;break}i.usid=a.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==a.siteId&&(o.siteId=a.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new au("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=uu(uu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=uu(uu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=30,Jo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ys(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(hu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var lu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v,I,m,k,x,y,w,C,O,z,P,E,q,j,S,T;return ha(e,[{key:"registerCustomer",value:(T=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Jo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ys(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(S=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for invalidateCustomerAuth: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Jo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new ys(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeCustomer",value:(j=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.clientId){e.next=17;break}o.clientId=n.clientId,e.next=22;break;case 17:if(void 0===a.clientId){e.next=21;break}o.clientId=a.clientId,e.next=22;break;case 21:throw new Error("Missing required query parameter: clientId");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(q=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeTrustedSystem: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Jo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ys(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Jo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=36;break}throw new ys(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(P=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Jo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ys(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"registerExternalProfile",value:(z=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Jo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ys(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getExternalProfile",value:(O=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===a.externalId){e.next=21;break}o.externalId=a.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===a.authenticationProviderId){e.next=30;break}o.authenticationProviderId=a.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getCustomer",value:(C=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(w=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(y=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"getCustomerAddress",value:(x=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ys(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(m=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}i.addressName=n.addressName,e.next=30;break;case 25:if(void 0===a.addressName){e.next=29;break}i.addressName=a.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==a.crossSites&&(o.crossSites=a.crossSites),void 0!==n.from?o.from=n.from:void 0!==a.from&&(o.from=a.from),void 0!==n.until?o.until=n.until:void 0!==a.until&&(o.until=a.until),void 0!==n.status?o.status=n.status:void 0!==a.status&&(o.status=a.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Jo(s.toString(),d);case 44:if(u=e.sent,!r){e.next=49;break}return e.abrupt("return",u);case 49:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new ys(u);case 53:return e.next=55,u.text();case 55:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new ys(u);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ys(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(f=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"createCustomerProductList",value:(h=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ys(u);case 54:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=56,Jo(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=63;break}throw new ys(u);case 63:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(i=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=56,Jo(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ys(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(a=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}i.customerId=n.customerId,e.next=21;break;case 16:if(void 0===a.customerId){e.next=20;break}i.customerId=a.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}i.listId=n.listId,e.next=30;break;case 25:if(void 0===a.listId){e.next=29;break}i.listId=a.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}i.itemId=n.itemId,e.next=39;break;case 34:if(void 0===a.itemId){e.next=38;break}i.itemId=a.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===a.siteId){e.next=48;break}o.siteId=a.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new au("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=56,Jo(s.toString(),d);case 56:if(u=e.sent,!r){e.next=61;break}return e.abrupt("return",u);case 61:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=65;break}throw new ys(u);case 65:return e.next=67,u.text();case 67:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==a.email&&(o.email=a.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==a.firstName&&(o.firstName=a.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==a.lastName&&(o.lastName=a.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===a.siteId){e.next=24;break}o.siteId=a.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new au("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=32,Jo(s.toString(),d);case 32:if(u=e.sent,!r){e.next=37;break}return e.abrupt("return",u);case 37:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=41;break}throw new ys(u);case 41:return e.next=43,u.text();case 43:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new au("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}i.listId=n.listId,e.next=21;break;case 16:if(void 0===a.listId){e.next=20;break}i.listId=a.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}i.itemId=n.itemId,e.next=30;break;case 25:if(void 0===a.itemId){e.next=29;break}i.itemId=a.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new au("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=pu(pu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Jo(s.toString(),d);case 47:if(u=e.sent,!r){e.next=52;break}return e.abrupt("return",u);case 52:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=56;break}throw new ys(u);case 56:return e.next=58,u.text();case 58:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function gu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var vu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r;return ha(e,[{key:"retrieveResults",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===a.locale){e.next=30;break}o.locale=a.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new au("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=bu(bu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=40,Jo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ys(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}i.channelId=n.channelId,e.next=21;break;case 16:if(void 0===a.channelId){e.next=20;break}i.channelId=a.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===a.suggestionTypes){e.next=30;break}o.suggestionTypes=a.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==a.searchText&&(o.searchText=a.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===a.locale){e.next=40;break}o.locale=a.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new au("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=bu(bu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=bu(bu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Iu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Iu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(vu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var ku=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r;return ha(e,[{key:"getPages",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==a.categoryId&&(o.categoryId=a.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==a.productId&&(o.productId=a.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===a.aspectTypeId){e.next=23;break}o.aspectTypeId=a.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===a.siteId){e.next=34;break}o.siteId=a.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new au("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Jo(s.toString(),d);case 43:if(u=e.sent,!r){e.next=48;break}return e.abrupt("return",u);case 48:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=52;break}throw new ys(u);case 52:return e.next=54,u.text();case 54:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}i.pageId=n.pageId,e.next=21;break;case 16:if(void 0===a.pageId){e.next=20;break}i.pageId=a.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==a.aspectAttributes&&(o.aspectAttributes=a.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==a.parameters&&(o.parameters=a.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new au("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Jo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ys(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(ku,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var wu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=yu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t;return ha(e,[{key:"getGiftCertificate",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new au("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=yu(yu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=yu(yu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Jo(s.toString(),d);case 29:if(u=e.sent,!r){e.next=34;break}return e.abrupt("return",u);case 34:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=38;break}throw new ys(u);case 38:return e.next=40,u.text();case 40:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Cu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ou(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(wu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var zu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=Ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r,n,a,i,o,s,c,d,u,h,f,p,l,g,b,v;return ha(e,[{key:"authenticateCustomer",value:(v=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ys(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}o.client_id=a.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===a.refresh_token){e.next=30;break}o.refresh_token=a.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Jo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ys(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.redirect_uri){e.next=17;break}o.redirect_uri=n.redirect_uri,e.next=22;break;case 17:if(void 0===a.redirect_uri){e.next=21;break}o.redirect_uri=a.redirect_uri,e.next=22;break;case 21:throw new Error("Missing required query parameter: redirect_uri");case 22:if(void 0===n.response_type){e.next=26;break}o.response_type=n.response_type,e.next=31;break;case 26:if(void 0===a.response_type){e.next=30;break}o.response_type=a.response_type,e.next=31;break;case 30:throw new Error("Missing required query parameter: response_type");case 31:if(void 0===n.client_id){e.next=35;break}o.client_id=n.client_id,e.next=40;break;case 35:if(void 0===a.client_id){e.next=39;break}o.client_id=a.client_id,e.next=40;break;case 39:throw new Error("Missing required query parameter: client_id");case 40:if(void 0!==n.scope?o.scope=n.scope:void 0!==a.scope&&(o.scope=a.scope),void 0!==n.state?o.state=n.state:void 0!==a.state&&(o.state=a.state),void 0!==n.usid?o.usid=n.usid:void 0!==a.usid&&(o.usid=a.usid),void 0!==n.hint?o.hint=n.hint:void 0!==a.hint&&(o.hint=a.hint),void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),void 0===n.code_challenge){e.next=49;break}o.code_challenge=n.code_challenge,e.next=54;break;case 49:if(void 0===a.code_challenge){e.next=53;break}o.code_challenge=a.code_challenge,e.next=54;break;case 53:throw new Error("Missing required query parameter: code_challenge");case 54:return void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==a.ui_locales&&(o.ui_locales=a.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=62,Jo(s.toString(),d);case 62:if(u=e.sent,!r){e.next=67;break}return e.abrupt("return",u);case 67:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=69;break}throw new ys(u);case 69:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(f=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(h=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===a.client_id){e.next=21;break}o.client_id=a.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===a.channel_id){e.next=30;break}o.channel_id=a.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===a.code_challenge){e.next=39;break}o.code_challenge=a.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===a.login_id){e.next=48;break}o.login_id=a.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===a.idp_origin){e.next=57;break}o.idp_origin=a.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===a.redirect_uri){e.next=66;break}o.redirect_uri=a.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===a.response_type){e.next=75;break}o.response_type=a.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=83,Jo(s.toString(),d);case 83:if(u=e.sent,!r){e.next=88;break}return e.abrupt("return",u);case 88:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=90;break}throw new ys(u);case 90:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ys(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=27;break}throw new ys(u);case 27:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(i=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"introspectToken",value:(a=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getUserInfo",value:(n=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==a.channel_id&&(o.channel_id=a.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=21,Jo(s.toString(),d);case 21:if(u=e.sent,!r){e.next=26;break}return e.abrupt("return",u);case 26:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=30;break}throw new ys(u);case 30:return e.next=32,u.text();case 32:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 34:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new au("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ou(Ou({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ou(Ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Jo(s.toString(),d);case 20:if(u=e.sent,!r){e.next=25;break}return e.abrupt("return",u);case 25:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=29;break}throw new ys(u);case 29:return e.next=31,u.text();case 31:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Pu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Eu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var qu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=Eu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r,n,a,i,o,s;return ha(e,[{key:"createOrder",value:(s=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new au("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Jo(s.toString(),d);case 30:if(u=e.sent,!r){e.next=35;break}return e.abrupt("return",u);case 35:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=39;break}throw new ys(u);case 39:return e.next=41,u.text();case 41:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(i=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(a=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}i.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===a.paymentInstrumentId){e.next=29;break}i.paymentInstrumentId=a.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===a.siteId){e.next=39;break}o.siteId=a.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Jo(s.toString(),d);case 48:if(u=e.sent,!r){e.next=53;break}return e.abrupt("return",u);case 53:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=57;break}throw new ys(u);case 57:return e.next=59,u.text();case 59:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}i.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===a.orderNo){e.next=20;break}i.orderNo=a.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new au("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Eu(Eu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Eu(Eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Jo(s.toString(),d);case 38:if(u=e.sent,!r){e.next=43;break}return e.abrupt("return",u);case 43:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=47;break}throw new ys(u);case 47:return e.next=49,u.text();case 49:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ju(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Su(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ju(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ju(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(qu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var Tu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=Su({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r,n,a;return ha(e,[{key:"getProducts",value:(a=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===a.ids){e.next=22;break}o.ids=a.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new au("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Jo(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ys(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getProduct",value:(n=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==a.select&&(o.select=a.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==a.inventoryIds&&(o.inventoryIds=a.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==a.allImages&&(o.allImages=a.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==a.perPricebook&&(o.perPricebook=a.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===a.siteId){e.next=37;break}o.siteId=a.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new au("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=45,Jo(s.toString(),d);case 45:if(u=e.sent,!r){e.next=50;break}return e.abrupt("return",u);case 50:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=54;break}throw new ys(u);case 54:return e.next=56,u.text();case 56:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===a.ids){e.next=21;break}o.ids=a.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new au("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Jo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ys(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}i.id=n.id,e.next=21;break;case 16:if(void 0===a.id){e.next=20;break}i.id=a.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==a.levels&&(o.levels=a.levels),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===a.siteId){e.next=32;break}o.siteId=a.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new au("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Su(Su({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Su(Su({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Jo(s.toString(),d);case 40:if(u=e.sent,!r){e.next=45;break}return e.abrupt("return",u);case 45:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=49;break}throw new ys(u);case 49:return e.next=51,u.text();case 51:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Mu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ru(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(Tu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var _u=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=Ru({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r;return ha(e,[{key:"getPromotions",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===a.ids){e.next=30;break}o.ids=a.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new au("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ru(Ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}i.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===a.campaignId){e.next=20;break}i.campaignId=a.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==a.startDate&&(o.startDate=a.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==a.endDate&&(o.endDate=a.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new au("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Ru(Ru({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Ru(Ru({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Jo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ys(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();fa(_u,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Au=TypeError,Bu=function(e,t){if(!delete e[t])throw Au("Cannot delete property "+H(t)+" of "+H(e))},Uu=_.match(/firefox\/(\d+)/i),Nu=!!Uu&&+Uu[1],Lu=/MSIE|Trident/.test(_),Wu=_.match(/AppleWebKit\/(\d+)\./),Du=!!Wu&&+Wu[1],Fu=[],Ju=k(Fu.sort),Gu=k(Fu.push),Hu=s((function(){Fu.sort(void 0)})),Vu=s((function(){Fu.sort(null)})),$u=Bn("sort"),Yu=!s((function(){if(L)return L<70;if(!(Nu&&Nu>3)){if(Lu)return!0;if(Du)return Du<603;var e,t,r,n,a="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Fu.push({k:t+n,v:r})}for(Fu.sort((function(e,t){return t.v-e.v})),n=0;n<Fu.length;n++)t=Fu[n].k.charAt(0),a.charAt(a.length-1)!==t&&(a+=t);return"DGBEFHACIJK"!==a}}));function Ku(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ku(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ku(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Mt({target:"Array",proto:!0,forced:Hu||!Vu||!$u||!Yu},{sort:function(e){void 0!==e&&$(e);var t=re(this);if(Yu)return void 0===e?Ju(t):Ju(t,e);var r,n,a=[],i=ft(t);for(n=0;n<i;n++)n in t&&Gu(a,t[n]);for(Vi(a,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Jt(t)>Jt(r)?1:-1}}(e)),r=a.length,n=0;n<r;)t[n]=a[n++];for(;n<i;)Bu(t,n++);return t}});var Xu=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=Qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t,r;return ha(e,[{key:"productSearch",value:(r=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.q?o.q=n.q:void 0!==a.q&&(o.q=a.q),void 0!==n.refine?o.refine=n.refine:void 0!==a.refine&&(o.refine=a.refine),void 0!==n.sort?o.sort=n.sort:void 0!==a.sort&&(o.sort=a.sort),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),void 0!==n.expand?o.expand=n.expand:void 0!==a.expand&&(o.expand=a.expand),void 0!==n.offset?o.offset=n.offset:void 0!==a.offset&&(o.offset=a.offset),void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new au("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Qu(Qu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Qu(Qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Jo(s.toString(),d);case 37:if(u=e.sent,!r){e.next=42;break}return e.abrupt("return",u);case 42:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=46;break}throw new ys(u);case 46:return e.next=48,u.text();case 48:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===a.siteId){e.next=21;break}o.siteId=a.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===a.q){e.next=30;break}o.q=a.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==a.limit&&(o.limit=a.limit),void 0!==n.currency?o.currency=n.currency:void 0!==a.currency&&(o.currency=a.currency),void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new au("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=Qu(Qu({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=Qu(Qu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=41,Jo(s.toString(),d);case 41:if(u=e.sent,!r){e.next=46;break}return e.abrupt("return",u);case 46:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=50;break}throw new ys(u);case 50:return e.next=52,u.text();case 52:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 54:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Zu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function eh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Zu(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}fa(Xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var th=function(){function e(t){da(this,e),fa(this,"clientConfig",void 0);var r=eh({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Uo(r)}var t;return ha(e,[{key:"getUrlMapping",value:(t=ca(Ua.mark((function e(t,r){var n,a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},a=this.clientConfig.parameters,i={shortCode:a.shortCode,version:a.version||"v1"},void 0===n.organizationId){e.next=7;break}i.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===a.organizationId){e.next=11;break}i.organizationId=a.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===a.urlSegment){e.next=21;break}o.urlSegment=a.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===a.siteId){e.next=30;break}o.siteId=a.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==a.locale&&(o.locale=a.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||i.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new au("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:i,queryParams:o,origin:this.clientConfig.proxy}),c=eh(eh({},this.clientConfig.headers),null==t?void 0:t.headers),Lo||(c["user-agent"]=[c["user-agent"],iu].join(" ")),d=eh(eh({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Jo(s.toString(),d);case 39:if(u=e.sent,!r){e.next=44;break}return e.abrupt("return",u);case 44:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=48;break}throw new ys(u);case 48:return e.next=50,u.text();case 50:return h=e.sent,e.abrupt("return",h?JSON.parse(h):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();fa(th,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}");var rh=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Gs("search",(function(e,t,r){return[function(t){var r=E(this),n=null==t?void 0:Y(t,e);return n?h(n,t,r):new RegExp(t)[e](Jt(r))},function(e){var n=Pe(this),a=Jt(e),i=r(t,n,a);if(i.done)return i.value;var o=n.lastIndex;rh(o,0)||(n.lastIndex=0);var s=rc(n,a);return rh(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var nh=pe("iterator"),ah=!1;try{var ih=0,oh={next:function(){return{done:!!ih++}},return:function(){ah=!0}};oh[nh]=function(){return this},Array.from(oh,(function(){throw 2}))}catch(e){}var sh,ch,dh,uh=function(e,t){if(!t&&!ah)return!1;var r=!1;try{var n={};n[nh]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},hh="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,fh=Se.f,ph=et.enforce,lh=et.get,gh=o.Int8Array,bh=gh&&gh.prototype,vh=o.Uint8ClampedArray,Ih=vh&&vh.prototype,mh=gh&&Qa(gh),kh=bh&&Qa(bh),xh=Object.prototype,yh=o.TypeError,wh=pe("toStringTag"),Ch=ce("TYPED_ARRAY_TAG"),Oh=hh&&!!oi&&"Opera"!==Dt(o.opera),zh=!1,Ph={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Eh={BigInt64Array:8,BigUint64Array:8},qh=function(e){var t=Qa(e);if(S(t)){var r=lh(t);return r&&ae(r,"TypedArrayConstructor")?r.TypedArrayConstructor:qh(t)}},jh=function(e){if(!S(e))return!1;var t=Dt(e);return ae(Ph,t)||ae(Eh,t)};for(sh in Ph)(dh=(ch=o[sh])&&ch.prototype)?ph(dh).TypedArrayConstructor=ch:Oh=!1;for(sh in Eh)(dh=(ch=o[sh])&&ch.prototype)&&(ph(dh).TypedArrayConstructor=ch);if((!Oh||!j(mh)||mh===Function.prototype)&&(mh=function(){throw yh("Incorrect invocation")},Oh))for(sh in Ph)o[sh]&&oi(o[sh],mh);if((!Oh||!kh||kh===xh)&&(kh=mh.prototype,Oh))for(sh in Ph)o[sh]&&oi(o[sh].prototype,kh);if(Oh&&Qa(Ih)!==kh&&oi(Ih,kh),c&&!ae(kh,wh))for(sh in zh=!0,fh(kh,wh,{get:function(){return S(this)?this[Ch]:void 0}}),Ph)o[sh]&&Te(o[sh],Ch,sh);var Sh={NATIVE_ARRAY_BUFFER_VIEWS:Oh,TYPED_ARRAY_TAG:zh&&Ch,aTypedArray:function(e){if(jh(e))return e;throw yh("Target is not a typed array")},aTypedArrayConstructor:function(e){if(j(e)&&(!oi||R(mh,e)))return e;throw yh(H(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(c){if(r)for(var a in Ph){var i=o[a];if(i&&ae(i.prototype,e))try{delete i.prototype[e]}catch(r){try{i.prototype[e]=t}catch(e){}}}kh[e]&&!r||rt(kh,e,r?t:Oh&&bh[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,a;if(c){if(oi){if(r)for(n in Ph)if((a=o[n])&&ae(a,e))try{delete a[e]}catch(e){}if(mh[e]&&!r)return;try{return rt(mh,e,r?t:Oh&&mh[e]||t)}catch(e){}}for(n in Ph)!(a=o[n])||a[e]&&!r||rt(a,e,t)}},getTypedArrayConstructor:qh,isView:function(e){if(!S(e))return!1;var t=Dt(e);return"DataView"===t||ae(Ph,t)||ae(Eh,t)},isTypedArray:jh,TypedArray:mh,TypedArrayPrototype:kh},Th=Sh.NATIVE_ARRAY_BUFFER_VIEWS,Mh=o.ArrayBuffer,Rh=o.Int8Array,_h=!Th||!s((function(){Rh(1)}))||!s((function(){new Rh(-1)}))||!uh((function(e){new Rh,new Rh(null),new Rh(1.5),new Rh(e)}),!0)||s((function(){return 1!==new Rh(new Mh(2),1,void 0).length})),Ah=RangeError,Bh=function(e){if(void 0===e)return 0;var t=ot(e),r=ht(t);if(t!==r)throw Ah("Wrong length or index");return r},Uh=Array,Nh=Math.abs,Lh=Math.pow,Wh=Math.floor,Dh=Math.log,Fh=Math.LN2,Jh=function(e,t,r){var n,a,i,o=Uh(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?Lh(2,-24)-Lh(2,-77):0,h=e<0||0===e&&1/e<0?1:0,f=0;for((e=Nh(e))!=e||e===1/0?(a=e!=e?1:0,n=c):(n=Wh(Dh(e)/Fh),e*(i=Lh(2,-n))<1&&(n--,i*=2),(e+=n+d>=1?u/i:u*Lh(2,1-d))*i>=2&&(n++,i/=2),n+d>=c?(a=0,n=c):n+d>=1?(a=(e*i-1)*Lh(2,t),n+=d):(a=e*Lh(2,d-1)*Lh(2,t),n=0));t>=8;)o[f++]=255&a,a/=256,t-=8;for(n=n<<t|a,s+=t;s>0;)o[f++]=255&n,n/=256,s-=8;return o[--f]|=128*h,o},Gh=function(e,t){var r,n=e.length,a=8*n-t-1,i=(1<<a)-1,o=i>>1,s=a-7,c=n-1,d=e[c--],u=127&d;for(d>>=7;s>0;)u=256*u+e[c--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[c--],s-=8;if(0===u)u=1-o;else{if(u===i)return r?NaN:d?-1/0:1/0;r+=Lh(2,t),u-=o}return(d?-1:1)*r*Lh(2,u-t)},Hh=function(e){for(var t=re(this),r=ft(t),n=arguments.length,a=dt(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,o=void 0===i?r:dt(i,r);o>a;)t[a++]=e;return t},Vh=kt.f,$h=Se.f,Yh=Ae.PROPER,Kh=Ae.CONFIGURABLE,Qh=et.get,Xh=et.set,Zh=o.ArrayBuffer,ef=Zh,tf=ef&&ef.prototype,rf=o.DataView,nf=rf&&rf.prototype,af=Object.prototype,of=o.Array,sf=o.RangeError,cf=k(Hh),df=k([].reverse),uf=Jh,hf=Gh,ff=function(e){return[255&e]},pf=function(e){return[255&e,e>>8&255]},lf=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},gf=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},bf=function(e){return uf(e,23,4)},vf=function(e){return uf(e,52,8)},If=function(e,t){$h(e.prototype,t,{get:function(){return Qh(this)[t]}})},mf=function(e,t,r,n){var a=Bh(r),i=Qh(e);if(a+t>i.byteLength)throw sf("Wrong index");var o=Qh(i.buffer).bytes,s=a+i.byteOffset,c=rr(o,s,s+t);return n?c:df(c)},kf=function(e,t,r,n,a,i){var o=Bh(r),s=Qh(e);if(o+t>s.byteLength)throw sf("Wrong index");for(var c=Qh(s.buffer).bytes,d=o+s.byteOffset,u=n(+a),h=0;h<t;h++)c[d+h]=u[i?h:t-h-1]};if(hh){var xf=Yh&&"ArrayBuffer"!==Zh.name;if(s((function(){Zh(1)}))&&s((function(){new Zh(-1)}))&&!s((function(){return new Zh,new Zh(1.5),new Zh(NaN),xf&&!Kh})))xf&&Kh&&Te(Zh,"name","ArrayBuffer");else{(ef=function(e){return Ai(this,tf),new Zh(Bh(e))}).prototype=tf;for(var yf,wf=Vh(Zh),Cf=0;wf.length>Cf;)(yf=wf[Cf++])in ef||Te(ef,yf,Zh[yf]);tf.constructor=ef}oi&&Qa(nf)!==af&&oi(nf,af);var Of=new rf(new ef(2)),zf=k(nf.setInt8);Of.setInt8(0,2147483648),Of.setInt8(1,2147483649),!Of.getInt8(0)&&Of.getInt8(1)||Ri(nf,{setInt8:function(e,t){zf(this,e,t<<24>>24)},setUint8:function(e,t){zf(this,e,t<<24>>24)}},{unsafe:!0})}else tf=(ef=function(e){Ai(this,tf);var t=Bh(e);Xh(this,{bytes:cf(of(t),0),byteLength:t}),c||(this.byteLength=t)}).prototype,nf=(rf=function(e,t,r){Ai(this,nf),Ai(e,tf);var n=Qh(e).byteLength,a=ot(t);if(a<0||a>n)throw sf("Wrong offset");if(a+(r=void 0===r?n-a:ht(r))>n)throw sf("Wrong length");Xh(this,{buffer:e,byteLength:r,byteOffset:a}),c||(this.buffer=e,this.byteLength=r,this.byteOffset=a)}).prototype,c&&(If(ef,"byteLength"),If(rf,"buffer"),If(rf,"byteLength"),If(rf,"byteOffset")),Ri(nf,{getInt8:function(e){return mf(this,1,e)[0]<<24>>24},getUint8:function(e){return mf(this,1,e)[0]},getInt16:function(e){var t=mf(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=mf(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return gf(mf(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return gf(mf(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return hf(mf(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return hf(mf(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){kf(this,1,e,ff,t)},setUint8:function(e,t){kf(this,1,e,ff,t)},setInt16:function(e,t){kf(this,2,e,pf,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){kf(this,2,e,pf,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){kf(this,4,e,lf,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){kf(this,4,e,lf,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){kf(this,4,e,bf,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){kf(this,8,e,vf,t,arguments.length>2?arguments[2]:void 0)}});hr(ef,"ArrayBuffer"),hr(rf,"DataView");var Pf={ArrayBuffer:ef,DataView:rf},Ef=Math.floor,qf=Number.isInteger||function(e){return!S(e)&&isFinite(e)&&Ef(e)===e},jf=RangeError,Sf=RangeError,Tf=function(e,t){var r=function(e){var t=ot(e);if(t<0)throw jf("The argument can't be less than 0");return t}(e);if(r%t)throw Sf("Wrong offset");return r},Mf=Sh.aTypedArrayConstructor,Rf=function(e){var t,r,n,a,i,o,s=Xo(this),c=re(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,p=Ui(c);if(p&&!yc(p))for(o=(i=Li(c,p)).next,c=[];!(a=h(o,i)).done;)c.push(a.value);for(f&&d>2&&(u=pr(u,arguments[2])),r=ft(c),n=new(Mf(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},_f=pe("species"),Af=function(e){var t=M(e),r=Se.f;c&&t&&!t[_f]&&r(t,_f,{configurable:!0,get:function(){return this}})};r((function(e){var t=kt.f,r=qr.forEach,n=et.get,a=et.set,i=et.enforce,s=Se.f,d=we.f,u=Math.round,f=o.RangeError,p=Pf.ArrayBuffer,l=p.prototype,b=Pf.DataView,v=Sh.NATIVE_ARRAY_BUFFER_VIEWS,I=Sh.TYPED_ARRAY_TAG,m=Sh.TypedArray,k=Sh.TypedArrayPrototype,x=Sh.aTypedArrayConstructor,y=Sh.isTypedArray,w=function(e,t){x(e);for(var r=0,n=t.length,a=new e(n);n>r;)a[r]=t[r++];return a},C=function(e,t){s(e,t,{get:function(){return n(this)[t]}})},O=function(e){var t;return R(l,e)||"ArrayBuffer"==(t=Dt(e))||"SharedArrayBuffer"==t},z=function(e,t){return y(e)&&!J(t)&&t in e&&qf(+t)&&t>=0},P=function(e,t){return t=ve(t),z(e,t)?g(2,e[t]):d(e,t)},E=function(e,t,r){return t=ve(t),!(z(e,t)&&S(r)&&ae(r,"value"))||ae(r,"get")||ae(r,"set")||r.configurable||ae(r,"writable")&&!r.writable||ae(r,"enumerable")&&!r.enumerable?s(e,t,r):(e[t]=r.value,e)};c?(v||(we.f=P,Se.f=E,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"length")),Mt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:P,defineProperty:E}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,g=e+(d?"Clamped":"")+"Array",x="get"+e,C="set"+e,z=o[g],P=z,E=P&&P.prototype,q={},T=function(e,t){s(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[x](t*l+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var a=n(e);d&&(r=(r=u(r))<0?0:r>255?255:255&r),a.view[C](t*l+a.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};v?_h&&(P=c((function(e,t,r,n){return Ai(e,E),function(e,t,r){var n,a;return oi&&j(n=t.constructor)&&n!==r&&S(a=n.prototype)&&a!==r.prototype&&oi(e,a),e}(S(t)?O(t)?void 0!==n?new z(t,Tf(r,l),n):void 0!==r?new z(t,Tf(r,l)):new z(t):y(t)?w(P,t):h(Rf,P,t):new z(Bh(t)),e,P)})),oi&&oi(P,m),r(t(z),(function(e){e in P||Te(P,e,z[e])})),P.prototype=E):(P=c((function(e,t,r,n){Ai(e,E);var i,o,s,c=0,d=0;if(S(t)){if(!O(t))return y(t)?w(P,t):h(Rf,P,t);i=t,d=Tf(r,l);var u=t.byteLength;if(void 0===n){if(u%l)throw f("Wrong length");if((o=u-d)<0)throw f("Wrong length")}else if((o=ht(n)*l)+d>u)throw f("Wrong length");s=o/l}else s=Bh(t),i=new p(o=s*l);for(a(e,{buffer:i,byteOffset:d,byteLength:o,length:s,view:new b(i)});c<s;)T(e,c++)})),oi&&oi(P,m),E=P.prototype=Xt(k)),E.constructor!==P&&Te(E,"constructor",P),i(E).TypedArrayConstructor=P,I&&Te(E,I,g);var M=P!=z;q[g]=P,Mt({global:!0,constructor:!0,forced:M,sham:!v},q),"BYTES_PER_ELEMENT"in P||Te(P,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in E||Te(E,"BYTES_PER_ELEMENT",l),Af(g)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Bf=Math.min,Uf=k([].copyWithin||function(e,t){var r=re(this),n=ft(r),a=dt(e,n),i=dt(t,n),o=arguments.length>2?arguments[2]:void 0,s=Bf((void 0===o?n:dt(o,n))-i,n-a),c=1;for(i<a&&a<i+s&&(c=-1,i+=s-1,a+=s-1);s-- >0;)i in r?r[a]=r[i]:Bu(r,a),a+=c,i+=c;return r}),Nf=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("copyWithin",(function(e,t){return Uf(Nf(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Lf=qr.every,Wf=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("every",(function(e){return Lf(Wf(this),e,arguments.length>1?arguments[1]:void 0)}));var Df=TypeError,Ff=function(e){var t=be(e,"number");if("number"==typeof t)throw Df("Can't convert number to bigint");return BigInt(t)},Jf=Sh.aTypedArray,Gf=Sh.exportTypedArrayMethod,Hf=k("".slice);Gf("fill",(function(e){var t=arguments.length;Jf(this);var r="Big"===Hf(Dt(this),0,3)?Ff(e):+e;return h(Hh,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),s((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Vf=pe("species"),$f=function(e,t){var r,n=Pe(e).constructor;return void 0===n||null==(r=Pe(n)[Vf])?t:Xo(r)},Yf=Sh.aTypedArrayConstructor,Kf=Sh.getTypedArrayConstructor,Qf=function(e){return Yf($f(e,Kf(e)))},Xf=function(e,t){return function(e,t){for(var r=0,n=ft(t),a=new e(n);n>r;)a[r]=t[r++];return a}(Qf(e),t)},Zf=qr.filter,ep=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("filter",(function(e){var t=Zf(ep(this),e,arguments.length>1?arguments[1]:void 0);return Xf(this,t)}));var tp=qr.find,rp=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("find",(function(e){return tp(rp(this),e,arguments.length>1?arguments[1]:void 0)}));var np=qr.findIndex,ap=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("findIndex",(function(e){return np(ap(this),e,arguments.length>1?arguments[1]:void 0)}));var ip=qr.forEach,op=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("forEach",(function(e){ip(op(this),e,arguments.length>1?arguments[1]:void 0)}));var sp=lt.includes,cp=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("includes",(function(e){return sp(cp(this),e,arguments.length>1?arguments[1]:void 0)}));var dp=lt.indexOf,up=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("indexOf",(function(e){return dp(up(this),e,arguments.length>1?arguments[1]:void 0)}));var hp=pe("iterator"),fp=o.Uint8Array,pp=k(vi.values),lp=k(vi.keys),gp=k(vi.entries),bp=Sh.aTypedArray,vp=Sh.exportTypedArrayMethod,Ip=fp&&fp.prototype,mp=!s((function(){Ip[hp].call([1])})),kp=!!Ip&&Ip.values&&Ip[hp]===Ip.values&&"values"===Ip.values.name,xp=function(){return pp(bp(this))};vp("entries",(function(){return gp(bp(this))}),mp),vp("keys",(function(){return lp(bp(this))}),mp),vp("values",xp,mp||!kp,{name:"values"}),vp(hp,xp,mp||!kp,{name:"values"});var yp=Sh.aTypedArray,wp=Sh.exportTypedArrayMethod,Cp=k([].join);wp("join",(function(e){return Cp(yp(this),e)}));var Op=Math.min,zp=[].lastIndexOf,Pp=!!zp&&1/[1].lastIndexOf(1,-0)<0,Ep=Bn("lastIndexOf"),qp=Pp||!Ep?function(e){if(Pp)return un(zp,this,arguments)||0;var t=q(this),r=ft(t),n=r-1;for(arguments.length>1&&(n=Op(n,ot(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:zp,jp=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return un(qp,jp(this),t>1?[e,arguments[1]]:[e])}));var Sp=qr.map,Tp=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("map",(function(e){return Sp(Tp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Qf(e))(t)}))}));var Mp=TypeError,Rp=function(e){return function(t,r,n,a){$(r);var i=re(t),o=z(i),s=ft(i),c=e?s-1:0,d=e?-1:1;if(n<2)for(;;){if(c in o){a=o[c],c+=d;break}if(c+=d,e?c<0:s<=c)throw Mp("Reduce of empty array with no initial value")}for(;e?c>=0:s>c;c+=d)c in o&&(a=r(a,o[c],c,i));return a}},_p={left:Rp(!1),right:Rp(!0)},Ap=_p.left,Bp=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Ap(Bp(this),e,t,t>1?arguments[1]:void 0)}));var Up=_p.right,Np=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Up(Np(this),e,t,t>1?arguments[1]:void 0)}));var Lp=Sh.aTypedArray,Wp=Sh.exportTypedArrayMethod,Dp=Math.floor;Wp("reverse",(function(){for(var e,t=Lp(this).length,r=Dp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Fp=o.RangeError,Jp=o.Int8Array,Gp=Jp&&Jp.prototype,Hp=Gp&&Gp.set,Vp=Sh.aTypedArray,$p=Sh.exportTypedArrayMethod,Yp=!s((function(){var e=new Uint8ClampedArray(2);return h(Hp,e,{length:1,0:3},1),3!==e[1]})),Kp=Yp&&Sh.NATIVE_ARRAY_BUFFER_VIEWS&&s((function(){var e=new Jp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));$p("set",(function(e){Vp(this);var t=Tf(arguments.length>1?arguments[1]:void 0,1),r=re(e);if(Yp)return h(Hp,this,r,t);var n=this.length,a=ft(r),i=0;if(a+t>n)throw Fp("Wrong length");for(;i<a;)this[t+i]=r[i++]}),!Yp||Kp);var Qp=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("slice",(function(e,t){for(var r=hn(Qp(this),e,t),n=Qf(this),a=0,i=r.length,o=new n(i);i>a;)o[a]=r[a++];return o}),s((function(){new Int8Array(1).slice()})));var Xp=qr.some,Zp=Sh.aTypedArray;(0,Sh.exportTypedArrayMethod)("some",(function(e){return Xp(Zp(this),e,arguments.length>1?arguments[1]:void 0)}));var el=Sh.aTypedArray,tl=Sh.exportTypedArrayMethod,rl=o.Uint16Array,nl=rl&&k(rl.prototype.sort),al=!(!nl||s((function(){nl(new rl(2),null)}))&&s((function(){nl(new rl(2),{})}))),il=!!nl&&!s((function(){if(L)return L<74;if(Nu)return Nu<67;if(Lu)return!0;if(Du)return Du<602;var e,t,r=new rl(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(nl(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));tl("sort",(function(e){return void 0!==e&&$(e),il?nl(this,e):Vi(el(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!il||al);var ol=o.Int8Array,sl=Sh.aTypedArray,cl=Sh.exportTypedArrayMethod,dl=[].toLocaleString,ul=!!ol&&s((function(){dl.call(new ol(1))}));cl("toLocaleString",(function(){return un(dl,ul?hn(sl(this)):sl(this),hn(arguments))}),s((function(){return[1,2].toLocaleString()!=new ol([1,2]).toLocaleString()}))||!s((function(){ol.prototype.toLocaleString.call([1,2])})));var hl=Sh.exportTypedArrayMethod,fl=o.Uint8Array,pl=fl&&fl.prototype||{},ll=[].toString,gl=k([].join);s((function(){ll.call({})}))&&(ll=function(){return gl(this)});var bl=pl.toString!=ll;hl("toString",ll,bl);var vl,Il,ml,kl,xl="process"==w(o.process),yl=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),wl=o.setImmediate,Cl=o.clearImmediate,Ol=o.process,zl=o.Dispatch,Pl=o.Function,El=o.MessageChannel,ql=o.String,jl=0,Sl={};try{vl=o.location}catch(e){}var Tl=function(e){if(ae(Sl,e)){var t=Sl[e];delete Sl[e],t()}},Ml=function(e){return function(){Tl(e)}},Rl=function(e){Tl(e.data)},_l=function(e){o.postMessage(ql(e),vl.protocol+"//"+vl.host)};wl&&Cl||(wl=function(e){Di(arguments.length,1);var t=j(e)?e:Pl(e),r=hn(arguments,1);return Sl[++jl]=function(){un(t,void 0,r)},Il(jl),jl},Cl=function(e){delete Sl[e]},xl?Il=function(e){Ol.nextTick(Ml(e))}:zl&&zl.now?Il=function(e){zl.now(Ml(e))}:El&&!yl?(kl=(ml=new El).port2,ml.port1.onmessage=Rl,Il=pr(kl.postMessage,kl)):o.addEventListener&&j(o.postMessage)&&!o.importScripts&&vl&&"file:"!==vl.protocol&&!s(_l)?(Il=_l,o.addEventListener("message",Rl,!1)):Il="onreadystatechange"in ke("script")?function(e){Ht.appendChild(ke("script")).onreadystatechange=function(){Ht.removeChild(this),Tl(e)}}:function(e){setTimeout(Ml(e),0)});var Al,Bl,Ul,Nl,Ll,Wl,Dl,Fl,Jl={set:wl,clear:Cl},Gl=/ipad|iphone|ipod/i.test(_)&&void 0!==o.Pebble,Hl=/web0s(?!.*chrome)/i.test(_),Vl=we.f,$l=Jl.set,Yl=o.MutationObserver||o.WebKitMutationObserver,Kl=o.document,Ql=o.process,Xl=o.Promise,Zl=Vl(o,"queueMicrotask"),eg=Zl&&Zl.value;eg||(Al=function(){var e,t;for(xl&&(e=Ql.domain)&&e.exit();Bl;){t=Bl.fn,Bl=Bl.next;try{t()}catch(e){throw Bl?Nl():Ul=void 0,e}}Ul=void 0,e&&e.enter()},yl||xl||Hl||!Yl||!Kl?!Gl&&Xl&&Xl.resolve?((Dl=Xl.resolve(void 0)).constructor=Xl,Fl=pr(Dl.then,Dl),Nl=function(){Fl(Al)}):xl?Nl=function(){Ql.nextTick(Al)}:($l=pr($l,o),Nl=function(){$l(Al)}):(Ll=!0,Wl=Kl.createTextNode(""),new Yl(Al).observe(Wl,{characterData:!0}),Nl=function(){Wl.data=Ll=!Ll}));var tg=eg||function(e){var t={fn:e,next:void 0};Ul&&(Ul.next=t),Bl||(Bl=t,Nl()),Ul=t},rg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},ng=function(){this.head=null,this.tail=null};ng.prototype={add:function(e){var t={item:e,next:null};this.head?this.tail.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}};var ag=ng,ig=o.Promise,og="object"==typeof window&&"object"!=typeof Deno;ig&&ig.prototype;var sg,cg,dg,ug=pe("species"),hg=!1,fg=j(o.PromiseRejectionEvent),pg={CONSTRUCTOR:St("Promise",(function(){var e=We(ig),t=e!==String(ig);if(!t&&66===L)return!0;if(L>=51&&/native code/.test(e))return!1;var r=new ig((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[ug]=n,!(hg=r.then((function(){}))instanceof n)||!t&&og&&!fg})),REJECTION_EVENT:fg,SUBCLASSING:hg},lg=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=$(t),this.reject=$(r)},gg={f:function(e){return new lg(e)}},bg=Jl.set,vg=pg.CONSTRUCTOR,Ig=pg.REJECTION_EVENT,mg=pg.SUBCLASSING,kg=et.getterFor("Promise"),xg=et.set,yg=ig&&ig.prototype,wg=ig,Cg=yg,Og=o.TypeError,zg=o.document,Pg=o.process,Eg=gg.f,qg=Eg,jg=!!(zg&&zg.createEvent&&o.dispatchEvent),Sg=function(e){var t;return!(!S(e)||!j(t=e.then))&&t},Tg=function(e,t){var r,n,a,i=t.value,o=1==t.state,s=o?e.ok:e.fail,c=e.resolve,d=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&Bg(t),t.rejection=1),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),a=!0)),r===e.promise?d(Og("Promise-chain cycle")):(n=Sg(r))?h(n,r,c,d):c(r)):d(i)}catch(e){u&&!a&&u.exit(),d(e)}},Mg=function(e,t){e.notified||(e.notified=!0,tg((function(){for(var r,n=e.reactions;r=n.get();)Tg(r,e);e.notified=!1,t&&!e.rejection&&_g(e)})))},Rg=function(e,t,r){var n,a;jg?((n=zg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),o.dispatchEvent(n)):n={promise:t,reason:r},!Ig&&(a=o["on"+e])?a(n):"unhandledrejection"===e&&function(e,t){var r=o.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},_g=function(e){h(bg,o,(function(){var t,r=e.facade,n=e.value;if(Ag(e)&&(t=rg((function(){xl?Pg.emit("unhandledRejection",n,r):Rg("unhandledrejection",r,n)})),e.rejection=xl||Ag(e)?2:1,t.error))throw t.value}))},Ag=function(e){return 1!==e.rejection&&!e.parent},Bg=function(e){h(bg,o,(function(){var t=e.facade;xl?Pg.emit("rejectionHandled",t):Rg("rejectionhandled",t,e.value)}))},Ug=function(e,t,r){return function(n){e(t,n,r)}},Ng=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Mg(e,!0))},Lg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Og("Promise can't be resolved itself");var n=Sg(t);n?tg((function(){var r={done:!1};try{h(n,t,Ug(Lg,r,e),Ug(Ng,r,e))}catch(t){Ng(r,t,e)}})):(e.value=t,e.state=1,Mg(e,!1))}catch(t){Ng({done:!1},t,e)}}};if(vg&&(Cg=(wg=function(e){Ai(this,Cg),$(e),h(sg,this);var t=kg(this);try{e(Ug(Lg,t),Ug(Ng,t))}catch(e){Ng(t,e)}}).prototype,(sg=function(e){xg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new ag,rejection:!1,state:0,value:void 0})}).prototype=rt(Cg,"then",(function(e,t){var r=kg(this),n=Eg($f(this,wg));return r.parent=!0,n.ok=!j(e)||e,n.fail=j(t)&&t,n.domain=xl?Pg.domain:void 0,0==r.state?r.reactions.add(n):tg((function(){Tg(n,r)})),n.promise})),cg=function(){var e=new sg,t=kg(e);this.promise=e,this.resolve=Ug(Lg,t),this.reject=Ug(Ng,t)},gg.f=Eg=function(e){return e===wg||void 0===e?new cg(e):qg(e)},j(ig)&&yg!==Object.prototype)){dg=yg.then,mg||rt(yg,"then",(function(e,t){var r=this;return new wg((function(e,t){h(dg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete yg.constructor}catch(e){}oi&&oi(yg,Cg)}Mt({global:!0,constructor:!0,wrap:!0,forced:vg},{Promise:wg}),hr(wg,"Promise",!1),Af("Promise");var Wg=TypeError,Dg=function(e,t){this.stopped=e,this.result=t},Fg=Dg.prototype,Jg=function(e,t,r){var n,a,i,o,s,c,d,u=r&&r.that,f=!(!r||!r.AS_ENTRIES),p=!(!r||!r.IS_RECORD),l=!(!r||!r.IS_ITERATOR),g=!(!r||!r.INTERRUPTED),b=pr(t,u),v=function(e){return n&&Ic(n,"normal",e),new Dg(!0,e)},I=function(e){return f?(Pe(e),g?b(e[0],e[1],v):b(e[0],e[1])):g?b(e,v):b(e)};if(p)n=e.iterator;else if(l)n=e;else{if(!(a=Ui(e)))throw Wg(H(e)+" is not iterable");if(yc(a)){for(i=0,o=ft(e);o>i;i++)if((s=I(e[i]))&&R(Fg,s))return s;return new Dg(!1)}n=Li(e,a)}for(c=p?e.next:n.next;!(d=h(c,n)).done;){try{s=I(d.value)}catch(e){Ic(n,"throw",e)}if("object"==typeof s&&s&&R(Fg,s))return s}return new Dg(!1)},Gg=pg.CONSTRUCTOR||!uh((function(e){ig.all(e).then(void 0,(function(){}))}));Mt({target:"Promise",stat:!0,forced:Gg},{all:function(e){var t=this,r=gg.f(t),n=r.resolve,a=r.reject,i=rg((function(){var r=$(t.resolve),i=[],o=0,s=1;Jg(e,(function(e){var c=o++,d=!1;s++,h(r,t,e).then((function(e){d||(d=!0,i[c]=e,--s||n(i))}),a)})),--s||n(i)}));return i.error&&a(i.value),r.promise}});var Hg=pg.CONSTRUCTOR,Vg=ig&&ig.prototype;if(Mt({target:"Promise",proto:!0,forced:Hg,real:!0},{catch:function(e){return this.then(void 0,e)}}),j(ig)){var $g=M("Promise").prototype.catch;Vg.catch!==$g&&rt(Vg,"catch",$g,{unsafe:!0})}Mt({target:"Promise",stat:!0,forced:Gg},{race:function(e){var t=this,r=gg.f(t),n=r.reject,a=rg((function(){var a=$(t.resolve);Jg(e,(function(e){h(a,t,e).then(r.resolve,n)}))}));return a.error&&n(a.value),r.promise}}),Mt({target:"Promise",stat:!0,forced:pg.CONSTRUCTOR},{reject:function(e){var t=gg.f(this);return h(t.reject,void 0,e),t.promise}});var Yg=pg.CONSTRUCTOR;function Kg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Qg(e){return function(e){if(Array.isArray(e))return Kg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Kg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Kg(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xg(Object(r),!0).forEach((function(t){fa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xg(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}M("Promise"),Mt({target:"Promise",stat:!0,forced:Yg},{resolve:function(e){return function(e,t){if(Pe(e),S(t)&&t.constructor===e)return t;var r=gg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Mt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Jg(e,(function(e,r){Zt(t,e,r)}),{AS_ENTRIES:!0}),t}});var eb=Lo?btoa:function(e){return Buffer.from(e).toString("base64")},tb=function(e){var t,r,n=new URL(e),a=new URLSearchParams(n.search),i=null!==(t=a.get("usid"))&&void 0!==t?t:"";return{code:null!==(r=a.get("code"))&&void 0!==r?r:"",usid:i}},rb=function(){return e(128)},nb=function(){var e=ca(Ua.mark((function e(t){var r,n,a,i,o,s,c;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Lo||!window.crypto){e.next=12;break}return a=new TextEncoder,i=a.encode(t),e.next=7,window.crypto.subtle.digest("SHA-256",i);case 7:o=e.sent,s=btoa(String.fromCharCode.apply(String,Qg(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:c=e.sent,n=r(c.default.createHash("sha256").update(t).digest("base64"));case 16:if(0!==n.length){e.next=18;break}throw new Error("Problem generating code challenge");case 18:return e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function ab(e,t,r){return ib.apply(this,arguments)}function ib(){return(ib=ca(Ua.mark((function e(t,r,n){var a,i,o,s,c,d,u,h;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,nb(r);case 2:return i=e.sent,(o=new zu(t.clientConfig)).clientConfig.fetchOptions=Zg(Zg({},t.clientConfig.fetchOptions),{},{redirect:Lo?"follow":"manual"}),s={parameters:Zg(Zg({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code_challenge:i},n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=8,o.authorizeCustomer(s,!0);case 8:if(c=e.sent,d=(null===(a=c.headers)||void 0===a?void 0:a.get("location"))||c.url,u=new URL(d),h=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||h.error)){e.next=14;break}throw new ys(c);case 14:return e.abrupt("return",Zg({url:d},tb(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ob(){return(ob=ca(Ua.mark((function e(t,r,n){var a,i;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a="Basic ".concat(eb("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),i={headers:{Authorization:a},body:Zg({grant_type:"client_credentials"},r.usid&&{usid:r.usid})},e.abrupt("return",t.getAccessToken(i));case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function sb(){return(sb=ca(Ua.mark((function e(t,r){var n,a,i;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=rb(),e.next=3,ab(t,n,Zg({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return a=e.sent,i={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:a.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:r.redirectURI,usid:a.usid},e.abrupt("return",t.getAccessToken({body:i}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function cb(){return(cb=ca(Ua.mark((function e(t,r,n){var a,i,o,s,c,d,u,h,f,p,l,g,b,v;return Ua.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=rb(),e.next=3,nb(i);case 3:return o=e.sent,(s=new zu(t.clientConfig)).clientConfig.fetchOptions=Zg(Zg({},t.clientConfig.fetchOptions),{},{redirect:Lo?"follow":"manual"}),c="Basic ".concat(eb("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:Zg({redirect_uri:n.redirectURI,client_id:t.clientConfig.parameters.clientId,code_challenge:o,channel_id:t.clientConfig.parameters.siteId},n.usid&&{usid:n.usid})},e.next=10,s.authenticateCustomer(d,!0);case 10:if(u=e.sent,h=(null===(a=u.headers)||void 0===a?void 0:a.get("location"))||u.url,f=new URL(h),p=Object.fromEntries(f.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new ys(u);case 16:if(l=tb(h),g={client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:l.code,code_verifier:i,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:l.usid},!r.clientSecret){e.next=22;break}return b="Basic ".concat(eb("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),v={headers:{Authorization:b},body:g},e.abrupt("return",t.getAccessToken(v));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var db=Object.freeze({__proto__:null,isBrowser:Lo,isNode:Wo,globalObject:Do,hasFetchAvailable:Fo,fetch:Jo,stringToBase64:eb,getCodeAndUsidFromUrl:tb,createCodeVerifier:rb,generateCodeChallenge:nb,authorize:ab,loginGuestUserPrivate:function(e,t,r){return ob.apply(this,arguments)},loginGuestUser:function(e,t){return sb.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return cb.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};if(r&&r.clientSecret){var a={headers:{Authorization:"Basic ".concat(eb("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(a)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})}});export{Uo as ClientConfig,cu as ShopperBaskets,hu as ShopperContexts,lu as ShopperCustomers,vu as ShopperDiscoverySearch,ku as ShopperExperience,wu as ShopperGiftCertificates,zu as ShopperLogin,qu as ShopperOrders,Tu as ShopperProducts,_u as ShopperPromotions,Xu as ShopperSearch,th as ShopperSeo,au as TemplateURL,db as helpers};
|