commerce-sdk-isomorphic 1.10.2 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/lib/index.cjs.d.ts +44 -205
- package/lib/index.cjs.js +1 -1
- package/lib/index.esm.d.ts +44 -205
- package/lib/index.esm.js +1 -1
- package/package.json +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid")):"function"==typeof define&&define.amd?define(["exports","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid)}(this,(function(e,t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(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 i,a,o=function(e){return e&&e.Math==Math&&e},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r&&r)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},d=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),f=Function.prototype.call,h=u?f.bind(f):function(){return f.apply(f,arguments)},p={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,g={f:l&&!p.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:p},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,I=v.bind,x=v.call,k=u&&I.bind(x,x),m=u?function(e){return e&&k(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},w=m({}.toString),y=m("".slice),C=function(e){return y(w(e),8,-1)},z=Object,O=m("".split),E=c((function(){return!z("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?O(e,""):z(e)}:z,q=TypeError,P=function(e){if(null==e)throw q("Can't call method on "+e);return e},S=function(e){return E(P(e))},j=function(e){return"function"==typeof e},T=function(e){return"object"==typeof e?null!==e:j(e)},M=function(e){return j(e)?e:void 0},R=function(e,t){return arguments.length<2?M(s[e]):s[e]&&s[e][t]},A=m({}.isPrototypeOf),U=R("navigator","userAgent")||"",B=s.process,N=s.Deno,_=B&&B.versions||N&&N.version,L=_&&_.v8;L&&(a=(i=L.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&U&&(!(i=U.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=U.match(/Chrome\/(\d+)/))&&(a=+i[1]);var D=a,J=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&D&&D<41})),F=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,G=Object,H=F?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return j(t)&&A(t.prototype,G(e))},V=String,W=function(e){try{return V(e)}catch(e){return"Object"}},$=TypeError,Y=function(e){if(j(e))return e;throw $(W(e)+" is not a function")},K=function(e,t){var r=e[t];return null==r?void 0:Y(r)},Q=TypeError,X=Object.defineProperty,Z=function(e,t){try{X(s,e,{value:t,configurable:!0,writable:!0})}catch(r){s[e]=t}return t},ee=s["__core-js_shared__"]||Z("__core-js_shared__",{}),te=n((function(e){(e.exports=function(e,t){return ee[e]||(ee[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"})})),re=Object,ne=function(e){return re(P(e))},ie=m({}.hasOwnProperty),ae=Object.hasOwn||function(e,t){return ie(ne(e),t)},oe=0,se=Math.random(),ce=m(1..toString),de=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++oe+se,36)},ue=te("wks"),fe=s.Symbol,he=fe&&fe.for,pe=F?fe:fe&&fe.withoutSetter||de,le=function(e){if(!ae(ue,e)||!J&&"string"!=typeof ue[e]){var t="Symbol."+e;J&&ae(fe,e)?ue[e]=fe[e]:ue[e]=F&&he?he(t):pe(t)}return ue[e]},ge=TypeError,be=le("toPrimitive"),ve=function(e,t){if(!T(e)||H(e))return e;var r,n=K(e,be);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!T(r)||H(r))return r;throw ge("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)&&!T(n=h(r,e)))return n;if(j(r=e.valueOf)&&!T(n=h(r,e)))return n;if("string"!==t&&j(r=e.toString)&&!T(n=h(r,e)))return n;throw Q("Can't convert object to primitive value")}(e,t)},Ie=function(e){var t=ve(e,"string");return H(t)?t:t+""},xe=s.document,ke=T(xe)&&T(xe.createElement),me=function(e){return ke?xe.createElement(e):{}},we=!d&&!c((function(){return 7!=Object.defineProperty(me("div"),"a",{get:function(){return 7}}).a})),ye=Object.getOwnPropertyDescriptor,Ce={f:d?ye:function(e,t){if(e=S(e),t=Ie(t),we)try{return ye(e,t)}catch(e){}if(ae(e,t))return b(!h(g.f,e,t),e[t])}},ze=d&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,Ee=TypeError,qe=function(e){if(T(e))return e;throw Ee(Oe(e)+" is not an object")},Pe=TypeError,Se=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Te={f:d?ze?function(e,t,r){if(qe(e),t=Ie(t),qe(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 Se(e,t,r)}:Se:function(e,t,r){if(qe(e),t=Ie(t),qe(r),we)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Pe("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=d?function(e,t,r){return Te.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,Ae=d&&Object.getOwnPropertyDescriptor,Ue=ae(Re,"name"),Be={EXISTS:Ue,PROPER:Ue&&"something"===function(){}.name,CONFIGURABLE:Ue&&(!d||d&&Ae(Re,"name").configurable)},Ne=m(Function.toString);j(ee.inspectSource)||(ee.inspectSource=function(e){return Ne(e)});var _e,Le,De,Je=ee.inspectSource,Fe=s.WeakMap,Ge=j(Fe)&&/native code/.test(Je(Fe)),He=te("keys"),Ve=function(e){return He[e]||(He[e]=de(e))},We={},$e=s.TypeError,Ye=s.WeakMap;if(Ge||ee.state){var Ke=ee.state||(ee.state=new Ye),Qe=m(Ke.get),Xe=m(Ke.has),Ze=m(Ke.set);_e=function(e,t){if(Xe(Ke,e))throw new $e("Object already initialized");return t.facade=e,Ze(Ke,e,t),t},Le=function(e){return Qe(Ke,e)||{}},De=function(e){return Xe(Ke,e)}}else{var et=Ve("state");We[et]=!0,_e=function(e,t){if(ae(e,et))throw new $e("Object already initialized");return t.facade=e,Me(e,et,t),t},Le=function(e){return ae(e,et)?e[et]:{}},De=function(e){return ae(e,et)}}var tt={set:_e,get:Le,has:De,enforce:function(e){return De(e)?Le(e):_e(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=Le(t)).type!==e)throw $e("Incompatible receiver, "+e+" required");return r}}},rt=n((function(e){var t=Be.CONFIGURABLE,r=tt.enforce,n=tt.get,i=Object.defineProperty,a=d&&!c((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=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)&&(d?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ae(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ae(s,"constructor")&&s.constructor?d&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ae(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return j(this)&&n(this).source||Je(this)}),"toString")})),nt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(j(r)&&rt(r,a,n),n.global)i?e[t]=r:Z(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Te.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},it=Math.ceil,at=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?at:it)(t)},st=function(e){var t=+e;return t!=t||0===t?0:ot(t)},ct=Math.max,dt=Math.min,ut=function(e,t){var r=st(e);return r<0?ct(r+t,0):dt(r,t)},ft=Math.min,ht=function(e){return e>0?ft(st(e),9007199254740991):0},pt=function(e){return ht(e.length)},lt=function(e){return function(t,r,n){var i,a=S(t),o=pt(a),s=ut(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}},gt={includes:lt(!0),indexOf:lt(!1)},bt=gt.indexOf,vt=m([].push),It=function(e,t){var r,n=S(e),i=0,a=[];for(r in n)!ae(We,r)&&ae(n,r)&&vt(a,r);for(;t.length>i;)ae(n,r=t[i++])&&(~bt(a,r)||vt(a,r));return a},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kt=xt.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(e){return It(e,kt)}},wt={f:Object.getOwnPropertySymbols},yt=m([].concat),Ct=R("Reflect","ownKeys")||function(e){var t=mt.f(qe(e)),r=wt.f;return r?yt(t,r(e)):t},zt=function(e,t,r){for(var n=Ct(t),i=Te.f,a=Ce.f,o=0;o<n.length;o++){var s=n[o];ae(e,s)||r&&ae(r,s)||i(e,s,a(t,s))}},Ot=/#|\.prototype\./,Et=function(e,t){var r=Pt[qt(e)];return r==jt||r!=St&&(j(t)?c(t):!!t)},qt=Et.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},Pt=Et.data={},St=Et.NATIVE="N",jt=Et.POLYFILL="P",Tt=Et,Mt=Ce.f,Rt=function(e,t){var r,n,i,a,o,c=e.target,d=e.global,u=e.stat;if(r=d?s:u?s[c]||Z(c,{}):(s[c]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;zt(a,i)}(e.sham||i&&i.sham)&&Me(a,"sham",!0),nt(r,n,a,e)}},At=Object.keys||function(e){return It(e,xt)},Ut=c((function(){At(1)}));Rt({target:"Object",stat:!0,forced:Ut},{keys:function(e){return At(ne(e))}});var Bt={};Bt[le("toStringTag")]="z";var Nt,_t="[object z]"===String(Bt),Lt=le("toStringTag"),Dt=Object,Jt="Arguments"==C(function(){return arguments}()),Ft=_t?C: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=Dt(e),Lt))?r:Jt?C(t):"Object"==(n=C(t))&&j(t.callee)?"Arguments":n},Gt=String,Ht=function(e){if("Symbol"===Ft(e))throw TypeError("Cannot convert a Symbol value to a string");return Gt(e)},Vt={f:d&&!ze?Object.defineProperties:function(e,t){qe(e);for(var r,n=S(t),i=At(t),a=i.length,o=0;a>o;)Te.f(e,r=i[o++],n[r]);return e}},Wt=R("document","documentElement"),$t=Ve("IE_PROTO"),Yt=function(){},Kt=function(e){return"<script>"+e+"<\/script>"},Qt=function(e){e.write(Kt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xt=function(){try{Nt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Xt="undefined"!=typeof document?document.domain&&Nt?Qt(Nt):((t=me("iframe")).style.display="none",Wt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Kt("document.F=Object")),e.close(),e.F):Qt(Nt);for(var r=xt.length;r--;)delete Xt.prototype[xt[r]];return Xt()};We[$t]=!0;var Zt=Object.create||function(e,t){var r;return null!==e?(Yt.prototype=qe(e),r=new Yt,Yt.prototype=null,r[$t]=e):r=Xt(),void 0===t?r:Vt.f(r,t)},er=function(e,t,r){var n=Ie(t);n in e?Te.f(e,n,b(0,r)):e[n]=r},tr=Array,rr=Math.max,nr=function(e,t,r){for(var n=pt(e),i=ut(t,n),a=ut(void 0===r?n:r,n),o=tr(rr(a-i,0)),s=0;i<a;i++,s++)er(o,s,e[i]);return o.length=s,o},ir=mt.f,ar="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],or={f:function(e){return ar&&"Window"==C(e)?function(e){try{return ir(e)}catch(e){return nr(ar)}}(e):ir(S(e))}},sr={f:le},cr=s,dr=Te.f,ur=Te.f,fr=le("toStringTag"),hr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ae(e,fr)&&ur(e,fr,{configurable:!0,value:t})},pr=m(m.bind),lr=function(e,t){return Y(e),void 0===t?e:u?pr(e,t):function(){return e.apply(t,arguments)}},gr=Array.isArray||function(e){return"Array"==C(e)},br=function(){},vr=[],Ir=R("Reflect","construct"),xr=/^\s*(?:class|function)\b/,kr=m(xr.exec),mr=!xr.exec(br),wr=function(e){if(!j(e))return!1;try{return Ir(br,vr,e),!0}catch(e){return!1}},yr=function(e){if(!j(e))return!1;switch(Ft(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mr||!!kr(xr,Je(e))}catch(e){return!0}};yr.sham=!0;var Cr=!Ir||c((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?yr:wr,zr=le("species"),Or=Array,Er=function(e,t){return new(function(e){var t;return gr(e)&&(t=e.constructor,(Cr(t)&&(t===Or||gr(t.prototype))||T(t)&&null===(t=t[zr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},qr=m([].push),Pr=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,f){for(var h,p,l=ne(c),g=E(l),b=lr(d,u),v=pt(g),I=0,x=f||Er,k=t?x(c,v):r||o?x(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)k[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:qr(k,h)}else switch(e){case 4:return!1;case 7:qr(k,h)}return a?-1:n||i?i:k}},Sr={forEach:Pr(0),map:Pr(1),filter:Pr(2),some:Pr(3),every:Pr(4),find:Pr(5),findIndex:Pr(6),filterReject:Pr(7)},jr=Sr.forEach,Tr=Ve("hidden"),Mr=tt.set,Rr=tt.getterFor("Symbol"),Ar=Object.prototype,Ur=s.Symbol,Br=Ur&&Ur.prototype,Nr=s.TypeError,_r=s.QObject,Lr=Ce.f,Dr=Te.f,Jr=or.f,Fr=g.f,Gr=m([].push),Hr=te("symbols"),Vr=te("op-symbols"),Wr=te("wks"),$r=!_r||!_r.prototype||!_r.prototype.findChild,Yr=d&&c((function(){return 7!=Zt(Dr({},"a",{get:function(){return Dr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Lr(Ar,t);n&&delete Ar[t],Dr(e,t,r),n&&e!==Ar&&Dr(Ar,t,n)}:Dr,Kr=function(e,t){var r=Hr[e]=Zt(Br);return Mr(r,{type:"Symbol",tag:e,description:t}),d||(r.description=t),r},Qr=function(e,t,r){e===Ar&&Qr(Vr,t,r),qe(e);var n=Ie(t);return qe(r),ae(Hr,n)?(r.enumerable?(ae(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=Zt(r,{enumerable:b(0,!1)})):(ae(e,Tr)||Dr(e,Tr,b(1,{})),e[Tr][n]=!0),Yr(e,n,r)):Dr(e,n,r)},Xr=function(e,t){qe(e);var r=S(t),n=At(r).concat(rn(r));return jr(n,(function(t){d&&!h(Zr,r,t)||Qr(e,t,r[t])})),e},Zr=function(e){var t=Ie(e),r=h(Fr,this,t);return!(this===Ar&&ae(Hr,t)&&!ae(Vr,t))&&(!(r||!ae(this,t)||!ae(Hr,t)||ae(this,Tr)&&this[Tr][t])||r)},en=function(e,t){var r=S(e),n=Ie(t);if(r!==Ar||!ae(Hr,n)||ae(Vr,n)){var i=Lr(r,n);return!i||!ae(Hr,n)||ae(r,Tr)&&r[Tr][n]||(i.enumerable=!0),i}},tn=function(e){var t=Jr(S(e)),r=[];return jr(t,(function(e){ae(Hr,e)||ae(We,e)||Gr(r,e)})),r},rn=function(e){var t=e===Ar,r=Jr(t?Vr:S(e)),n=[];return jr(r,(function(e){!ae(Hr,e)||t&&!ae(Ar,e)||Gr(n,Hr[e])})),n};J||(Br=(Ur=function(){if(A(Br,this))throw Nr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Ht(arguments[0]):void 0,t=de(e),r=function(e){this===Ar&&h(r,Vr,e),ae(this,Tr)&&ae(this[Tr],t)&&(this[Tr][t]=!1),Yr(this,t,b(1,e))};return d&&$r&&Yr(Ar,t,{configurable:!0,set:r}),Kr(t,e)}).prototype,nt(Br,"toString",(function(){return Rr(this).tag})),nt(Ur,"withoutSetter",(function(e){return Kr(de(e),e)})),g.f=Zr,Te.f=Qr,Vt.f=Xr,Ce.f=en,mt.f=or.f=tn,wt.f=rn,sr.f=function(e){return Kr(le(e),e)},d&&(Dr(Br,"description",{configurable:!0,get:function(){return Rr(this).description}}),nt(Ar,"propertyIsEnumerable",Zr,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!J,sham:!J},{Symbol:Ur}),jr(At(Wr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});ae(t,e)||dr(t,e,{value:sr.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!J},{useSetter:function(){$r=!0},useSimple:function(){$r=!1}}),Rt({target:"Object",stat:!0,forced:!J,sham:!d},{create:function(e,t){return void 0===t?Zt(e):Xr(Zt(e),t)},defineProperty:Qr,defineProperties:Xr,getOwnPropertyDescriptor:en}),Rt({target:"Object",stat:!0,forced:!J},{getOwnPropertyNames:tn}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=le("toPrimitive");t&&!t[n]&&nt(t,n,(function(e){return h(r,this)}),{arity:1})}(),hr(Ur,"Symbol"),We[Tr]=!0;var nn=J&&!!Symbol.for&&!!Symbol.keyFor,an=te("string-to-symbol-registry"),on=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{for:function(e){var t=Ht(e);if(ae(an,t))return an[t];var r=R("Symbol")(t);return an[t]=r,on[r]=t,r}});var sn=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{keyFor:function(e){if(!H(e))throw TypeError(W(e)+" is not a symbol");if(ae(sn,e))return sn[e]}});var cn=Function.prototype,dn=cn.apply,un=cn.call,fn="object"==typeof Reflect&&Reflect.apply||(u?un.bind(dn):function(){return un.apply(dn,arguments)}),hn=m([].slice),pn=R("JSON","stringify"),ln=m(/./.exec),gn=m("".charAt),bn=m("".charCodeAt),vn=m("".replace),In=m(1..toString),xn=/[\uD800-\uDFFF]/g,kn=/^[\uD800-\uDBFF]$/,mn=/^[\uDC00-\uDFFF]$/,wn=!J||c((function(){var e=R("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),yn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=hn(arguments),n=t;if((T(t)||void 0!==e)&&!H(e))return gr(t)||(t=function(e,t){if(j(n)&&(t=h(n,this,e,t)),!H(t))return t}),r[1]=t,fn(pn,null,r)},zn=function(e,t,r){var n=gn(r,t-1),i=gn(r,t+1);return ln(kn,e)&&!ln(mn,i)||ln(mn,e)&&!ln(kn,n)?"\\u"+In(bn(e,0),16):e};pn&&Rt({target:"JSON",stat:!0,arity:3,forced:wn||yn},{stringify:function(e,t,r){var n=hn(arguments),i=fn(wn?Cn:pn,null,n);return yn&&"string"==typeof i?vn(i,xn,zn):i}});var On=!J||c((function(){wt.f(1)}));Rt({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=wt.f;return t?t(ne(e)):[]}});var En=le("species"),qn=function(e){return D>=51||!c((function(){var t=[];return(t.constructor={})[En]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pn=Sr.filter,Sn=qn("filter");Rt({target:"Array",proto:!0,forced:!Sn},{filter:function(e){return Pn(this,e,arguments.length>1?arguments[1]:void 0)}});var jn=_t?{}.toString:function(){return"[object "+Ft(this)+"]"};_t||nt(Object.prototype,"toString",jn,{unsafe:!0});var Tn=Ce.f,Mn=c((function(){Tn(1)}));Rt({target:"Object",stat:!0,forced:!d||Mn,sham:!d},{getOwnPropertyDescriptor:function(e,t){return Tn(S(e),t)}});var Rn={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},An=me("span").classList,Un=An&&An.constructor&&An.constructor.prototype,Bn=Un===Object.prototype?void 0:Un,Nn=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},_n=Sr.forEach,Ln=Nn("forEach")?[].forEach:function(e){return _n(this,e,arguments.length>1?arguments[1]:void 0)},Dn=function(e){if(e&&e.forEach!==Ln)try{Me(e,"forEach",Ln)}catch(t){e.forEach=Ln}};for(var Jn in Rn)Rn[Jn]&&Dn(s[Jn]&&s[Jn].prototype);Dn(Bn),Rt({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,r,n=S(e),i=Ce.f,a=Ct(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&er(o,t,r);return o}});var Fn=Vt.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Fn,sham:!d},{defineProperties:Fn});var Gn=Te.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==Gn,sham:!d},{defineProperty:Gn});var Hn=function(){var e=qe(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},Vn=RegExp.prototype,Wn=Be.PROPER,$n=RegExp.prototype.toString,Yn=c((function(){return"/a/b"!=$n.call({source:"a",flags:"b"})})),Kn=Wn&&"toString"!=$n.name;function Qn(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 Xn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Qn(a,n,i,o,s,"next",e)}function s(e){Qn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Zn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ei(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 ti(e,t,r){return t&&ei(e.prototype,t),r&&ei(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ri(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(Yn||Kn)&&nt(RegExp.prototype,"toString",(function(){var e=qe(this);return"/"+Ht(e.source)+"/"+Ht(function(e){var t=e.flags;return void 0!==t||"flags"in Vn||ae(e,"flags")||!A(Vn,e)?t:h(Hn,e)}(e))}),{unsafe:!0});var ni=Object.prototype,ii=ni.hasOwnProperty,ai="function"==typeof Symbol?Symbol:{},oi=ai.iterator||"@@iterator",si=ai.asyncIterator||"@@asyncIterator",ci=ai.toStringTag||"@@toStringTag";function di(e,t,r,n){var i=t&&t.prototype instanceof hi?t:hi,a=Object.create(i.prototype),o=new zi(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 Ei()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=wi(o,r);if(s){if(s===fi)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=ui(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===fi)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 ui(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var fi={};function hi(){}function pi(){}function li(){}var gi={};gi[oi]=function(){return this};var bi=Object.getPrototypeOf,vi=bi&&bi(bi(Oi([])));vi&&vi!==ni&&ii.call(vi,oi)&&(gi=vi);var Ii=li.prototype=hi.prototype=Object.create(gi);function xi(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function ki(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===pi||"GeneratorFunction"===(t.displayName||t.name))}function mi(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=ui(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ii.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 wi(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,wi(e,t),"throw"===t.method))return fi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return fi}var n=ui(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,fi;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,fi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,fi)}function yi(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 Ci(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function zi(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(yi,this),this.reset(!0)}function Oi(e){if(e){var t=e[oi];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(ii.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:Ei}}function Ei(){return{value:void 0,done:!0}}pi.prototype=Ii.constructor=li,li.constructor=pi,li[ci]=pi.displayName="GeneratorFunction",xi(mi.prototype),mi.prototype[si]=function(){return this},xi(Ii),Ii[ci]="Generator",Ii[oi]=function(){return this},Ii.toString=function(){return"[object Generator]"},zi.prototype={constructor:zi,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(Ci),!e)for(var t in this)"t"===t.charAt(0)&&ii.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=ii.call(i,"catchLoc"),s=ii.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&&ii.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,fi):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),fi},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),Ci(r),fi}},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;Ci(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Oi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),fi}};var qi={wrap:di,isGeneratorFunction:ki,AsyncIterator:mi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,li):(e.__proto__=li,ci in e||(e[ci]="GeneratorFunction")),e.prototype=Object.create(Ii),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new mi(di(e,t,r,n),i);return ki(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:Oi},Pi=Te.f,Si=le("unscopables"),ji=Array.prototype;null==ji[Si]&&Pi(ji,Si,{configurable:!0,value:Zt(null)});var Ti,Mi,Ri,Ai=function(e){ji[Si][e]=!0},Ui={},Bi=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ni=Ve("IE_PROTO"),_i=Object,Li=_i.prototype,Di=Bi?_i.getPrototypeOf:function(e){var t=ne(e);if(ae(t,Ni))return t[Ni];var r=t.constructor;return j(r)&&t instanceof r?r.prototype:t instanceof _i?Li:null},Ji=le("iterator"),Fi=!1;[].keys&&("next"in(Ri=[].keys())?(Mi=Di(Di(Ri)))!==Object.prototype&&(Ti=Mi):Fi=!0),(null==Ti||c((function(){var e={};return Ti[Ji].call(e)!==e})))&&(Ti={}),j(Ti[Ji])||nt(Ti,Ji,(function(){return this}));var Gi={IteratorPrototype:Ti,BUGGY_SAFARI_ITERATORS:Fi},Hi=Gi.IteratorPrototype,Vi=function(){return this},Wi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Zt(Hi,{next:b(+!n,r)}),hr(e,i,!1),Ui[i]=Vi,e},$i=String,Yi=TypeError,Ki=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 qe(r),function(e){if("object"==typeof e||j(e))return e;throw Yi("Can't set "+$i(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Qi=Be.PROPER,Xi=Be.CONFIGURABLE,Zi=Gi.IteratorPrototype,ea=Gi.BUGGY_SAFARI_ITERATORS,ta=le("iterator"),ra=function(){return this},na=function(e,t,r,n,i,a,o){Wi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!ea&&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[ta]||l["@@iterator"]||i&&l[i],b=!ea&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Di(v.call(new e)))!==Object.prototype&&s.next&&(Di(s)!==Zi&&(Ki?Ki(s,Zi):j(s[ta])||nt(s,ta,ra)),hr(s,f,!0)),Qi&&"values"==i&&g&&"values"!==g.name&&(Xi?Me(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)(ea||p||!(d in l))&&nt(l,d,c[d]);else Rt({target:t,proto:!0,forced:ea||p},c);return l[ta]!==b&&nt(l,ta,b,{name:i}),Ui[t]=b,c},ia=Te.f,aa=tt.set,oa=tt.getterFor("Array Iterator"),sa=na(Array,"Array",(function(e,t){aa(this,{type:"Array Iterator",target:S(e),index:0,kind:t})}),(function(){var e=oa(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"),ca=Ui.Arguments=Ui.Array;if(Ai("keys"),Ai("values"),Ai("entries"),d&&"values"!==ca.name)try{ia(ca,"name",{value:"values"})}catch(e){}var da=m("".charAt),ua=m("".charCodeAt),fa=m("".slice),ha=function(e){return function(t,r){var n,i,a=Ht(P(t)),o=st(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=ua(a,o))<55296||n>56319||o+1===s||(i=ua(a,o+1))<56320||i>57343?e?da(a,o):n:e?fa(a,o,o+2):i-56320+(n-55296<<10)+65536}},pa={codeAt:ha(!1),charAt:ha(!0)},la=pa.charAt,ga=tt.set,ba=tt.getterFor("String Iterator");na(String,"String",(function(e){ga(this,{type:"String Iterator",string:Ht(e),index:0})}),(function(){var e,t=ba(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=la(r,n),t.index+=e.length,{value:e,done:!1})}));var va=le("iterator"),Ia=le("toStringTag"),xa=sa.values,ka=function(e,t){if(e){if(e[va]!==xa)try{Me(e,va,xa)}catch(t){e[va]=xa}if(e[Ia]||Me(e,Ia,t),Rn[t])for(var r in sa)if(e[r]!==sa[r])try{Me(e,r,sa[r])}catch(t){e[r]=sa[r]}}};for(var ma in Rn)ka(s[ma]&&s[ma].prototype,ma);ka(Bn,"DOMTokenList");var wa=le("iterator"),ya=!c((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[wa]||"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})),Ca=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},za=TypeError,Oa=function(e,t){if(A(t,e))return e;throw za("Incorrect invocation")},Ea=le("iterator"),qa=function(e){if(null!=e)return K(e,Ea)||K(e,"@@iterator")||Ui[Ft(e)]},Pa=TypeError,Sa=function(e,t){var r=arguments.length<2?qa(e):t;if(Y(r))return qe(h(r,e));throw Pa(W(e)+" is not iterable")},ja=TypeError,Ta=function(e,t){if(e<t)throw ja("Not enough arguments");return e},Ma=Math.floor,Ra=function(e,t){var r=e.length,n=Ma(r/2);return r<8?Aa(e,t):Ua(e,Ra(nr(e,0,n),t),Ra(nr(e,n),t),t)},Aa=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},Ua=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},Ba=Ra,Na=le("iterator"),_a=tt.set,La=tt.getterFor("URLSearchParams"),Da=tt.getterFor("URLSearchParamsIterator"),Ja=Object.getOwnPropertyDescriptor,Fa=function(e){if(!d)return s[e];var t=Ja(s,e);return t&&t.value},Ga=Fa("fetch"),Ha=Fa("Request"),Va=Fa("Headers"),Wa=Ha&&Ha.prototype,$a=Va&&Va.prototype,Ya=s.RegExp,Ka=s.TypeError,Qa=s.decodeURIComponent,Xa=s.encodeURIComponent,Za=m("".charAt),eo=m([].join),to=m([].push),ro=m("".replace),no=m([].shift),io=m([].splice),ao=m("".split),oo=m("".slice),so=/\+/g,co=Array(4),uo=function(e){return co[e-1]||(co[e-1]=Ya("((?:%[\\da-f]{2}){"+e+"})","gi"))},fo=function(e){try{return Qa(e)}catch(t){return e}},ho=function(e){var t=ro(e,so," "),r=4;try{return Qa(t)}catch(e){for(;r;)t=ro(t,uo(r--),fo);return t}},po=/[!'()~]|%20/g,lo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},go=function(e){return lo[e]},bo=function(e){return ro(Xa(e),po,go)},vo=Wi((function(e,t){_a(this,{type:"URLSearchParamsIterator",iterator:Sa(La(e).entries),kind:t})}),"Iterator",(function(){var e=Da(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),Io=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Za(e,0)?oo(e,1):e:Ht(e)))};Io.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=qa(e);if(c)for(r=(t=Sa(e,c)).next;!(n=h(r,t)).done;){if(a=(i=Sa(qe(n.value))).next,(o=h(a,i)).done||(s=h(a,i)).done||!h(a,i).done)throw Ka("Expected sequence with length 2");to(this.entries,{key:Ht(o.value),value:Ht(s.value)})}else for(var d in e)ae(e,d)&&to(this.entries,{key:d,value:Ht(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=ao(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ao(t,"="),to(this.entries,{key:ho(no(r)),value:ho(eo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],to(r,bo(e.key)+"="+bo(e.value));return eo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var xo=function(){Oa(this,ko);var e=arguments.length>0?arguments[0]:void 0;_a(this,new Io(e))},ko=xo.prototype;if(Ca(ko,{append:function(e,t){Ta(arguments.length,2);var r=La(this);to(r.entries,{key:Ht(e),value:Ht(t)}),r.updateURL()},delete:function(e){Ta(arguments.length,1);for(var t=La(this),r=t.entries,n=Ht(e),i=0;i<r.length;)r[i].key===n?io(r,i,1):i++;t.updateURL()},get:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(e),n=[],i=0;i<t.length;i++)t[i].key===r&&to(n,t[i].value);return n},has:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ta(arguments.length,1);for(var r,n=La(this),i=n.entries,a=!1,o=Ht(e),s=Ht(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?io(i,c--,1):(a=!0,r.value=s));a||to(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=La(this);Ba(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=La(this).entries,n=lr(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 vo(this,"keys")},values:function(){return new vo(this,"values")},entries:function(){return new vo(this,"entries")}},{enumerable:!0}),nt(ko,Na,ko.entries,{name:"entries"}),nt(ko,"toString",(function(){return La(this).serialize()}),{enumerable:!0}),hr(xo,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!ya},{URLSearchParams:xo}),!ya&&j(Va)){var mo=m($a.has),wo=m($a.set),yo=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Ft(r))return t=e.headers?new Va(e.headers):new Va,mo(t,"content-type")||wo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Zt(e,{body:b(0,Ht(r)),headers:b(0,t)})}return e};if(j(Ga)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ga(e,arguments.length>1?yo(arguments[1]):{})}}),j(Ha)){var Co=function(e){return Oa(this,Wa),new Ha(e,arguments.length>1?yo(arguments[1]):{})};Wa.constructor=Co,Co.prototype=Wa,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Co})}}var zo={URLSearchParams:xo,getState:La};function Oo(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 Eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oo(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qo=ti((function e(t){if(Zn(this,e),ri(this,"baseUri",void 0),ri(this,"proxy",void 0),ri(this,"headers",void 0),ri(this,"parameters",void 0),ri(this,"fetchOptions",void 0),ri(this,"transformRequest",void 0),ri(this,"throwOnBadResponse",void 0),this.headers=Eo({},t.headers),this.parameters=Eo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Eo({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 Po(e){return(Po="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)}ri(qo,"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}}}),Rt({global:!0},{globalThis:s});var So="object"===("undefined"==typeof window?"undefined":Po(window))&&"object"===Po(window.document),jo="object"===("undefined"==typeof process?"undefined":Po(process))&&"object"===Po(process.versions)&&"string"==typeof process.versions.node,To=So?window:globalThis,Mo="function"==typeof To.fetch,Ro=function(){if(jo)return require("node-fetch").default;if(!Mo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return To.fetch}(),Ao=Function,Uo=m([].concat),Bo=m([].join),No={},_o=function(e,t,r){if(!ae(No,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";No[t]=Ao("C,a","return new C("+Bo(n,",")+")")}return No[t](e,r)},Lo=u?Ao.bind:function(e){var t=Y(this),r=t.prototype,n=hn(arguments,1),i=function(){var r=Uo(n,hn(arguments));return this instanceof i?_o(t,r.length,r):t.apply(e,r)};return T(r)&&(i.prototype=r),i},Do=TypeError,Jo=function(e){if(Cr(e))return e;throw Do(W(e)+" is not a constructor")},Fo=R("Reflect","construct"),Go=Object.prototype,Ho=[].push,Vo=c((function(){function e(){}return!(Fo((function(){}),[],e)instanceof e)})),Wo=!c((function(){Fo((function(){}))})),$o=Vo||Wo;Rt({target:"Reflect",stat:!0,forced:$o,sham:$o},{construct:function(e,t){Jo(e),qe(t);var r=arguments.length<3?e:Jo(arguments[2]);if(Wo&&!Vo)return Fo(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 fn(Ho,n,t),new(fn(Lo,e,n))}var i=r.prototype,a=Zt(T(i)?i:Go),o=fn(e,a,t);return T(o)?o:a}});var Yo=TypeError,Ko=function(e){if(e>9007199254740991)throw Yo("Maximum allowed index exceeded");return e},Qo=le("isConcatSpreadable"),Xo=D>=51||!c((function(){var e=[];return e[Qo]=!1,e.concat()[0]!==e})),Zo=qn("concat"),es=function(e){if(!T(e))return!1;var t=e[Qo];return void 0!==t?!!t:gr(e)};function ts(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rs(e,t){return(rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ns(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&&rs(e,t)}function is(e,t){if(t&&("object"===Po(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ts(e)}function as(e){return(as=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function os(){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 ss(e,t,r){return(ss=os()?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&&rs(i,r.prototype),i}).apply(null,arguments)}function cs(e){var t="function"==typeof Map?new Map:void 0;return(cs=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 ss(e,arguments,as(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),rs(n,e)})(e)}function ds(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=as(e);if(t){var i=as(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return is(this,r)}}Rt({target:"Array",proto:!0,arity:1,forced:!Xo||!Zo},{concat:function(e){var t,r,n,i,a,o=ne(this),s=Er(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(es(a=-1===t?o:arguments[t]))for(i=pt(a),Ko(c+i),r=0;r<i;r++,c++)r in a&&er(s,c,a[r]);else Ko(c+1),er(s,c++,a);return s.length=c,s}});var us,fs,hs=function(e){ns(r,e);var t=ds(r);function r(e){var n;return Zn(this,r),ri(ts(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ti(r)}(cs(Error)),ps=s.RegExp,ls=c((function(){var e=ps("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),gs=ls||c((function(){return!ps("a","y").sticky})),bs={BROKEN_CARET:ls||c((function(){var e=ps("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:gs,UNSUPPORTED_Y:ls},vs=s.RegExp,Is=c((function(){var e=vs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),xs=s.RegExp,ks=c((function(){var e=xs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ms=tt.get,ws=te("native-string-replace",String.prototype.replace),ys=RegExp.prototype.exec,Cs=ys,zs=m("".charAt),Os=m("".indexOf),Es=m("".replace),qs=m("".slice),Ps=(fs=/b*/g,h(ys,us=/a/,"a"),h(ys,fs,"a"),0!==us.lastIndex||0!==fs.lastIndex),Ss=bs.BROKEN_CARET,js=void 0!==/()??/.exec("")[1];(Ps||js||Ss||Is||ks)&&(Cs=function(e){var t,r,n,i,a,o,s,c=this,d=ms(c),u=Ht(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=h(Cs,f,u),c.lastIndex=f.lastIndex,t;var p=d.groups,l=Ss&&c.sticky,g=h(Hn,c),b=c.source,v=0,I=u;if(l&&(g=Es(g,"y",""),-1===Os(g,"g")&&(g+="g"),I=qs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==zs(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),js&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ps&&(n=c.lastIndex),i=h(ys,l?r:c,I),l?i?(i.input=qs(i.input,v),i[0]=qs(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Ps&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),js&&i&&i.length>1&&h(ws,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=Zt(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var Ts=Cs;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Ts},{exec:Ts});var Ms=le("species"),Rs=RegExp.prototype,As=function(e,t,r,n){var i=le(e),a=!c((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ms]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=m(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=m(e),c=t.exec;return c===Ts||c===Rs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,d[0]),nt(Rs,i,d[1])}n&&Me(Rs[i],"sham",!0)},Us=pa.charAt,Bs=function(e,t,r){return t+(r?Us(e,t).length:1)},Ns=Math.floor,_s=m("".charAt),Ls=m("".replace),Ds=m("".slice),Js=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Fs=/\$([$&'`]|\d{1,2})/g,Gs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Fs;return void 0!==i&&(i=ne(i),c=Js),Ls(a,c,(function(a,c){var d;switch(_s(c,0)){case"$":return"$";case"&":return e;case"`":return Ds(t,0,r);case"'":return Ds(t,o);case"<":d=i[Ds(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=Ns(u/10);return 0===f?a:f<=s?void 0===n[f-1]?_s(c,1):n[f-1]+_s(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Hs=TypeError,Vs=function(e,t){var r=e.exec;if(j(r)){var n=h(r,e,t);return null!==n&&qe(n),n}if("RegExp"===C(e))return h(Ts,e,t);throw Hs("RegExp#exec called on incompatible receiver")},Ws=le("replace"),$s=Math.max,Ys=Math.min,Ks=m([].concat),Qs=m([].push),Xs=m("".indexOf),Zs=m("".slice),ec="$0"==="a".replace(/./,"$0"),tc=!!/./[Ws]&&""===/./[Ws]("a","$0");As("replace",(function(e,t,r){var n=tc?"$":"$0";return[function(e,r){var n=P(this),i=null==e?void 0:K(e,Ws);return i?h(i,e,n,r):h(t,Ht(n),e,r)},function(e,i){var a=qe(this),o=Ht(e);if("string"==typeof i&&-1===Xs(i,n)&&-1===Xs(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=j(i);c||(i=Ht(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Vs(a,o);if(null===h)break;if(Qs(f,h),!d)break;""===Ht(h[0])&&(a.lastIndex=Bs(o,ht(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=Ht((h=f[b])[0]),I=$s(Ys(st(h.index),o.length),0),x=[],k=1;k<h.length;k++)Qs(x,void 0===(p=h[k])?p:String(p));var m=h.groups;if(c){var w=Ks([v],x,I,o);void 0!==m&&Qs(w,m);var y=Ht(fn(i,void 0,w))}else y=Gs(v,o,I,x,m,i);I>=g&&(l+=Zs(o,g,I)+y,g=I+v.length)}return l+Zs(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!ec||tc);var rc,nc=function(e,t,r){return r.get&&rt(r.get,t,{getter:!0}),r.set&&rt(r.set,t,{setter:!0}),Te.f(e,t,r)},ic=Object.assign,ac=Object.defineProperty,oc=m([].concat),sc=!ic||c((function(){if(d&&1!==ic({b:1},ic(ac({},"a",{enumerable:!0,get:function(){ac(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!=ic({},e)[r]||"abcdefghijklmnopqrst"!=At(ic({},t)).join("")}))?function(e,t){for(var r=ne(e),n=arguments.length,i=1,a=wt.f,o=g.f;n>i;)for(var s,c=E(arguments[i++]),u=a?oc(At(c),a(c)):At(c),f=u.length,p=0;f>p;)s=u[p++],d&&!h(o,c,s)||(r[s]=c[s]);return r}:ic,cc=function(e,t,r){var n,i;qe(e);try{if(!(n=K(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 qe(n),r},dc=function(e,t,r,n){try{return n?t(qe(r)[0],r[1]):t(r)}catch(t){cc(e,"throw",t)}},uc=le("iterator"),fc=Array.prototype,hc=function(e){return void 0!==e&&(Ui.Array===e||fc[uc]===e)},pc=Array,lc=function(e){var t=ne(e),r=Cr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=lr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,f,p=qa(t),l=0;if(!p||this===pc&&hc(p))for(o=pt(t),s=r?new this(o):pc(o);o>l;l++)f=a?i(t[l],l):t[l],er(s,l,f);else for(u=(d=Sa(t,p)).next,s=r?new this:[];!(c=h(u,d)).done;l++)f=a?dc(d,i,[c.value,l],!0):c.value,er(s,l,f);return s.length=l,s},gc=/[^\0-\u007E]/,bc=/[.\u3002\uFF0E\uFF61]/g,vc="Overflow: input needs wider integers to process",Ic=RangeError,xc=m(bc.exec),kc=Math.floor,mc=String.fromCharCode,wc=m("".charCodeAt),yc=m([].join),Cc=m([].push),zc=m("".replace),Oc=m("".split),Ec=m("".toLowerCase),qc=function(e){return e+22+75*(e<26)},Pc=function(e,t,r){var n=0;for(e=r?kc(e/700):e>>1,e+=kc(e/t);e>455;)e=kc(e/35),n+=36;return kc(n+36*e/(e+38))},Sc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=wc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=wc(e,r++);56320==(64512&a)?Cc(t,((1023&i)<<10)+(1023&a)+65536):(Cc(t,i),r--)}else Cc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Cc(n,mc(r));var c=n.length,d=c;for(c&&Cc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>kc((2147483647-o)/f))throw Ic(vc);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ic(vc);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;Cc(n,mc(qc(l+g%b))),h=kc(g/b),p+=36}Cc(n,mc(qc(h))),s=Pc(o,f,d==c),o=0,d++}}o++,a++}return yc(n,"")},jc=pa.codeAt,Tc=tt.set,Mc=tt.getterFor("URL"),Rc=zo.URLSearchParams,Ac=zo.getState,Uc=s.URL,Bc=s.TypeError,Nc=s.parseInt,_c=Math.floor,Lc=Math.pow,Dc=m("".charAt),Jc=m(/./.exec),Fc=m([].join),Gc=m(1..toString),Hc=m([].pop),Vc=m([].push),Wc=m("".replace),$c=m([].shift),Yc=m("".split),Kc=m("".slice),Qc=m("".toLowerCase),Xc=m([].unshift),Zc=/[a-z]/i,ed=/[\d+-.a-z]/i,td=/\d/,rd=/^0x/i,nd=/^[0-7]+$/,id=/^\d+$/,ad=/^[\da-f]+$/i,od=/[\0\t\n\r #%/:<>?@[\\\]^|]/,sd=/[\0\t\n\r #/:<>?@[\\\]^|]/,cd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,dd=/[\t\n\r]/g,ud=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Xc(t,e%256),e=_c(e/256);return Fc(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+=Gc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},fd={},hd=sc({},fd,{" ":1,'"':1,"<":1,">":1,"`":1}),pd=sc({},hd,{"#":1,"?":1,"{":1,"}":1}),ld=sc({},pd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gd=function(e,t){var r=jc(e,0);return r>32&&r<127&&!ae(t,e)?e:encodeURIComponent(e)},bd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},vd=function(e,t){var r;return 2==e.length&&Jc(Zc,Dc(e,0))&&(":"==(r=Dc(e,1))||!t&&"|"==r)},Id=function(e){var t;return e.length>1&&vd(Kc(e,0,2))&&(2==e.length||"/"===(t=Dc(e,2))||"\\"===t||"?"===t||"#"===t)},xd=function(e){return"."===e||"%2e"===Qc(e)},kd={},md={},wd={},yd={},Cd={},zd={},Od={},Ed={},qd={},Pd={},Sd={},jd={},Td={},Md={},Rd={},Ad={},Ud={},Bd={},Nd={},_d={},Ld={},Dd=function(e,t,r){var n,i,a,o=Ht(e);if(t){if(i=this.parse(o))throw Bc(i);this.searchParams=null}else{if(void 0!==r&&(n=new Dd(r,!0)),i=this.parse(o,null,n))throw Bc(i);(a=Ac(new Rc)).bindURL(this),this.searchParams=a}};Dd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||kd,u=0,f="",h=!1,p=!1,l=!1;for(e=Ht(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=Wc(e,cd,"")),e=Wc(e,dd,""),n=lc(e);u<=n.length;){switch(i=n[u],d){case kd:if(!i||!Jc(Zc,i)){if(t)return"Invalid scheme";d=wd;continue}f+=Qc(i),d=md;break;case md:if(i&&(Jc(ed,i)||"+"==i||"-"==i||"."==i))f+=Qc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=wd,u=0;continue}if(t&&(c.isSpecial()!=ae(bd,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&bd[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=Md:c.isSpecial()&&r&&r.scheme==c.scheme?d=yd:c.isSpecial()?d=Ed:"/"==n[u+1]?(d=Cd,u++):(c.cannotBeABaseURL=!0,Vc(c.path,""),d=Nd)}break;case wd:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=nr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Ld;break}d="file"==r.scheme?Md:zd;continue;case yd:if("/"!=i||"/"!=n[u+1]){d=zd;continue}d=qd,u++;break;case Cd:if("/"==i){d=Pd;break}d=Bd;continue;case zd:if(c.scheme=r.scheme,i==rc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Od;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query="",d=_d;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.path.length--,d=Bd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Ld}break;case Od:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Bd;continue}d=Pd}else d=qd;break;case Ed:if(d=qd,"/"!=i||"/"!=Dc(f,u+1))continue;u++;break;case qd:if("/"!=i&&"\\"!=i){d=Pd;continue}break;case Pd:if("@"==i){h&&(f="%40"+f),h=!0,a=lc(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=gd(b,ld);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=lc(f).length+1,f="",d=Sd}else f+=i;break;case Sd:case jd:if(t&&"file"==c.scheme){d=Ad;continue}if(":"!=i||p){if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=Ud,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=Td,t==jd)return}break;case Td:if(!Jc(td,i)){if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=Nc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===bd[c.scheme]?null:I,f=""}if(t)return;d=Ud;continue}return"Invalid port"}f+=i;break;case Md:if(c.scheme="file","/"==i||"\\"==i)d=Rd;else{if(!r||"file"!=r.scheme){d=Bd;continue}if(i==rc)c.host=r.host,c.path=nr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=nr(r.path),c.query="",d=_d;else{if("#"!=i){Id(Fc(nr(n,u),""))||(c.host=r.host,c.path=nr(r.path),c.shortenPath()),d=Bd;continue}c.host=r.host,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Ld}}break;case Rd:if("/"==i||"\\"==i){d=Ad;break}r&&"file"==r.scheme&&!Id(Fc(nr(n,u),""))&&(vd(r.path[0],!0)?Vc(c.path,r.path[0]):c.host=r.host),d=Bd;continue;case Ad:if(i==rc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&vd(f))d=Bd;else if(""==f){if(c.host="",t)return;d=Ud}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=Ud}continue}f+=i;break;case Ud:if(c.isSpecial()){if(d=Bd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=rc&&(d=Bd,"/"!=i))continue}else c.fragment="",d=Ld;else c.query="",d=_d;break;case Bd:if(i==rc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Qc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Vc(c.path,"")):xd(f)?"/"==i||"\\"==i&&c.isSpecial()||Vc(c.path,""):("file"==c.scheme&&!c.path.length&&vd(f)&&(c.host&&(c.host=""),f=Dc(f,0)+":"),Vc(c.path,f)),f="","file"==c.scheme&&(i==rc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)$c(c.path);"?"==i?(c.query="",d=_d):"#"==i&&(c.fragment="",d=Ld)}else f+=gd(i,pd);break;case Nd:"?"==i?(c.query="",d=_d):"#"==i?(c.fragment="",d=Ld):i!=rc&&(c.path[0]+=gd(i,fd));break;case _d:t||"#"!=i?i!=rc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":gd(i,fd)):(c.fragment="",d=Ld);break;case Ld:i!=rc&&(c.fragment+=gd(i,hd))}u++}},parseHost:function(e){var t,r,n;if("["==Dc(e,0)){if("]"!=Dc(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,f=0,h=function(){return Dc(e,f)};if(":"==h()){if(":"!=Dc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Jc(ad,h());)t=16*t+Nc(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Jc(td,h()))return;for(;Jc(td,h());){if(a=Nc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,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}(Kc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Oc(zc(Ec(e),bc,"."),".");for(t=0;t<i.length;t++)r=i[t],Cc(n,xc(gc,r)?"xn--"+Sc(r):r);return yc(n,".")}(e),Jc(od,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=Yc(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"==Dc(i,0)&&(a=Jc(rd,i)?16:8,i=Kc(i,8==a?1:2)),""===i)o=0;else{if(!Jc(10==a?id:8==a?nd:ad,i))return e;o=Nc(i,a)}Vc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Lc(256,5-t))return null}else if(o>255)return null;for(s=Hc(r),n=0;n<r.length;n++)s+=r[n]*Lc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Jc(sd,e))return"Invalid host";for(t="",r=lc(e),n=0;n<r.length;n++)t+=gd(r[n],fd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ae(bd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&vd(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+=ud(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Fc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Bc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Jd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ud(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ht(e)+":",kd)},getUsername:function(){return this.username},setUsername:function(e){var t=lc(Ht(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=gd(t[r],ld)}},getPassword:function(){return this.password},setPassword:function(e){var t=lc(Ht(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=gd(t[r],ld)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ud(e):ud(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Sd)},getHostname:function(){var e=this.host;return null===e?"":ud(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,jd)},getPort:function(){var e=this.port;return null===e?"":Ht(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Ht(e))?this.port=null:this.parse(e,Td))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Fc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ud))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Ht(e))?this.query=null:("?"==Dc(e,0)&&(e=Kc(e,1)),this.query="",this.parse(e,_d)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Ht(e))?("#"==Dc(e,0)&&(e=Kc(e,1)),this.fragment="",this.parse(e,Ld)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Jd=function(e){var t=Oa(this,Fd),r=Ta(arguments.length,1)>1?arguments[1]:void 0,n=Tc(t,new Dd(e,!1,r));d||(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())},Fd=Jd.prototype,Gd=function(e,t){return{get:function(){return Mc(this)[e]()},set:t&&function(e){return Mc(this)[t](e)},configurable:!0,enumerable:!0}};if(d&&(nc(Fd,"href",Gd("serialize","setHref")),nc(Fd,"origin",Gd("getOrigin")),nc(Fd,"protocol",Gd("getProtocol","setProtocol")),nc(Fd,"username",Gd("getUsername","setUsername")),nc(Fd,"password",Gd("getPassword","setPassword")),nc(Fd,"host",Gd("getHost","setHost")),nc(Fd,"hostname",Gd("getHostname","setHostname")),nc(Fd,"port",Gd("getPort","setPort")),nc(Fd,"pathname",Gd("getPathname","setPathname")),nc(Fd,"search",Gd("getSearch","setSearch")),nc(Fd,"searchParams",Gd("getSearchParams")),nc(Fd,"hash",Gd("getHash","setHash"))),nt(Fd,"toJSON",(function(){return Mc(this).serialize()}),{enumerable:!0}),nt(Fd,"toString",(function(){return Mc(this).serialize()}),{enumerable:!0}),Uc){var Hd=Uc.createObjectURL,Vd=Uc.revokeObjectURL;Hd&&nt(Jd,"createObjectURL",lr(Hd,Uc)),Vd&&nt(Jd,"revokeObjectURL",lr(Vd,Uc))}function Wd(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=as(e);if(t){var i=as(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return is(this,r)}}hr(Jd,"URL"),Rt({global:!0,constructor:!0,forced:!ya,sham:!d},{URL:Jd});var $d=function(e){ns(r,e);var t=Wd(r);function r(e,n,i){var a;return Zn(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 ti(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))for(var i=0;i<n.length;i+=1)t.searchParams.append(r,String(n[i]));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}(cs(URL)),Yd="commerce-sdk-isomorphic@1.10.2";function Kd(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 Qd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kd(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Xd=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Qd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,x,k,m,w,y,C,z,O,E,q,P,S,j,T,M,R,A,U;return ti(e,[{key:"createBasket",value:(U=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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.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),s=new $d("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Ro(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 hs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=30,Ro(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 hs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(R=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Ro(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 hs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(j=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(P=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(z=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(y=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addItemToBasket",value:(w=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeItemFromBasket",value:(m=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Ro(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 hs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(x=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Ro(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 hs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=49,Ro(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 hs(u);case 58:return e.next=60,u.text();case 60:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Zd(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?Zd(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(Xd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var tu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=eu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i;return ti(e,[{key:"getShopperContext",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",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),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Ro(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 hs(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",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),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ru(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 nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ru(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(tu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var iu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=nu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,x,k,m,w,y,C,z,O,E,q,P,S,j,T;return ti(e,[{key:"registerCustomer",value:(T=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(j=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new hs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeCustomer",value:(S=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(P=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"resetPassword",value:(q=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new hs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getResetPasswordToken",value:(E=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"registerExternalProfile",value:(O=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getExternalProfile",value:(z=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getCustomer",value:(C=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(y=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"createCustomerAddress",value:(w=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomerAddress",value:(m=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(x=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Ro(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 hs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=62;break}throw new hs(u);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new hs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new hs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=31,Ro(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 hs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function au(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?au(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):au(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var su=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"retrieveResults",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ou(ou({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=ou(ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ou(ou({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=ou(ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60: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 du(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){ri(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}ri(su,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var uu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=du({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"getPages",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=du(du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=du(du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=42,Ro(s.toString(),d);case 42:if(u=e.sent,!r){e.next=47;break}return e.abrupt("return",u);case 47:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=51;break}throw new hs(u);case 51:return e.next=53,u.text();case 53:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=du(du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=du(du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53: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 hu(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){ri(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}ri(uu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var pu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=hu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t;return ti(e,[{key:"getGiftCertificate",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function lu(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 gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var bu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=gu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I;return ti(e,[{key:"retrieveCredQualityUserInfo",value:(I=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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.username){e.next=17;break}o.username=n.username,e.next=22;break;case 17:if(void 0===i.username){e.next=21;break}o.username=i.username,e.next=22;break;case 21:throw new Error("Missing required query parameter: username");case 22:return s=new $d("/organizations/{organizationId}/cred-qual/user",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"authenticateCustomer",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=60,Ro(s.toString(),d);case 60:if(u=e.sent,!r){e.next=65;break}return e.abrupt("return",u);case 65:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=67;break}throw new hs(u);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=82,Ro(s.toString(),d);case 82:if(u=e.sent,!r){e.next=87;break}return e.abrupt("return",u);case 87:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=89;break}throw new hs(u);case 89:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Ro(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 hs(u);case 29:return e.next=31,u.text();case 31:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function vu(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 Iu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(bu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var xu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Iu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s;return ti(e,[{key:"createOrder",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();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 mu(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){ri(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}ri(xu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var wu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i;return ti(e,[{key:"getProducts",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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.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=32;break}o.siteId=n.siteId,e.next=37;break;case 32:if(void 0===i.siteId){e.next=36;break}o.siteId=i.siteId,e.next=37;break;case 36:throw new Error("Missing required query parameter: siteId");case 37:return s=new $d("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Ro(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 hs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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.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=32;break}o.siteId=n.siteId,e.next=37;break;case 32:if(void 0===i.siteId){e.next=36;break}o.siteId=i.siteId,e.next=37;break;case 36:throw new Error("Missing required query parameter: siteId");case 37:return s=new $d("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Ro(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 hs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function yu(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 Cu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(wu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var zu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"getPromotions",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Cu(Cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Cu(Cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ri(zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Ou=TypeError,Eu=function(e,t){if(!delete e[t])throw Ou("Cannot delete property "+W(t)+" of "+W(e))},qu=U.match(/firefox\/(\d+)/i),Pu=!!qu&&+qu[1],Su=/MSIE|Trident/.test(U),ju=U.match(/AppleWebKit\/(\d+)\./),Tu=!!ju&&+ju[1],Mu=[],Ru=m(Mu.sort),Au=m(Mu.push),Uu=c((function(){Mu.sort(void 0)})),Bu=c((function(){Mu.sort(null)})),Nu=Nn("sort"),_u=!c((function(){if(D)return D<70;if(!(Pu&&Pu>3)){if(Su)return!0;if(Tu)return Tu<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++)Mu.push({k:t+n,v:r})}for(Mu.sort((function(e,t){return t.v-e.v})),n=0;n<Mu.length;n++)t=Mu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function Lu(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 Du(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Uu||!Bu||!Nu||!_u},{sort:function(e){void 0!==e&&Y(e);var t=ne(this);if(_u)return void 0===e?Ru(t):Ru(t,e);var r,n,i=[],a=pt(t);for(n=0;n<a;n++)n in t&&Au(i,t[n]);for(Ba(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Ht(t)>Ht(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Eu(t,n++);return t}});var Ju=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Du({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"productSearch",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Du(Du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=36,Ro(s.toString(),d);case 36:if(u=e.sent,!r){e.next=41;break}return e.abrupt("return",u);case 41:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new hs(u);case 45:return e.next=47,u.text();case 47:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Du(Du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ri(Ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var Fu=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};As("search",(function(e,t,r){return[function(t){var r=P(this),n=null==t?void 0:K(t,e);return n?h(n,t,r):new RegExp(t)[e](Ht(r))},function(e){var n=qe(this),i=Ht(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;Fu(o,0)||(n.lastIndex=0);var s=Vs(n,i);return Fu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var Gu=le("iterator"),Hu=!1;try{var Vu=0,Wu={next:function(){return{done:!!Vu++}},return:function(){Hu=!0}};Wu[Gu]=function(){return this},Array.from(Wu,(function(){throw 2}))}catch(e){}var $u,Yu,Ku,Qu=function(e,t){if(!t&&!Hu)return!1;var r=!1;try{var n={};n[Gu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Xu="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Zu=Te.f,ef=tt.enforce,tf=tt.get,rf=s.Int8Array,nf=rf&&rf.prototype,af=s.Uint8ClampedArray,of=af&&af.prototype,sf=rf&&Di(rf),cf=nf&&Di(nf),df=Object.prototype,uf=s.TypeError,ff=le("toStringTag"),hf=de("TYPED_ARRAY_TAG"),pf=Xu&&!!Ki&&"Opera"!==Ft(s.opera),lf=!1,gf={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bf={BigInt64Array:8,BigUint64Array:8},vf=function(e){var t=Di(e);if(T(t)){var r=tf(t);return r&&ae(r,"TypedArrayConstructor")?r.TypedArrayConstructor:vf(t)}},If=function(e){if(!T(e))return!1;var t=Ft(e);return ae(gf,t)||ae(bf,t)};for($u in gf)(Ku=(Yu=s[$u])&&Yu.prototype)?ef(Ku).TypedArrayConstructor=Yu:pf=!1;for($u in bf)(Ku=(Yu=s[$u])&&Yu.prototype)&&(ef(Ku).TypedArrayConstructor=Yu);if((!pf||!j(sf)||sf===Function.prototype)&&(sf=function(){throw uf("Incorrect invocation")},pf))for($u in gf)s[$u]&&Ki(s[$u],sf);if((!pf||!cf||cf===df)&&(cf=sf.prototype,pf))for($u in gf)s[$u]&&Ki(s[$u].prototype,cf);if(pf&&Di(of)!==cf&&Ki(of,cf),d&&!ae(cf,ff))for($u in lf=!0,Zu(cf,ff,{get:function(){return T(this)?this[hf]:void 0}}),gf)s[$u]&&Me(s[$u],hf,$u);var xf={NATIVE_ARRAY_BUFFER_VIEWS:pf,TYPED_ARRAY_TAG:lf&&hf,aTypedArray:function(e){if(If(e))return e;throw uf("Target is not a typed array")},aTypedArrayConstructor:function(e){if(j(e)&&(!Ki||A(sf,e)))return e;throw uf(W(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(d){if(r)for(var i in gf){var a=s[i];if(a&&ae(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}cf[e]&&!r||nt(cf,e,r?t:pf&&nf[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(d){if(Ki){if(r)for(n in gf)if((i=s[n])&&ae(i,e))try{delete i[e]}catch(e){}if(sf[e]&&!r)return;try{return nt(sf,e,r?t:pf&&sf[e]||t)}catch(e){}}for(n in gf)!(i=s[n])||i[e]&&!r||nt(i,e,t)}},getTypedArrayConstructor:vf,isView:function(e){if(!T(e))return!1;var t=Ft(e);return"DataView"===t||ae(gf,t)||ae(bf,t)},isTypedArray:If,TypedArray:sf,TypedArrayPrototype:cf},kf=xf.NATIVE_ARRAY_BUFFER_VIEWS,mf=s.ArrayBuffer,wf=s.Int8Array,yf=!kf||!c((function(){wf(1)}))||!c((function(){new wf(-1)}))||!Qu((function(e){new wf,new wf(null),new wf(1.5),new wf(e)}),!0)||c((function(){return 1!==new wf(new mf(2),1,void 0).length})),Cf=RangeError,zf=function(e){if(void 0===e)return 0;var t=st(e),r=ht(t);if(t!==r)throw Cf("Wrong length or index");return r},Of=Array,Ef=Math.abs,qf=Math.pow,Pf=Math.floor,Sf=Math.log,jf=Math.LN2,Tf=function(e,t,r){var n,i,a,o=Of(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?qf(2,-24)-qf(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Ef(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Pf(Sf(e)/jf),e*(a=qf(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*qf(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*qf(2,t),n+=d):(i=e*qf(2,d-1)*qf(2,t),n=0));t>=8;)o[h++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[h++]=255&n,n/=256,s-=8;return o[--h]|=128*f,o},Mf=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+=qf(2,t),u-=o}return(d?-1:1)*r*qf(2,u-t)},Rf=function(e){for(var t=ne(this),r=pt(t),n=arguments.length,i=ut(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ut(a,r);o>i;)t[i++]=e;return t},Af=mt.f,Uf=Te.f,Bf=Be.PROPER,Nf=Be.CONFIGURABLE,_f=tt.get,Lf=tt.set,Df=s.ArrayBuffer,Jf=Df,Ff=Jf&&Jf.prototype,Gf=s.DataView,Hf=Gf&&Gf.prototype,Vf=Object.prototype,Wf=s.Array,$f=s.RangeError,Yf=m(Rf),Kf=m([].reverse),Qf=Tf,Xf=Mf,Zf=function(e){return[255&e]},eh=function(e){return[255&e,e>>8&255]},th=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},rh=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},nh=function(e){return Qf(e,23,4)},ih=function(e){return Qf(e,52,8)},ah=function(e,t){Uf(e.prototype,t,{get:function(){return _f(this)[t]}})},oh=function(e,t,r,n){var i=zf(r),a=_f(e);if(i+t>a.byteLength)throw $f("Wrong index");var o=_f(a.buffer).bytes,s=i+a.byteOffset,c=nr(o,s,s+t);return n?c:Kf(c)},sh=function(e,t,r,n,i,a){var o=zf(r),s=_f(e);if(o+t>s.byteLength)throw $f("Wrong index");for(var c=_f(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(Xu){var ch=Bf&&"ArrayBuffer"!==Df.name;if(c((function(){Df(1)}))&&c((function(){new Df(-1)}))&&!c((function(){return new Df,new Df(1.5),new Df(NaN),ch&&!Nf})))ch&&Nf&&Me(Df,"name","ArrayBuffer");else{(Jf=function(e){return Oa(this,Ff),new Df(zf(e))}).prototype=Ff;for(var dh,uh=Af(Df),fh=0;uh.length>fh;)(dh=uh[fh++])in Jf||Me(Jf,dh,Df[dh]);Ff.constructor=Jf}Ki&&Di(Hf)!==Vf&&Ki(Hf,Vf);var hh=new Gf(new Jf(2)),ph=m(Hf.setInt8);hh.setInt8(0,2147483648),hh.setInt8(1,2147483649),!hh.getInt8(0)&&hh.getInt8(1)||Ca(Hf,{setInt8:function(e,t){ph(this,e,t<<24>>24)},setUint8:function(e,t){ph(this,e,t<<24>>24)}},{unsafe:!0})}else Ff=(Jf=function(e){Oa(this,Ff);var t=zf(e);Lf(this,{bytes:Yf(Wf(t),0),byteLength:t}),d||(this.byteLength=t)}).prototype,Hf=(Gf=function(e,t,r){Oa(this,Hf),Oa(e,Ff);var n=_f(e).byteLength,i=st(t);if(i<0||i>n)throw $f("Wrong offset");if(i+(r=void 0===r?n-i:ht(r))>n)throw $f("Wrong length");Lf(this,{buffer:e,byteLength:r,byteOffset:i}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,d&&(ah(Jf,"byteLength"),ah(Gf,"buffer"),ah(Gf,"byteLength"),ah(Gf,"byteOffset")),Ca(Hf,{getInt8:function(e){return oh(this,1,e)[0]<<24>>24},getUint8:function(e){return oh(this,1,e)[0]},getInt16:function(e){var t=oh(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=oh(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return rh(oh(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return rh(oh(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Xf(oh(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Xf(oh(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){sh(this,1,e,Zf,t)},setUint8:function(e,t){sh(this,1,e,Zf,t)},setInt16:function(e,t){sh(this,2,e,eh,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){sh(this,2,e,eh,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){sh(this,4,e,th,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){sh(this,4,e,th,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){sh(this,4,e,nh,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){sh(this,8,e,ih,t,arguments.length>2?arguments[2]:void 0)}});hr(Jf,"ArrayBuffer"),hr(Gf,"DataView");var lh={ArrayBuffer:Jf,DataView:Gf},gh=Math.floor,bh=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&gh(e)===e},vh=RangeError,Ih=RangeError,xh=function(e,t){var r=function(e){var t=st(e);if(t<0)throw vh("The argument can't be less than 0");return t}(e);if(r%t)throw Ih("Wrong offset");return r},kh=xf.aTypedArrayConstructor,mh=function(e){var t,r,n,i,a,o,s=Jo(this),c=ne(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,p=qa(c);if(p&&!hc(p))for(o=(a=Sa(c,p)).next,c=[];!(i=h(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=lr(u,arguments[2])),r=pt(c),n=new(kh(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},wh=le("species"),yh=function(e){var t=R(e),r=Te.f;d&&t&&!t[wh]&&r(t,wh,{configurable:!0,get:function(){return this}})};n((function(e){var t=mt.f,r=Sr.forEach,n=tt.get,i=tt.set,a=tt.enforce,o=Te.f,c=Ce.f,u=Math.round,f=s.RangeError,p=lh.ArrayBuffer,l=p.prototype,g=lh.DataView,v=xf.NATIVE_ARRAY_BUFFER_VIEWS,I=xf.TYPED_ARRAY_TAG,x=xf.TypedArray,k=xf.TypedArrayPrototype,m=xf.aTypedArrayConstructor,w=xf.isTypedArray,y=function(e,t){m(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return A(l,e)||"ArrayBuffer"==(t=Ft(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!H(t)&&t in e&&bh(+t)&&t>=0},E=function(e,t){return t=Ie(t),O(e,t)?b(2,e[t]):c(e,t)},q=function(e,t,r){return t=Ie(t),!(O(e,t)&&T(r)&&ae(r,"value"))||ae(r,"get")||ae(r,"set")||r.configurable||ae(r,"writable")&&!r.writable||ae(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};d?(v||(Ce.f=E,Te.f=q,C(k,"buffer"),C(k,"byteOffset"),C(k,"byteLength"),C(k,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:E,defineProperty:q}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,b=e+(d?"Clamped":"")+"Array",m="get"+e,C="set"+e,O=s[b],E=O,q=E&&E.prototype,P={},S=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[m](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?yf&&(E=c((function(e,t,r,n){return Oa(e,q),function(e,t,r){var n,i;return Ki&&j(n=t.constructor)&&n!==r&&T(i=n.prototype)&&i!==r.prototype&&Ki(e,i),e}(T(t)?z(t)?void 0!==n?new O(t,xh(r,l),n):void 0!==r?new O(t,xh(r,l)):new O(t):w(t)?y(E,t):h(mh,E,t):new O(zf(t)),e,E)})),Ki&&Ki(E,x),r(t(O),(function(e){e in E||Me(E,e,O[e])})),E.prototype=q):(E=c((function(e,t,r,n){Oa(e,q);var a,o,s,c=0,d=0;if(T(t)){if(!z(t))return w(t)?y(E,t):h(mh,E,t);a=t,d=xh(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=zf(t),a=new p(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new g(a)});c<s;)S(e,c++)})),Ki&&Ki(E,x),q=E.prototype=Zt(k)),q.constructor!==E&&Me(q,"constructor",E),a(q).TypedArrayConstructor=E,I&&Me(q,I,b);var M=E!=O;P[b]=E,Rt({global:!0,constructor:!0,forced:M,sham:!v},P),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in q||Me(q,"BYTES_PER_ELEMENT",l),yh(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Ch=Math.min,zh=m([].copyWithin||function(e,t){var r=ne(this),n=pt(r),i=ut(e,n),a=ut(t,n),o=arguments.length>2?arguments[2]:void 0,s=Ch((void 0===o?n:ut(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]:Eu(r,i),i+=c,a+=c;return r}),Oh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("copyWithin",(function(e,t){return zh(Oh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Eh=Sr.every,qh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("every",(function(e){return Eh(qh(this),e,arguments.length>1?arguments[1]:void 0)}));var Ph=TypeError,Sh=function(e){var t=ve(e,"number");if("number"==typeof t)throw Ph("Can't convert number to bigint");return BigInt(t)},jh=xf.aTypedArray,Th=xf.exportTypedArrayMethod,Mh=m("".slice);Th("fill",(function(e){var t=arguments.length;jh(this);var r="Big"===Mh(Ft(this),0,3)?Sh(e):+e;return h(Rf,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Rh=le("species"),Ah=function(e,t){var r,n=qe(e).constructor;return void 0===n||null==(r=qe(n)[Rh])?t:Jo(r)},Uh=xf.aTypedArrayConstructor,Bh=xf.getTypedArrayConstructor,Nh=function(e){return Uh(Ah(e,Bh(e)))},_h=function(e,t){return function(e,t){for(var r=0,n=pt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(Nh(e),t)},Lh=Sr.filter,Dh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("filter",(function(e){var t=Lh(Dh(this),e,arguments.length>1?arguments[1]:void 0);return _h(this,t)}));var Jh=Sr.find,Fh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("find",(function(e){return Jh(Fh(this),e,arguments.length>1?arguments[1]:void 0)}));var Gh=Sr.findIndex,Hh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("findIndex",(function(e){return Gh(Hh(this),e,arguments.length>1?arguments[1]:void 0)}));var Vh=Sr.forEach,Wh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("forEach",(function(e){Vh(Wh(this),e,arguments.length>1?arguments[1]:void 0)}));var $h=gt.includes,Yh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("includes",(function(e){return $h(Yh(this),e,arguments.length>1?arguments[1]:void 0)}));var Kh=gt.indexOf,Qh=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("indexOf",(function(e){return Kh(Qh(this),e,arguments.length>1?arguments[1]:void 0)}));var Xh=le("iterator"),Zh=s.Uint8Array,ep=m(sa.values),tp=m(sa.keys),rp=m(sa.entries),np=xf.aTypedArray,ip=xf.exportTypedArrayMethod,ap=Zh&&Zh.prototype,op=!c((function(){ap[Xh].call([1])})),sp=!!ap&&ap.values&&ap[Xh]===ap.values&&"values"===ap.values.name,cp=function(){return ep(np(this))};ip("entries",(function(){return rp(np(this))}),op),ip("keys",(function(){return tp(np(this))}),op),ip("values",cp,op||!sp,{name:"values"}),ip(Xh,cp,op||!sp,{name:"values"});var dp=xf.aTypedArray,up=xf.exportTypedArrayMethod,fp=m([].join);up("join",(function(e){return fp(dp(this),e)}));var hp=Math.min,pp=[].lastIndexOf,lp=!!pp&&1/[1].lastIndexOf(1,-0)<0,gp=Nn("lastIndexOf"),bp=lp||!gp?function(e){if(lp)return fn(pp,this,arguments)||0;var t=S(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=hp(n,st(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:pp,vp=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return fn(bp,vp(this),t>1?[e,arguments[1]]:[e])}));var Ip=Sr.map,xp=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("map",(function(e){return Ip(xp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Nh(e))(t)}))}));var kp=TypeError,mp=function(e){return function(t,r,n,i){Y(r);var a=ne(t),o=E(a),s=pt(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 kp("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}},wp={left:mp(!1),right:mp(!0)},yp=wp.left,Cp=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return yp(Cp(this),e,t,t>1?arguments[1]:void 0)}));var zp=wp.right,Op=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return zp(Op(this),e,t,t>1?arguments[1]:void 0)}));var Ep=xf.aTypedArray,qp=xf.exportTypedArrayMethod,Pp=Math.floor;qp("reverse",(function(){for(var e,t=Ep(this).length,r=Pp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Sp=s.RangeError,jp=s.Int8Array,Tp=jp&&jp.prototype,Mp=Tp&&Tp.set,Rp=xf.aTypedArray,Ap=xf.exportTypedArrayMethod,Up=!c((function(){var e=new Uint8ClampedArray(2);return h(Mp,e,{length:1,0:3},1),3!==e[1]})),Bp=Up&&xf.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new jp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Ap("set",(function(e){Rp(this);var t=xh(arguments.length>1?arguments[1]:void 0,1),r=ne(e);if(Up)return h(Mp,this,r,t);var n=this.length,i=pt(r),a=0;if(i+t>n)throw Sp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Up||Bp);var Np=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("slice",(function(e,t){for(var r=hn(Np(this),e,t),n=Nh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),c((function(){new Int8Array(1).slice()})));var _p=Sr.some,Lp=xf.aTypedArray;(0,xf.exportTypedArrayMethod)("some",(function(e){return _p(Lp(this),e,arguments.length>1?arguments[1]:void 0)}));var Dp=xf.aTypedArray,Jp=xf.exportTypedArrayMethod,Fp=s.Uint16Array,Gp=Fp&&m(Fp.prototype.sort),Hp=!(!Gp||c((function(){Gp(new Fp(2),null)}))&&c((function(){Gp(new Fp(2),{})}))),Vp=!!Gp&&!c((function(){if(D)return D<74;if(Pu)return Pu<67;if(Su)return!0;if(Tu)return Tu<602;var e,t,r=new Fp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(Gp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Jp("sort",(function(e){return void 0!==e&&Y(e),Vp?Gp(this,e):Ba(Dp(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))}),!Vp||Hp);var Wp=s.Int8Array,$p=xf.aTypedArray,Yp=xf.exportTypedArrayMethod,Kp=[].toLocaleString,Qp=!!Wp&&c((function(){Kp.call(new Wp(1))}));Yp("toLocaleString",(function(){return fn(Kp,Qp?hn($p(this)):$p(this),hn(arguments))}),c((function(){return[1,2].toLocaleString()!=new Wp([1,2]).toLocaleString()}))||!c((function(){Wp.prototype.toLocaleString.call([1,2])})));var Xp=xf.exportTypedArrayMethod,Zp=s.Uint8Array,el=Zp&&Zp.prototype||{},tl=[].toString,rl=m([].join);c((function(){tl.call({})}))&&(tl=function(){return rl(this)});var nl=el.toString!=tl;Xp("toString",tl,nl);var il,al,ol,sl,cl="process"==C(s.process),dl=/(?:ipad|iphone|ipod).*applewebkit/i.test(U),ul=s.setImmediate,fl=s.clearImmediate,hl=s.process,pl=s.Dispatch,ll=s.Function,gl=s.MessageChannel,bl=s.String,vl=0,Il={};try{il=s.location}catch(e){}var xl=function(e){if(ae(Il,e)){var t=Il[e];delete Il[e],t()}},kl=function(e){return function(){xl(e)}},ml=function(e){xl(e.data)},wl=function(e){s.postMessage(bl(e),il.protocol+"//"+il.host)};ul&&fl||(ul=function(e){Ta(arguments.length,1);var t=j(e)?e:ll(e),r=hn(arguments,1);return Il[++vl]=function(){fn(t,void 0,r)},al(vl),vl},fl=function(e){delete Il[e]},cl?al=function(e){hl.nextTick(kl(e))}:pl&&pl.now?al=function(e){pl.now(kl(e))}:gl&&!dl?(sl=(ol=new gl).port2,ol.port1.onmessage=ml,al=lr(sl.postMessage,sl)):s.addEventListener&&j(s.postMessage)&&!s.importScripts&&il&&"file:"!==il.protocol&&!c(wl)?(al=wl,s.addEventListener("message",ml,!1)):al="onreadystatechange"in me("script")?function(e){Wt.appendChild(me("script")).onreadystatechange=function(){Wt.removeChild(this),xl(e)}}:function(e){setTimeout(kl(e),0)});var yl,Cl,zl,Ol,El,ql,Pl,Sl,jl={set:ul,clear:fl},Tl=/ipad|iphone|ipod/i.test(U)&&void 0!==s.Pebble,Ml=/web0s(?!.*chrome)/i.test(U),Rl=Ce.f,Al=jl.set,Ul=s.MutationObserver||s.WebKitMutationObserver,Bl=s.document,Nl=s.process,_l=s.Promise,Ll=Rl(s,"queueMicrotask"),Dl=Ll&&Ll.value;Dl||(yl=function(){var e,t;for(cl&&(e=Nl.domain)&&e.exit();Cl;){t=Cl.fn,Cl=Cl.next;try{t()}catch(e){throw Cl?Ol():zl=void 0,e}}zl=void 0,e&&e.enter()},dl||cl||Ml||!Ul||!Bl?!Tl&&_l&&_l.resolve?((Pl=_l.resolve(void 0)).constructor=_l,Sl=lr(Pl.then,Pl),Ol=function(){Sl(yl)}):cl?Ol=function(){Nl.nextTick(yl)}:(Al=lr(Al,s),Ol=function(){Al(yl)}):(El=!0,ql=Bl.createTextNode(""),new Ul(yl).observe(ql,{characterData:!0}),Ol=function(){ql.data=El=!El}));var Jl=Dl||function(e){var t={fn:e,next:void 0};zl&&(zl.next=t),Cl||(Cl=t,Ol()),zl=t},Fl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Gl=function(){this.head=null,this.tail=null};Gl.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 Hl=Gl,Vl=s.Promise,Wl="object"==typeof window&&"object"!=typeof Deno;Vl&&Vl.prototype;var $l,Yl,Kl,Ql=le("species"),Xl=!1,Zl=j(s.PromiseRejectionEvent),eg={CONSTRUCTOR:Tt("Promise",(function(){var e=Je(Vl),t=e!==String(Vl);if(!t&&66===D)return!0;if(D>=51&&/native code/.test(e))return!1;var r=new Vl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Ql]=n,!(Xl=r.then((function(){}))instanceof n)||!t&&Wl&&!Zl})),REJECTION_EVENT:Zl,SUBCLASSING:Xl},tg=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=Y(t),this.reject=Y(r)},rg={f:function(e){return new tg(e)}},ng=jl.set,ig=eg.CONSTRUCTOR,ag=eg.REJECTION_EVENT,og=eg.SUBCLASSING,sg=tt.getterFor("Promise"),cg=tt.set,dg=Vl&&Vl.prototype,ug=Vl,fg=dg,hg=s.TypeError,pg=s.document,lg=s.process,gg=rg.f,bg=gg,vg=!!(pg&&pg.createEvent&&s.dispatchEvent),Ig=function(e){var t;return!(!T(e)||!j(t=e.then))&&t},xg=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&&Cg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(hg("Promise-chain cycle")):(n=Ig(r))?h(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},kg=function(e,t){e.notified||(e.notified=!0,Jl((function(){for(var r,n=e.reactions;r=n.get();)xg(r,e);e.notified=!1,t&&!e.rejection&&wg(e)})))},mg=function(e,t,r){var n,i;vg?((n=pg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!ag&&(i=s["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=s.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},wg=function(e){h(ng,s,(function(){var t,r=e.facade,n=e.value;if(yg(e)&&(t=Fl((function(){cl?lg.emit("unhandledRejection",n,r):mg("unhandledrejection",r,n)})),e.rejection=cl||yg(e)?2:1,t.error))throw t.value}))},yg=function(e){return 1!==e.rejection&&!e.parent},Cg=function(e){h(ng,s,(function(){var t=e.facade;cl?lg.emit("rejectionHandled",t):mg("rejectionhandled",t,e.value)}))},zg=function(e,t,r){return function(n){e(t,n,r)}},Og=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,kg(e,!0))},Eg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw hg("Promise can't be resolved itself");var n=Ig(t);n?Jl((function(){var r={done:!1};try{h(n,t,zg(Eg,r,e),zg(Og,r,e))}catch(t){Og(r,t,e)}})):(e.value=t,e.state=1,kg(e,!1))}catch(t){Og({done:!1},t,e)}}};if(ig&&(fg=(ug=function(e){Oa(this,fg),Y(e),h($l,this);var t=sg(this);try{e(zg(Eg,t),zg(Og,t))}catch(e){Og(t,e)}}).prototype,($l=function(e){cg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Hl,rejection:!1,state:0,value:void 0})}).prototype=nt(fg,"then",(function(e,t){var r=sg(this),n=gg(Ah(this,ug));return r.parent=!0,n.ok=!j(e)||e,n.fail=j(t)&&t,n.domain=cl?lg.domain:void 0,0==r.state?r.reactions.add(n):Jl((function(){xg(n,r)})),n.promise})),Yl=function(){var e=new $l,t=sg(e);this.promise=e,this.resolve=zg(Eg,t),this.reject=zg(Og,t)},rg.f=gg=function(e){return e===ug||void 0===e?new Yl(e):bg(e)},j(Vl)&&dg!==Object.prototype)){Kl=dg.then,og||nt(dg,"then",(function(e,t){var r=this;return new ug((function(e,t){h(Kl,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete dg.constructor}catch(e){}Ki&&Ki(dg,fg)}Rt({global:!0,constructor:!0,wrap:!0,forced:ig},{Promise:ug}),hr(ug,"Promise",!1),yh("Promise");var qg=TypeError,Pg=function(e,t){this.stopped=e,this.result=t},Sg=Pg.prototype,jg=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=lr(t,u),v=function(e){return n&&cc(n,"normal",e),new Pg(!0,e)},I=function(e){return f?(qe(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=qa(e)))throw qg(W(e)+" is not iterable");if(hc(i)){for(a=0,o=pt(e);o>a;a++)if((s=I(e[a]))&&A(Sg,s))return s;return new Pg(!1)}n=Sa(e,i)}for(c=p?e.next:n.next;!(d=h(c,n)).done;){try{s=I(d.value)}catch(e){cc(n,"throw",e)}if("object"==typeof s&&s&&A(Sg,s))return s}return new Pg(!1)},Tg=eg.CONSTRUCTOR||!Qu((function(e){Vl.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:Tg},{all:function(e){var t=this,r=rg.f(t),n=r.resolve,i=r.reject,a=Fl((function(){var r=Y(t.resolve),a=[],o=0,s=1;jg(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 Mg=eg.CONSTRUCTOR,Rg=Vl&&Vl.prototype;if(Rt({target:"Promise",proto:!0,forced:Mg,real:!0},{catch:function(e){return this.then(void 0,e)}}),j(Vl)){var Ag=R("Promise").prototype.catch;Rg.catch!==Ag&&nt(Rg,"catch",Ag,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:Tg},{race:function(e){var t=this,r=rg.f(t),n=r.reject,i=Fl((function(){var i=Y(t.resolve);jg(e,(function(e){h(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:eg.CONSTRUCTOR},{reject:function(e){var t=rg.f(this);return h(t.reject,void 0,e),t.promise}});var Ug=eg.CONSTRUCTOR;function Bg(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 Ng(e){return function(e){if(Array.isArray(e))return Bg(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 Bg(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)?Bg(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 _g(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 Lg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_g(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:Ug},{resolve:function(e){return function(e,t){if(qe(e),T(t)&&t.constructor===e)return t;var r=rg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return jg(e,(function(e,r){er(t,e,r)}),{AS_ENTRIES:!0}),t}});var Dg=So?btoa:function(e){return Buffer.from(e).toString("base64")},Jg=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}},Fg=function(){return t.nanoid(128)},Gg=function(){var e=Xn(qi.mark((function e(t){var r,n,i,a,o,s,c;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!So||!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,Ng(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 Hg(e,t,r){return Vg.apply(this,arguments)}function Vg(){return(Vg=Xn(qi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gg(r);case 2:return a=e.sent,(o=new bu(t.clientConfig)).clientConfig.fetchOptions=Lg(Lg({},t.clientConfig.fetchOptions),{},{redirect:So?"follow":"manual"}),s={parameters:Lg(Lg({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),f=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||f.error)){e.next=14;break}throw new hs(c);case 14:return e.abrupt("return",Lg({url:d},Jg(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wg(){return(Wg=Xn(qi.mark((function e(t,r){var n,i,a;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Fg(),e.next=3,Hg(t,n,Lg({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 $g(){return($g=Xn(qi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f,h,p,l,g;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Fg(),e.next=3,Gg(a);case 3:return o=e.sent,(s=new bu(t.clientConfig)).clientConfig.fetchOptions=Lg(Lg({},t.clientConfig.fetchOptions),{},{redirect:So?"follow":"manual"}),c="Basic ".concat(Dg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:Lg({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,f=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=new URL(f),p=Object.fromEntries(h.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new hs(u);case 16:return l=Jg(f),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},e.abrupt("return",t.getAccessToken({body:g}));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Yg=Object.freeze({__proto__:null,isBrowser:So,isNode:jo,globalObject:To,hasFetchAvailable:Mo,fetch:Ro,stringToBase64:Dg,getCodeAndUsidFromUrl:Jg,createCodeVerifier:Fg,generateCodeChallenge:Gg,authorize:Hg,loginGuestUser:function(e,t){return Wg.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return $g.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};return e.getAccessToken({body:r})},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}})}});e.ClientConfig=qo,e.ShopperBaskets=Xd,e.ShopperContexts=tu,e.ShopperCustomers=iu,e.ShopperDiscoverySearch=su,e.ShopperExperience=uu,e.ShopperGiftCertificates=pu,e.ShopperLogin=bu,e.ShopperOrders=xu,e.ShopperProducts=wu,e.ShopperPromotions=zu,e.ShopperSearch=Ju,e.TemplateURL=$d,e.helpers=Yg,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid")):"function"==typeof define&&define.amd?define(["exports","nanoid"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid)}(this,(function(e,t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(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 i,a,o=function(e){return e&&e.Math==Math&&e},s=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r&&r)||function(){return this}()||Function("return this")(),c=function(e){try{return!!e()}catch(e){return!0}},d=!c((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),u=!c((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),f=Function.prototype.call,h=u?f.bind(f):function(){return f.apply(f,arguments)},p={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,g={f:l&&!p.call({1:2},1)?function(e){var t=l(this,e);return!!t&&t.enumerable}:p},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},v=Function.prototype,I=v.bind,k=v.call,x=u&&I.bind(k,k),m=u?function(e){return e&&x(e)}:function(e){return e&&function(){return k.apply(e,arguments)}},w=m({}.toString),y=m("".slice),C=function(e){return y(w(e),8,-1)},z=Object,O=m("".split),E=c((function(){return!z("z").propertyIsEnumerable(0)}))?function(e){return"String"==C(e)?O(e,""):z(e)}:z,q=TypeError,P=function(e){if(null==e)throw q("Can't call method on "+e);return e},S=function(e){return E(P(e))},j=function(e){return"function"==typeof e},T=function(e){return"object"==typeof e?null!==e:j(e)},M=function(e){return j(e)?e:void 0},R=function(e,t){return arguments.length<2?M(s[e]):s[e]&&s[e][t]},A=m({}.isPrototypeOf),U=R("navigator","userAgent")||"",B=s.process,N=s.Deno,_=B&&B.versions||N&&N.version,L=_&&_.v8;L&&(a=(i=L.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!a&&U&&(!(i=U.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=U.match(/Chrome\/(\d+)/))&&(a=+i[1]);var D=a,J=!!Object.getOwnPropertySymbols&&!c((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&D&&D<41})),F=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,G=Object,H=F?function(e){return"symbol"==typeof e}:function(e){var t=R("Symbol");return j(t)&&A(t.prototype,G(e))},V=String,W=function(e){try{return V(e)}catch(e){return"Object"}},$=TypeError,Y=function(e){if(j(e))return e;throw $(W(e)+" is not a function")},K=function(e,t){var r=e[t];return null==r?void 0:Y(r)},Q=TypeError,X=Object.defineProperty,Z=function(e,t){try{X(s,e,{value:t,configurable:!0,writable:!0})}catch(r){s[e]=t}return t},ee=s["__core-js_shared__"]||Z("__core-js_shared__",{}),te=n((function(e){(e.exports=function(e,t){return ee[e]||(ee[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"})})),re=Object,ne=function(e){return re(P(e))},ie=m({}.hasOwnProperty),ae=Object.hasOwn||function(e,t){return ie(ne(e),t)},oe=0,se=Math.random(),ce=m(1..toString),de=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ce(++oe+se,36)},ue=te("wks"),fe=s.Symbol,he=fe&&fe.for,pe=F?fe:fe&&fe.withoutSetter||de,le=function(e){if(!ae(ue,e)||!J&&"string"!=typeof ue[e]){var t="Symbol."+e;J&&ae(fe,e)?ue[e]=fe[e]:ue[e]=F&&he?he(t):pe(t)}return ue[e]},ge=TypeError,be=le("toPrimitive"),ve=function(e,t){if(!T(e)||H(e))return e;var r,n=K(e,be);if(n){if(void 0===t&&(t="default"),r=h(n,e,t),!T(r)||H(r))return r;throw ge("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)&&!T(n=h(r,e)))return n;if(j(r=e.valueOf)&&!T(n=h(r,e)))return n;if("string"!==t&&j(r=e.toString)&&!T(n=h(r,e)))return n;throw Q("Can't convert object to primitive value")}(e,t)},Ie=function(e){var t=ve(e,"string");return H(t)?t:t+""},ke=s.document,xe=T(ke)&&T(ke.createElement),me=function(e){return xe?ke.createElement(e):{}},we=!d&&!c((function(){return 7!=Object.defineProperty(me("div"),"a",{get:function(){return 7}}).a})),ye=Object.getOwnPropertyDescriptor,Ce={f:d?ye:function(e,t){if(e=S(e),t=Ie(t),we)try{return ye(e,t)}catch(e){}if(ae(e,t))return b(!h(g.f,e,t),e[t])}},ze=d&&c((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Oe=String,Ee=TypeError,qe=function(e){if(T(e))return e;throw Ee(Oe(e)+" is not an object")},Pe=TypeError,Se=Object.defineProperty,je=Object.getOwnPropertyDescriptor,Te={f:d?ze?function(e,t,r){if(qe(e),t=Ie(t),qe(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 Se(e,t,r)}:Se:function(e,t,r){if(qe(e),t=Ie(t),qe(r),we)try{return Se(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Pe("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Me=d?function(e,t,r){return Te.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Re=Function.prototype,Ae=d&&Object.getOwnPropertyDescriptor,Ue=ae(Re,"name"),Be={EXISTS:Ue,PROPER:Ue&&"something"===function(){}.name,CONFIGURABLE:Ue&&(!d||d&&Ae(Re,"name").configurable)},Ne=m(Function.toString);j(ee.inspectSource)||(ee.inspectSource=function(e){return Ne(e)});var _e,Le,De,Je=ee.inspectSource,Fe=s.WeakMap,Ge=j(Fe)&&/native code/.test(Je(Fe)),He=te("keys"),Ve=function(e){return He[e]||(He[e]=de(e))},We={},$e=s.TypeError,Ye=s.WeakMap;if(Ge||ee.state){var Ke=ee.state||(ee.state=new Ye),Qe=m(Ke.get),Xe=m(Ke.has),Ze=m(Ke.set);_e=function(e,t){if(Xe(Ke,e))throw new $e("Object already initialized");return t.facade=e,Ze(Ke,e,t),t},Le=function(e){return Qe(Ke,e)||{}},De=function(e){return Xe(Ke,e)}}else{var et=Ve("state");We[et]=!0,_e=function(e,t){if(ae(e,et))throw new $e("Object already initialized");return t.facade=e,Me(e,et,t),t},Le=function(e){return ae(e,et)?e[et]:{}},De=function(e){return ae(e,et)}}var tt={set:_e,get:Le,has:De,enforce:function(e){return De(e)?Le(e):_e(e,{})},getterFor:function(e){return function(t){var r;if(!T(t)||(r=Le(t)).type!==e)throw $e("Incompatible receiver, "+e+" required");return r}}},rt=n((function(e){var t=Be.CONFIGURABLE,r=tt.enforce,n=tt.get,i=Object.defineProperty,a=d&&!c((function(){return 8!==i((function(){}),"length",{value:8}).length})),o=String(String).split("String"),s=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)&&(d?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&ae(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&ae(s,"constructor")&&s.constructor?d&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var c=r(e);return ae(c,"source")||(c.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return j(this)&&n(this).source||Je(this)}),"toString")})),nt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(j(r)&&rt(r,a,n),n.global)i?e[t]=r:Z(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Te.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},it=Math.ceil,at=Math.floor,ot=Math.trunc||function(e){var t=+e;return(t>0?at:it)(t)},st=function(e){var t=+e;return t!=t||0===t?0:ot(t)},ct=Math.max,dt=Math.min,ut=function(e,t){var r=st(e);return r<0?ct(r+t,0):dt(r,t)},ft=Math.min,ht=function(e){return e>0?ft(st(e),9007199254740991):0},pt=function(e){return ht(e.length)},lt=function(e){return function(t,r,n){var i,a=S(t),o=pt(a),s=ut(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}},gt={includes:lt(!0),indexOf:lt(!1)},bt=gt.indexOf,vt=m([].push),It=function(e,t){var r,n=S(e),i=0,a=[];for(r in n)!ae(We,r)&&ae(n,r)&&vt(a,r);for(;t.length>i;)ae(n,r=t[i++])&&(~bt(a,r)||vt(a,r));return a},kt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],xt=kt.concat("length","prototype"),mt={f:Object.getOwnPropertyNames||function(e){return It(e,xt)}},wt={f:Object.getOwnPropertySymbols},yt=m([].concat),Ct=R("Reflect","ownKeys")||function(e){var t=mt.f(qe(e)),r=wt.f;return r?yt(t,r(e)):t},zt=function(e,t,r){for(var n=Ct(t),i=Te.f,a=Ce.f,o=0;o<n.length;o++){var s=n[o];ae(e,s)||r&&ae(r,s)||i(e,s,a(t,s))}},Ot=/#|\.prototype\./,Et=function(e,t){var r=Pt[qt(e)];return r==jt||r!=St&&(j(t)?c(t):!!t)},qt=Et.normalize=function(e){return String(e).replace(Ot,".").toLowerCase()},Pt=Et.data={},St=Et.NATIVE="N",jt=Et.POLYFILL="P",Tt=Et,Mt=Ce.f,Rt=function(e,t){var r,n,i,a,o,c=e.target,d=e.global,u=e.stat;if(r=d?s:u?s[c]||Z(c,{}):(s[c]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Mt(r,n))&&o.value:r[n],!Tt(d?n:c+(u?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;zt(a,i)}(e.sham||i&&i.sham)&&Me(a,"sham",!0),nt(r,n,a,e)}},At=Object.keys||function(e){return It(e,kt)},Ut=c((function(){At(1)}));Rt({target:"Object",stat:!0,forced:Ut},{keys:function(e){return At(ne(e))}});var Bt={};Bt[le("toStringTag")]="z";var Nt,_t="[object z]"===String(Bt),Lt=le("toStringTag"),Dt=Object,Jt="Arguments"==C(function(){return arguments}()),Ft=_t?C: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=Dt(e),Lt))?r:Jt?C(t):"Object"==(n=C(t))&&j(t.callee)?"Arguments":n},Gt=String,Ht=function(e){if("Symbol"===Ft(e))throw TypeError("Cannot convert a Symbol value to a string");return Gt(e)},Vt={f:d&&!ze?Object.defineProperties:function(e,t){qe(e);for(var r,n=S(t),i=At(t),a=i.length,o=0;a>o;)Te.f(e,r=i[o++],n[r]);return e}},Wt=R("document","documentElement"),$t=Ve("IE_PROTO"),Yt=function(){},Kt=function(e){return"<script>"+e+"<\/script>"},Qt=function(e){e.write(Kt("")),e.close();var t=e.parentWindow.Object;return e=null,t},Xt=function(){try{Nt=new ActiveXObject("htmlfile")}catch(e){}var e,t;Xt="undefined"!=typeof document?document.domain&&Nt?Qt(Nt):((t=me("iframe")).style.display="none",Wt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Kt("document.F=Object")),e.close(),e.F):Qt(Nt);for(var r=kt.length;r--;)delete Xt.prototype[kt[r]];return Xt()};We[$t]=!0;var Zt=Object.create||function(e,t){var r;return null!==e?(Yt.prototype=qe(e),r=new Yt,Yt.prototype=null,r[$t]=e):r=Xt(),void 0===t?r:Vt.f(r,t)},er=function(e,t,r){var n=Ie(t);n in e?Te.f(e,n,b(0,r)):e[n]=r},tr=Array,rr=Math.max,nr=function(e,t,r){for(var n=pt(e),i=ut(t,n),a=ut(void 0===r?n:r,n),o=tr(rr(a-i,0)),s=0;i<a;i++,s++)er(o,s,e[i]);return o.length=s,o},ir=mt.f,ar="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],or={f:function(e){return ar&&"Window"==C(e)?function(e){try{return ir(e)}catch(e){return nr(ar)}}(e):ir(S(e))}},sr={f:le},cr=s,dr=Te.f,ur=Te.f,fr=le("toStringTag"),hr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!ae(e,fr)&&ur(e,fr,{configurable:!0,value:t})},pr=m(m.bind),lr=function(e,t){return Y(e),void 0===t?e:u?pr(e,t):function(){return e.apply(t,arguments)}},gr=Array.isArray||function(e){return"Array"==C(e)},br=function(){},vr=[],Ir=R("Reflect","construct"),kr=/^\s*(?:class|function)\b/,xr=m(kr.exec),mr=!kr.exec(br),wr=function(e){if(!j(e))return!1;try{return Ir(br,vr,e),!0}catch(e){return!1}},yr=function(e){if(!j(e))return!1;switch(Ft(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mr||!!xr(kr,Je(e))}catch(e){return!0}};yr.sham=!0;var Cr=!Ir||c((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?yr:wr,zr=le("species"),Or=Array,Er=function(e,t){return new(function(e){var t;return gr(e)&&(t=e.constructor,(Cr(t)&&(t===Or||gr(t.prototype))||T(t)&&null===(t=t[zr]))&&(t=void 0)),void 0===t?Or:t}(e))(0===t?0:t)},qr=m([].push),Pr=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,f){for(var h,p,l=ne(c),g=E(l),b=lr(d,u),v=pt(g),I=0,k=f||Er,x=t?k(c,v):r||o?k(c,0):void 0;v>I;I++)if((s||I in g)&&(p=b(h=g[I],I,l),e))if(t)x[I]=p;else if(p)switch(e){case 3:return!0;case 5:return h;case 6:return I;case 2:qr(x,h)}else switch(e){case 4:return!1;case 7:qr(x,h)}return a?-1:n||i?i:x}},Sr={forEach:Pr(0),map:Pr(1),filter:Pr(2),some:Pr(3),every:Pr(4),find:Pr(5),findIndex:Pr(6),filterReject:Pr(7)},jr=Sr.forEach,Tr=Ve("hidden"),Mr=tt.set,Rr=tt.getterFor("Symbol"),Ar=Object.prototype,Ur=s.Symbol,Br=Ur&&Ur.prototype,Nr=s.TypeError,_r=s.QObject,Lr=Ce.f,Dr=Te.f,Jr=or.f,Fr=g.f,Gr=m([].push),Hr=te("symbols"),Vr=te("op-symbols"),Wr=te("wks"),$r=!_r||!_r.prototype||!_r.prototype.findChild,Yr=d&&c((function(){return 7!=Zt(Dr({},"a",{get:function(){return Dr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Lr(Ar,t);n&&delete Ar[t],Dr(e,t,r),n&&e!==Ar&&Dr(Ar,t,n)}:Dr,Kr=function(e,t){var r=Hr[e]=Zt(Br);return Mr(r,{type:"Symbol",tag:e,description:t}),d||(r.description=t),r},Qr=function(e,t,r){e===Ar&&Qr(Vr,t,r),qe(e);var n=Ie(t);return qe(r),ae(Hr,n)?(r.enumerable?(ae(e,Tr)&&e[Tr][n]&&(e[Tr][n]=!1),r=Zt(r,{enumerable:b(0,!1)})):(ae(e,Tr)||Dr(e,Tr,b(1,{})),e[Tr][n]=!0),Yr(e,n,r)):Dr(e,n,r)},Xr=function(e,t){qe(e);var r=S(t),n=At(r).concat(rn(r));return jr(n,(function(t){d&&!h(Zr,r,t)||Qr(e,t,r[t])})),e},Zr=function(e){var t=Ie(e),r=h(Fr,this,t);return!(this===Ar&&ae(Hr,t)&&!ae(Vr,t))&&(!(r||!ae(this,t)||!ae(Hr,t)||ae(this,Tr)&&this[Tr][t])||r)},en=function(e,t){var r=S(e),n=Ie(t);if(r!==Ar||!ae(Hr,n)||ae(Vr,n)){var i=Lr(r,n);return!i||!ae(Hr,n)||ae(r,Tr)&&r[Tr][n]||(i.enumerable=!0),i}},tn=function(e){var t=Jr(S(e)),r=[];return jr(t,(function(e){ae(Hr,e)||ae(We,e)||Gr(r,e)})),r},rn=function(e){var t=e===Ar,r=Jr(t?Vr:S(e)),n=[];return jr(r,(function(e){!ae(Hr,e)||t&&!ae(Ar,e)||Gr(n,Hr[e])})),n};J||(Br=(Ur=function(){if(A(Br,this))throw Nr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Ht(arguments[0]):void 0,t=de(e),r=function(e){this===Ar&&h(r,Vr,e),ae(this,Tr)&&ae(this[Tr],t)&&(this[Tr][t]=!1),Yr(this,t,b(1,e))};return d&&$r&&Yr(Ar,t,{configurable:!0,set:r}),Kr(t,e)}).prototype,nt(Br,"toString",(function(){return Rr(this).tag})),nt(Ur,"withoutSetter",(function(e){return Kr(de(e),e)})),g.f=Zr,Te.f=Qr,Vt.f=Xr,Ce.f=en,mt.f=or.f=tn,wt.f=rn,sr.f=function(e){return Kr(le(e),e)},d&&(Dr(Br,"description",{configurable:!0,get:function(){return Rr(this).description}}),nt(Ar,"propertyIsEnumerable",Zr,{unsafe:!0}))),Rt({global:!0,constructor:!0,wrap:!0,forced:!J,sham:!J},{Symbol:Ur}),jr(At(Wr),(function(e){!function(e){var t=cr.Symbol||(cr.Symbol={});ae(t,e)||dr(t,e,{value:sr.f(e)})}(e)})),Rt({target:"Symbol",stat:!0,forced:!J},{useSetter:function(){$r=!0},useSimple:function(){$r=!1}}),Rt({target:"Object",stat:!0,forced:!J,sham:!d},{create:function(e,t){return void 0===t?Zt(e):Xr(Zt(e),t)},defineProperty:Qr,defineProperties:Xr,getOwnPropertyDescriptor:en}),Rt({target:"Object",stat:!0,forced:!J},{getOwnPropertyNames:tn}),function(){var e=R("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=le("toPrimitive");t&&!t[n]&&nt(t,n,(function(e){return h(r,this)}),{arity:1})}(),hr(Ur,"Symbol"),We[Tr]=!0;var nn=J&&!!Symbol.for&&!!Symbol.keyFor,an=te("string-to-symbol-registry"),on=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{for:function(e){var t=Ht(e);if(ae(an,t))return an[t];var r=R("Symbol")(t);return an[t]=r,on[r]=t,r}});var sn=te("symbol-to-string-registry");Rt({target:"Symbol",stat:!0,forced:!nn},{keyFor:function(e){if(!H(e))throw TypeError(W(e)+" is not a symbol");if(ae(sn,e))return sn[e]}});var cn=Function.prototype,dn=cn.apply,un=cn.call,fn="object"==typeof Reflect&&Reflect.apply||(u?un.bind(dn):function(){return un.apply(dn,arguments)}),hn=m([].slice),pn=R("JSON","stringify"),ln=m(/./.exec),gn=m("".charAt),bn=m("".charCodeAt),vn=m("".replace),In=m(1..toString),kn=/[\uD800-\uDFFF]/g,xn=/^[\uD800-\uDBFF]$/,mn=/^[\uDC00-\uDFFF]$/,wn=!J||c((function(){var e=R("Symbol")();return"[null]"!=pn([e])||"{}"!=pn({a:e})||"{}"!=pn(Object(e))})),yn=c((function(){return'"\\udf06\\ud834"'!==pn("\udf06\ud834")||'"\\udead"'!==pn("\udead")})),Cn=function(e,t){var r=hn(arguments),n=t;if((T(t)||void 0!==e)&&!H(e))return gr(t)||(t=function(e,t){if(j(n)&&(t=h(n,this,e,t)),!H(t))return t}),r[1]=t,fn(pn,null,r)},zn=function(e,t,r){var n=gn(r,t-1),i=gn(r,t+1);return ln(xn,e)&&!ln(mn,i)||ln(mn,e)&&!ln(xn,n)?"\\u"+In(bn(e,0),16):e};pn&&Rt({target:"JSON",stat:!0,arity:3,forced:wn||yn},{stringify:function(e,t,r){var n=hn(arguments),i=fn(wn?Cn:pn,null,n);return yn&&"string"==typeof i?vn(i,kn,zn):i}});var On=!J||c((function(){wt.f(1)}));Rt({target:"Object",stat:!0,forced:On},{getOwnPropertySymbols:function(e){var t=wt.f;return t?t(ne(e)):[]}});var En=le("species"),qn=function(e){return D>=51||!c((function(){var t=[];return(t.constructor={})[En]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Pn=Sr.filter,Sn=qn("filter");Rt({target:"Array",proto:!0,forced:!Sn},{filter:function(e){return Pn(this,e,arguments.length>1?arguments[1]:void 0)}});var jn=_t?{}.toString:function(){return"[object "+Ft(this)+"]"};_t||nt(Object.prototype,"toString",jn,{unsafe:!0});var Tn=Ce.f,Mn=c((function(){Tn(1)}));Rt({target:"Object",stat:!0,forced:!d||Mn,sham:!d},{getOwnPropertyDescriptor:function(e,t){return Tn(S(e),t)}});var Rn={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},An=me("span").classList,Un=An&&An.constructor&&An.constructor.prototype,Bn=Un===Object.prototype?void 0:Un,Nn=function(e,t){var r=[][e];return!!r&&c((function(){r.call(null,t||function(){return 1},1)}))},_n=Sr.forEach,Ln=Nn("forEach")?[].forEach:function(e){return _n(this,e,arguments.length>1?arguments[1]:void 0)},Dn=function(e){if(e&&e.forEach!==Ln)try{Me(e,"forEach",Ln)}catch(t){e.forEach=Ln}};for(var Jn in Rn)Rn[Jn]&&Dn(s[Jn]&&s[Jn].prototype);Dn(Bn),Rt({target:"Object",stat:!0,sham:!d},{getOwnPropertyDescriptors:function(e){for(var t,r,n=S(e),i=Ce.f,a=Ct(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&er(o,t,r);return o}});var Fn=Vt.f;Rt({target:"Object",stat:!0,forced:Object.defineProperties!==Fn,sham:!d},{defineProperties:Fn});var Gn=Te.f;Rt({target:"Object",stat:!0,forced:Object.defineProperty!==Gn,sham:!d},{defineProperty:Gn});var Hn=function(){var e=qe(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},Vn=RegExp.prototype,Wn=Be.PROPER,$n=RegExp.prototype.toString,Yn=c((function(){return"/a/b"!=$n.call({source:"a",flags:"b"})})),Kn=Wn&&"toString"!=$n.name;function Qn(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 Xn(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){Qn(a,n,i,o,s,"next",e)}function s(e){Qn(a,n,i,o,s,"throw",e)}o(void 0)}))}}function Zn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ei(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 ti(e,t,r){return t&&ei(e.prototype,t),r&&ei(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ri(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(Yn||Kn)&&nt(RegExp.prototype,"toString",(function(){var e=qe(this);return"/"+Ht(e.source)+"/"+Ht(function(e){var t=e.flags;return void 0!==t||"flags"in Vn||ae(e,"flags")||!A(Vn,e)?t:h(Hn,e)}(e))}),{unsafe:!0});var ni=Object.prototype,ii=ni.hasOwnProperty,ai="function"==typeof Symbol?Symbol:{},oi=ai.iterator||"@@iterator",si=ai.asyncIterator||"@@asyncIterator",ci=ai.toStringTag||"@@toStringTag";function di(e,t,r,n){var i=t&&t.prototype instanceof hi?t:hi,a=Object.create(i.prototype),o=new zi(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 Ei()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=wi(o,r);if(s){if(s===fi)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=ui(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===fi)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 ui(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var fi={};function hi(){}function pi(){}function li(){}var gi={};gi[oi]=function(){return this};var bi=Object.getPrototypeOf,vi=bi&&bi(bi(Oi([])));vi&&vi!==ni&&ii.call(vi,oi)&&(gi=vi);var Ii=li.prototype=hi.prototype=Object.create(gi);function ki(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function xi(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===pi||"GeneratorFunction"===(t.displayName||t.name))}function mi(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=ui(e[n],e,i);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&ii.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 wi(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,wi(e,t),"throw"===t.method))return fi;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return fi}var n=ui(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,fi;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,fi):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,fi)}function yi(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 Ci(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function zi(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(yi,this),this.reset(!0)}function Oi(e){if(e){var t=e[oi];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(ii.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:Ei}}function Ei(){return{value:void 0,done:!0}}pi.prototype=Ii.constructor=li,li.constructor=pi,li[ci]=pi.displayName="GeneratorFunction",ki(mi.prototype),mi.prototype[si]=function(){return this},ki(Ii),Ii[ci]="Generator",Ii[oi]=function(){return this},Ii.toString=function(){return"[object Generator]"},zi.prototype={constructor:zi,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(Ci),!e)for(var t in this)"t"===t.charAt(0)&&ii.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=ii.call(i,"catchLoc"),s=ii.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&&ii.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,fi):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),fi},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),Ci(r),fi}},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;Ci(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Oi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),fi}};var qi={wrap:di,isGeneratorFunction:xi,AsyncIterator:mi,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,li):(e.__proto__=li,ci in e||(e[ci]="GeneratorFunction")),e.prototype=Object.create(Ii),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new mi(di(e,t,r,n),i);return xi(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:Oi},Pi=Te.f,Si=le("unscopables"),ji=Array.prototype;null==ji[Si]&&Pi(ji,Si,{configurable:!0,value:Zt(null)});var Ti,Mi,Ri,Ai=function(e){ji[Si][e]=!0},Ui={},Bi=!c((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ni=Ve("IE_PROTO"),_i=Object,Li=_i.prototype,Di=Bi?_i.getPrototypeOf:function(e){var t=ne(e);if(ae(t,Ni))return t[Ni];var r=t.constructor;return j(r)&&t instanceof r?r.prototype:t instanceof _i?Li:null},Ji=le("iterator"),Fi=!1;[].keys&&("next"in(Ri=[].keys())?(Mi=Di(Di(Ri)))!==Object.prototype&&(Ti=Mi):Fi=!0),(null==Ti||c((function(){var e={};return Ti[Ji].call(e)!==e})))&&(Ti={}),j(Ti[Ji])||nt(Ti,Ji,(function(){return this}));var Gi={IteratorPrototype:Ti,BUGGY_SAFARI_ITERATORS:Fi},Hi=Gi.IteratorPrototype,Vi=function(){return this},Wi=function(e,t,r,n){var i=t+" Iterator";return e.prototype=Zt(Hi,{next:b(+!n,r)}),hr(e,i,!1),Ui[i]=Vi,e},$i=String,Yi=TypeError,Ki=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 qe(r),function(e){if("object"==typeof e||j(e))return e;throw Yi("Can't set "+$i(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),Qi=Be.PROPER,Xi=Be.CONFIGURABLE,Zi=Gi.IteratorPrototype,ea=Gi.BUGGY_SAFARI_ITERATORS,ta=le("iterator"),ra=function(){return this},na=function(e,t,r,n,i,a,o){Wi(r,t,n);var s,c,d,u=function(e){if(e===i&&b)return b;if(!ea&&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[ta]||l["@@iterator"]||i&&l[i],b=!ea&&g||u(i),v="Array"==t&&l.entries||g;if(v&&(s=Di(v.call(new e)))!==Object.prototype&&s.next&&(Di(s)!==Zi&&(Ki?Ki(s,Zi):j(s[ta])||nt(s,ta,ra)),hr(s,f,!0)),Qi&&"values"==i&&g&&"values"!==g.name&&(Xi?Me(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)(ea||p||!(d in l))&&nt(l,d,c[d]);else Rt({target:t,proto:!0,forced:ea||p},c);return l[ta]!==b&&nt(l,ta,b,{name:i}),Ui[t]=b,c},ia=Te.f,aa=tt.set,oa=tt.getterFor("Array Iterator"),sa=na(Array,"Array",(function(e,t){aa(this,{type:"Array Iterator",target:S(e),index:0,kind:t})}),(function(){var e=oa(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"),ca=Ui.Arguments=Ui.Array;if(Ai("keys"),Ai("values"),Ai("entries"),d&&"values"!==ca.name)try{ia(ca,"name",{value:"values"})}catch(e){}var da=m("".charAt),ua=m("".charCodeAt),fa=m("".slice),ha=function(e){return function(t,r){var n,i,a=Ht(P(t)),o=st(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=ua(a,o))<55296||n>56319||o+1===s||(i=ua(a,o+1))<56320||i>57343?e?da(a,o):n:e?fa(a,o,o+2):i-56320+(n-55296<<10)+65536}},pa={codeAt:ha(!1),charAt:ha(!0)},la=pa.charAt,ga=tt.set,ba=tt.getterFor("String Iterator");na(String,"String",(function(e){ga(this,{type:"String Iterator",string:Ht(e),index:0})}),(function(){var e,t=ba(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=la(r,n),t.index+=e.length,{value:e,done:!1})}));var va=le("iterator"),Ia=le("toStringTag"),ka=sa.values,xa=function(e,t){if(e){if(e[va]!==ka)try{Me(e,va,ka)}catch(t){e[va]=ka}if(e[Ia]||Me(e,Ia,t),Rn[t])for(var r in sa)if(e[r]!==sa[r])try{Me(e,r,sa[r])}catch(t){e[r]=sa[r]}}};for(var ma in Rn)xa(s[ma]&&s[ma].prototype,ma);xa(Bn,"DOMTokenList");var wa=le("iterator"),ya=!c((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[wa]||"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})),Ca=function(e,t,r){for(var n in t)nt(e,n,t[n],r);return e},za=TypeError,Oa=function(e,t){if(A(t,e))return e;throw za("Incorrect invocation")},Ea=le("iterator"),qa=function(e){if(null!=e)return K(e,Ea)||K(e,"@@iterator")||Ui[Ft(e)]},Pa=TypeError,Sa=function(e,t){var r=arguments.length<2?qa(e):t;if(Y(r))return qe(h(r,e));throw Pa(W(e)+" is not iterable")},ja=TypeError,Ta=function(e,t){if(e<t)throw ja("Not enough arguments");return e},Ma=Math.floor,Ra=function(e,t){var r=e.length,n=Ma(r/2);return r<8?Aa(e,t):Ua(e,Ra(nr(e,0,n),t),Ra(nr(e,n),t),t)},Aa=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},Ua=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},Ba=Ra,Na=le("iterator"),_a=tt.set,La=tt.getterFor("URLSearchParams"),Da=tt.getterFor("URLSearchParamsIterator"),Ja=Object.getOwnPropertyDescriptor,Fa=function(e){if(!d)return s[e];var t=Ja(s,e);return t&&t.value},Ga=Fa("fetch"),Ha=Fa("Request"),Va=Fa("Headers"),Wa=Ha&&Ha.prototype,$a=Va&&Va.prototype,Ya=s.RegExp,Ka=s.TypeError,Qa=s.decodeURIComponent,Xa=s.encodeURIComponent,Za=m("".charAt),eo=m([].join),to=m([].push),ro=m("".replace),no=m([].shift),io=m([].splice),ao=m("".split),oo=m("".slice),so=/\+/g,co=Array(4),uo=function(e){return co[e-1]||(co[e-1]=Ya("((?:%[\\da-f]{2}){"+e+"})","gi"))},fo=function(e){try{return Qa(e)}catch(t){return e}},ho=function(e){var t=ro(e,so," "),r=4;try{return Qa(t)}catch(e){for(;r;)t=ro(t,uo(r--),fo);return t}},po=/[!'()~]|%20/g,lo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},go=function(e){return lo[e]},bo=function(e){return ro(Xa(e),po,go)},vo=Wi((function(e,t){_a(this,{type:"URLSearchParamsIterator",iterator:Sa(La(e).entries),kind:t})}),"Iterator",(function(){var e=Da(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),Io=function(e){this.entries=[],this.url=null,void 0!==e&&(T(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===Za(e,0)?oo(e,1):e:Ht(e)))};Io.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,c=qa(e);if(c)for(r=(t=Sa(e,c)).next;!(n=h(r,t)).done;){if(a=(i=Sa(qe(n.value))).next,(o=h(a,i)).done||(s=h(a,i)).done||!h(a,i).done)throw Ka("Expected sequence with length 2");to(this.entries,{key:Ht(o.value),value:Ht(s.value)})}else for(var d in e)ae(e,d)&&to(this.entries,{key:d,value:Ht(e[d])})},parseQuery:function(e){if(e)for(var t,r,n=ao(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ao(t,"="),to(this.entries,{key:ho(no(r)),value:ho(eo(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],to(r,bo(e.key)+"="+bo(e.value));return eo(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var ko=function(){Oa(this,xo);var e=arguments.length>0?arguments[0]:void 0;_a(this,new Io(e))},xo=ko.prototype;if(Ca(xo,{append:function(e,t){Ta(arguments.length,2);var r=La(this);to(r.entries,{key:Ht(e),value:Ht(t)}),r.updateURL()},delete:function(e){Ta(arguments.length,1);for(var t=La(this),r=t.entries,n=Ht(e),i=0;i<r.length;)r[i].key===n?io(r,i,1):i++;t.updateURL()},get:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(e),n=[],i=0;i<t.length;i++)t[i].key===r&&to(n,t[i].value);return n},has:function(e){Ta(arguments.length,1);for(var t=La(this).entries,r=Ht(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Ta(arguments.length,1);for(var r,n=La(this),i=n.entries,a=!1,o=Ht(e),s=Ht(t),c=0;c<i.length;c++)(r=i[c]).key===o&&(a?io(i,c--,1):(a=!0,r.value=s));a||to(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=La(this);Ba(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=La(this).entries,n=lr(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 vo(this,"keys")},values:function(){return new vo(this,"values")},entries:function(){return new vo(this,"entries")}},{enumerable:!0}),nt(xo,Na,xo.entries,{name:"entries"}),nt(xo,"toString",(function(){return La(this).serialize()}),{enumerable:!0}),hr(ko,"URLSearchParams"),Rt({global:!0,constructor:!0,forced:!ya},{URLSearchParams:ko}),!ya&&j(Va)){var mo=m($a.has),wo=m($a.set),yo=function(e){if(T(e)){var t,r=e.body;if("URLSearchParams"===Ft(r))return t=e.headers?new Va(e.headers):new Va,mo(t,"content-type")||wo(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Zt(e,{body:b(0,Ht(r)),headers:b(0,t)})}return e};if(j(Ga)&&Rt({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return Ga(e,arguments.length>1?yo(arguments[1]):{})}}),j(Ha)){var Co=function(e){return Oa(this,Wa),new Ha(e,arguments.length>1?yo(arguments[1]):{})};Wa.constructor=Co,Co.prototype=Wa,Rt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Co})}}var zo={URLSearchParams:ko,getState:La};function Oo(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 Eo(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Oo(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Oo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qo=ti((function e(t){if(Zn(this,e),ri(this,"baseUri",void 0),ri(this,"proxy",void 0),ri(this,"headers",void 0),ri(this,"parameters",void 0),ri(this,"fetchOptions",void 0),ri(this,"transformRequest",void 0),ri(this,"throwOnBadResponse",void 0),this.headers=Eo({},t.headers),this.parameters=Eo({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=Eo({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 Po(e){return(Po="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)}ri(qo,"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}}}),Rt({global:!0},{globalThis:s});var So="object"===("undefined"==typeof window?"undefined":Po(window))&&"object"===Po(window.document),jo="object"===("undefined"==typeof process?"undefined":Po(process))&&"object"===Po(process.versions)&&"string"==typeof process.versions.node,To=So?window:globalThis,Mo="function"==typeof To.fetch,Ro=function(){if(jo)return require("node-fetch").default;if(!Mo)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return To.fetch}(),Ao=Function,Uo=m([].concat),Bo=m([].join),No={},_o=function(e,t,r){if(!ae(No,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";No[t]=Ao("C,a","return new C("+Bo(n,",")+")")}return No[t](e,r)},Lo=u?Ao.bind:function(e){var t=Y(this),r=t.prototype,n=hn(arguments,1),i=function(){var r=Uo(n,hn(arguments));return this instanceof i?_o(t,r.length,r):t.apply(e,r)};return T(r)&&(i.prototype=r),i},Do=TypeError,Jo=function(e){if(Cr(e))return e;throw Do(W(e)+" is not a constructor")},Fo=R("Reflect","construct"),Go=Object.prototype,Ho=[].push,Vo=c((function(){function e(){}return!(Fo((function(){}),[],e)instanceof e)})),Wo=!c((function(){Fo((function(){}))})),$o=Vo||Wo;Rt({target:"Reflect",stat:!0,forced:$o,sham:$o},{construct:function(e,t){Jo(e),qe(t);var r=arguments.length<3?e:Jo(arguments[2]);if(Wo&&!Vo)return Fo(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 fn(Ho,n,t),new(fn(Lo,e,n))}var i=r.prototype,a=Zt(T(i)?i:Go),o=fn(e,a,t);return T(o)?o:a}});var Yo=TypeError,Ko=function(e){if(e>9007199254740991)throw Yo("Maximum allowed index exceeded");return e},Qo=le("isConcatSpreadable"),Xo=D>=51||!c((function(){var e=[];return e[Qo]=!1,e.concat()[0]!==e})),Zo=qn("concat"),es=function(e){if(!T(e))return!1;var t=e[Qo];return void 0!==t?!!t:gr(e)};function ts(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rs(e,t){return(rs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ns(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&&rs(e,t)}function is(e,t){if(t&&("object"===Po(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ts(e)}function as(e){return(as=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function os(){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 ss(e,t,r){return(ss=os()?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&&rs(i,r.prototype),i}).apply(null,arguments)}function cs(e){var t="function"==typeof Map?new Map:void 0;return(cs=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 ss(e,arguments,as(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),rs(n,e)})(e)}function ds(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=as(e);if(t){var i=as(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return is(this,r)}}Rt({target:"Array",proto:!0,arity:1,forced:!Xo||!Zo},{concat:function(e){var t,r,n,i,a,o=ne(this),s=Er(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(es(a=-1===t?o:arguments[t]))for(i=pt(a),Ko(c+i),r=0;r<i;r++,c++)r in a&&er(s,c,a[r]);else Ko(c+1),er(s,c++,a);return s.length=c,s}});var us,fs,hs=function(e){ns(r,e);var t=ds(r);function r(e){var n;return Zn(this,r),ri(ts(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return ti(r)}(cs(Error)),ps=s.RegExp,ls=c((function(){var e=ps("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),gs=ls||c((function(){return!ps("a","y").sticky})),bs={BROKEN_CARET:ls||c((function(){var e=ps("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:gs,UNSUPPORTED_Y:ls},vs=s.RegExp,Is=c((function(){var e=vs(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ks=s.RegExp,xs=c((function(){var e=ks("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),ms=tt.get,ws=te("native-string-replace",String.prototype.replace),ys=RegExp.prototype.exec,Cs=ys,zs=m("".charAt),Os=m("".indexOf),Es=m("".replace),qs=m("".slice),Ps=(fs=/b*/g,h(ys,us=/a/,"a"),h(ys,fs,"a"),0!==us.lastIndex||0!==fs.lastIndex),Ss=bs.BROKEN_CARET,js=void 0!==/()??/.exec("")[1];(Ps||js||Ss||Is||xs)&&(Cs=function(e){var t,r,n,i,a,o,s,c=this,d=ms(c),u=Ht(e),f=d.raw;if(f)return f.lastIndex=c.lastIndex,t=h(Cs,f,u),c.lastIndex=f.lastIndex,t;var p=d.groups,l=Ss&&c.sticky,g=h(Hn,c),b=c.source,v=0,I=u;if(l&&(g=Es(g,"y",""),-1===Os(g,"g")&&(g+="g"),I=qs(u,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==zs(u,c.lastIndex-1))&&(b="(?: "+b+")",I=" "+I,v++),r=new RegExp("^(?:"+b+")",g)),js&&(r=new RegExp("^"+b+"$(?!\\s)",g)),Ps&&(n=c.lastIndex),i=h(ys,l?r:c,I),l?i?(i.input=qs(i.input,v),i[0]=qs(i[0],v),i.index=c.lastIndex,c.lastIndex+=i[0].length):c.lastIndex=0:Ps&&i&&(c.lastIndex=c.global?i.index+i[0].length:n),js&&i&&i.length>1&&h(ws,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=Zt(null),a=0;a<p.length;a++)o[(s=p[a])[0]]=i[s[1]];return i});var Ts=Cs;Rt({target:"RegExp",proto:!0,forced:/./.exec!==Ts},{exec:Ts});var Ms=le("species"),Rs=RegExp.prototype,As=function(e,t,r,n){var i=le(e),a=!c((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!c((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Ms]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=m(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=m(e),c=t.exec;return c===Ts||c===Rs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));nt(String.prototype,e,d[0]),nt(Rs,i,d[1])}n&&Me(Rs[i],"sham",!0)},Us=pa.charAt,Bs=function(e,t,r){return t+(r?Us(e,t).length:1)},Ns=Math.floor,_s=m("".charAt),Ls=m("".replace),Ds=m("".slice),Js=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Fs=/\$([$&'`]|\d{1,2})/g,Gs=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,c=Fs;return void 0!==i&&(i=ne(i),c=Js),Ls(a,c,(function(a,c){var d;switch(_s(c,0)){case"$":return"$";case"&":return e;case"`":return Ds(t,0,r);case"'":return Ds(t,o);case"<":d=i[Ds(c,1,-1)];break;default:var u=+c;if(0===u)return a;if(u>s){var f=Ns(u/10);return 0===f?a:f<=s?void 0===n[f-1]?_s(c,1):n[f-1]+_s(c,1):a}d=n[u-1]}return void 0===d?"":d}))},Hs=TypeError,Vs=function(e,t){var r=e.exec;if(j(r)){var n=h(r,e,t);return null!==n&&qe(n),n}if("RegExp"===C(e))return h(Ts,e,t);throw Hs("RegExp#exec called on incompatible receiver")},Ws=le("replace"),$s=Math.max,Ys=Math.min,Ks=m([].concat),Qs=m([].push),Xs=m("".indexOf),Zs=m("".slice),ec="$0"==="a".replace(/./,"$0"),tc=!!/./[Ws]&&""===/./[Ws]("a","$0");As("replace",(function(e,t,r){var n=tc?"$":"$0";return[function(e,r){var n=P(this),i=null==e?void 0:K(e,Ws);return i?h(i,e,n,r):h(t,Ht(n),e,r)},function(e,i){var a=qe(this),o=Ht(e);if("string"==typeof i&&-1===Xs(i,n)&&-1===Xs(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var c=j(i);c||(i=Ht(i));var d=a.global;if(d){var u=a.unicode;a.lastIndex=0}for(var f=[];;){var h=Vs(a,o);if(null===h)break;if(Qs(f,h),!d)break;""===Ht(h[0])&&(a.lastIndex=Bs(o,ht(a.lastIndex),u))}for(var p,l="",g=0,b=0;b<f.length;b++){for(var v=Ht((h=f[b])[0]),I=$s(Ys(st(h.index),o.length),0),k=[],x=1;x<h.length;x++)Qs(k,void 0===(p=h[x])?p:String(p));var m=h.groups;if(c){var w=Ks([v],k,I,o);void 0!==m&&Qs(w,m);var y=Ht(fn(i,void 0,w))}else y=Gs(v,o,I,k,m,i);I>=g&&(l+=Zs(o,g,I)+y,g=I+v.length)}return l+Zs(o,g)}]}),!!c((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!ec||tc);var rc,nc=function(e,t,r){return r.get&&rt(r.get,t,{getter:!0}),r.set&&rt(r.set,t,{setter:!0}),Te.f(e,t,r)},ic=Object.assign,ac=Object.defineProperty,oc=m([].concat),sc=!ic||c((function(){if(d&&1!==ic({b:1},ic(ac({},"a",{enumerable:!0,get:function(){ac(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!=ic({},e)[r]||"abcdefghijklmnopqrst"!=At(ic({},t)).join("")}))?function(e,t){for(var r=ne(e),n=arguments.length,i=1,a=wt.f,o=g.f;n>i;)for(var s,c=E(arguments[i++]),u=a?oc(At(c),a(c)):At(c),f=u.length,p=0;f>p;)s=u[p++],d&&!h(o,c,s)||(r[s]=c[s]);return r}:ic,cc=function(e,t,r){var n,i;qe(e);try{if(!(n=K(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 qe(n),r},dc=function(e,t,r,n){try{return n?t(qe(r)[0],r[1]):t(r)}catch(t){cc(e,"throw",t)}},uc=le("iterator"),fc=Array.prototype,hc=function(e){return void 0!==e&&(Ui.Array===e||fc[uc]===e)},pc=Array,lc=function(e){var t=ne(e),r=Cr(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=lr(i,n>2?arguments[2]:void 0));var o,s,c,d,u,f,p=qa(t),l=0;if(!p||this===pc&&hc(p))for(o=pt(t),s=r?new this(o):pc(o);o>l;l++)f=a?i(t[l],l):t[l],er(s,l,f);else for(u=(d=Sa(t,p)).next,s=r?new this:[];!(c=h(u,d)).done;l++)f=a?dc(d,i,[c.value,l],!0):c.value,er(s,l,f);return s.length=l,s},gc=/[^\0-\u007E]/,bc=/[.\u3002\uFF0E\uFF61]/g,vc="Overflow: input needs wider integers to process",Ic=RangeError,kc=m(bc.exec),xc=Math.floor,mc=String.fromCharCode,wc=m("".charCodeAt),yc=m([].join),Cc=m([].push),zc=m("".replace),Oc=m("".split),Ec=m("".toLowerCase),qc=function(e){return e+22+75*(e<26)},Pc=function(e,t,r){var n=0;for(e=r?xc(e/700):e>>1,e+=xc(e/t);e>455;)e=xc(e/35),n+=36;return xc(n+36*e/(e+38))},Sc=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=wc(e,r++);if(i>=55296&&i<=56319&&r<n){var a=wc(e,r++);56320==(64512&a)?Cc(t,((1023&i)<<10)+(1023&a)+65536):(Cc(t,i),r--)}else Cc(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Cc(n,mc(r));var c=n.length,d=c;for(c&&Cc(n,"-");d<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var f=d+1;if(u-a>xc((2147483647-o)/f))throw Ic(vc);for(o+=(u-a)*f,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ic(vc);if(r==a){for(var h=o,p=36;;){var l=p<=s?1:p>=s+26?26:p-s;if(h<l)break;var g=h-l,b=36-l;Cc(n,mc(qc(l+g%b))),h=xc(g/b),p+=36}Cc(n,mc(qc(h))),s=Pc(o,f,d==c),o=0,d++}}o++,a++}return yc(n,"")},jc=pa.codeAt,Tc=tt.set,Mc=tt.getterFor("URL"),Rc=zo.URLSearchParams,Ac=zo.getState,Uc=s.URL,Bc=s.TypeError,Nc=s.parseInt,_c=Math.floor,Lc=Math.pow,Dc=m("".charAt),Jc=m(/./.exec),Fc=m([].join),Gc=m(1..toString),Hc=m([].pop),Vc=m([].push),Wc=m("".replace),$c=m([].shift),Yc=m("".split),Kc=m("".slice),Qc=m("".toLowerCase),Xc=m([].unshift),Zc=/[a-z]/i,ed=/[\d+-.a-z]/i,td=/\d/,rd=/^0x/i,nd=/^[0-7]+$/,id=/^\d+$/,ad=/^[\da-f]+$/i,od=/[\0\t\n\r #%/:<>?@[\\\]^|]/,sd=/[\0\t\n\r #/:<>?@[\\\]^|]/,cd=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,dd=/[\t\n\r]/g,ud=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)Xc(t,e%256),e=_c(e/256);return Fc(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+=Gc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},fd={},hd=sc({},fd,{" ":1,'"':1,"<":1,">":1,"`":1}),pd=sc({},hd,{"#":1,"?":1,"{":1,"}":1}),ld=sc({},pd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),gd=function(e,t){var r=jc(e,0);return r>32&&r<127&&!ae(t,e)?e:encodeURIComponent(e)},bd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},vd=function(e,t){var r;return 2==e.length&&Jc(Zc,Dc(e,0))&&(":"==(r=Dc(e,1))||!t&&"|"==r)},Id=function(e){var t;return e.length>1&&vd(Kc(e,0,2))&&(2==e.length||"/"===(t=Dc(e,2))||"\\"===t||"?"===t||"#"===t)},kd=function(e){return"."===e||"%2e"===Qc(e)},xd={},md={},wd={},yd={},Cd={},zd={},Od={},Ed={},qd={},Pd={},Sd={},jd={},Td={},Md={},Rd={},Ad={},Ud={},Bd={},Nd={},_d={},Ld={},Dd=function(e,t,r){var n,i,a,o=Ht(e);if(t){if(i=this.parse(o))throw Bc(i);this.searchParams=null}else{if(void 0!==r&&(n=new Dd(r,!0)),i=this.parse(o,null,n))throw Bc(i);(a=Ac(new Rc)).bindURL(this),this.searchParams=a}};Dd.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,c=this,d=t||xd,u=0,f="",h=!1,p=!1,l=!1;for(e=Ht(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=Wc(e,cd,"")),e=Wc(e,dd,""),n=lc(e);u<=n.length;){switch(i=n[u],d){case xd:if(!i||!Jc(Zc,i)){if(t)return"Invalid scheme";d=wd;continue}f+=Qc(i),d=md;break;case md:if(i&&(Jc(ed,i)||"+"==i||"-"==i||"."==i))f+=Qc(i);else{if(":"!=i){if(t)return"Invalid scheme";f="",d=wd,u=0;continue}if(t&&(c.isSpecial()!=ae(bd,f)||"file"==f&&(c.includesCredentials()||null!==c.port)||"file"==c.scheme&&!c.host))return;if(c.scheme=f,t)return void(c.isSpecial()&&bd[c.scheme]==c.port&&(c.port=null));f="","file"==c.scheme?d=Md:c.isSpecial()&&r&&r.scheme==c.scheme?d=yd:c.isSpecial()?d=Ed:"/"==n[u+1]?(d=Cd,u++):(c.cannotBeABaseURL=!0,Vc(c.path,""),d=Nd)}break;case wd:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){c.scheme=r.scheme,c.path=nr(r.path),c.query=r.query,c.fragment="",c.cannotBeABaseURL=!0,d=Ld;break}d="file"==r.scheme?Md:zd;continue;case yd:if("/"!=i||"/"!=n[u+1]){d=zd;continue}d=qd,u++;break;case Cd:if("/"==i){d=Pd;break}d=Bd;continue;case zd:if(c.scheme=r.scheme,i==rc)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query;else if("/"==i||"\\"==i&&c.isSpecial())d=Od;else if("?"==i)c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query="",d=_d;else{if("#"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.path.length--,d=Bd;continue}c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Ld}break;case Od:if(!c.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){c.username=r.username,c.password=r.password,c.host=r.host,c.port=r.port,d=Bd;continue}d=Pd}else d=qd;break;case Ed:if(d=qd,"/"!=i||"/"!=Dc(f,u+1))continue;u++;break;case qd:if("/"!=i&&"\\"!=i){d=Pd;continue}break;case Pd:if("@"==i){h&&(f="%40"+f),h=!0,a=lc(f);for(var g=0;g<a.length;g++){var b=a[g];if(":"!=b||l){var v=gd(b,ld);l?c.password+=v:c.username+=v}else l=!0}f=""}else if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(h&&""==f)return"Invalid authority";u-=lc(f).length+1,f="",d=Sd}else f+=i;break;case Sd:case jd:if(t&&"file"==c.scheme){d=Ad;continue}if(":"!=i||p){if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()){if(c.isSpecial()&&""==f)return"Invalid host";if(t&&""==f&&(c.includesCredentials()||null!==c.port))return;if(o=c.parseHost(f))return o;if(f="",d=Ud,t)return;continue}"["==i?p=!0:"]"==i&&(p=!1),f+=i}else{if(""==f)return"Invalid host";if(o=c.parseHost(f))return o;if(f="",d=Td,t==jd)return}break;case Td:if(!Jc(td,i)){if(i==rc||"/"==i||"?"==i||"#"==i||"\\"==i&&c.isSpecial()||t){if(""!=f){var I=Nc(f,10);if(I>65535)return"Invalid port";c.port=c.isSpecial()&&I===bd[c.scheme]?null:I,f=""}if(t)return;d=Ud;continue}return"Invalid port"}f+=i;break;case Md:if(c.scheme="file","/"==i||"\\"==i)d=Rd;else{if(!r||"file"!=r.scheme){d=Bd;continue}if(i==rc)c.host=r.host,c.path=nr(r.path),c.query=r.query;else if("?"==i)c.host=r.host,c.path=nr(r.path),c.query="",d=_d;else{if("#"!=i){Id(Fc(nr(n,u),""))||(c.host=r.host,c.path=nr(r.path),c.shortenPath()),d=Bd;continue}c.host=r.host,c.path=nr(r.path),c.query=r.query,c.fragment="",d=Ld}}break;case Rd:if("/"==i||"\\"==i){d=Ad;break}r&&"file"==r.scheme&&!Id(Fc(nr(n,u),""))&&(vd(r.path[0],!0)?Vc(c.path,r.path[0]):c.host=r.host),d=Bd;continue;case Ad:if(i==rc||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&vd(f))d=Bd;else if(""==f){if(c.host="",t)return;d=Ud}else{if(o=c.parseHost(f))return o;if("localhost"==c.host&&(c.host=""),t)return;f="",d=Ud}continue}f+=i;break;case Ud:if(c.isSpecial()){if(d=Bd,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=rc&&(d=Bd,"/"!=i))continue}else c.fragment="",d=Ld;else c.query="",d=_d;break;case Bd:if(i==rc||"/"==i||"\\"==i&&c.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=Qc(s=f))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(c.shortenPath(),"/"==i||"\\"==i&&c.isSpecial()||Vc(c.path,"")):kd(f)?"/"==i||"\\"==i&&c.isSpecial()||Vc(c.path,""):("file"==c.scheme&&!c.path.length&&vd(f)&&(c.host&&(c.host=""),f=Dc(f,0)+":"),Vc(c.path,f)),f="","file"==c.scheme&&(i==rc||"?"==i||"#"==i))for(;c.path.length>1&&""===c.path[0];)$c(c.path);"?"==i?(c.query="",d=_d):"#"==i&&(c.fragment="",d=Ld)}else f+=gd(i,pd);break;case Nd:"?"==i?(c.query="",d=_d):"#"==i?(c.fragment="",d=Ld):i!=rc&&(c.path[0]+=gd(i,fd));break;case _d:t||"#"!=i?i!=rc&&("'"==i&&c.isSpecial()?c.query+="%27":c.query+="#"==i?"%23":gd(i,fd)):(c.fragment="",d=Ld);break;case Ld:i!=rc&&(c.fragment+=gd(i,hd))}u++}},parseHost:function(e){var t,r,n;if("["==Dc(e,0)){if("]"!=Dc(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,f=0,h=function(){return Dc(e,f)};if(":"==h()){if(":"!=Dc(e,1))return;f+=2,u=++d}for(;h();){if(8==d)return;if(":"!=h()){for(t=r=0;r<4&&Jc(ad,h());)t=16*t+Nc(h(),16),f++,r++;if("."==h()){if(0==r)return;if(f-=r,d>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;f++}if(!Jc(td,h()))return;for(;Jc(td,h());){if(a=Nc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;f++}c[d]=256*c[d]+i,2!=++n&&4!=n||d++}if(4!=n)return;break}if(":"==h()){if(f++,!h())return}else if(h())return;c[d++]=t}else{if(null!==u)return;f++,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}(Kc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Oc(zc(Ec(e),bc,"."),".");for(t=0;t<i.length;t++)r=i[t],Cc(n,kc(gc,r)?"xn--"+Sc(r):r);return yc(n,".")}(e),Jc(od,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,c=Yc(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"==Dc(i,0)&&(a=Jc(rd,i)?16:8,i=Kc(i,8==a?1:2)),""===i)o=0;else{if(!Jc(10==a?id:8==a?nd:ad,i))return e;o=Nc(i,a)}Vc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=Lc(256,5-t))return null}else if(o>255)return null;for(s=Hc(r),n=0;n<r.length;n++)s+=r[n]*Lc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(Jc(sd,e))return"Invalid host";for(t="",r=lc(e),n=0;n<r.length;n++)t+=gd(r[n],fd);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return ae(bd,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&vd(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+=ud(i),null!==a&&(d+=":"+a)):"file"==t&&(d+="//"),d+=e.cannotBeABaseURL?o[0]:o.length?"/"+Fc(o,"/"):"",null!==s&&(d+="?"+s),null!==c&&(d+="#"+c),d},setHref:function(e){var t=this.parse(e);if(t)throw Bc(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new Jd(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+ud(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Ht(e)+":",xd)},getUsername:function(){return this.username},setUsername:function(e){var t=lc(Ht(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=gd(t[r],ld)}},getPassword:function(){return this.password},setPassword:function(e){var t=lc(Ht(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=gd(t[r],ld)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?ud(e):ud(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,Sd)},getHostname:function(){var e=this.host;return null===e?"":ud(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,jd)},getPort:function(){var e=this.port;return null===e?"":Ht(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Ht(e))?this.port=null:this.parse(e,Td))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+Fc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Ud))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Ht(e))?this.query=null:("?"==Dc(e,0)&&(e=Kc(e,1)),this.query="",this.parse(e,_d)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Ht(e))?("#"==Dc(e,0)&&(e=Kc(e,1)),this.fragment="",this.parse(e,Ld)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var Jd=function(e){var t=Oa(this,Fd),r=Ta(arguments.length,1)>1?arguments[1]:void 0,n=Tc(t,new Dd(e,!1,r));d||(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())},Fd=Jd.prototype,Gd=function(e,t){return{get:function(){return Mc(this)[e]()},set:t&&function(e){return Mc(this)[t](e)},configurable:!0,enumerable:!0}};if(d&&(nc(Fd,"href",Gd("serialize","setHref")),nc(Fd,"origin",Gd("getOrigin")),nc(Fd,"protocol",Gd("getProtocol","setProtocol")),nc(Fd,"username",Gd("getUsername","setUsername")),nc(Fd,"password",Gd("getPassword","setPassword")),nc(Fd,"host",Gd("getHost","setHost")),nc(Fd,"hostname",Gd("getHostname","setHostname")),nc(Fd,"port",Gd("getPort","setPort")),nc(Fd,"pathname",Gd("getPathname","setPathname")),nc(Fd,"search",Gd("getSearch","setSearch")),nc(Fd,"searchParams",Gd("getSearchParams")),nc(Fd,"hash",Gd("getHash","setHash"))),nt(Fd,"toJSON",(function(){return Mc(this).serialize()}),{enumerable:!0}),nt(Fd,"toString",(function(){return Mc(this).serialize()}),{enumerable:!0}),Uc){var Hd=Uc.createObjectURL,Vd=Uc.revokeObjectURL;Hd&&nt(Jd,"createObjectURL",lr(Hd,Uc)),Vd&&nt(Jd,"revokeObjectURL",lr(Vd,Uc))}function Wd(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=as(e);if(t){var i=as(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return is(this,r)}}hr(Jd,"URL"),Rt({global:!0,constructor:!0,forced:!ya,sham:!d},{URL:Jd});var $d=function(e){ns(r,e);var t=Wd(r);function r(e,n,i){var a;return Zn(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 ti(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}(cs(URL)),Yd="commerce-sdk-isomorphic@1.10.3";function Kd(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 Qd(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Kd(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Xd=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Qd({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,T,M,R,A,U;return ti(e,[{key:"createBasket",value:(U=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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.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),s=new $d("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=30,Ro(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 hs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(A=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=30,Ro(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 hs(u);case 39:return e.next=41,u.text();case 41:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"mergeBasket",value:(R=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"POST"}),e.next=31,Ro(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 hs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"deleteBasket",value:(M=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"getBasket",value:(T=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateBasket",value:(j=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(P=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(z=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(y=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"addItemToBasket",value:(w=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"removeItemFromBasket",value:(m=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateItemInBasket",value:(x=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Ro(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 hs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(k=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(I=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=48,Ro(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 hs(u);case 57:return e.next=59,u.text();case 59:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 61:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=49,Ro(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 hs(u);case 58:return e.next=60,u.text();case 60:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"PUT"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Qd(Qd({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Qd(Qd({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Zd(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?Zd(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zd(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(Xd,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}");var tu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=eu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i;return ti(e,[{key:"getShopperContext",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",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),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=eu(eu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=29,Ro(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 hs(u);case 36:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/shopper-context/{usid}",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),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=eu(eu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ru(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 nu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ru(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ru(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(tu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}");var iu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=nu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v,I,k,x,m,w,y,C,z,O,E,q,P,S,j,T;return ti(e,[{key:"registerCustomer",value:(T=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"invalidateCustomerAuth",value:(j=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/actions/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new hs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"authorizeCustomer",value:(S=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"authorizeTrustedSystem",value:(P=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/trusted-system/actions/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"resetPassword",value:(q=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=35;break}throw new hs(u);case 35:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"getResetPasswordToken",value:(E=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"registerExternalProfile",value:(O=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"getExternalProfile",value:(z=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"getCustomer",value:(C=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateCustomer",value:(y=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"createCustomerAddress",value:(w=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"getCustomerAddress",value:(m=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"removeCustomerAddress",value:(x=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"updateCustomerAddress",value:(k=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"getCustomerBaskets",value:(I=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getCustomerOrders",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=43,Ro(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 hs(u);case 52:return e.next=54,u.text();case 54:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"updateCustomerPassword",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PUT"}),e.next=37,Ro(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=44;break}throw new hs(u);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=53;break}throw new hs(u);case 53:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateCustomerProductList",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=62;break}throw new hs(u);case 62:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new hs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=55,Ro(s.toString(),d);case 55:if(u=e.sent,!r){e.next=60;break}return e.abrupt("return",u);case 60:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=64;break}throw new hs(u);case 64:return e.next=66,u.text();case 66:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 68:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=31,Ro(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 hs(u);case 40:return e.next=42,u.text();case 42:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=nu(nu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=nu(nu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=46,Ro(s.toString(),d);case 46:if(u=e.sent,!r){e.next=51;break}return e.abrupt("return",u);case 51:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=55;break}throw new hs(u);case 55:return e.next=57,u.text();case 57:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 59:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function au(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?au(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):au(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(iu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}");var su=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=ou({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"retrieveResults",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ou(ou({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=ou(ou({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=ou(ou({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=ou(ou({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60: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 du(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){ri(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}ri(su,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}");var uu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=du({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"getPages",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=du(du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=du(du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=42,Ro(s.toString(),d);case 42:if(u=e.sent,!r){e.next=47;break}return e.abrupt("return",u);case 47:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=51;break}throw new hs(u);case 51:return e.next=53,u.text();case 53:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 55:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=du(du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=du(du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53: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 hu(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){ri(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}ri(uu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}");var pu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=hu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t;return ti(e,[{key:"getGiftCertificate",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=hu(hu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=hu(hu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=28,Ro(s.toString(),d);case 28:if(u=e.sent,!r){e.next=33;break}return e.abrupt("return",u);case 33:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=37;break}throw new hs(u);case 37:return e.next=39,u.text();case 39:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function lu(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 gu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?lu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(pu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}");var bu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=gu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s,c,d,u,f,h,p,l,g,b,v;return ti(e,[{key:"authenticateCustomer",value:(v=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(b=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"logoutCustomer",value:(g=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"authorizeCustomer",value:(l=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=60,Ro(s.toString(),d);case 60:if(u=e.sent,!r){e.next=65;break}return e.abrupt("return",u);case 65:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=67;break}throw new hs(u);case 67:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getAccessToken",value:(p=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(h=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(f=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(u=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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 s=new $d("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=82,Ro(s.toString(),d);case 82:if(u=e.sent,!r){e.next=87;break}return e.abrupt("return",u);case 87:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=89;break}throw new hs(u);case 89:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(c=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"resetPassword",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=26;break}throw new hs(u);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"revokeToken",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=20,Ro(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 hs(u);case 29:return e.next=31,u.text();case 31:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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={},s=new $d("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=gu(gu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=gu(gu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=19,Ro(s.toString(),d);case 19:if(u=e.sent,!r){e.next=24;break}return e.abrupt("return",u);case 24:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=28;break}throw new hs(u);case 28:return e.next=30,u.text();case 30:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 32:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function vu(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 Iu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?vu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(bu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}");var ku=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Iu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i,a,o,s;return ti(e,[{key:"createOrder",value:(s=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=29,Ro(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 hs(u);case 38:return e.next=40,u.text();case 40:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getOrder",value:(o=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"POST"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"DELETE"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{body:this.clientConfig.transformRequest(t.body,c),headers:c,method:"PATCH"}),e.next=47,Ro(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 hs(u);case 56:return e.next=58,u.text();case 58:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 60:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Iu(Iu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Iu(Iu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=37,Ro(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 hs(u);case 46:return e.next=48,u.text();case 48:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 50: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 mu(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){ri(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}ri(ku,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}");var wu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r,n,i;return ti(e,[{key:"getProducts",value:(i=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=44,Ro(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 hs(u);case 53:return e.next=55,u.text();case 55:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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){e.next=29;break}o.expand=n.expand,e.next=34;break;case 29:if(void 0===i.expand){e.next=33;break}o.expand=i.expand,e.next=34;break;case 33:throw new Error("Missing required query parameter: expand");case 34:if(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=41;break}o.siteId=n.siteId,e.next=46;break;case 41:if(void 0===i.siteId){e.next=45;break}o.siteId=i.siteId,e.next=46;break;case 45:throw new Error("Missing required query parameter: siteId");case 46:return s=new $d("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=52,Ro(s.toString(),d);case 52:if(u=e.sent,!r){e.next=57;break}return e.abrupt("return",u);case 57:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=61;break}throw new hs(u);case 61:return e.next=63,u.text();case 63:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 65:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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 s=new $d("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=mu(mu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=39,Ro(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 hs(u);case 48:return e.next=50,u.text();case 50:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 52:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function yu(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 Cu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}ri(wu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}");var zu=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Cu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"getPromotions",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Cu(Cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=38,Ro(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 hs(u);case 47:return e.next=49,u.text();case 49:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Cu(Cu({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Cu(Cu({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ri(zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}");var Ou=TypeError,Eu=function(e,t){if(!delete e[t])throw Ou("Cannot delete property "+W(t)+" of "+W(e))},qu=U.match(/firefox\/(\d+)/i),Pu=!!qu&&+qu[1],Su=/MSIE|Trident/.test(U),ju=U.match(/AppleWebKit\/(\d+)\./),Tu=!!ju&&+ju[1],Mu=[],Ru=m(Mu.sort),Au=m(Mu.push),Uu=c((function(){Mu.sort(void 0)})),Bu=c((function(){Mu.sort(null)})),Nu=Nn("sort"),_u=!c((function(){if(D)return D<70;if(!(Pu&&Pu>3)){if(Su)return!0;if(Tu)return Tu<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++)Mu.push({k:t+n,v:r})}for(Mu.sort((function(e,t){return t.v-e.v})),n=0;n<Mu.length;n++)t=Mu[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function Lu(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 Du(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Lu(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Rt({target:"Array",proto:!0,forced:Uu||!Bu||!Nu||!_u},{sort:function(e){void 0!==e&&Y(e);var t=ne(this);if(_u)return void 0===e?Ru(t):Ru(t,e);var r,n,i=[],a=pt(t);for(n=0;n<a;n++)n in t&&Au(i,t[n]);for(Ba(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Ht(t)>Ht(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Eu(t,n++);return t}});var Ju=function(){function e(t){Zn(this,e),ri(this,"clientConfig",void 0);var r=Du({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new qo(r)}var t,r;return ti(e,[{key:"productSearch",value:(r=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Du(Du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=36,Ro(s.toString(),d);case 36:if(u=e.sent,!r){e.next=41;break}return e.abrupt("return",u);case 41:if(!this.clientConfig.throwOnBadResponse||u.ok||304===u.status){e.next=45;break}throw new hs(u);case 45:return e.next=47,u.text();case 47:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=Xn(qi.mark((function e(t,r){var n,i,a,o,s,c,d,u,f;return qi.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),s=new $d("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),c=Du(Du({},this.clientConfig.headers),null==t?void 0:t.headers),So||(c["user-agent"]=[c["user-agent"],Yd].join(" ")),d=Du(Du({},this.clientConfig.fetchOptions),{},{headers:c,method:"GET"}),e.next=40,Ro(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 hs(u);case 49:return e.next=51,u.text();case 51:return f=e.sent,e.abrupt("return",f?JSON.parse(f):{});case 53:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();ri(Ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/");var Fu=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};As("search",(function(e,t,r){return[function(t){var r=P(this),n=null==t?void 0:K(t,e);return n?h(n,t,r):new RegExp(t)[e](Ht(r))},function(e){var n=qe(this),i=Ht(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;Fu(o,0)||(n.lastIndex=0);var s=Vs(n,i);return Fu(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var Gu=le("iterator"),Hu=!1;try{var Vu=0,Wu={next:function(){return{done:!!Vu++}},return:function(){Hu=!0}};Wu[Gu]=function(){return this},Array.from(Wu,(function(){throw 2}))}catch(e){}var $u,Yu,Ku,Qu=function(e,t){if(!t&&!Hu)return!1;var r=!1;try{var n={};n[Gu]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Xu="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,Zu=Te.f,ef=tt.enforce,tf=tt.get,rf=s.Int8Array,nf=rf&&rf.prototype,af=s.Uint8ClampedArray,of=af&&af.prototype,sf=rf&&Di(rf),cf=nf&&Di(nf),df=Object.prototype,uf=s.TypeError,ff=le("toStringTag"),hf=de("TYPED_ARRAY_TAG"),pf=Xu&&!!Ki&&"Opera"!==Ft(s.opera),lf=!1,gf={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},bf={BigInt64Array:8,BigUint64Array:8},vf=function(e){var t=Di(e);if(T(t)){var r=tf(t);return r&&ae(r,"TypedArrayConstructor")?r.TypedArrayConstructor:vf(t)}},If=function(e){if(!T(e))return!1;var t=Ft(e);return ae(gf,t)||ae(bf,t)};for($u in gf)(Ku=(Yu=s[$u])&&Yu.prototype)?ef(Ku).TypedArrayConstructor=Yu:pf=!1;for($u in bf)(Ku=(Yu=s[$u])&&Yu.prototype)&&(ef(Ku).TypedArrayConstructor=Yu);if((!pf||!j(sf)||sf===Function.prototype)&&(sf=function(){throw uf("Incorrect invocation")},pf))for($u in gf)s[$u]&&Ki(s[$u],sf);if((!pf||!cf||cf===df)&&(cf=sf.prototype,pf))for($u in gf)s[$u]&&Ki(s[$u].prototype,cf);if(pf&&Di(of)!==cf&&Ki(of,cf),d&&!ae(cf,ff))for($u in lf=!0,Zu(cf,ff,{get:function(){return T(this)?this[hf]:void 0}}),gf)s[$u]&&Me(s[$u],hf,$u);var kf={NATIVE_ARRAY_BUFFER_VIEWS:pf,TYPED_ARRAY_TAG:lf&&hf,aTypedArray:function(e){if(If(e))return e;throw uf("Target is not a typed array")},aTypedArrayConstructor:function(e){if(j(e)&&(!Ki||A(sf,e)))return e;throw uf(W(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(d){if(r)for(var i in gf){var a=s[i];if(a&&ae(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}cf[e]&&!r||nt(cf,e,r?t:pf&&nf[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(d){if(Ki){if(r)for(n in gf)if((i=s[n])&&ae(i,e))try{delete i[e]}catch(e){}if(sf[e]&&!r)return;try{return nt(sf,e,r?t:pf&&sf[e]||t)}catch(e){}}for(n in gf)!(i=s[n])||i[e]&&!r||nt(i,e,t)}},getTypedArrayConstructor:vf,isView:function(e){if(!T(e))return!1;var t=Ft(e);return"DataView"===t||ae(gf,t)||ae(bf,t)},isTypedArray:If,TypedArray:sf,TypedArrayPrototype:cf},xf=kf.NATIVE_ARRAY_BUFFER_VIEWS,mf=s.ArrayBuffer,wf=s.Int8Array,yf=!xf||!c((function(){wf(1)}))||!c((function(){new wf(-1)}))||!Qu((function(e){new wf,new wf(null),new wf(1.5),new wf(e)}),!0)||c((function(){return 1!==new wf(new mf(2),1,void 0).length})),Cf=RangeError,zf=function(e){if(void 0===e)return 0;var t=st(e),r=ht(t);if(t!==r)throw Cf("Wrong length or index");return r},Of=Array,Ef=Math.abs,qf=Math.pow,Pf=Math.floor,Sf=Math.log,jf=Math.LN2,Tf=function(e,t,r){var n,i,a,o=Of(r),s=8*r-t-1,c=(1<<s)-1,d=c>>1,u=23===t?qf(2,-24)-qf(2,-77):0,f=e<0||0===e&&1/e<0?1:0,h=0;for((e=Ef(e))!=e||e===1/0?(i=e!=e?1:0,n=c):(n=Pf(Sf(e)/jf),e*(a=qf(2,-n))<1&&(n--,a*=2),(e+=n+d>=1?u/a:u*qf(2,1-d))*a>=2&&(n++,a/=2),n+d>=c?(i=0,n=c):n+d>=1?(i=(e*a-1)*qf(2,t),n+=d):(i=e*qf(2,d-1)*qf(2,t),n=0));t>=8;)o[h++]=255&i,i/=256,t-=8;for(n=n<<t|i,s+=t;s>0;)o[h++]=255&n,n/=256,s-=8;return o[--h]|=128*f,o},Mf=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+=qf(2,t),u-=o}return(d?-1:1)*r*qf(2,u-t)},Rf=function(e){for(var t=ne(this),r=pt(t),n=arguments.length,i=ut(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ut(a,r);o>i;)t[i++]=e;return t},Af=mt.f,Uf=Te.f,Bf=Be.PROPER,Nf=Be.CONFIGURABLE,_f=tt.get,Lf=tt.set,Df=s.ArrayBuffer,Jf=Df,Ff=Jf&&Jf.prototype,Gf=s.DataView,Hf=Gf&&Gf.prototype,Vf=Object.prototype,Wf=s.Array,$f=s.RangeError,Yf=m(Rf),Kf=m([].reverse),Qf=Tf,Xf=Mf,Zf=function(e){return[255&e]},eh=function(e){return[255&e,e>>8&255]},th=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},rh=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},nh=function(e){return Qf(e,23,4)},ih=function(e){return Qf(e,52,8)},ah=function(e,t){Uf(e.prototype,t,{get:function(){return _f(this)[t]}})},oh=function(e,t,r,n){var i=zf(r),a=_f(e);if(i+t>a.byteLength)throw $f("Wrong index");var o=_f(a.buffer).bytes,s=i+a.byteOffset,c=nr(o,s,s+t);return n?c:Kf(c)},sh=function(e,t,r,n,i,a){var o=zf(r),s=_f(e);if(o+t>s.byteLength)throw $f("Wrong index");for(var c=_f(s.buffer).bytes,d=o+s.byteOffset,u=n(+i),f=0;f<t;f++)c[d+f]=u[a?f:t-f-1]};if(Xu){var ch=Bf&&"ArrayBuffer"!==Df.name;if(c((function(){Df(1)}))&&c((function(){new Df(-1)}))&&!c((function(){return new Df,new Df(1.5),new Df(NaN),ch&&!Nf})))ch&&Nf&&Me(Df,"name","ArrayBuffer");else{(Jf=function(e){return Oa(this,Ff),new Df(zf(e))}).prototype=Ff;for(var dh,uh=Af(Df),fh=0;uh.length>fh;)(dh=uh[fh++])in Jf||Me(Jf,dh,Df[dh]);Ff.constructor=Jf}Ki&&Di(Hf)!==Vf&&Ki(Hf,Vf);var hh=new Gf(new Jf(2)),ph=m(Hf.setInt8);hh.setInt8(0,2147483648),hh.setInt8(1,2147483649),!hh.getInt8(0)&&hh.getInt8(1)||Ca(Hf,{setInt8:function(e,t){ph(this,e,t<<24>>24)},setUint8:function(e,t){ph(this,e,t<<24>>24)}},{unsafe:!0})}else Ff=(Jf=function(e){Oa(this,Ff);var t=zf(e);Lf(this,{bytes:Yf(Wf(t),0),byteLength:t}),d||(this.byteLength=t)}).prototype,Hf=(Gf=function(e,t,r){Oa(this,Hf),Oa(e,Ff);var n=_f(e).byteLength,i=st(t);if(i<0||i>n)throw $f("Wrong offset");if(i+(r=void 0===r?n-i:ht(r))>n)throw $f("Wrong length");Lf(this,{buffer:e,byteLength:r,byteOffset:i}),d||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,d&&(ah(Jf,"byteLength"),ah(Gf,"buffer"),ah(Gf,"byteLength"),ah(Gf,"byteOffset")),Ca(Hf,{getInt8:function(e){return oh(this,1,e)[0]<<24>>24},getUint8:function(e){return oh(this,1,e)[0]},getInt16:function(e){var t=oh(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=oh(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return rh(oh(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return rh(oh(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return Xf(oh(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return Xf(oh(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){sh(this,1,e,Zf,t)},setUint8:function(e,t){sh(this,1,e,Zf,t)},setInt16:function(e,t){sh(this,2,e,eh,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){sh(this,2,e,eh,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){sh(this,4,e,th,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){sh(this,4,e,th,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){sh(this,4,e,nh,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){sh(this,8,e,ih,t,arguments.length>2?arguments[2]:void 0)}});hr(Jf,"ArrayBuffer"),hr(Gf,"DataView");var lh={ArrayBuffer:Jf,DataView:Gf},gh=Math.floor,bh=Number.isInteger||function(e){return!T(e)&&isFinite(e)&&gh(e)===e},vh=RangeError,Ih=RangeError,kh=function(e,t){var r=function(e){var t=st(e);if(t<0)throw vh("The argument can't be less than 0");return t}(e);if(r%t)throw Ih("Wrong offset");return r},xh=kf.aTypedArrayConstructor,mh=function(e){var t,r,n,i,a,o,s=Jo(this),c=ne(e),d=arguments.length,u=d>1?arguments[1]:void 0,f=void 0!==u,p=qa(c);if(p&&!hc(p))for(o=(a=Sa(c,p)).next,c=[];!(i=h(o,a)).done;)c.push(i.value);for(f&&d>2&&(u=lr(u,arguments[2])),r=pt(c),n=new(xh(s))(r),t=0;r>t;t++)n[t]=f?u(c[t],t):c[t];return n},wh=le("species"),yh=function(e){var t=R(e),r=Te.f;d&&t&&!t[wh]&&r(t,wh,{configurable:!0,get:function(){return this}})};n((function(e){var t=mt.f,r=Sr.forEach,n=tt.get,i=tt.set,a=tt.enforce,o=Te.f,c=Ce.f,u=Math.round,f=s.RangeError,p=lh.ArrayBuffer,l=p.prototype,g=lh.DataView,v=kf.NATIVE_ARRAY_BUFFER_VIEWS,I=kf.TYPED_ARRAY_TAG,k=kf.TypedArray,x=kf.TypedArrayPrototype,m=kf.aTypedArrayConstructor,w=kf.isTypedArray,y=function(e,t){m(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},C=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},z=function(e){var t;return A(l,e)||"ArrayBuffer"==(t=Ft(e))||"SharedArrayBuffer"==t},O=function(e,t){return w(e)&&!H(t)&&t in e&&bh(+t)&&t>=0},E=function(e,t){return t=Ie(t),O(e,t)?b(2,e[t]):c(e,t)},q=function(e,t,r){return t=Ie(t),!(O(e,t)&&T(r)&&ae(r,"value"))||ae(r,"get")||ae(r,"set")||r.configurable||ae(r,"writable")&&!r.writable||ae(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};d?(v||(Ce.f=E,Te.f=q,C(x,"buffer"),C(x,"byteOffset"),C(x,"byteLength"),C(x,"length")),Rt({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:E,defineProperty:q}),e.exports=function(e,c,d){var l=e.match(/\d+$/)[0]/8,b=e+(d?"Clamped":"")+"Array",m="get"+e,C="set"+e,O=s[b],E=O,q=E&&E.prototype,P={},S=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[m](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?yf&&(E=c((function(e,t,r,n){return Oa(e,q),function(e,t,r){var n,i;return Ki&&j(n=t.constructor)&&n!==r&&T(i=n.prototype)&&i!==r.prototype&&Ki(e,i),e}(T(t)?z(t)?void 0!==n?new O(t,kh(r,l),n):void 0!==r?new O(t,kh(r,l)):new O(t):w(t)?y(E,t):h(mh,E,t):new O(zf(t)),e,E)})),Ki&&Ki(E,k),r(t(O),(function(e){e in E||Me(E,e,O[e])})),E.prototype=q):(E=c((function(e,t,r,n){Oa(e,q);var a,o,s,c=0,d=0;if(T(t)){if(!z(t))return w(t)?y(E,t):h(mh,E,t);a=t,d=kh(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=zf(t),a=new p(o=s*l);for(i(e,{buffer:a,byteOffset:d,byteLength:o,length:s,view:new g(a)});c<s;)S(e,c++)})),Ki&&Ki(E,k),q=E.prototype=Zt(x)),q.constructor!==E&&Me(q,"constructor",E),a(q).TypedArrayConstructor=E,I&&Me(q,I,b);var M=E!=O;P[b]=E,Rt({global:!0,constructor:!0,forced:M,sham:!v},P),"BYTES_PER_ELEMENT"in E||Me(E,"BYTES_PER_ELEMENT",l),"BYTES_PER_ELEMENT"in q||Me(q,"BYTES_PER_ELEMENT",l),yh(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Ch=Math.min,zh=m([].copyWithin||function(e,t){var r=ne(this),n=pt(r),i=ut(e,n),a=ut(t,n),o=arguments.length>2?arguments[2]:void 0,s=Ch((void 0===o?n:ut(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]:Eu(r,i),i+=c,a+=c;return r}),Oh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("copyWithin",(function(e,t){return zh(Oh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Eh=Sr.every,qh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("every",(function(e){return Eh(qh(this),e,arguments.length>1?arguments[1]:void 0)}));var Ph=TypeError,Sh=function(e){var t=ve(e,"number");if("number"==typeof t)throw Ph("Can't convert number to bigint");return BigInt(t)},jh=kf.aTypedArray,Th=kf.exportTypedArrayMethod,Mh=m("".slice);Th("fill",(function(e){var t=arguments.length;jh(this);var r="Big"===Mh(Ft(this),0,3)?Sh(e):+e;return h(Rf,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Rh=le("species"),Ah=function(e,t){var r,n=qe(e).constructor;return void 0===n||null==(r=qe(n)[Rh])?t:Jo(r)},Uh=kf.aTypedArrayConstructor,Bh=kf.getTypedArrayConstructor,Nh=function(e){return Uh(Ah(e,Bh(e)))},_h=function(e,t){return function(e,t){for(var r=0,n=pt(t),i=new e(n);n>r;)i[r]=t[r++];return i}(Nh(e),t)},Lh=Sr.filter,Dh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("filter",(function(e){var t=Lh(Dh(this),e,arguments.length>1?arguments[1]:void 0);return _h(this,t)}));var Jh=Sr.find,Fh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("find",(function(e){return Jh(Fh(this),e,arguments.length>1?arguments[1]:void 0)}));var Gh=Sr.findIndex,Hh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("findIndex",(function(e){return Gh(Hh(this),e,arguments.length>1?arguments[1]:void 0)}));var Vh=Sr.forEach,Wh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("forEach",(function(e){Vh(Wh(this),e,arguments.length>1?arguments[1]:void 0)}));var $h=gt.includes,Yh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("includes",(function(e){return $h(Yh(this),e,arguments.length>1?arguments[1]:void 0)}));var Kh=gt.indexOf,Qh=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("indexOf",(function(e){return Kh(Qh(this),e,arguments.length>1?arguments[1]:void 0)}));var Xh=le("iterator"),Zh=s.Uint8Array,ep=m(sa.values),tp=m(sa.keys),rp=m(sa.entries),np=kf.aTypedArray,ip=kf.exportTypedArrayMethod,ap=Zh&&Zh.prototype,op=!c((function(){ap[Xh].call([1])})),sp=!!ap&&ap.values&&ap[Xh]===ap.values&&"values"===ap.values.name,cp=function(){return ep(np(this))};ip("entries",(function(){return rp(np(this))}),op),ip("keys",(function(){return tp(np(this))}),op),ip("values",cp,op||!sp,{name:"values"}),ip(Xh,cp,op||!sp,{name:"values"});var dp=kf.aTypedArray,up=kf.exportTypedArrayMethod,fp=m([].join);up("join",(function(e){return fp(dp(this),e)}));var hp=Math.min,pp=[].lastIndexOf,lp=!!pp&&1/[1].lastIndexOf(1,-0)<0,gp=Nn("lastIndexOf"),bp=lp||!gp?function(e){if(lp)return fn(pp,this,arguments)||0;var t=S(this),r=pt(t),n=r-1;for(arguments.length>1&&(n=hp(n,st(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:pp,vp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return fn(bp,vp(this),t>1?[e,arguments[1]]:[e])}));var Ip=Sr.map,kp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("map",(function(e){return Ip(kp(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(Nh(e))(t)}))}));var xp=TypeError,mp=function(e){return function(t,r,n,i){Y(r);var a=ne(t),o=E(a),s=pt(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 xp("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}},wp={left:mp(!1),right:mp(!0)},yp=wp.left,Cp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return yp(Cp(this),e,t,t>1?arguments[1]:void 0)}));var zp=wp.right,Op=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return zp(Op(this),e,t,t>1?arguments[1]:void 0)}));var Ep=kf.aTypedArray,qp=kf.exportTypedArrayMethod,Pp=Math.floor;qp("reverse",(function(){for(var e,t=Ep(this).length,r=Pp(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var Sp=s.RangeError,jp=s.Int8Array,Tp=jp&&jp.prototype,Mp=Tp&&Tp.set,Rp=kf.aTypedArray,Ap=kf.exportTypedArrayMethod,Up=!c((function(){var e=new Uint8ClampedArray(2);return h(Mp,e,{length:1,0:3},1),3!==e[1]})),Bp=Up&&kf.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new jp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Ap("set",(function(e){Rp(this);var t=kh(arguments.length>1?arguments[1]:void 0,1),r=ne(e);if(Up)return h(Mp,this,r,t);var n=this.length,i=pt(r),a=0;if(i+t>n)throw Sp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!Up||Bp);var Np=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("slice",(function(e,t){for(var r=hn(Np(this),e,t),n=Nh(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),c((function(){new Int8Array(1).slice()})));var _p=Sr.some,Lp=kf.aTypedArray;(0,kf.exportTypedArrayMethod)("some",(function(e){return _p(Lp(this),e,arguments.length>1?arguments[1]:void 0)}));var Dp=kf.aTypedArray,Jp=kf.exportTypedArrayMethod,Fp=s.Uint16Array,Gp=Fp&&m(Fp.prototype.sort),Hp=!(!Gp||c((function(){Gp(new Fp(2),null)}))&&c((function(){Gp(new Fp(2),{})}))),Vp=!!Gp&&!c((function(){if(D)return D<74;if(Pu)return Pu<67;if(Su)return!0;if(Tu)return Tu<602;var e,t,r=new Fp(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(Gp(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));Jp("sort",(function(e){return void 0!==e&&Y(e),Vp?Gp(this,e):Ba(Dp(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))}),!Vp||Hp);var Wp=s.Int8Array,$p=kf.aTypedArray,Yp=kf.exportTypedArrayMethod,Kp=[].toLocaleString,Qp=!!Wp&&c((function(){Kp.call(new Wp(1))}));Yp("toLocaleString",(function(){return fn(Kp,Qp?hn($p(this)):$p(this),hn(arguments))}),c((function(){return[1,2].toLocaleString()!=new Wp([1,2]).toLocaleString()}))||!c((function(){Wp.prototype.toLocaleString.call([1,2])})));var Xp=kf.exportTypedArrayMethod,Zp=s.Uint8Array,el=Zp&&Zp.prototype||{},tl=[].toString,rl=m([].join);c((function(){tl.call({})}))&&(tl=function(){return rl(this)});var nl=el.toString!=tl;Xp("toString",tl,nl);var il,al,ol,sl,cl="process"==C(s.process),dl=/(?:ipad|iphone|ipod).*applewebkit/i.test(U),ul=s.setImmediate,fl=s.clearImmediate,hl=s.process,pl=s.Dispatch,ll=s.Function,gl=s.MessageChannel,bl=s.String,vl=0,Il={};try{il=s.location}catch(e){}var kl=function(e){if(ae(Il,e)){var t=Il[e];delete Il[e],t()}},xl=function(e){return function(){kl(e)}},ml=function(e){kl(e.data)},wl=function(e){s.postMessage(bl(e),il.protocol+"//"+il.host)};ul&&fl||(ul=function(e){Ta(arguments.length,1);var t=j(e)?e:ll(e),r=hn(arguments,1);return Il[++vl]=function(){fn(t,void 0,r)},al(vl),vl},fl=function(e){delete Il[e]},cl?al=function(e){hl.nextTick(xl(e))}:pl&&pl.now?al=function(e){pl.now(xl(e))}:gl&&!dl?(sl=(ol=new gl).port2,ol.port1.onmessage=ml,al=lr(sl.postMessage,sl)):s.addEventListener&&j(s.postMessage)&&!s.importScripts&&il&&"file:"!==il.protocol&&!c(wl)?(al=wl,s.addEventListener("message",ml,!1)):al="onreadystatechange"in me("script")?function(e){Wt.appendChild(me("script")).onreadystatechange=function(){Wt.removeChild(this),kl(e)}}:function(e){setTimeout(xl(e),0)});var yl,Cl,zl,Ol,El,ql,Pl,Sl,jl={set:ul,clear:fl},Tl=/ipad|iphone|ipod/i.test(U)&&void 0!==s.Pebble,Ml=/web0s(?!.*chrome)/i.test(U),Rl=Ce.f,Al=jl.set,Ul=s.MutationObserver||s.WebKitMutationObserver,Bl=s.document,Nl=s.process,_l=s.Promise,Ll=Rl(s,"queueMicrotask"),Dl=Ll&&Ll.value;Dl||(yl=function(){var e,t;for(cl&&(e=Nl.domain)&&e.exit();Cl;){t=Cl.fn,Cl=Cl.next;try{t()}catch(e){throw Cl?Ol():zl=void 0,e}}zl=void 0,e&&e.enter()},dl||cl||Ml||!Ul||!Bl?!Tl&&_l&&_l.resolve?((Pl=_l.resolve(void 0)).constructor=_l,Sl=lr(Pl.then,Pl),Ol=function(){Sl(yl)}):cl?Ol=function(){Nl.nextTick(yl)}:(Al=lr(Al,s),Ol=function(){Al(yl)}):(El=!0,ql=Bl.createTextNode(""),new Ul(yl).observe(ql,{characterData:!0}),Ol=function(){ql.data=El=!El}));var Jl=Dl||function(e){var t={fn:e,next:void 0};zl&&(zl.next=t),Cl||(Cl=t,Ol()),zl=t},Fl=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Gl=function(){this.head=null,this.tail=null};Gl.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 Hl=Gl,Vl=s.Promise,Wl="object"==typeof window&&"object"!=typeof Deno;Vl&&Vl.prototype;var $l,Yl,Kl,Ql=le("species"),Xl=!1,Zl=j(s.PromiseRejectionEvent),eg={CONSTRUCTOR:Tt("Promise",(function(){var e=Je(Vl),t=e!==String(Vl);if(!t&&66===D)return!0;if(D>=51&&/native code/.test(e))return!1;var r=new Vl((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Ql]=n,!(Xl=r.then((function(){}))instanceof n)||!t&&Wl&&!Zl})),REJECTION_EVENT:Zl,SUBCLASSING:Xl},tg=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=Y(t),this.reject=Y(r)},rg={f:function(e){return new tg(e)}},ng=jl.set,ig=eg.CONSTRUCTOR,ag=eg.REJECTION_EVENT,og=eg.SUBCLASSING,sg=tt.getterFor("Promise"),cg=tt.set,dg=Vl&&Vl.prototype,ug=Vl,fg=dg,hg=s.TypeError,pg=s.document,lg=s.process,gg=rg.f,bg=gg,vg=!!(pg&&pg.createEvent&&s.dispatchEvent),Ig=function(e){var t;return!(!T(e)||!j(t=e.then))&&t},kg=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&&Cg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?d(hg("Promise-chain cycle")):(n=Ig(r))?h(n,r,c,d):c(r)):d(a)}catch(e){u&&!i&&u.exit(),d(e)}},xg=function(e,t){e.notified||(e.notified=!0,Jl((function(){for(var r,n=e.reactions;r=n.get();)kg(r,e);e.notified=!1,t&&!e.rejection&&wg(e)})))},mg=function(e,t,r){var n,i;vg?((n=pg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),s.dispatchEvent(n)):n={promise:t,reason:r},!ag&&(i=s["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=s.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},wg=function(e){h(ng,s,(function(){var t,r=e.facade,n=e.value;if(yg(e)&&(t=Fl((function(){cl?lg.emit("unhandledRejection",n,r):mg("unhandledrejection",r,n)})),e.rejection=cl||yg(e)?2:1,t.error))throw t.value}))},yg=function(e){return 1!==e.rejection&&!e.parent},Cg=function(e){h(ng,s,(function(){var t=e.facade;cl?lg.emit("rejectionHandled",t):mg("rejectionhandled",t,e.value)}))},zg=function(e,t,r){return function(n){e(t,n,r)}},Og=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,xg(e,!0))},Eg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw hg("Promise can't be resolved itself");var n=Ig(t);n?Jl((function(){var r={done:!1};try{h(n,t,zg(Eg,r,e),zg(Og,r,e))}catch(t){Og(r,t,e)}})):(e.value=t,e.state=1,xg(e,!1))}catch(t){Og({done:!1},t,e)}}};if(ig&&(fg=(ug=function(e){Oa(this,fg),Y(e),h($l,this);var t=sg(this);try{e(zg(Eg,t),zg(Og,t))}catch(e){Og(t,e)}}).prototype,($l=function(e){cg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Hl,rejection:!1,state:0,value:void 0})}).prototype=nt(fg,"then",(function(e,t){var r=sg(this),n=gg(Ah(this,ug));return r.parent=!0,n.ok=!j(e)||e,n.fail=j(t)&&t,n.domain=cl?lg.domain:void 0,0==r.state?r.reactions.add(n):Jl((function(){kg(n,r)})),n.promise})),Yl=function(){var e=new $l,t=sg(e);this.promise=e,this.resolve=zg(Eg,t),this.reject=zg(Og,t)},rg.f=gg=function(e){return e===ug||void 0===e?new Yl(e):bg(e)},j(Vl)&&dg!==Object.prototype)){Kl=dg.then,og||nt(dg,"then",(function(e,t){var r=this;return new ug((function(e,t){h(Kl,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete dg.constructor}catch(e){}Ki&&Ki(dg,fg)}Rt({global:!0,constructor:!0,wrap:!0,forced:ig},{Promise:ug}),hr(ug,"Promise",!1),yh("Promise");var qg=TypeError,Pg=function(e,t){this.stopped=e,this.result=t},Sg=Pg.prototype,jg=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=lr(t,u),v=function(e){return n&&cc(n,"normal",e),new Pg(!0,e)},I=function(e){return f?(qe(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=qa(e)))throw qg(W(e)+" is not iterable");if(hc(i)){for(a=0,o=pt(e);o>a;a++)if((s=I(e[a]))&&A(Sg,s))return s;return new Pg(!1)}n=Sa(e,i)}for(c=p?e.next:n.next;!(d=h(c,n)).done;){try{s=I(d.value)}catch(e){cc(n,"throw",e)}if("object"==typeof s&&s&&A(Sg,s))return s}return new Pg(!1)},Tg=eg.CONSTRUCTOR||!Qu((function(e){Vl.all(e).then(void 0,(function(){}))}));Rt({target:"Promise",stat:!0,forced:Tg},{all:function(e){var t=this,r=rg.f(t),n=r.resolve,i=r.reject,a=Fl((function(){var r=Y(t.resolve),a=[],o=0,s=1;jg(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 Mg=eg.CONSTRUCTOR,Rg=Vl&&Vl.prototype;if(Rt({target:"Promise",proto:!0,forced:Mg,real:!0},{catch:function(e){return this.then(void 0,e)}}),j(Vl)){var Ag=R("Promise").prototype.catch;Rg.catch!==Ag&&nt(Rg,"catch",Ag,{unsafe:!0})}Rt({target:"Promise",stat:!0,forced:Tg},{race:function(e){var t=this,r=rg.f(t),n=r.reject,i=Fl((function(){var i=Y(t.resolve);jg(e,(function(e){h(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Rt({target:"Promise",stat:!0,forced:eg.CONSTRUCTOR},{reject:function(e){var t=rg.f(this);return h(t.reject,void 0,e),t.promise}});var Ug=eg.CONSTRUCTOR;function Bg(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 Ng(e){return function(e){if(Array.isArray(e))return Bg(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 Bg(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)?Bg(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 _g(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 Lg(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_g(Object(r),!0).forEach((function(t){ri(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_g(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}R("Promise"),Rt({target:"Promise",stat:!0,forced:Ug},{resolve:function(e){return function(e,t){if(qe(e),T(t)&&t.constructor===e)return t;var r=rg.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Rt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return jg(e,(function(e,r){er(t,e,r)}),{AS_ENTRIES:!0}),t}});var Dg=So?btoa:function(e){return Buffer.from(e).toString("base64")},Jg=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}},Fg=function(){return t.nanoid(128)},Gg=function(){var e=Xn(qi.mark((function e(t){var r,n,i,a,o,s,c;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!So||!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,Ng(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 Hg(e,t,r){return Vg.apply(this,arguments)}function Vg(){return(Vg=Xn(qi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Gg(r);case 2:return a=e.sent,(o=new bu(t.clientConfig)).clientConfig.fetchOptions=Lg(Lg({},t.clientConfig.fetchOptions),{},{redirect:So?"follow":"manual"}),s={parameters:Lg(Lg({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),f=Object.fromEntries(u.searchParams.entries()),!(c.status>=400||f.error)){e.next=14;break}throw new hs(c);case 14:return e.abrupt("return",Lg({url:d},Jg(d)));case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Wg(){return(Wg=Xn(qi.mark((function e(t,r){var n,i,a;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Fg(),e.next=3,Hg(t,n,Lg({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 $g(){return($g=Xn(qi.mark((function e(t,r,n){var i,a,o,s,c,d,u,f,h,p,l,g;return qi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=Fg(),e.next=3,Gg(a);case 3:return o=e.sent,(s=new bu(t.clientConfig)).clientConfig.fetchOptions=Lg(Lg({},t.clientConfig.fetchOptions),{},{redirect:So?"follow":"manual"}),c="Basic ".concat(Dg("".concat(r.username,":").concat(r.password))),d={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:Lg({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,f=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=new URL(f),p=Object.fromEntries(h.searchParams.entries()),!(u.status>=400||p.error)){e.next=16;break}throw new hs(u);case 16:return l=Jg(f),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},e.abrupt("return",t.getAccessToken({body:g}));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Yg=Object.freeze({__proto__:null,isBrowser:So,isNode:jo,globalObject:To,hasFetchAvailable:Mo,fetch:Ro,stringToBase64:Dg,getCodeAndUsidFromUrl:Jg,createCodeVerifier:Fg,generateCodeChallenge:Gg,authorize:Hg,loginGuestUser:function(e,t){return Wg.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return $g.apply(this,arguments)},refreshAccessToken:function(e,t){var r={grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId};return e.getAccessToken({body:r})},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}})}});e.ClientConfig=qo,e.ShopperBaskets=Xd,e.ShopperContexts=tu,e.ShopperCustomers=iu,e.ShopperDiscoverySearch=su,e.ShopperExperience=uu,e.ShopperGiftCertificates=pu,e.ShopperLogin=bu,e.ShopperOrders=ku,e.ShopperProducts=wu,e.ShopperPromotions=zu,e.ShopperSearch=Ju,e.TemplateURL=$d,e.helpers=Yg,Object.defineProperty(e,"__esModule",{value:!0})}));
|