commerce-sdk-isomorphic 3.2.0 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.cjs.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid"),require("seedrandom")):"function"==typeof define&&define.amd?define(["exports","nanoid","seedrandom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid$1,e.seedrandom)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(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 s,d,c=function(e){return e&&e.Math==Math&&e},u=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof a&&a)||function(){return this}()||Function("return this")(),l=function(e){try{return!!e()}catch(e){return!0}},h=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!l((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),p=Function.prototype.call,g=f?p.bind(p):function(){return p.apply(p,arguments)},I={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,v={f:m&&!I.call({1:2},1)?function(e){var t=m(this,e);return!!t&&t.enumerable}:I},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},k=Function.prototype,y=k.bind,x=k.call,w=f&&y.bind(x,x),z=f?function(e){return e&&w(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},C=z({}.toString),P=z("".slice),O=function(e){return P(C(e),8,-1)},E=Object,q=z("".split),j=l((function(){return!E("z").propertyIsEnumerable(0)}))?function(e){return"String"==O(e)?q(e,""):E(e)}:E,S=TypeError,T=function(e){if(null==e)throw S("Can't call method on "+e);return e},M=function(e){return j(T(e))},_=function(e){return"function"==typeof e},A=function(e){return"object"==typeof e?null!==e:_(e)},R=function(e){return _(e)?e:void 0},U=function(e,t){return arguments.length<2?R(u[e]):u[e]&&u[e][t]},B=z({}.isPrototypeOf),L=U("navigator","userAgent")||"",F=u.process,N=u.Deno,W=F&&F.versions||N&&N.version,D=W&&W.v8;D&&(d=(s=D.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!d&&L&&(!(s=L.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=L.match(/Chrome\/(\d+)/))&&(d=+s[1]);var G=d,H=!!Object.getOwnPropertySymbols&&!l((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&G&&G<41})),V=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,$=Object,Y=V?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return _(t)&&B(t.prototype,$(e))},K=String,J=function(e){try{return K(e)}catch(e){return"Object"}},Q=TypeError,X=function(e){if(_(e))return e;throw Q(J(e)+" is not a function")},Z=function(e,t){var r=e[t];return null==r?void 0:X(r)},ee=TypeError,te=Object.defineProperty,re=function(e,t){try{te(u,e,{value:t,configurable:!0,writable:!0})}catch(r){u[e]=t}return t},ne=u["__core-js_shared__"]||re("__core-js_shared__",{}),ie=o((function(e){(e.exports=function(e,t){return ne[e]||(ne[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"})})),ae=Object,oe=function(e){return ae(T(e))},se=z({}.hasOwnProperty),de=Object.hasOwn||function(e,t){return se(oe(e),t)},ce=0,ue=Math.random(),le=z(1..toString),he=function(e){return"Symbol("+(void 0===e?"":e)+")_"+le(++ce+ue,36)},fe=ie("wks"),pe=u.Symbol,ge=pe&&pe.for,Ie=V?pe:pe&&pe.withoutSetter||he,me=function(e){if(!de(fe,e)||!H&&"string"!=typeof fe[e]){var t="Symbol."+e;H&&de(pe,e)?fe[e]=pe[e]:fe[e]=V&&ge?ge(t):Ie(t)}return fe[e]},ve=TypeError,be=me("toPrimitive"),ke=function(e,t){if(!A(e)||Y(e))return e;var r,n=Z(e,be);if(n){if(void 0===t&&(t="default"),r=g(n,e,t),!A(r)||Y(r))return r;throw ve("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&_(r=e.toString)&&!A(n=g(r,e)))return n;if(_(r=e.valueOf)&&!A(n=g(r,e)))return n;if("string"!==t&&_(r=e.toString)&&!A(n=g(r,e)))return n;throw ee("Can't convert object to primitive value")}(e,t)},ye=function(e){var t=ke(e,"string");return Y(t)?t:t+""},xe=u.document,we=A(xe)&&A(xe.createElement),ze=function(e){return we?xe.createElement(e):{}},Ce=!h&&!l((function(){return 7!=Object.defineProperty(ze("div"),"a",{get:function(){return 7}}).a})),Pe=Object.getOwnPropertyDescriptor,Oe={f:h?Pe:function(e,t){if(e=M(e),t=ye(t),Ce)try{return Pe(e,t)}catch(e){}if(de(e,t))return b(!g(v.f,e,t),e[t])}},Ee=h&&l((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),qe=String,je=TypeError,Se=function(e){if(A(e))return e;throw je(qe(e)+" is not an object")},Te=TypeError,Me=Object.defineProperty,_e=Object.getOwnPropertyDescriptor,Ae={f:h?Ee?function(e,t,r){if(Se(e),t=ye(t),Se(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=_e(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 Me(e,t,r)}:Me:function(e,t,r){if(Se(e),t=ye(t),Se(r),Ce)try{return Me(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Te("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Re=h?function(e,t,r){return Ae.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Ue=Function.prototype,Be=h&&Object.getOwnPropertyDescriptor,Le=de(Ue,"name"),Fe={EXISTS:Le,PROPER:Le&&"something"===function(){}.name,CONFIGURABLE:Le&&(!h||h&&Be(Ue,"name").configurable)},Ne=z(Function.toString);_(ne.inspectSource)||(ne.inspectSource=function(e){return Ne(e)});var We,De,Ge,He=ne.inspectSource,Ve=u.WeakMap,$e=_(Ve)&&/native code/.test(He(Ve)),Ye=ie("keys"),Ke=function(e){return Ye[e]||(Ye[e]=he(e))},Je={},Qe=u.TypeError,Xe=u.WeakMap;if($e||ne.state){var Ze=ne.state||(ne.state=new Xe),et=z(Ze.get),tt=z(Ze.has),rt=z(Ze.set);We=function(e,t){if(tt(Ze,e))throw new Qe("Object already initialized");return t.facade=e,rt(Ze,e,t),t},De=function(e){return et(Ze,e)||{}},Ge=function(e){return tt(Ze,e)}}else{var nt=Ke("state");Je[nt]=!0,We=function(e,t){if(de(e,nt))throw new Qe("Object already initialized");return t.facade=e,Re(e,nt,t),t},De=function(e){return de(e,nt)?e[nt]:{}},Ge=function(e){return de(e,nt)}}var it={set:We,get:De,has:Ge,enforce:function(e){return Ge(e)?De(e):We(e,{})},getterFor:function(e){return function(t){var r;if(!A(t)||(r=De(t)).type!==e)throw Qe("Incompatible receiver, "+e+" required");return r}}},at=o((function(e){var t=Fe.CONFIGURABLE,r=it.enforce,n=it.get,i=Object.defineProperty,a=h&&!l((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),(!de(e,"name")||t&&e.name!==n)&&(h?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&de(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&de(s,"constructor")&&s.constructor?h&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return de(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return _(this)&&n(this).source||He(this)}),"toString")})),ot=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(_(r)&&at(r,a,n),n.global)i?e[t]=r:re(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Ae.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},st=Math.ceil,dt=Math.floor,ct=Math.trunc||function(e){var t=+e;return(t>0?dt:st)(t)},ut=function(e){var t=+e;return t!=t||0===t?0:ct(t)},lt=Math.max,ht=Math.min,ft=function(e,t){var r=ut(e);return r<0?lt(r+t,0):ht(r,t)},pt=Math.min,gt=function(e){return e>0?pt(ut(e),9007199254740991):0},It=function(e){return gt(e.length)},mt=function(e){return function(t,r,n){var i,a=M(t),o=It(a),s=ft(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}},vt={includes:mt(!0),indexOf:mt(!1)},bt=vt.indexOf,kt=z([].push),yt=function(e,t){var r,n=M(e),i=0,a=[];for(r in n)!de(Je,r)&&de(n,r)&&kt(a,r);for(;t.length>i;)de(n,r=t[i++])&&(~bt(a,r)||kt(a,r));return a},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=xt.concat("length","prototype"),zt={f:Object.getOwnPropertyNames||function(e){return yt(e,wt)}},Ct={f:Object.getOwnPropertySymbols},Pt=z([].concat),Ot=U("Reflect","ownKeys")||function(e){var t=zt.f(Se(e)),r=Ct.f;return r?Pt(t,r(e)):t},Et=function(e,t,r){for(var n=Ot(t),i=Ae.f,a=Oe.f,o=0;o<n.length;o++){var s=n[o];de(e,s)||r&&de(r,s)||i(e,s,a(t,s))}},qt=/#|\.prototype\./,jt=function(e,t){var r=Tt[St(e)];return r==_t||r!=Mt&&(_(t)?l(t):!!t)},St=jt.normalize=function(e){return String(e).replace(qt,".").toLowerCase()},Tt=jt.data={},Mt=jt.NATIVE="N",_t=jt.POLYFILL="P",At=jt,Rt=Oe.f,Ut=function(e,t){var r,n,i,a,o,s=e.target,d=e.global,c=e.stat;if(r=d?u:c?u[s]||re(s,{}):(u[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Rt(r,n))&&o.value:r[n],!At(d?n:s+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Et(a,i)}(e.sham||i&&i.sham)&&Re(a,"sham",!0),ot(r,n,a,e)}},Bt=Object.keys||function(e){return yt(e,xt)},Lt=l((function(){Bt(1)}));Ut({target:"Object",stat:!0,forced:Lt},{keys:function(e){return Bt(oe(e))}});var Ft={};Ft[me("toStringTag")]="z";var Nt,Wt="[object z]"===String(Ft),Dt=me("toStringTag"),Gt=Object,Ht="Arguments"==O(function(){return arguments}()),Vt=Wt?O: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=Gt(e),Dt))?r:Ht?O(t):"Object"==(n=O(t))&&_(t.callee)?"Arguments":n},$t=String,Yt=function(e){if("Symbol"===Vt(e))throw TypeError("Cannot convert a Symbol value to a string");return $t(e)},Kt={f:h&&!Ee?Object.defineProperties:function(e,t){Se(e);for(var r,n=M(t),i=Bt(t),a=i.length,o=0;a>o;)Ae.f(e,r=i[o++],n[r]);return e}},Jt=U("document","documentElement"),Qt=Ke("IE_PROTO"),Xt=function(){},Zt=function(e){return"<script>"+e+"<\/script>"},er=function(e){e.write(Zt("")),e.close();var t=e.parentWindow.Object;return e=null,t},tr=function(){try{Nt=new ActiveXObject("htmlfile")}catch(e){}var e,t;tr="undefined"!=typeof document?document.domain&&Nt?er(Nt):((t=ze("iframe")).style.display="none",Jt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Zt("document.F=Object")),e.close(),e.F):er(Nt);for(var r=xt.length;r--;)delete tr.prototype[xt[r]];return tr()};Je[Qt]=!0;var rr=Object.create||function(e,t){var r;return null!==e?(Xt.prototype=Se(e),r=new Xt,Xt.prototype=null,r[Qt]=e):r=tr(),void 0===t?r:Kt.f(r,t)},nr=function(e,t,r){var n=ye(t);n in e?Ae.f(e,n,b(0,r)):e[n]=r},ir=Array,ar=Math.max,or=function(e,t,r){for(var n=It(e),i=ft(t,n),a=ft(void 0===r?n:r,n),o=ir(ar(a-i,0)),s=0;i<a;i++,s++)nr(o,s,e[i]);return o.length=s,o},sr=zt.f,dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],cr={f:function(e){return dr&&"Window"==O(e)?function(e){try{return sr(e)}catch(e){return or(dr)}}(e):sr(M(e))}},ur={f:me},lr=u,hr=Ae.f,fr=Ae.f,pr=me("toStringTag"),gr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!de(e,pr)&&fr(e,pr,{configurable:!0,value:t})},Ir=z(z.bind),mr=function(e,t){return X(e),void 0===t?e:f?Ir(e,t):function(){return e.apply(t,arguments)}},vr=Array.isArray||function(e){return"Array"==O(e)},br=function(){},kr=[],yr=U("Reflect","construct"),xr=/^\s*(?:class|function)\b/,wr=z(xr.exec),zr=!xr.exec(br),Cr=function(e){if(!_(e))return!1;try{return yr(br,kr,e),!0}catch(e){return!1}},Pr=function(e){if(!_(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zr||!!wr(xr,He(e))}catch(e){return!0}};Pr.sham=!0;var Or=!yr||l((function(){var e;return Cr(Cr.call)||!Cr(Object)||!Cr((function(){e=!0}))||e}))?Pr:Cr,Er=me("species"),qr=Array,jr=function(e,t){return new(function(e){var t;return vr(e)&&(t=e.constructor,(Or(t)&&(t===qr||vr(t.prototype))||A(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?qr:t}(e))(0===t?0:t)},Sr=z([].push),Tr=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(d,c,u,l){for(var h,f,p=oe(d),g=j(p),I=mr(c,u),m=It(g),v=0,b=l||jr,k=t?b(d,m):r||o?b(d,0):void 0;m>v;v++)if((s||v in g)&&(f=I(h=g[v],v,p),e))if(t)k[v]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Sr(k,h)}else switch(e){case 4:return!1;case 7:Sr(k,h)}return a?-1:n||i?i:k}},Mr={forEach:Tr(0),map:Tr(1),filter:Tr(2),some:Tr(3),every:Tr(4),find:Tr(5),findIndex:Tr(6),filterReject:Tr(7)},_r=Mr.forEach,Ar=Ke("hidden"),Rr=it.set,Ur=it.getterFor("Symbol"),Br=Object.prototype,Lr=u.Symbol,Fr=Lr&&Lr.prototype,Nr=u.TypeError,Wr=u.QObject,Dr=Oe.f,Gr=Ae.f,Hr=cr.f,Vr=v.f,$r=z([].push),Yr=ie("symbols"),Kr=ie("op-symbols"),Jr=ie("wks"),Qr=!Wr||!Wr.prototype||!Wr.prototype.findChild,Xr=h&&l((function(){return 7!=rr(Gr({},"a",{get:function(){return Gr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Dr(Br,t);n&&delete Br[t],Gr(e,t,r),n&&e!==Br&&Gr(Br,t,n)}:Gr,Zr=function(e,t){var r=Yr[e]=rr(Fr);return Rr(r,{type:"Symbol",tag:e,description:t}),h||(r.description=t),r},en=function(e,t,r){e===Br&&en(Kr,t,r),Se(e);var n=ye(t);return Se(r),de(Yr,n)?(r.enumerable?(de(e,Ar)&&e[Ar][n]&&(e[Ar][n]=!1),r=rr(r,{enumerable:b(0,!1)})):(de(e,Ar)||Gr(e,Ar,b(1,{})),e[Ar][n]=!0),Xr(e,n,r)):Gr(e,n,r)},tn=function(e,t){Se(e);var r=M(t),n=Bt(r).concat(on(r));return _r(n,(function(t){h&&!g(rn,r,t)||en(e,t,r[t])})),e},rn=function(e){var t=ye(e),r=g(Vr,this,t);return!(this===Br&&de(Yr,t)&&!de(Kr,t))&&(!(r||!de(this,t)||!de(Yr,t)||de(this,Ar)&&this[Ar][t])||r)},nn=function(e,t){var r=M(e),n=ye(t);if(r!==Br||!de(Yr,n)||de(Kr,n)){var i=Dr(r,n);return!i||!de(Yr,n)||de(r,Ar)&&r[Ar][n]||(i.enumerable=!0),i}},an=function(e){var t=Hr(M(e)),r=[];return _r(t,(function(e){de(Yr,e)||de(Je,e)||$r(r,e)})),r},on=function(e){var t=e===Br,r=Hr(t?Kr:M(e)),n=[];return _r(r,(function(e){!de(Yr,e)||t&&!de(Br,e)||$r(n,Yr[e])})),n};H||(Fr=(Lr=function(){if(B(Fr,this))throw Nr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Yt(arguments[0]):void 0,t=he(e),r=function(e){this===Br&&g(r,Kr,e),de(this,Ar)&&de(this[Ar],t)&&(this[Ar][t]=!1),Xr(this,t,b(1,e))};return h&&Qr&&Xr(Br,t,{configurable:!0,set:r}),Zr(t,e)}).prototype,ot(Fr,"toString",(function(){return Ur(this).tag})),ot(Lr,"withoutSetter",(function(e){return Zr(he(e),e)})),v.f=rn,Ae.f=en,Kt.f=tn,Oe.f=nn,zt.f=cr.f=an,Ct.f=on,ur.f=function(e){return Zr(me(e),e)},h&&(Gr(Fr,"description",{configurable:!0,get:function(){return Ur(this).description}}),ot(Br,"propertyIsEnumerable",rn,{unsafe:!0}))),Ut({global:!0,constructor:!0,wrap:!0,forced:!H,sham:!H},{Symbol:Lr}),_r(Bt(Jr),(function(e){!function(e){var t=lr.Symbol||(lr.Symbol={});de(t,e)||hr(t,e,{value:ur.f(e)})}(e)})),Ut({target:"Symbol",stat:!0,forced:!H},{useSetter:function(){Qr=!0},useSimple:function(){Qr=!1}}),Ut({target:"Object",stat:!0,forced:!H,sham:!h},{create:function(e,t){return void 0===t?rr(e):tn(rr(e),t)},defineProperty:en,defineProperties:tn,getOwnPropertyDescriptor:nn}),Ut({target:"Object",stat:!0,forced:!H},{getOwnPropertyNames:an}),function(){var e=U("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=me("toPrimitive");t&&!t[n]&&ot(t,n,(function(e){return g(r,this)}),{arity:1})}(),gr(Lr,"Symbol"),Je[Ar]=!0;var sn=H&&!!Symbol.for&&!!Symbol.keyFor,dn=ie("string-to-symbol-registry"),cn=ie("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!sn},{for:function(e){var t=Yt(e);if(de(dn,t))return dn[t];var r=U("Symbol")(t);return dn[t]=r,cn[r]=t,r}});var un=ie("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!sn},{keyFor:function(e){if(!Y(e))throw TypeError(J(e)+" is not a symbol");if(de(un,e))return un[e]}});var ln=Function.prototype,hn=ln.apply,fn=ln.call,pn="object"==typeof Reflect&&Reflect.apply||(f?fn.bind(hn):function(){return fn.apply(hn,arguments)}),gn=z([].slice),In=U("JSON","stringify"),mn=z(/./.exec),vn=z("".charAt),bn=z("".charCodeAt),kn=z("".replace),yn=z(1..toString),xn=/[\uD800-\uDFFF]/g,wn=/^[\uD800-\uDBFF]$/,zn=/^[\uDC00-\uDFFF]$/,Cn=!H||l((function(){var e=U("Symbol")();return"[null]"!=In([e])||"{}"!=In({a:e})||"{}"!=In(Object(e))})),Pn=l((function(){return'"\\udf06\\ud834"'!==In("\udf06\ud834")||'"\\udead"'!==In("\udead")})),On=function(e,t){var r=gn(arguments),n=t;if((A(t)||void 0!==e)&&!Y(e))return vr(t)||(t=function(e,t){if(_(n)&&(t=g(n,this,e,t)),!Y(t))return t}),r[1]=t,pn(In,null,r)},En=function(e,t,r){var n=vn(r,t-1),i=vn(r,t+1);return mn(wn,e)&&!mn(zn,i)||mn(zn,e)&&!mn(wn,n)?"\\u"+yn(bn(e,0),16):e};In&&Ut({target:"JSON",stat:!0,arity:3,forced:Cn||Pn},{stringify:function(e,t,r){var n=gn(arguments),i=pn(Cn?On:In,null,n);return Pn&&"string"==typeof i?kn(i,xn,En):i}});var qn=!H||l((function(){Ct.f(1)}));Ut({target:"Object",stat:!0,forced:qn},{getOwnPropertySymbols:function(e){var t=Ct.f;return t?t(oe(e)):[]}});var jn=me("species"),Sn=function(e){return G>=51||!l((function(){var t=[];return(t.constructor={})[jn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Tn=Mr.filter,Mn=Sn("filter");Ut({target:"Array",proto:!0,forced:!Mn},{filter:function(e){return Tn(this,e,arguments.length>1?arguments[1]:void 0)}});var _n=Wt?{}.toString:function(){return"[object "+Vt(this)+"]"};Wt||ot(Object.prototype,"toString",_n,{unsafe:!0});var An=Oe.f,Rn=l((function(){An(1)}));Ut({target:"Object",stat:!0,forced:!h||Rn,sham:!h},{getOwnPropertyDescriptor:function(e,t){return An(M(e),t)}});var Un={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},Bn=ze("span").classList,Ln=Bn&&Bn.constructor&&Bn.constructor.prototype,Fn=Ln===Object.prototype?void 0:Ln,Nn=function(e,t){var r=[][e];return!!r&&l((function(){r.call(null,t||function(){return 1},1)}))},Wn=Mr.forEach,Dn=Nn("forEach")?[].forEach:function(e){return Wn(this,e,arguments.length>1?arguments[1]:void 0)},Gn=function(e){if(e&&e.forEach!==Dn)try{Re(e,"forEach",Dn)}catch(t){e.forEach=Dn}};for(var Hn in Un)Un[Hn]&&Gn(u[Hn]&&u[Hn].prototype);Gn(Fn),Ut({target:"Object",stat:!0,sham:!h},{getOwnPropertyDescriptors:function(e){for(var t,r,n=M(e),i=Oe.f,a=Ot(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&nr(o,t,r);return o}});var Vn=Kt.f;Ut({target:"Object",stat:!0,forced:Object.defineProperties!==Vn,sham:!h},{defineProperties:Vn});var $n=Ae.f;Ut({target:"Object",stat:!0,forced:Object.defineProperty!==$n,sham:!h},{defineProperty:$n});var Yn,Kn=me("match"),Jn=TypeError,Qn=function(e){if(function(e){var t;return A(e)&&(void 0!==(t=e[Kn])?!!t:"RegExp"==O(e))}(e))throw Jn("The method doesn't accept regular expressions");return e},Xn=me("match"),Zn=Oe.f,ei=z("".startsWith),ti=z("".slice),ri=Math.min,ni=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Xn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ii=!(ni||(Yn=Zn(String.prototype,"startsWith"),!Yn||Yn.writable));Ut({target:"String",proto:!0,forced:!ii&&!ni},{startsWith:function(e){var t=Yt(T(this));Qn(e);var r=gt(ri(arguments.length>1?arguments[1]:void 0,t.length)),n=Yt(e);return ei?ei(t,n,r):ti(t,r,r+n.length)===n}});var ai=function(){var e=Se(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},oi=RegExp.prototype,si=Fe.PROPER,di=RegExp.prototype.toString,ci=l((function(){return"/a/b"!=di.call({source:"a",flags:"b"})})),ui=si&&"toString"!=di.name;function li(e,t,r,n,i,a,o){try{var s=e[a](o),d=s.value}catch(e){return void r(e)}s.done?t(d):Promise.resolve(d).then(n,i)}function hi(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){li(a,n,i,o,s,"next",e)}function s(e){li(a,n,i,o,s,"throw",e)}o(void 0)}))}}function fi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pi(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 gi(e,t,r){return t&&pi(e.prototype,t),r&&pi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ii(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(ci||ui)&&ot(RegExp.prototype,"toString",(function(){var e=Se(this);return"/"+Yt(e.source)+"/"+Yt(function(e){var t=e.flags;return void 0!==t||"flags"in oi||de(e,"flags")||!B(oi,e)?t:g(ai,e)}(e))}),{unsafe:!0});var mi=Object.prototype,vi=mi.hasOwnProperty,bi="function"==typeof Symbol?Symbol:{},ki=bi.iterator||"@@iterator",yi=bi.asyncIterator||"@@asyncIterator",xi=bi.toStringTag||"@@toStringTag";function wi(e,t,r,n){var i=t&&t.prototype instanceof Pi?t:Pi,a=Object.create(i.prototype),o=new Li(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 Ni()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=Ri(o,r);if(s){if(s===Ci)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 d=zi(e,t,r);if("normal"===d.type){if(n=r.done?"completed":"suspendedYield",d.arg===Ci)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(n="completed",r.method="throw",r.arg=d.arg)}}}(e,r,o),a}function zi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var Ci={};function Pi(){}function Oi(){}function Ei(){}var qi={};qi[ki]=function(){return this};var ji=Object.getPrototypeOf,Si=ji&&ji(ji(Fi([])));Si&&Si!==mi&&vi.call(Si,ki)&&(qi=Si);var Ti=Ei.prototype=Pi.prototype=Object.create(qi);function Mi(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function _i(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Oi||"GeneratorFunction"===(t.displayName||t.name))}function Ai(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=zi(e[n],e,i);if("throw"!==s.type){var d=s.arg,c=d.value;return c&&"object"==typeof c&&vi.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(c).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function Ri(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,Ri(e,t),"throw"===t.method))return Ci;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return Ci}var n=zi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,Ci;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,Ci):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,Ci)}function Ui(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 Bi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Li(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ui,this),this.reset(!0)}function Fi(e){if(e){var t=e[ki];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(vi.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:Ni}}function Ni(){return{value:void 0,done:!0}}Oi.prototype=Ti.constructor=Ei,Ei.constructor=Oi,Ei[xi]=Oi.displayName="GeneratorFunction",Mi(Ai.prototype),Ai.prototype[yi]=function(){return this},Mi(Ti),Ti[xi]="Generator",Ti[ki]=function(){return this},Ti.toString=function(){return"[object Generator]"},Li.prototype={constructor:Li,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(Bi),!e)for(var t in this)"t"===t.charAt(0)&&vi.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=vi.call(i,"catchLoc"),s=vi.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&&vi.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,Ci):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),Ci},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),Bi(r),Ci}},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;Bi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Fi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),Ci}};var Wi={wrap:wi,isGeneratorFunction:_i,AsyncIterator:Ai,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Ei):(e.__proto__=Ei,xi in e||(e[xi]="GeneratorFunction")),e.prototype=Object.create(Ti),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new Ai(wi(e,t,r,n),i);return _i(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:Fi},Di=Ae.f,Gi=me("unscopables"),Hi=Array.prototype;null==Hi[Gi]&&Di(Hi,Gi,{configurable:!0,value:rr(null)});var Vi,$i,Yi,Ki=function(e){Hi[Gi][e]=!0},Ji={},Qi=!l((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Xi=Ke("IE_PROTO"),Zi=Object,ea=Zi.prototype,ta=Qi?Zi.getPrototypeOf:function(e){var t=oe(e);if(de(t,Xi))return t[Xi];var r=t.constructor;return _(r)&&t instanceof r?r.prototype:t instanceof Zi?ea:null},ra=me("iterator"),na=!1;[].keys&&("next"in(Yi=[].keys())?($i=ta(ta(Yi)))!==Object.prototype&&(Vi=$i):na=!0),(null==Vi||l((function(){var e={};return Vi[ra].call(e)!==e})))&&(Vi={}),_(Vi[ra])||ot(Vi,ra,(function(){return this}));var ia={IteratorPrototype:Vi,BUGGY_SAFARI_ITERATORS:na},aa=ia.IteratorPrototype,oa=function(){return this},sa=function(e,t,r,n){var i=t+" Iterator";return e.prototype=rr(aa,{next:b(+!n,r)}),gr(e,i,!1),Ji[i]=oa,e},da=String,ca=TypeError,ua=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=z(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Se(r),function(e){if("object"==typeof e||_(e))return e;throw ca("Can't set "+da(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),la=Fe.PROPER,ha=Fe.CONFIGURABLE,fa=ia.IteratorPrototype,pa=ia.BUGGY_SAFARI_ITERATORS,ga=me("iterator"),Ia=function(){return this},ma=function(e,t,r,n,i,a,o){sa(r,t,n);var s,d,c,u=function(e){if(e===i&&I)return I;if(!pa&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[ga]||f["@@iterator"]||i&&f[i],I=!pa&&p||u(i),m="Array"==t&&f.entries||p;if(m&&(s=ta(m.call(new e)))!==Object.prototype&&s.next&&(ta(s)!==fa&&(ua?ua(s,fa):_(s[ga])||ot(s,ga,Ia)),gr(s,l,!0)),la&&"values"==i&&p&&"values"!==p.name&&(ha?Re(f,"name","values"):(h=!0,I=function(){return g(p,this)})),i)if(d={values:u("values"),keys:a?I:u("keys"),entries:u("entries")},o)for(c in d)(pa||h||!(c in f))&&ot(f,c,d[c]);else Ut({target:t,proto:!0,forced:pa||h},d);return f[ga]!==I&&ot(f,ga,I,{name:i}),Ji[t]=I,d},va=Ae.f,ba=it.set,ka=it.getterFor("Array Iterator"),ya=ma(Array,"Array",(function(e,t){ba(this,{type:"Array Iterator",target:M(e),index:0,kind:t})}),(function(){var e=ka(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"),xa=Ji.Arguments=Ji.Array;if(Ki("keys"),Ki("values"),Ki("entries"),h&&"values"!==xa.name)try{va(xa,"name",{value:"values"})}catch(e){}var wa=z("".charAt),za=z("".charCodeAt),Ca=z("".slice),Pa=function(e){return function(t,r){var n,i,a=Yt(T(t)),o=ut(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=za(a,o))<55296||n>56319||o+1===s||(i=za(a,o+1))<56320||i>57343?e?wa(a,o):n:e?Ca(a,o,o+2):i-56320+(n-55296<<10)+65536}},Oa={codeAt:Pa(!1),charAt:Pa(!0)},Ea=Oa.charAt,qa=it.set,ja=it.getterFor("String Iterator");ma(String,"String",(function(e){qa(this,{type:"String Iterator",string:Yt(e),index:0})}),(function(){var e,t=ja(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Ea(r,n),t.index+=e.length,{value:e,done:!1})}));var Sa=me("iterator"),Ta=me("toStringTag"),Ma=ya.values,_a=function(e,t){if(e){if(e[Sa]!==Ma)try{Re(e,Sa,Ma)}catch(t){e[Sa]=Ma}if(e[Ta]||Re(e,Ta,t),Un[t])for(var r in ya)if(e[r]!==ya[r])try{Re(e,r,ya[r])}catch(t){e[r]=ya[r]}}};for(var Aa in Un)_a(u[Aa]&&u[Aa].prototype,Aa);_a(Fn,"DOMTokenList");var Ra=me("iterator"),Ua=!l((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[Ra]||"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})),Ba=function(e,t,r){for(var n in t)ot(e,n,t[n],r);return e},La=TypeError,Fa=function(e,t){if(B(t,e))return e;throw La("Incorrect invocation")},Na=me("iterator"),Wa=function(e){if(null!=e)return Z(e,Na)||Z(e,"@@iterator")||Ji[Vt(e)]},Da=TypeError,Ga=function(e,t){var r=arguments.length<2?Wa(e):t;if(X(r))return Se(g(r,e));throw Da(J(e)+" is not iterable")},Ha=TypeError,Va=function(e,t){if(e<t)throw Ha("Not enough arguments");return e},$a=Math.floor,Ya=function(e,t){var r=e.length,n=$a(r/2);return r<8?Ka(e,t):Ja(e,Ya(or(e,0,n),t),Ya(or(e,n),t),t)},Ka=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},Ja=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},Qa=Ya,Xa=me("iterator"),Za=it.set,eo=it.getterFor("URLSearchParams"),to=it.getterFor("URLSearchParamsIterator"),ro=Object.getOwnPropertyDescriptor,no=function(e){if(!h)return u[e];var t=ro(u,e);return t&&t.value},io=no("fetch"),ao=no("Request"),oo=no("Headers"),so=ao&&ao.prototype,co=oo&&oo.prototype,uo=u.RegExp,lo=u.TypeError,ho=u.decodeURIComponent,fo=u.encodeURIComponent,po=z("".charAt),go=z([].join),Io=z([].push),mo=z("".replace),vo=z([].shift),bo=z([].splice),ko=z("".split),yo=z("".slice),xo=/\+/g,wo=Array(4),zo=function(e){return wo[e-1]||(wo[e-1]=uo("((?:%[\\da-f]{2}){"+e+"})","gi"))},Co=function(e){try{return ho(e)}catch(t){return e}},Po=function(e){var t=mo(e,xo," "),r=4;try{return ho(t)}catch(e){for(;r;)t=mo(t,zo(r--),Co);return t}},Oo=/[!'()~]|%20/g,Eo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},qo=function(e){return Eo[e]},jo=function(e){return mo(fo(e),Oo,qo)},So=sa((function(e,t){Za(this,{type:"URLSearchParamsIterator",iterator:Ga(eo(e).entries),kind:t})}),"Iterator",(function(){var e=to(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),To=function(e){this.entries=[],this.url=null,void 0!==e&&(A(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===po(e,0)?yo(e,1):e:Yt(e)))};To.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,d=Wa(e);if(d)for(r=(t=Ga(e,d)).next;!(n=g(r,t)).done;){if(a=(i=Ga(Se(n.value))).next,(o=g(a,i)).done||(s=g(a,i)).done||!g(a,i).done)throw lo("Expected sequence with length 2");Io(this.entries,{key:Yt(o.value),value:Yt(s.value)})}else for(var c in e)de(e,c)&&Io(this.entries,{key:c,value:Yt(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=ko(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ko(t,"="),Io(this.entries,{key:Po(vo(r)),value:Po(go(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Io(r,jo(e.key)+"="+jo(e.value));return go(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Mo=function(){Fa(this,_o);var e=arguments.length>0?arguments[0]:void 0;Za(this,new To(e))},_o=Mo.prototype;if(Ba(_o,{append:function(e,t){Va(arguments.length,2);var r=eo(this);Io(r.entries,{key:Yt(e),value:Yt(t)}),r.updateURL()},delete:function(e){Va(arguments.length,1);for(var t=eo(this),r=t.entries,n=Yt(e),i=0;i<r.length;)r[i].key===n?bo(r,i,1):i++;t.updateURL()},get:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Io(n,t[i].value);return n},has:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Va(arguments.length,1);for(var r,n=eo(this),i=n.entries,a=!1,o=Yt(e),s=Yt(t),d=0;d<i.length;d++)(r=i[d]).key===o&&(a?bo(i,d--,1):(a=!0,r.value=s));a||Io(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=eo(this);Qa(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=eo(this).entries,n=mr(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 So(this,"keys")},values:function(){return new So(this,"values")},entries:function(){return new So(this,"entries")}},{enumerable:!0}),ot(_o,Xa,_o.entries,{name:"entries"}),ot(_o,"toString",(function(){return eo(this).serialize()}),{enumerable:!0}),gr(Mo,"URLSearchParams"),Ut({global:!0,constructor:!0,forced:!Ua},{URLSearchParams:Mo}),!Ua&&_(oo)){var Ao=z(co.has),Ro=z(co.set),Uo=function(e){if(A(e)){var t,r=e.body;if("URLSearchParams"===Vt(r))return t=e.headers?new oo(e.headers):new oo,Ao(t,"content-type")||Ro(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),rr(e,{body:b(0,Yt(r)),headers:b(0,t)})}return e};if(_(io)&&Ut({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return io(e,arguments.length>1?Uo(arguments[1]):{})}}),_(ao)){var Bo=function(e){return Fa(this,so),new ao(e,arguments.length>1?Uo(arguments[1]):{})};so.constructor=Bo,Bo.prototype=so,Ut({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Bo})}}var Lo={URLSearchParams:Mo,getState:eo};function Fo(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 No(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wo=gi((function e(t){if(fi(this,e),Ii(this,"baseUri",void 0),Ii(this,"proxy",void 0),Ii(this,"headers",void 0),Ii(this,"parameters",void 0),Ii(this,"fetchOptions",void 0),Ii(this,"transformRequest",void 0),Ii(this,"throwOnBadResponse",void 0),this.headers=No({},t.headers),this.parameters=No({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=No({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 Do(e){return(Do="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)}Ii(Wo,"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}}}),Ut({global:!0},{globalThis:u});var Go="object"===("undefined"==typeof window?"undefined":Do(window))&&"object"===Do(window.document),Ho="object"===("undefined"==typeof process?"undefined":Do(process))&&"object"===Do(process.versions)&&"string"==typeof process.versions.node,Vo=Go?window:globalThis,$o="function"==typeof Vo.fetch,Yo=function(){if(Ho)return require("node-fetch").default;if(!$o)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Vo.fetch}(),Ko=Function,Jo=z([].concat),Qo=z([].join),Xo={},Zo=function(e,t,r){if(!de(Xo,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Xo[t]=Ko("C,a","return new C("+Qo(n,",")+")")}return Xo[t](e,r)},es=f?Ko.bind:function(e){var t=X(this),r=t.prototype,n=gn(arguments,1),i=function(){var r=Jo(n,gn(arguments));return this instanceof i?Zo(t,r.length,r):t.apply(e,r)};return A(r)&&(i.prototype=r),i},ts=TypeError,rs=function(e){if(Or(e))return e;throw ts(J(e)+" is not a constructor")},ns=U("Reflect","construct"),is=Object.prototype,as=[].push,os=l((function(){function e(){}return!(ns((function(){}),[],e)instanceof e)})),ss=!l((function(){ns((function(){}))})),ds=os||ss;Ut({target:"Reflect",stat:!0,forced:ds,sham:ds},{construct:function(e,t){rs(e),Se(t);var r=arguments.length<3?e:rs(arguments[2]);if(ss&&!os)return ns(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 pn(as,n,t),new(pn(es,e,n))}var i=r.prototype,a=rr(A(i)?i:is),o=pn(e,a,t);return A(o)?o:a}});var cs=TypeError,us=function(e){if(e>9007199254740991)throw cs("Maximum allowed index exceeded");return e},ls=me("isConcatSpreadable"),hs=G>=51||!l((function(){var e=[];return e[ls]=!1,e.concat()[0]!==e})),fs=Sn("concat"),ps=function(e){if(!A(e))return!1;var t=e[ls];return void 0!==t?!!t:vr(e)};function gs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Is(e,t){return(Is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ms(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&&Is(e,t)}function vs(e,t){if(t&&("object"===Do(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return gs(e)}function bs(e){return(bs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ks(){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 ys(e,t,r){return(ys=ks()?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&&Is(i,r.prototype),i}).apply(null,arguments)}function xs(e){var t="function"==typeof Map?new Map:void 0;return(xs=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 ys(e,arguments,bs(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Is(n,e)})(e)}function ws(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=bs(e);if(t){var i=bs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vs(this,r)}}Ut({target:"Array",proto:!0,arity:1,forced:!hs||!fs},{concat:function(e){var t,r,n,i,a,o=oe(this),s=jr(o,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(ps(a=-1===t?o:arguments[t]))for(i=It(a),us(d+i),r=0;r<i;r++,d++)r in a&&nr(s,d,a[r]);else us(d+1),nr(s,d++,a);return s.length=d,s}});var zs=function(e){ms(r,e);var t=ws(r);function r(e){var n;return fi(this,r),Ii(gs(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return gi(r)}(xs(Error));function Cs(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 Ps(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Cs(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cs(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Os,Es,qs=function(){var e=hi(Wi.mark((function e(t,r,n,i){var a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=Ps(Ps({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=Ps(Ps({},null==n?void 0:n.fetchOptions),{},{headers:o,body:null==r?void 0:r.body,method:null!==(a=null==r?void 0:r.method)&&void 0!==a?a:"GET"}),e.next=4,Yo(t,s);case 4:if(d=e.sent,!i){e.next=7;break}return e.abrupt("return",d);case 7:if(null==n||!n.throwOnBadResponse||d.ok||304===d.status){e.next=11;break}throw new zs(d);case 11:return e.next=13,d.text();case 13:return c=e.sent,e.abrupt("return",c?JSON.parse(c):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),js=u.RegExp,Ss=l((function(){var e=js("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Ts=Ss||l((function(){return!js("a","y").sticky})),Ms={BROKEN_CARET:Ss||l((function(){var e=js("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Ts,UNSUPPORTED_Y:Ss},_s=u.RegExp,As=l((function(){var e=_s(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Rs=u.RegExp,Us=l((function(){var e=Rs("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Bs=it.get,Ls=ie("native-string-replace",String.prototype.replace),Fs=RegExp.prototype.exec,Ns=Fs,Ws=z("".charAt),Ds=z("".indexOf),Gs=z("".replace),Hs=z("".slice),Vs=(Es=/b*/g,g(Fs,Os=/a/,"a"),g(Fs,Es,"a"),0!==Os.lastIndex||0!==Es.lastIndex),$s=Ms.BROKEN_CARET,Ys=void 0!==/()??/.exec("")[1];(Vs||Ys||$s||As||Us)&&(Ns=function(e){var t,r,n,i,a,o,s,d=this,c=Bs(d),u=Yt(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=g(Ns,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,f=$s&&d.sticky,p=g(ai,d),I=d.source,m=0,v=u;if(f&&(p=Gs(p,"y",""),-1===Ds(p,"g")&&(p+="g"),v=Hs(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==Ws(u,d.lastIndex-1))&&(I="(?: "+I+")",v=" "+v,m++),r=new RegExp("^(?:"+I+")",p)),Ys&&(r=new RegExp("^"+I+"$(?!\\s)",p)),Vs&&(n=d.lastIndex),i=g(Fs,f?r:d,v),f?i?(i.input=Hs(i.input,m),i[0]=Hs(i[0],m),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:Vs&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),Ys&&i&&i.length>1&&g(Ls,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=o=rr(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=i[s[1]];return i});var Ks=Ns;Ut({target:"RegExp",proto:!0,forced:/./.exec!==Ks},{exec:Ks});var Js=me("species"),Qs=RegExp.prototype,Xs=function(e,t,r,n){var i=me(e),a=!l((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!l((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[Js]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=z(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=z(e),d=t.exec;return d===Ks||d===Qs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));ot(String.prototype,e,d[0]),ot(Qs,i,d[1])}n&&Re(Qs[i],"sham",!0)},Zs=Oa.charAt,ed=function(e,t,r){return t+(r?Zs(e,t).length:1)},td=Math.floor,rd=z("".charAt),nd=z("".replace),id=z("".slice),ad=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,od=/\$([$&'`]|\d{1,2})/g,sd=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,d=od;return void 0!==i&&(i=oe(i),d=ad),nd(a,d,(function(a,d){var c;switch(rd(d,0)){case"$":return"$";case"&":return e;case"`":return id(t,0,r);case"'":return id(t,o);case"<":c=i[id(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>s){var l=td(u/10);return 0===l?a:l<=s?void 0===n[l-1]?rd(d,1):n[l-1]+rd(d,1):a}c=n[u-1]}return void 0===c?"":c}))},dd=TypeError,cd=function(e,t){var r=e.exec;if(_(r)){var n=g(r,e,t);return null!==n&&Se(n),n}if("RegExp"===O(e))return g(Ks,e,t);throw dd("RegExp#exec called on incompatible receiver")},ud=me("replace"),ld=Math.max,hd=Math.min,fd=z([].concat),pd=z([].push),gd=z("".indexOf),Id=z("".slice),md="$0"==="a".replace(/./,"$0"),vd=!!/./[ud]&&""===/./[ud]("a","$0");Xs("replace",(function(e,t,r){var n=vd?"$":"$0";return[function(e,r){var n=T(this),i=null==e?void 0:Z(e,ud);return i?g(i,e,n,r):g(t,Yt(n),e,r)},function(e,i){var a=Se(this),o=Yt(e);if("string"==typeof i&&-1===gd(i,n)&&-1===gd(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var d=_(i);d||(i=Yt(i));var c=a.global;if(c){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=cd(a,o);if(null===h)break;if(pd(l,h),!c)break;""===Yt(h[0])&&(a.lastIndex=ed(o,gt(a.lastIndex),u))}for(var f,p="",g=0,I=0;I<l.length;I++){for(var m=Yt((h=l[I])[0]),v=ld(hd(ut(h.index),o.length),0),b=[],k=1;k<h.length;k++)pd(b,void 0===(f=h[k])?f:String(f));var y=h.groups;if(d){var x=fd([m],b,v,o);void 0!==y&&pd(x,y);var w=Yt(pn(i,void 0,x))}else w=sd(m,o,v,b,y,i);v>=g&&(p+=Id(o,g,v)+w,g=v+m.length)}return p+Id(o,g)}]}),!!l((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!md||vd);var bd,kd=function(e,t,r){return r.get&&at(r.get,t,{getter:!0}),r.set&&at(r.set,t,{setter:!0}),Ae.f(e,t,r)},yd=Object.assign,xd=Object.defineProperty,wd=z([].concat),zd=!yd||l((function(){if(h&&1!==yd({b:1},yd(xd({},"a",{enumerable:!0,get:function(){xd(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!=yd({},e)[r]||"abcdefghijklmnopqrst"!=Bt(yd({},t)).join("")}))?function(e,t){for(var r=oe(e),n=arguments.length,i=1,a=Ct.f,o=v.f;n>i;)for(var s,d=j(arguments[i++]),c=a?wd(Bt(d),a(d)):Bt(d),u=c.length,l=0;u>l;)s=c[l++],h&&!g(o,d,s)||(r[s]=d[s]);return r}:yd,Cd=function(e,t,r){var n,i;Se(e);try{if(!(n=Z(e,"return"))){if("throw"===t)throw r;return r}n=g(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Se(n),r},Pd=function(e,t,r,n){try{return n?t(Se(r)[0],r[1]):t(r)}catch(t){Cd(e,"throw",t)}},Od=me("iterator"),Ed=Array.prototype,qd=function(e){return void 0!==e&&(Ji.Array===e||Ed[Od]===e)},jd=Array,Sd=function(e){var t=oe(e),r=Or(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=mr(i,n>2?arguments[2]:void 0));var o,s,d,c,u,l,h=Wa(t),f=0;if(!h||this===jd&&qd(h))for(o=It(t),s=r?new this(o):jd(o);o>f;f++)l=a?i(t[f],f):t[f],nr(s,f,l);else for(u=(c=Ga(t,h)).next,s=r?new this:[];!(d=g(u,c)).done;f++)l=a?Pd(c,i,[d.value,f],!0):d.value,nr(s,f,l);return s.length=f,s},Td=/[^\0-\u007E]/,Md=/[.\u3002\uFF0E\uFF61]/g,_d="Overflow: input needs wider integers to process",Ad=RangeError,Rd=z(Md.exec),Ud=Math.floor,Bd=String.fromCharCode,Ld=z("".charCodeAt),Fd=z([].join),Nd=z([].push),Wd=z("".replace),Dd=z("".split),Gd=z("".toLowerCase),Hd=function(e){return e+22+75*(e<26)},Vd=function(e,t,r){var n=0;for(e=r?Ud(e/700):e>>1,e+=Ud(e/t);e>455;)e=Ud(e/35),n+=36;return Ud(n+36*e/(e+38))},$d=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Ld(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Ld(e,r++);56320==(64512&a)?Nd(t,((1023&i)<<10)+(1023&a)+65536):(Nd(t,i),r--)}else Nd(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Nd(n,Bd(r));var d=n.length,c=d;for(d&&Nd(n,"-");c<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var l=c+1;if(u-a>Ud((2147483647-o)/l))throw Ad(_d);for(o+=(u-a)*l,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw Ad(_d);if(r==a){for(var h=o,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(h<p)break;var g=h-p,I=36-p;Nd(n,Bd(Hd(p+g%I))),h=Ud(g/I),f+=36}Nd(n,Bd(Hd(h))),s=Vd(o,l,c==d),o=0,c++}}o++,a++}return Fd(n,"")},Yd=Oa.codeAt,Kd=it.set,Jd=it.getterFor("URL"),Qd=Lo.URLSearchParams,Xd=Lo.getState,Zd=u.URL,ec=u.TypeError,tc=u.parseInt,rc=Math.floor,nc=Math.pow,ic=z("".charAt),ac=z(/./.exec),oc=z([].join),sc=z(1..toString),dc=z([].pop),cc=z([].push),uc=z("".replace),lc=z([].shift),hc=z("".split),fc=z("".slice),pc=z("".toLowerCase),gc=z([].unshift),Ic=/[a-z]/i,mc=/[\d+-.a-z]/i,vc=/\d/,bc=/^0x/i,kc=/^[0-7]+$/,yc=/^\d+$/,xc=/^[\da-f]+$/i,wc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,zc=/[\0\t\n\r #/:<>?@[\\\]^|]/,Cc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Pc=/[\t\n\r]/g,Oc=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)gc(t,e%256),e=rc(e/256);return oc(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+=sc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ec={},qc=zd({},Ec,{" ":1,'"':1,"<":1,">":1,"`":1}),jc=zd({},qc,{"#":1,"?":1,"{":1,"}":1}),Sc=zd({},jc,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Tc=function(e,t){var r=Yd(e,0);return r>32&&r<127&&!de(t,e)?e:encodeURIComponent(e)},Mc={ftp:21,file:null,http:80,https:443,ws:80,wss:443},_c=function(e,t){var r;return 2==e.length&&ac(Ic,ic(e,0))&&(":"==(r=ic(e,1))||!t&&"|"==r)},Ac=function(e){var t;return e.length>1&&_c(fc(e,0,2))&&(2==e.length||"/"===(t=ic(e,2))||"\\"===t||"?"===t||"#"===t)},Rc=function(e){return"."===e||"%2e"===pc(e)},Uc={},Bc={},Lc={},Fc={},Nc={},Wc={},Dc={},Gc={},Hc={},Vc={},$c={},Yc={},Kc={},Jc={},Qc={},Xc={},Zc={},eu={},tu={},ru={},nu={},iu=function(e,t,r){var n,i,a,o=Yt(e);if(t){if(i=this.parse(o))throw ec(i);this.searchParams=null}else{if(void 0!==r&&(n=new iu(r,!0)),i=this.parse(o,null,n))throw ec(i);(a=Xd(new Qd)).bindURL(this),this.searchParams=a}};iu.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,d=this,c=t||Uc,u=0,l="",h=!1,f=!1,p=!1;for(e=Yt(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=uc(e,Cc,"")),e=uc(e,Pc,""),n=Sd(e);u<=n.length;){switch(i=n[u],c){case Uc:if(!i||!ac(Ic,i)){if(t)return"Invalid scheme";c=Lc;continue}l+=pc(i),c=Bc;break;case Bc:if(i&&(ac(mc,i)||"+"==i||"-"==i||"."==i))l+=pc(i);else{if(":"!=i){if(t)return"Invalid scheme";l="",c=Lc,u=0;continue}if(t&&(d.isSpecial()!=de(Mc,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Mc[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?c=Jc:d.isSpecial()&&r&&r.scheme==d.scheme?c=Fc:d.isSpecial()?c=Gc:"/"==n[u+1]?(c=Nc,u++):(d.cannotBeABaseURL=!0,cc(d.path,""),c=tu)}break;case Lc:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){d.scheme=r.scheme,d.path=or(r.path),d.query=r.query,d.fragment="",d.cannotBeABaseURL=!0,c=nu;break}c="file"==r.scheme?Jc:Wc;continue;case Fc:if("/"!=i||"/"!=n[u+1]){c=Wc;continue}c=Hc,u++;break;case Nc:if("/"==i){c=Vc;break}c=eu;continue;case Wc:if(d.scheme=r.scheme,i==bd)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.query=r.query;else if("/"==i||"\\"==i&&d.isSpecial())c=Dc;else if("?"==i)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.query="",c=ru;else{if("#"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.path.length--,c=eu;continue}d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.query=r.query,d.fragment="",c=nu}break;case Dc:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,c=eu;continue}c=Vc}else c=Hc;break;case Gc:if(c=Hc,"/"!=i||"/"!=ic(l,u+1))continue;u++;break;case Hc:if("/"!=i&&"\\"!=i){c=Vc;continue}break;case Vc:if("@"==i){h&&(l="%40"+l),h=!0,a=Sd(l);for(var g=0;g<a.length;g++){var I=a[g];if(":"!=I||p){var m=Tc(I,Sc);p?d.password+=m:d.username+=m}else p=!0}l=""}else if(i==bd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(h&&""==l)return"Invalid authority";u-=Sd(l).length+1,l="",c=$c}else l+=i;break;case $c:case Yc:if(t&&"file"==d.scheme){c=Xc;continue}if(":"!=i||f){if(i==bd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==l)return"Invalid host";if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(o=d.parseHost(l))return o;if(l="",c=Zc,t)return;continue}"["==i?f=!0:"]"==i&&(f=!1),l+=i}else{if(""==l)return"Invalid host";if(o=d.parseHost(l))return o;if(l="",c=Kc,t==Yc)return}break;case Kc:if(!ac(vc,i)){if(i==bd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=l){var v=tc(l,10);if(v>65535)return"Invalid port";d.port=d.isSpecial()&&v===Mc[d.scheme]?null:v,l=""}if(t)return;c=Zc;continue}return"Invalid port"}l+=i;break;case Jc:if(d.scheme="file","/"==i||"\\"==i)c=Qc;else{if(!r||"file"!=r.scheme){c=eu;continue}if(i==bd)d.host=r.host,d.path=or(r.path),d.query=r.query;else if("?"==i)d.host=r.host,d.path=or(r.path),d.query="",c=ru;else{if("#"!=i){Ac(oc(or(n,u),""))||(d.host=r.host,d.path=or(r.path),d.shortenPath()),c=eu;continue}d.host=r.host,d.path=or(r.path),d.query=r.query,d.fragment="",c=nu}}break;case Qc:if("/"==i||"\\"==i){c=Xc;break}r&&"file"==r.scheme&&!Ac(oc(or(n,u),""))&&(_c(r.path[0],!0)?cc(d.path,r.path[0]):d.host=r.host),c=eu;continue;case Xc:if(i==bd||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&_c(l))c=eu;else if(""==l){if(d.host="",t)return;c=Zc}else{if(o=d.parseHost(l))return o;if("localhost"==d.host&&(d.host=""),t)return;l="",c=Zc}continue}l+=i;break;case Zc:if(d.isSpecial()){if(c=eu,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=bd&&(c=eu,"/"!=i))continue}else d.fragment="",c=nu;else d.query="",c=ru;break;case eu:if(i==bd||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=pc(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||cc(d.path,"")):Rc(l)?"/"==i||"\\"==i&&d.isSpecial()||cc(d.path,""):("file"==d.scheme&&!d.path.length&&_c(l)&&(d.host&&(d.host=""),l=ic(l,0)+":"),cc(d.path,l)),l="","file"==d.scheme&&(i==bd||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)lc(d.path);"?"==i?(d.query="",c=ru):"#"==i&&(d.fragment="",c=nu)}else l+=Tc(i,jc);break;case tu:"?"==i?(d.query="",c=ru):"#"==i?(d.fragment="",c=nu):i!=bd&&(d.path[0]+=Tc(i,Ec));break;case ru:t||"#"!=i?i!=bd&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":Tc(i,Ec)):(d.fragment="",c=nu);break;case nu:i!=bd&&(d.fragment+=Tc(i,qc))}u++}},parseHost:function(e){var t,r,n;if("["==ic(e,0)){if("]"!=ic(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,h=function(){return ic(e,l)};if(":"==h()){if(":"!=ic(e,1))return;l+=2,u=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=r=0;r<4&&ac(xc,h());)t=16*t+tc(h(),16),l++,r++;if("."==h()){if(0==r)return;if(l-=r,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;l++}if(!ac(vc,h()))return;for(;ac(vc,h());){if(a=tc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}d[c]=256*d[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=d[c],d[c--]=d[u+o-1],d[u+--o]=s;else if(8!=c)return;return d}(fc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Dd(Wd(Gd(e),Md,"."),".");for(t=0;t<i.length;t++)r=i[t],Nd(n,Rd(Td,r)?"xn--"+$d(r):r);return Fd(n,".")}(e),ac(wc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,d=hc(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=d[n]))return e;if(a=10,i.length>1&&"0"==ic(i,0)&&(a=ac(bc,i)?16:8,i=fc(i,8==a?1:2)),""===i)o=0;else{if(!ac(10==a?yc:8==a?kc:xc,i))return e;o=tc(i,a)}cc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=nc(256,5-t))return null}else if(o>255)return null;for(s=dc(r),n=0;n<r.length;n++)s+=r[n]*nc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(ac(zc,e))return"Invalid host";for(t="",r=Sd(e),n=0;n<r.length;n++)t+=Tc(r[n],Ec);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return de(Mc,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&_c(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,d=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=Oc(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+oc(o,"/"):"",null!==s&&(c+="?"+s),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw ec(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new au(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Oc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Yt(e)+":",Uc)},getUsername:function(){return this.username},setUsername:function(e){var t=Sd(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Tc(t[r],Sc)}},getPassword:function(){return this.password},setPassword:function(e){var t=Sd(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Tc(t[r],Sc)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Oc(e):Oc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,$c)},getHostname:function(){var e=this.host;return null===e?"":Oc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Yc)},getPort:function(){var e=this.port;return null===e?"":Yt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Yt(e))?this.port=null:this.parse(e,Kc))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+oc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Zc))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Yt(e))?this.query=null:("?"==ic(e,0)&&(e=fc(e,1)),this.query="",this.parse(e,ru)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Yt(e))?("#"==ic(e,0)&&(e=fc(e,1)),this.fragment="",this.parse(e,nu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var au=function(e){var t=Fa(this,ou),r=Va(arguments.length,1)>1?arguments[1]:void 0,n=Kd(t,new iu(e,!1,r));h||(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())},ou=au.prototype,su=function(e,t){return{get:function(){return Jd(this)[e]()},set:t&&function(e){return Jd(this)[t](e)},configurable:!0,enumerable:!0}};if(h&&(kd(ou,"href",su("serialize","setHref")),kd(ou,"origin",su("getOrigin")),kd(ou,"protocol",su("getProtocol","setProtocol")),kd(ou,"username",su("getUsername","setUsername")),kd(ou,"password",su("getPassword","setPassword")),kd(ou,"host",su("getHost","setHost")),kd(ou,"hostname",su("getHostname","setHostname")),kd(ou,"port",su("getPort","setPort")),kd(ou,"pathname",su("getPathname","setPathname")),kd(ou,"search",su("getSearch","setSearch")),kd(ou,"searchParams",su("getSearchParams")),kd(ou,"hash",su("getHash","setHash"))),ot(ou,"toJSON",(function(){return Jd(this).serialize()}),{enumerable:!0}),ot(ou,"toString",(function(){return Jd(this).serialize()}),{enumerable:!0}),Zd){var du=Zd.createObjectURL,cu=Zd.revokeObjectURL;du&&ot(au,"createObjectURL",mr(du,Zd)),cu&&ot(au,"revokeObjectURL",mr(cu,Zd))}function uu(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=bs(e);if(t){var i=bs(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return vs(this,r)}}gr(au,"URL"),Ut({global:!0,constructor:!0,forced:!Ua,sham:!h},{URL:au});var lu=function(e){ms(r,e);var t=uu(r);function r(e,n,i){var a;return fi(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 gi(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}(xs(URL)),hu="commerce-sdk-isomorphic@3.2.0";function fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fu(Object(r),!0).forEach((function(t){Ii(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}var gu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y,x,w,z,C,P,O,E,q,j,S,T,M,_,A,R,U;return gi(e,[{key:"createBasket",value:(U=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=31,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(R=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=30,qs(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"mergeBasket",value:(A=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=31,qs(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"deleteBasket",value:(_=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"getBasket",value:(M=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"updateBasket",value:(T=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(j=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(P=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(z=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addItemToBasket",value:(w=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"updateItemsInBasket",value:(x=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemsInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=48,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(b=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(v=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(m=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(I=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=48,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(p=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(f=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(l=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(c=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=49,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 49:return c=e.sent,e.abrupt("return",c);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,qs(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Iu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Iu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}"),Ii(gu,"apiPaths",{createBasket:"/organizations/{organizationId}/baskets",transferBasket:"/organizations/{organizationId}/baskets/actions/transfer",mergeBasket:"/organizations/{organizationId}/baskets/actions/merge",deleteBasket:"/organizations/{organizationId}/baskets/{basketId}",getBasket:"/organizations/{organizationId}/baskets/{basketId}",updateBasket:"/organizations/{organizationId}/baskets/{basketId}",updateAsAgentBasket:"/organizations/{organizationId}/baskets/{basketId}/agent",updateBillingAddressForBasket:"/organizations/{organizationId}/baskets/{basketId}/billing-address",addCouponToBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons",removeCouponFromBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",updateCustomerForBasket:"/organizations/{organizationId}/baskets/{basketId}/customer",addGiftCertificateItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",removeGiftCertificateItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",updateGiftCertificateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",addItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/items",updateItemsInBasket:"/organizations/{organizationId}/baskets/{basketId}/items",removeItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",updateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",addTaxesForBasketItem:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",addPaymentInstrumentToBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments",removePaymentInstrumentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",updatePaymentInstrumentInBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",getPaymentMethodsForBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-methods",addPriceAdjustmentToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments",removePriceAdjustmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",updatePriceAdjustmentInBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",getPriceBooksForBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",addPriceBooksToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",createShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments",removeShipmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShippingAddressForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",updateShippingMethodForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",getShippingMethodsForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",updateAsStorefrontBasket:"/organizations/{organizationId}/baskets/{basketId}/storefront",getTaxesFromBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes",addTaxesForBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes"}),Ii(gu,"paramKeys",{createBasket:["organizationId","taxMode","temporary","siteId","locale"],createBasketRequired:["organizationId","siteId"],transferBasket:["organizationId","overrideExisting","siteId","locale"],transferBasketRequired:["organizationId","siteId"],mergeBasket:["organizationId","createDestinationBasket","productItemMergeMode","siteId","locale"],mergeBasketRequired:["organizationId","siteId"],deleteBasket:["organizationId","basketId","siteId"],deleteBasketRequired:["organizationId","basketId","siteId"],getBasket:["organizationId","basketId","siteId","locale"],getBasketRequired:["organizationId","basketId","siteId"],updateBasket:["organizationId","basketId","removeExternalTax","siteId","locale"],updateBasketRequired:["organizationId","basketId","siteId"],updateAsAgentBasket:["organizationId","basketId","siteId","locale"],updateAsAgentBasketRequired:["organizationId","basketId","siteId"],updateBillingAddressForBasket:["organizationId","basketId","useAsShipping","removeExternalTax","siteId","locale"],updateBillingAddressForBasketRequired:["organizationId","basketId","siteId"],addCouponToBasket:["organizationId","basketId","siteId","locale"],addCouponToBasketRequired:["organizationId","basketId","siteId"],removeCouponFromBasket:["organizationId","basketId","couponItemId","siteId","locale"],removeCouponFromBasketRequired:["organizationId","basketId","couponItemId","siteId"],updateCustomerForBasket:["organizationId","basketId","siteId","locale"],updateCustomerForBasketRequired:["organizationId","basketId","siteId"],addGiftCertificateItemToBasket:["organizationId","basketId","siteId","locale"],addGiftCertificateItemToBasketRequired:["organizationId","basketId","siteId"],removeGiftCertificateItemFromBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],removeGiftCertificateItemFromBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],updateGiftCertificateItemInBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],updateGiftCertificateItemInBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],addItemToBasket:["organizationId","basketId","siteId","locale"],addItemToBasketRequired:["organizationId","basketId","siteId"],updateItemsInBasket:["organizationId","basketId","removeExternalTax","siteId","locale"],updateItemsInBasketRequired:["organizationId","basketId","siteId"],removeItemFromBasket:["organizationId","basketId","itemId","siteId","locale"],removeItemFromBasketRequired:["organizationId","basketId","itemId","siteId"],updateItemInBasket:["organizationId","basketId","itemId","removeExternalTax","siteId","locale"],updateItemInBasketRequired:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItem:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItemRequired:["organizationId","basketId","itemId","siteId"],addPaymentInstrumentToBasket:["organizationId","basketId","siteId","locale"],addPaymentInstrumentToBasketRequired:["organizationId","basketId","siteId"],removePaymentInstrumentFromBasket:["organizationId","basketId","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],updatePaymentInstrumentInBasket:["organizationId","basketId","paymentInstrumentId","removeExternalTax","siteId","locale"],updatePaymentInstrumentInBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],getPaymentMethodsForBasket:["organizationId","basketId","siteId","locale"],getPaymentMethodsForBasketRequired:["organizationId","basketId","siteId"],addPriceAdjustmentToBasket:["organizationId","basketId","siteId","locale"],addPriceAdjustmentToBasketRequired:["organizationId","basketId","siteId"],removePriceAdjustmentFromBasket:["organizationId","basketId","priceAdjustmentId","siteId","locale"],removePriceAdjustmentFromBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasket:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],getPriceBooksForBasket:["organizationId","basketId","siteId"],getPriceBooksForBasketRequired:["organizationId","basketId","siteId"],addPriceBooksToBasket:["organizationId","basketId","siteId"],addPriceBooksToBasketRequired:["organizationId","basketId","siteId"],createShipmentForBasket:["organizationId","basketId","siteId","locale"],createShipmentForBasketRequired:["organizationId","basketId","siteId"],removeShipmentFromBasket:["organizationId","basketId","shipmentId","siteId","locale"],removeShipmentFromBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShipmentForBasket:["organizationId","basketId","shipmentId","siteId","locale"],updateShipmentForBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingAddressForShipment:["organizationId","basketId","shipmentId","useAsBilling","removeExternalTax","siteId","locale"],updateShippingAddressForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingMethodForShipment:["organizationId","basketId","shipmentId","siteId","locale"],updateShippingMethodForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],getShippingMethodsForShipment:["organizationId","basketId","shipmentId","siteId","locale"],getShippingMethodsForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateAsStorefrontBasket:["organizationId","basketId","exchange","siteId","locale"],updateAsStorefrontBasketRequired:["organizationId","basketId","siteId"],getTaxesFromBasket:["organizationId","basketId","siteId"],getTaxesFromBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasket:["organizationId","basketId","siteId"],addTaxesForBasketRequired:["organizationId","basketId","siteId"]});var vu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i;return gi(e,[{key:"getShopperContext",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=29,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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),void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==i.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=i.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=30,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=29,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 29:if(c=e.sent,!r){e.next=32;break}return e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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),void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==i.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=i.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=30,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(vu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}"),Ii(vu,"apiPaths",{getShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",createShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",deleteShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",updateShopperContext:"/organizations/{organizationId}/shopper-context/{usid}"}),Ii(vu,"paramKeys",{getShopperContext:["organizationId","usid","siteId"],getShopperContextRequired:["organizationId","usid"],createShopperContext:["organizationId","usid","siteId","evaluateContextWithClientIp"],createShopperContextRequired:["organizationId","usid"],deleteShopperContext:["organizationId","usid","siteId"],deleteShopperContextRequired:["organizationId","usid"],updateShopperContext:["organizationId","usid","siteId","evaluateContextWithClientIp"],updateShopperContextRequired:["organizationId","usid"]});var yu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=ku({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y,x,w,z,C,P,O,E,q;return gi(e,[{key:"registerCustomer",value:(q=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:if(c=e.sent,!r){e.next=31;break}return e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(P=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getExternalProfile",value:(C=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"getCustomer",value:(z=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomer",value:(w=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(x=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(b=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getCustomerBaskets",value:(v=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getCustomerOrders",value:(m=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=43,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 43:return c=e.sent,e.abrupt("return",c);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateCustomerPassword",value:(I=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(p=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(f=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(l=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(c=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=55,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 55:if(c=e.sent,!r){e.next=58;break}return e.abrupt("return",c);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=55,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=55,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=31,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xu(Object(r),!0).forEach((function(t){Ii(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}Ii(yu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}"),Ii(yu,"apiPaths",{registerCustomer:"/organizations/{organizationId}/customers",resetPassword:"/organizations/{organizationId}/customers/password/actions/reset",getResetPasswordToken:"/organizations/{organizationId}/customers/password/actions/create-reset-token",registerExternalProfile:"/organizations/{organizationId}/customers/external-profile",getExternalProfile:"/organizations/{organizationId}/customers/external-profile",getCustomer:"/organizations/{organizationId}/customers/{customerId}",updateCustomer:"/organizations/{organizationId}/customers/{customerId}",createCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses",getCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",removeCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",updateCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",getCustomerBaskets:"/organizations/{organizationId}/customers/{customerId}/baskets",getCustomerOrders:"/organizations/{organizationId}/customers/{customerId}/orders",updateCustomerPassword:"/organizations/{organizationId}/customers/{customerId}/password",createCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments",deleteCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",getCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",getCustomerProductLists:"/organizations/{organizationId}/customers/{customerId}/product-lists",createCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists",deleteCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",getCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",updateCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",createCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",deleteCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",updateCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getPublicProductListsBySearchTerm:"/organizations/{organizationId}/product-lists",getPublicProductList:"/organizations/{organizationId}/product-lists/{listId}",getProductListItem:"/organizations/{organizationId}/product-lists/{listId}/items/{itemId}"}),Ii(yu,"paramKeys",{registerCustomer:["organizationId","siteId"],registerCustomerRequired:["organizationId","siteId"],resetPassword:["organizationId","siteId"],resetPasswordRequired:["organizationId","siteId"],getResetPasswordToken:["organizationId","siteId"],getResetPasswordTokenRequired:["organizationId","siteId"],registerExternalProfile:["organizationId","siteId"],registerExternalProfileRequired:["organizationId","siteId"],getExternalProfile:["organizationId","externalId","authenticationProviderId","siteId"],getExternalProfileRequired:["organizationId","externalId","authenticationProviderId","siteId"],getCustomer:["organizationId","customerId","siteId"],getCustomerRequired:["organizationId","customerId","siteId"],updateCustomer:["organizationId","customerId","siteId"],updateCustomerRequired:["organizationId","customerId","siteId"],createCustomerAddress:["organizationId","customerId","siteId"],createCustomerAddressRequired:["organizationId","customerId","siteId"],getCustomerAddress:["organizationId","customerId","addressName","siteId"],getCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],removeCustomerAddress:["organizationId","customerId","addressName","siteId"],removeCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],updateCustomerAddress:["organizationId","customerId","addressName","siteId"],updateCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],getCustomerBaskets:["organizationId","customerId","siteId"],getCustomerBasketsRequired:["organizationId","customerId","siteId"],getCustomerOrders:["organizationId","customerId","crossSites","from","until","status","siteId","offset","limit"],getCustomerOrdersRequired:["organizationId","customerId","siteId"],updateCustomerPassword:["organizationId","customerId","siteId"],updateCustomerPasswordRequired:["organizationId","customerId","siteId"],createCustomerPaymentInstrument:["organizationId","customerId","siteId"],createCustomerPaymentInstrumentRequired:["organizationId","customerId","siteId"],deleteCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],deleteCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerProductLists:["organizationId","customerId","siteId"],getCustomerProductListsRequired:["organizationId","customerId","siteId"],createCustomerProductList:["organizationId","customerId","siteId"],createCustomerProductListRequired:["organizationId","customerId","siteId"],deleteCustomerProductList:["organizationId","customerId","listId","siteId"],deleteCustomerProductListRequired:["organizationId","customerId","listId","siteId"],getCustomerProductList:["organizationId","customerId","listId","siteId"],getCustomerProductListRequired:["organizationId","customerId","listId","siteId"],updateCustomerProductList:["organizationId","customerId","listId","siteId"],updateCustomerProductListRequired:["organizationId","customerId","listId","siteId"],createCustomerProductListItem:["organizationId","customerId","listId","siteId"],createCustomerProductListItemRequired:["organizationId","customerId","listId","siteId"],deleteCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],deleteCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getPublicProductListsBySearchTerm:["organizationId","email","firstName","lastName","siteId"],getPublicProductListsBySearchTermRequired:["organizationId","siteId"],getPublicProductList:["organizationId","listId","siteId"],getPublicProductListRequired:["organizationId","listId","siteId"],getProductListItem:["organizationId","listId","itemId","siteId"],getProductListItemRequired:["organizationId","listId","itemId","siteId"]});var zu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=wu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"retrieveResults",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new lu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=wu(wu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new lu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=wu(wu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49: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 Pu(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){Ii(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}Ii(zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}"),Ii(zu,"apiPaths",{retrieveResults:"/organizations/{organizationId}/channels/{channelId}/results",getSuggestions:"/organizations/{organizationId}/channels/{channelId}/suggestions"}),Ii(zu,"paramKeys",{retrieveResults:["organizationId","channelId","locale","offset","limit"],retrieveResultsRequired:["organizationId","channelId","locale"],getSuggestions:["organizationId","channelId","suggestionTypes","searchText","locale"],getSuggestionsRequired:["organizationId","channelId","suggestionTypes","locale"]});var Ou=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"getPages",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new lu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Pu(Pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=42,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 42:return c=e.sent,e.abrupt("return",c);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new lu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Pu(Pu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Eu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Eu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(Ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}"),Ii(Ou,"apiPaths",{getPages:"/organizations/{organizationId}/pages",getPage:"/organizations/{organizationId}/pages/{pageId}"}),Ii(Ou,"paramKeys",{getPages:["organizationId","categoryId","productId","aspectTypeId","aspectAttributes","parameters","siteId","locale"],getPagesRequired:["organizationId","aspectTypeId","siteId"],getPage:["organizationId","pageId","aspectAttributes","parameters","siteId","locale"],getPageRequired:["organizationId","pageId","siteId"]});var ju=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return gi(e,[{key:"getGiftCertificate",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new lu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Su(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 Tu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Su(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}"),Ii(ju,"apiPaths",{getGiftCertificate:"/organizations/{organizationId}/gift-certificate"}),Ii(ju,"paramKeys",{getGiftCertificate:["organizationId","siteId"],getGiftCertificateRequired:["organizationId","siteId"]});var Mu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Tu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d;return gi(e,[{key:"createOrder",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=29,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getOrder",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"guestOrderLookup",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for guestOrderLookup: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,qs(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function _u(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 Au(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_u(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}"),Ii(Mu,"apiPaths",{createOrder:"/organizations/{organizationId}/orders",getOrder:"/organizations/{organizationId}/orders/{orderNo}",guestOrderLookup:"/organizations/{organizationId}/orders/{orderNo}/lookup",createPaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments",removePaymentInstrumentFromOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",updatePaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",getPaymentMethodsForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-methods",getTaxesFromOrder:"/organizations/{organizationId}/orders/{orderNo}/taxes"}),Ii(Mu,"paramKeys",{createOrder:["organizationId","siteId","locale"],createOrderRequired:["organizationId","siteId"],getOrder:["organizationId","orderNo","siteId","locale"],getOrderRequired:["organizationId","orderNo","siteId"],guestOrderLookup:["organizationId","orderNo","siteId","locale"],guestOrderLookupRequired:["organizationId","orderNo","siteId"],createPaymentInstrumentForOrder:["organizationId","orderNo","siteId","locale"],createPaymentInstrumentForOrderRequired:["organizationId","orderNo","siteId"],removePaymentInstrumentFromOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],updatePaymentInstrumentForOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],updatePaymentInstrumentForOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],getPaymentMethodsForOrder:["organizationId","orderNo","siteId","locale"],getPaymentMethodsForOrderRequired:["organizationId","orderNo","siteId"],getTaxesFromOrder:["organizationId","orderNo","siteId"],getTaxesFromOrderRequired:["organizationId","orderNo","siteId"]});var Ru=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Au({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i;return gi(e,[{key:"getProducts",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new lu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=44,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new lu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=44,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new lu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new lu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Au(Au({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Uu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(Ru,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}"),Ii(Ru,"apiPaths",{getProducts:"/organizations/{organizationId}/products",getProduct:"/organizations/{organizationId}/products/{id}",getCategories:"/organizations/{organizationId}/categories",getCategory:"/organizations/{organizationId}/categories/{id}"}),Ii(Ru,"paramKeys",{getProducts:["organizationId","select","ids","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductsRequired:["organizationId","ids","siteId"],getProduct:["organizationId","id","select","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductRequired:["organizationId","id","siteId"],getCategories:["organizationId","ids","levels","locale","siteId"],getCategoriesRequired:["organizationId","ids","siteId"],getCategory:["organizationId","id","levels","locale","siteId"],getCategoryRequired:["organizationId","id","siteId"]});var Lu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"getPromotions",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new lu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new lu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();Ii(Lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}"),Ii(Lu,"apiPaths",{getPromotions:"/organizations/{organizationId}/promotions",getPromotionsForCampaign:"/organizations/{organizationId}/promotions/campaigns/{campaignId}"}),Ii(Lu,"paramKeys",{getPromotions:["organizationId","siteId","ids","locale"],getPromotionsRequired:["organizationId","siteId","ids"],getPromotionsForCampaign:["organizationId","campaignId","siteId","startDate","endDate","currency"],getPromotionsForCampaignRequired:["organizationId","campaignId","siteId"]});var Fu=TypeError,Nu=function(e,t){if(!delete e[t])throw Fu("Cannot delete property "+J(t)+" of "+J(e))},Wu=L.match(/firefox\/(\d+)/i),Du=!!Wu&&+Wu[1],Gu=/MSIE|Trident/.test(L),Hu=L.match(/AppleWebKit\/(\d+)\./),Vu=!!Hu&&+Hu[1],$u=[],Yu=z($u.sort),Ku=z($u.push),Ju=l((function(){$u.sort(void 0)})),Qu=l((function(){$u.sort(null)})),Xu=Nn("sort"),Zu=!l((function(){if(G)return G<70;if(!(Du&&Du>3)){if(Gu)return!0;if(Vu)return Vu<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++)$u.push({k:t+n,v:r})}for($u.sort((function(e,t){return t.v-e.v})),n=0;n<$u.length;n++)t=$u[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function el(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 tl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?el(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):el(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ut({target:"Array",proto:!0,forced:Ju||!Qu||!Xu||!Zu},{sort:function(e){void 0!==e&&X(e);var t=oe(this);if(Zu)return void 0===e?Yu(t):Yu(t,e);var r,n,i=[],a=It(t);for(n=0;n<a;n++)n in t&&Ku(i,t[n]);for(Qa(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Yt(t)>Yt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Nu(t,n++);return t}});var rl=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=tl({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"productSearch",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.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.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.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.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==i.allVariationProperties&&(o.allVariationProperties=i.allVariationProperties),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=tl(tl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.q){e.next=26;break}o.q=n.q,e.next=31;break;case 26:if(void 0===i.q){e.next=30;break}o.q=i.q,e.next=31;break;case 30:throw new Error("Missing required query parameter: q");case 31:return void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new lu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=tl(tl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function nl(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 il(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nl(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(rl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/"),Ii(rl,"apiPaths",{productSearch:"/organizations/{organizationId}/product-search",getSearchSuggestions:"/organizations/{organizationId}/search-suggestions"}),Ii(rl,"paramKeys",{productSearch:["organizationId","select","siteId","q","refine","sort","currency","locale","expand","allImages","perPricebook","allVariationProperties","offset","limit"],productSearchRequired:["organizationId","siteId"],getSearchSuggestions:["organizationId","siteId","q","limit","currency","locale"],getSearchSuggestionsRequired:["organizationId","siteId","q"]});var al=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=il({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return gi(e,[{key:"getUrlMapping",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===i.urlSegment){e.next=21;break}o.urlSegment=i.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new lu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=il(il({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ol(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 sl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ol(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ol(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(al,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}"),Ii(al,"apiPaths",{getUrlMapping:"/organizations/{organizationId}/url-mapping"}),Ii(al,"paramKeys",{getUrlMapping:["organizationId","urlSegment","siteId","locale"],getUrlMappingRequired:["organizationId","urlSegment","siteId"]});var dl=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=sl({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"searchStores",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.countryCode?o.countryCode=n.countryCode:void 0!==i.countryCode&&(o.countryCode=i.countryCode),void 0!==n.distanceUnit?o.distanceUnit=n.distanceUnit:void 0!==i.distanceUnit&&(o.distanceUnit=i.distanceUnit),void 0!==n.latitude?o.latitude=n.latitude:void 0!==i.latitude&&(o.latitude=i.latitude),void 0!==n.longitude?o.longitude=n.longitude:void 0!==i.longitude&&(o.longitude=i.longitude),void 0!==n.maxDistance?o.maxDistance=n.maxDistance:void 0!==i.maxDistance&&(o.maxDistance=i.maxDistance),void 0!==n.postalCode?o.postalCode=n.postalCode:void 0!==i.postalCode&&(o.postalCode=i.postalCode),void 0===n.siteId){e.next=23;break}o.siteId=n.siteId,e.next=28;break;case 23:if(void 0===i.siteId){e.next=27;break}o.siteId=i.siteId,e.next=28;break;case 27:throw new Error("Missing required query parameter: siteId");case 28:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for searchStores: ".concat(e))})),s=new lu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=sl(sl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getStores",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getStores: ".concat(e))})),s=new lu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=sl(sl({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function cl(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 ul(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cl(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(dl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}"),Ii(dl,"apiPaths",{searchStores:"/organizations/{organizationId}/store-search",getStores:"/organizations/{organizationId}/stores"}),Ii(dl,"paramKeys",{searchStores:["organizationId","countryCode","distanceUnit","latitude","longitude","maxDistance","postalCode","siteId","locale","offset","limit"],searchStoresRequired:["organizationId","siteId"],getStores:["organizationId","siteId","ids","locale"],getStoresRequired:["organizationId","siteId","ids"]});var ll=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=ul({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I;return gi(e,[{key:"authenticateCustomer",value:(I=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(g=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"logoutCustomer",value:(p=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"authorizeCustomer",value:(f=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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:return 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?o.code_challenge=n.code_challenge:void 0!==i.code_challenge&&(o.code_challenge=i.code_challenge),void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=53,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 53:if(c=e.sent,!r){e.next=56;break}return e.abrupt("return",c);case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getAccessToken",value:(h=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(l=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(u=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(c=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=82,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 82:if(c=e.sent,!r){e.next=85;break}return e.abrupt("return",c);case 85:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"resetPassword",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:function(){var e=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"revokeToken",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=20,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 20:return c=e.sent,e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Go||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,qs(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();Ii(ll,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}"),Ii(ll,"apiPaths",{authenticateCustomer:"/organizations/{organizationId}/oauth2/login",authorizePasswordlessCustomer:"/organizations/{organizationId}/oauth2/passwordless/login",logoutCustomer:"/organizations/{organizationId}/oauth2/logout",authorizeCustomer:"/organizations/{organizationId}/oauth2/authorize",getAccessToken:"/organizations/{organizationId}/oauth2/token",getSessionBridgeAccessToken:"/organizations/{organizationId}/oauth2/session-bridge/token",getTrustedSystemAccessToken:"/organizations/{organizationId}/oauth2/trusted-system/token",getTrustedAgentAuthorizationToken:"/organizations/{organizationId}/oauth2/trusted-agent/authorize",getTrustedAgentAccessToken:"/organizations/{organizationId}/oauth2/trusted-agent/token",getPasswordResetToken:"/organizations/{organizationId}/oauth2/password/reset",resetPassword:"/organizations/{organizationId}/oauth2/password/action",getPasswordLessAccessToken:"/organizations/{organizationId}/oauth2/passwordless/token",revokeToken:"/organizations/{organizationId}/oauth2/revoke",introspectToken:"/organizations/{organizationId}/oauth2/introspect",getUserInfo:"/organizations/{organizationId}/oauth2/userinfo",getWellknownOpenidConfiguration:"/organizations/{organizationId}/oauth2/.well-known/openid-configuration",getJwksUri:"/organizations/{organizationId}/oauth2/jwks"}),Ii(ll,"paramKeys",{authenticateCustomer:["organizationId"],authenticateCustomerRequired:["organizationId"],authorizePasswordlessCustomer:["organizationId"],authorizePasswordlessCustomerRequired:["organizationId"],logoutCustomer:["organizationId","client_id","refresh_token","channel_id","hint"],logoutCustomerRequired:["organizationId","client_id","refresh_token"],authorizeCustomer:["organizationId","redirect_uri","response_type","client_id","scope","state","usid","hint","channel_id","code_challenge","ui_locales"],authorizeCustomerRequired:["organizationId","redirect_uri","response_type","client_id"],getAccessToken:["organizationId"],getAccessTokenRequired:["organizationId"],getSessionBridgeAccessToken:["organizationId"],getSessionBridgeAccessTokenRequired:["organizationId"],getTrustedSystemAccessToken:["organizationId"],getTrustedSystemAccessTokenRequired:["organizationId"],getTrustedAgentAuthorizationToken:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAuthorizationTokenRequired:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAccessToken:["organizationId"],getTrustedAgentAccessTokenRequired:["organizationId"],getPasswordResetToken:["organizationId"],getPasswordResetTokenRequired:["organizationId"],resetPassword:["organizationId"],resetPasswordRequired:["organizationId"],getPasswordLessAccessToken:["organizationId"],getPasswordLessAccessTokenRequired:["organizationId"],revokeToken:["organizationId"],revokeTokenRequired:["organizationId"],introspectToken:["organizationId"],introspectTokenRequired:["organizationId"],getUserInfo:["organizationId","channel_id"],getUserInfoRequired:["organizationId"],getWellknownOpenidConfiguration:["organizationId"],getWellknownOpenidConfigurationRequired:["organizationId"],getJwksUri:["organizationId"],getJwksUriRequired:["organizationId"]});var hl=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Xs("search",(function(e,t,r){return[function(t){var r=T(this),n=null==t?void 0:Z(t,e);return n?g(n,t,r):new RegExp(t)[e](Yt(r))},function(e){var n=Se(this),i=Yt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;hl(o,0)||(n.lastIndex=0);var s=cd(n,i);return hl(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var fl=Mr.map,pl=Sn("map");Ut({target:"Array",proto:!0,forced:!pl},{map:function(e){return fl(this,e,arguments.length>1?arguments[1]:void 0)}});var gl=me("iterator"),Il=!1;try{var ml=0,vl={next:function(){return{done:!!ml++}},return:function(){Il=!0}};vl[gl]=function(){return this},Array.from(vl,(function(){throw 2}))}catch(e){}var bl,kl,yl,xl=function(e,t){if(!t&&!Il)return!1;var r=!1;try{var n={};n[gl]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},wl="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,zl=Ae.f,Cl=it.enforce,Pl=it.get,Ol=u.Int8Array,El=Ol&&Ol.prototype,ql=u.Uint8ClampedArray,jl=ql&&ql.prototype,Sl=Ol&&ta(Ol),Tl=El&&ta(El),Ml=Object.prototype,_l=u.TypeError,Al=me("toStringTag"),Rl=he("TYPED_ARRAY_TAG"),Ul=wl&&!!ua&&"Opera"!==Vt(u.opera),Bl=!1,Ll={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Fl={BigInt64Array:8,BigUint64Array:8},Nl=function(e){var t=ta(e);if(A(t)){var r=Pl(t);return r&&de(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Nl(t)}},Wl=function(e){if(!A(e))return!1;var t=Vt(e);return de(Ll,t)||de(Fl,t)};for(bl in Ll)(yl=(kl=u[bl])&&kl.prototype)?Cl(yl).TypedArrayConstructor=kl:Ul=!1;for(bl in Fl)(yl=(kl=u[bl])&&kl.prototype)&&(Cl(yl).TypedArrayConstructor=kl);if((!Ul||!_(Sl)||Sl===Function.prototype)&&(Sl=function(){throw _l("Incorrect invocation")},Ul))for(bl in Ll)u[bl]&&ua(u[bl],Sl);if((!Ul||!Tl||Tl===Ml)&&(Tl=Sl.prototype,Ul))for(bl in Ll)u[bl]&&ua(u[bl].prototype,Tl);if(Ul&&ta(jl)!==Tl&&ua(jl,Tl),h&&!de(Tl,Al))for(bl in Bl=!0,zl(Tl,Al,{get:function(){return A(this)?this[Rl]:void 0}}),Ll)u[bl]&&Re(u[bl],Rl,bl);var Dl={NATIVE_ARRAY_BUFFER_VIEWS:Ul,TYPED_ARRAY_TAG:Bl&&Rl,aTypedArray:function(e){if(Wl(e))return e;throw _l("Target is not a typed array")},aTypedArrayConstructor:function(e){if(_(e)&&(!ua||B(Sl,e)))return e;throw _l(J(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(h){if(r)for(var i in Ll){var a=u[i];if(a&&de(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Tl[e]&&!r||ot(Tl,e,r?t:Ul&&El[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(h){if(ua){if(r)for(n in Ll)if((i=u[n])&&de(i,e))try{delete i[e]}catch(e){}if(Sl[e]&&!r)return;try{return ot(Sl,e,r?t:Ul&&Sl[e]||t)}catch(e){}}for(n in Ll)!(i=u[n])||i[e]&&!r||ot(i,e,t)}},getTypedArrayConstructor:Nl,isView:function(e){if(!A(e))return!1;var t=Vt(e);return"DataView"===t||de(Ll,t)||de(Fl,t)},isTypedArray:Wl,TypedArray:Sl,TypedArrayPrototype:Tl},Gl=Dl.NATIVE_ARRAY_BUFFER_VIEWS,Hl=u.ArrayBuffer,Vl=u.Int8Array,$l=!Gl||!l((function(){Vl(1)}))||!l((function(){new Vl(-1)}))||!xl((function(e){new Vl,new Vl(null),new Vl(1.5),new Vl(e)}),!0)||l((function(){return 1!==new Vl(new Hl(2),1,void 0).length})),Yl=RangeError,Kl=function(e){if(void 0===e)return 0;var t=ut(e),r=gt(t);if(t!==r)throw Yl("Wrong length or index");return r},Jl=Array,Ql=Math.abs,Xl=Math.pow,Zl=Math.floor,eh=Math.log,th=Math.LN2,rh=function(e,t,r){var n,i,a,o=Jl(r),s=8*r-t-1,d=(1<<s)-1,c=d>>1,u=23===t?Xl(2,-24)-Xl(2,-77):0,l=e<0||0===e&&1/e<0?1:0,h=0;for((e=Ql(e))!=e||e===1/0?(i=e!=e?1:0,n=d):(n=Zl(eh(e)/th),e*(a=Xl(2,-n))<1&&(n--,a*=2),(e+=n+c>=1?u/a:u*Xl(2,1-c))*a>=2&&(n++,a/=2),n+c>=d?(i=0,n=d):n+c>=1?(i=(e*a-1)*Xl(2,t),n+=c):(i=e*Xl(2,c-1)*Xl(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*l,o},nh=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,d=n-1,c=e[d--],u=127&c;for(c>>=7;s>0;)u=256*u+e[d--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[d--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:c?-1/0:1/0;r+=Xl(2,t),u-=o}return(c?-1:1)*r*Xl(2,u-t)},ih=function(e){for(var t=oe(this),r=It(t),n=arguments.length,i=ft(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ft(a,r);o>i;)t[i++]=e;return t},ah=zt.f,oh=Ae.f,sh=Fe.PROPER,dh=Fe.CONFIGURABLE,ch=it.get,uh=it.set,lh=u.ArrayBuffer,hh=lh,fh=hh&&hh.prototype,ph=u.DataView,gh=ph&&ph.prototype,Ih=Object.prototype,mh=u.Array,vh=u.RangeError,bh=z(ih),kh=z([].reverse),yh=rh,xh=nh,wh=function(e){return[255&e]},zh=function(e){return[255&e,e>>8&255]},Ch=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Ph=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Oh=function(e){return yh(e,23,4)},Eh=function(e){return yh(e,52,8)},qh=function(e,t){oh(e.prototype,t,{get:function(){return ch(this)[t]}})},jh=function(e,t,r,n){var i=Kl(r),a=ch(e);if(i+t>a.byteLength)throw vh("Wrong index");var o=ch(a.buffer).bytes,s=i+a.byteOffset,d=or(o,s,s+t);return n?d:kh(d)},Sh=function(e,t,r,n,i,a){var o=Kl(r),s=ch(e);if(o+t>s.byteLength)throw vh("Wrong index");for(var d=ch(s.buffer).bytes,c=o+s.byteOffset,u=n(+i),l=0;l<t;l++)d[c+l]=u[a?l:t-l-1]};if(wl){var Th=sh&&"ArrayBuffer"!==lh.name;if(l((function(){lh(1)}))&&l((function(){new lh(-1)}))&&!l((function(){return new lh,new lh(1.5),new lh(NaN),Th&&!dh})))Th&&dh&&Re(lh,"name","ArrayBuffer");else{(hh=function(e){return Fa(this,fh),new lh(Kl(e))}).prototype=fh;for(var Mh,_h=ah(lh),Ah=0;_h.length>Ah;)(Mh=_h[Ah++])in hh||Re(hh,Mh,lh[Mh]);fh.constructor=hh}ua&&ta(gh)!==Ih&&ua(gh,Ih);var Rh=new ph(new hh(2)),Uh=z(gh.setInt8);Rh.setInt8(0,2147483648),Rh.setInt8(1,2147483649),!Rh.getInt8(0)&&Rh.getInt8(1)||Ba(gh,{setInt8:function(e,t){Uh(this,e,t<<24>>24)},setUint8:function(e,t){Uh(this,e,t<<24>>24)}},{unsafe:!0})}else fh=(hh=function(e){Fa(this,fh);var t=Kl(e);uh(this,{bytes:bh(mh(t),0),byteLength:t}),h||(this.byteLength=t)}).prototype,gh=(ph=function(e,t,r){Fa(this,gh),Fa(e,fh);var n=ch(e).byteLength,i=ut(t);if(i<0||i>n)throw vh("Wrong offset");if(i+(r=void 0===r?n-i:gt(r))>n)throw vh("Wrong length");uh(this,{buffer:e,byteLength:r,byteOffset:i}),h||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,h&&(qh(hh,"byteLength"),qh(ph,"buffer"),qh(ph,"byteLength"),qh(ph,"byteOffset")),Ba(gh,{getInt8:function(e){return jh(this,1,e)[0]<<24>>24},getUint8:function(e){return jh(this,1,e)[0]},getInt16:function(e){var t=jh(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=jh(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Ph(jh(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Ph(jh(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return xh(jh(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return xh(jh(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Sh(this,1,e,wh,t)},setUint8:function(e,t){Sh(this,1,e,wh,t)},setInt16:function(e,t){Sh(this,2,e,zh,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Sh(this,2,e,zh,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Sh(this,4,e,Ch,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Sh(this,4,e,Ch,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Sh(this,4,e,Oh,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Sh(this,8,e,Eh,t,arguments.length>2?arguments[2]:void 0)}});gr(hh,"ArrayBuffer"),gr(ph,"DataView");var Bh={ArrayBuffer:hh,DataView:ph},Lh=Math.floor,Fh=Number.isInteger||function(e){return!A(e)&&isFinite(e)&&Lh(e)===e},Nh=RangeError,Wh=RangeError,Dh=function(e,t){var r=function(e){var t=ut(e);if(t<0)throw Nh("The argument can't be less than 0");return t}(e);if(r%t)throw Wh("Wrong offset");return r},Gh=Dl.aTypedArrayConstructor,Hh=function(e){var t,r,n,i,a,o,s=rs(this),d=oe(e),c=arguments.length,u=c>1?arguments[1]:void 0,l=void 0!==u,h=Wa(d);if(h&&!qd(h))for(o=(a=Ga(d,h)).next,d=[];!(i=g(o,a)).done;)d.push(i.value);for(l&&c>2&&(u=mr(u,arguments[2])),r=It(d),n=new(Gh(s))(r),t=0;r>t;t++)n[t]=l?u(d[t],t):d[t];return n},Vh=me("species"),$h=function(e){var t=U(e),r=Ae.f;h&&t&&!t[Vh]&&r(t,Vh,{configurable:!0,get:function(){return this}})};o((function(e){var t=zt.f,r=Mr.forEach,n=it.get,i=it.set,a=it.enforce,o=Ae.f,s=Oe.f,d=Math.round,c=u.RangeError,l=Bh.ArrayBuffer,f=l.prototype,p=Bh.DataView,I=Dl.NATIVE_ARRAY_BUFFER_VIEWS,m=Dl.TYPED_ARRAY_TAG,v=Dl.TypedArray,k=Dl.TypedArrayPrototype,y=Dl.aTypedArrayConstructor,x=Dl.isTypedArray,w=function(e,t){y(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},z=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},C=function(e){var t;return B(f,e)||"ArrayBuffer"==(t=Vt(e))||"SharedArrayBuffer"==t},P=function(e,t){return x(e)&&!Y(t)&&t in e&&Fh(+t)&&t>=0},O=function(e,t){return t=ye(t),P(e,t)?b(2,e[t]):s(e,t)},E=function(e,t,r){return t=ye(t),!(P(e,t)&&A(r)&&de(r,"value"))||de(r,"get")||de(r,"set")||r.configurable||de(r,"writable")&&!r.writable||de(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};h?(I||(Oe.f=O,Ae.f=E,z(k,"buffer"),z(k,"byteOffset"),z(k,"byteLength"),z(k,"length")),Ut({target:"Object",stat:!0,forced:!I},{getOwnPropertyDescriptor:O,defineProperty:E}),e.exports=function(e,s,h){var f=e.match(/\d+$/)[0]/8,b=e+(h?"Clamped":"")+"Array",y="get"+e,z="set"+e,P=u[b],O=P,E=O&&O.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[y](t*f+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);h&&(r=(r=d(r))<0?0:r>255?255:255&r),i.view[z](t*f+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};I?$l&&(O=s((function(e,t,r,n){return Fa(e,E),function(e,t,r){var n,i;return ua&&_(n=t.constructor)&&n!==r&&A(i=n.prototype)&&i!==r.prototype&&ua(e,i),e}(A(t)?C(t)?void 0!==n?new P(t,Dh(r,f),n):void 0!==r?new P(t,Dh(r,f)):new P(t):x(t)?w(O,t):g(Hh,O,t):new P(Kl(t)),e,O)})),ua&&ua(O,v),r(t(P),(function(e){e in O||Re(O,e,P[e])})),O.prototype=E):(O=s((function(e,t,r,n){Fa(e,E);var a,o,s,d=0,u=0;if(A(t)){if(!C(t))return x(t)?w(O,t):g(Hh,O,t);a=t,u=Dh(r,f);var h=t.byteLength;if(void 0===n){if(h%f)throw c("Wrong length");if((o=h-u)<0)throw c("Wrong length")}else if((o=gt(n)*f)+u>h)throw c("Wrong length");s=o/f}else s=Kl(t),a=new l(o=s*f);for(i(e,{buffer:a,byteOffset:u,byteLength:o,length:s,view:new p(a)});d<s;)j(e,d++)})),ua&&ua(O,v),E=O.prototype=rr(k)),E.constructor!==O&&Re(E,"constructor",O),a(E).TypedArrayConstructor=O,m&&Re(E,m,b);var S=O!=P;q[b]=O,Ut({global:!0,constructor:!0,forced:S,sham:!I},q),"BYTES_PER_ELEMENT"in O||Re(O,"BYTES_PER_ELEMENT",f),"BYTES_PER_ELEMENT"in E||Re(E,"BYTES_PER_ELEMENT",f),$h(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Yh=Math.min,Kh=z([].copyWithin||function(e,t){var r=oe(this),n=It(r),i=ft(e,n),a=ft(t,n),o=arguments.length>2?arguments[2]:void 0,s=Yh((void 0===o?n:ft(o,n))-a,n-i),d=1;for(a<i&&i<a+s&&(d=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Nu(r,i),i+=d,a+=d;return r}),Jh=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("copyWithin",(function(e,t){return Kh(Jh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Qh=Mr.every,Xh=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("every",(function(e){return Qh(Xh(this),e,arguments.length>1?arguments[1]:void 0)}));var Zh=TypeError,ef=function(e){var t=ke(e,"number");if("number"==typeof t)throw Zh("Can't convert number to bigint");return BigInt(t)},tf=Dl.aTypedArray,rf=Dl.exportTypedArrayMethod,nf=z("".slice);rf("fill",(function(e){var t=arguments.length;tf(this);var r="Big"===nf(Vt(this),0,3)?ef(e):+e;return g(ih,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),l((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var af=me("species"),of=function(e,t){var r,n=Se(e).constructor;return void 0===n||null==(r=Se(n)[af])?t:rs(r)},sf=Dl.aTypedArrayConstructor,df=Dl.getTypedArrayConstructor,cf=function(e){return sf(of(e,df(e)))},uf=function(e,t){return function(e,t){for(var r=0,n=It(t),i=new e(n);n>r;)i[r]=t[r++];return i}(cf(e),t)},lf=Mr.filter,hf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("filter",(function(e){var t=lf(hf(this),e,arguments.length>1?arguments[1]:void 0);return uf(this,t)}));var ff=Mr.find,pf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("find",(function(e){return ff(pf(this),e,arguments.length>1?arguments[1]:void 0)}));var gf=Mr.findIndex,If=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("findIndex",(function(e){return gf(If(this),e,arguments.length>1?arguments[1]:void 0)}));var mf=Mr.forEach,vf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("forEach",(function(e){mf(vf(this),e,arguments.length>1?arguments[1]:void 0)}));var bf=vt.includes,kf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("includes",(function(e){return bf(kf(this),e,arguments.length>1?arguments[1]:void 0)}));var yf=vt.indexOf,xf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("indexOf",(function(e){return yf(xf(this),e,arguments.length>1?arguments[1]:void 0)}));var wf=me("iterator"),zf=u.Uint8Array,Cf=z(ya.values),Pf=z(ya.keys),Of=z(ya.entries),Ef=Dl.aTypedArray,qf=Dl.exportTypedArrayMethod,jf=zf&&zf.prototype,Sf=!l((function(){jf[wf].call([1])})),Tf=!!jf&&jf.values&&jf[wf]===jf.values&&"values"===jf.values.name,Mf=function(){return Cf(Ef(this))};qf("entries",(function(){return Of(Ef(this))}),Sf),qf("keys",(function(){return Pf(Ef(this))}),Sf),qf("values",Mf,Sf||!Tf,{name:"values"}),qf(wf,Mf,Sf||!Tf,{name:"values"});var _f=Dl.aTypedArray,Af=Dl.exportTypedArrayMethod,Rf=z([].join);Af("join",(function(e){return Rf(_f(this),e)}));var Uf=Math.min,Bf=[].lastIndexOf,Lf=!!Bf&&1/[1].lastIndexOf(1,-0)<0,Ff=Nn("lastIndexOf"),Nf=Lf||!Ff?function(e){if(Lf)return pn(Bf,this,arguments)||0;var t=M(this),r=It(t),n=r-1;for(arguments.length>1&&(n=Uf(n,ut(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Bf,Wf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return pn(Nf,Wf(this),t>1?[e,arguments[1]]:[e])}));var Df=Mr.map,Gf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("map",(function(e){return Df(Gf(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(cf(e))(t)}))}));var Hf=TypeError,Vf=function(e){return function(t,r,n,i){X(r);var a=oe(t),o=j(a),s=It(a),d=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(d in o){i=o[d],d+=c;break}if(d+=c,e?d<0:s<=d)throw Hf("Reduce of empty array with no initial value")}for(;e?d>=0:s>d;d+=c)d in o&&(i=r(i,o[d],d,a));return i}},$f={left:Vf(!1),right:Vf(!0)},Yf=$f.left,Kf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Yf(Kf(this),e,t,t>1?arguments[1]:void 0)}));var Jf=$f.right,Qf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Jf(Qf(this),e,t,t>1?arguments[1]:void 0)}));var Xf=Dl.aTypedArray,Zf=Dl.exportTypedArrayMethod,ep=Math.floor;Zf("reverse",(function(){for(var e,t=Xf(this).length,r=ep(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var tp=u.RangeError,rp=u.Int8Array,np=rp&&rp.prototype,ip=np&&np.set,ap=Dl.aTypedArray,op=Dl.exportTypedArrayMethod,sp=!l((function(){var e=new Uint8ClampedArray(2);return g(ip,e,{length:1,0:3},1),3!==e[1]})),dp=sp&&Dl.NATIVE_ARRAY_BUFFER_VIEWS&&l((function(){var e=new rp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));op("set",(function(e){ap(this);var t=Dh(arguments.length>1?arguments[1]:void 0,1),r=oe(e);if(sp)return g(ip,this,r,t);var n=this.length,i=It(r),a=0;if(i+t>n)throw tp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!sp||dp);var cp=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("slice",(function(e,t){for(var r=gn(cp(this),e,t),n=cf(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),l((function(){new Int8Array(1).slice()})));var up=Mr.some,lp=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("some",(function(e){return up(lp(this),e,arguments.length>1?arguments[1]:void 0)}));var hp=Dl.aTypedArray,fp=Dl.exportTypedArrayMethod,pp=u.Uint16Array,gp=pp&&z(pp.prototype.sort),Ip=!(!gp||l((function(){gp(new pp(2),null)}))&&l((function(){gp(new pp(2),{})}))),mp=!!gp&&!l((function(){if(G)return G<74;if(Du)return Du<67;if(Gu)return!0;if(Vu)return Vu<602;var e,t,r=new pp(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}));fp("sort",(function(e){return void 0!==e&&X(e),mp?gp(this,e):Qa(hp(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))}),!mp||Ip);var vp=u.Int8Array,bp=Dl.aTypedArray,kp=Dl.exportTypedArrayMethod,yp=[].toLocaleString,xp=!!vp&&l((function(){yp.call(new vp(1))}));kp("toLocaleString",(function(){return pn(yp,xp?gn(bp(this)):bp(this),gn(arguments))}),l((function(){return[1,2].toLocaleString()!=new vp([1,2]).toLocaleString()}))||!l((function(){vp.prototype.toLocaleString.call([1,2])})));var wp=Dl.exportTypedArrayMethod,zp=u.Uint8Array,Cp=zp&&zp.prototype||{},Pp=[].toString,Op=z([].join);l((function(){Pp.call({})}))&&(Pp=function(){return Op(this)});var Ep=Cp.toString!=Pp;wp("toString",Pp,Ep);var qp,jp,Sp,Tp,Mp="process"==O(u.process),_p=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),Ap=u.setImmediate,Rp=u.clearImmediate,Up=u.process,Bp=u.Dispatch,Lp=u.Function,Fp=u.MessageChannel,Np=u.String,Wp=0,Dp={};try{qp=u.location}catch(e){}var Gp=function(e){if(de(Dp,e)){var t=Dp[e];delete Dp[e],t()}},Hp=function(e){return function(){Gp(e)}},Vp=function(e){Gp(e.data)},$p=function(e){u.postMessage(Np(e),qp.protocol+"//"+qp.host)};Ap&&Rp||(Ap=function(e){Va(arguments.length,1);var t=_(e)?e:Lp(e),r=gn(arguments,1);return Dp[++Wp]=function(){pn(t,void 0,r)},jp(Wp),Wp},Rp=function(e){delete Dp[e]},Mp?jp=function(e){Up.nextTick(Hp(e))}:Bp&&Bp.now?jp=function(e){Bp.now(Hp(e))}:Fp&&!_p?(Tp=(Sp=new Fp).port2,Sp.port1.onmessage=Vp,jp=mr(Tp.postMessage,Tp)):u.addEventListener&&_(u.postMessage)&&!u.importScripts&&qp&&"file:"!==qp.protocol&&!l($p)?(jp=$p,u.addEventListener("message",Vp,!1)):jp="onreadystatechange"in ze("script")?function(e){Jt.appendChild(ze("script")).onreadystatechange=function(){Jt.removeChild(this),Gp(e)}}:function(e){setTimeout(Hp(e),0)});var Yp,Kp,Jp,Qp,Xp,Zp,eg,tg,rg={set:Ap,clear:Rp},ng=/ipad|iphone|ipod/i.test(L)&&void 0!==u.Pebble,ig=/web0s(?!.*chrome)/i.test(L),ag=Oe.f,og=rg.set,sg=u.MutationObserver||u.WebKitMutationObserver,dg=u.document,cg=u.process,ug=u.Promise,lg=ag(u,"queueMicrotask"),hg=lg&&lg.value;hg||(Yp=function(){var e,t;for(Mp&&(e=cg.domain)&&e.exit();Kp;){t=Kp.fn,Kp=Kp.next;try{t()}catch(e){throw Kp?Qp():Jp=void 0,e}}Jp=void 0,e&&e.enter()},_p||Mp||ig||!sg||!dg?!ng&&ug&&ug.resolve?((eg=ug.resolve(void 0)).constructor=ug,tg=mr(eg.then,eg),Qp=function(){tg(Yp)}):Mp?Qp=function(){cg.nextTick(Yp)}:(og=mr(og,u),Qp=function(){og(Yp)}):(Xp=!0,Zp=dg.createTextNode(""),new sg(Yp).observe(Zp,{characterData:!0}),Qp=function(){Zp.data=Xp=!Xp}));var fg=hg||function(e){var t={fn:e,next:void 0};Jp&&(Jp.next=t),Kp||(Kp=t,Qp()),Jp=t},pg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},gg=function(){this.head=null,this.tail=null};gg.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 Ig=gg,mg=u.Promise,vg="object"==typeof window&&"object"!=typeof Deno;mg&&mg.prototype;var bg,kg,yg,xg=me("species"),wg=!1,zg=_(u.PromiseRejectionEvent),Cg={CONSTRUCTOR:At("Promise",(function(){var e=He(mg),t=e!==String(mg);if(!t&&66===G)return!0;if(G>=51&&/native code/.test(e))return!1;var r=new mg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[xg]=n,!(wg=r.then((function(){}))instanceof n)||!t&&vg&&!zg})),REJECTION_EVENT:zg,SUBCLASSING:wg},Pg=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=X(t),this.reject=X(r)},Og={f:function(e){return new Pg(e)}},Eg=rg.set,qg=Cg.CONSTRUCTOR,jg=Cg.REJECTION_EVENT,Sg=Cg.SUBCLASSING,Tg=it.getterFor("Promise"),Mg=it.set,_g=mg&&mg.prototype,Ag=mg,Rg=_g,Ug=u.TypeError,Bg=u.document,Lg=u.process,Fg=Og.f,Ng=Fg,Wg=!!(Bg&&Bg.createEvent&&u.dispatchEvent),Dg=function(e){var t;return!(!A(e)||!_(t=e.then))&&t},Gg=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,d=e.resolve,c=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&Kg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?c(Ug("Promise-chain cycle")):(n=Dg(r))?g(n,r,d,c):d(r)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},Hg=function(e,t){e.notified||(e.notified=!0,fg((function(){for(var r,n=e.reactions;r=n.get();)Gg(r,e);e.notified=!1,t&&!e.rejection&&$g(e)})))},Vg=function(e,t,r){var n,i;Wg?((n=Bg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!jg&&(i=u["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=u.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},$g=function(e){g(Eg,u,(function(){var t,r=e.facade,n=e.value;if(Yg(e)&&(t=pg((function(){Mp?Lg.emit("unhandledRejection",n,r):Vg("unhandledrejection",r,n)})),e.rejection=Mp||Yg(e)?2:1,t.error))throw t.value}))},Yg=function(e){return 1!==e.rejection&&!e.parent},Kg=function(e){g(Eg,u,(function(){var t=e.facade;Mp?Lg.emit("rejectionHandled",t):Vg("rejectionhandled",t,e.value)}))},Jg=function(e,t,r){return function(n){e(t,n,r)}},Qg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Hg(e,!0))},Xg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Ug("Promise can't be resolved itself");var n=Dg(t);n?fg((function(){var r={done:!1};try{g(n,t,Jg(Xg,r,e),Jg(Qg,r,e))}catch(t){Qg(r,t,e)}})):(e.value=t,e.state=1,Hg(e,!1))}catch(t){Qg({done:!1},t,e)}}};if(qg&&(Rg=(Ag=function(e){Fa(this,Rg),X(e),g(bg,this);var t=Tg(this);try{e(Jg(Xg,t),Jg(Qg,t))}catch(e){Qg(t,e)}}).prototype,(bg=function(e){Mg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Ig,rejection:!1,state:0,value:void 0})}).prototype=ot(Rg,"then",(function(e,t){var r=Tg(this),n=Fg(of(this,Ag));return r.parent=!0,n.ok=!_(e)||e,n.fail=_(t)&&t,n.domain=Mp?Lg.domain:void 0,0==r.state?r.reactions.add(n):fg((function(){Gg(n,r)})),n.promise})),kg=function(){var e=new bg,t=Tg(e);this.promise=e,this.resolve=Jg(Xg,t),this.reject=Jg(Qg,t)},Og.f=Fg=function(e){return e===Ag||void 0===e?new kg(e):Ng(e)},_(mg)&&_g!==Object.prototype)){yg=_g.then,Sg||ot(_g,"then",(function(e,t){var r=this;return new Ag((function(e,t){g(yg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete _g.constructor}catch(e){}ua&&ua(_g,Rg)}Ut({global:!0,constructor:!0,wrap:!0,forced:qg},{Promise:Ag}),gr(Ag,"Promise",!1),$h("Promise");var Zg=TypeError,eI=function(e,t){this.stopped=e,this.result=t},tI=eI.prototype,rI=function(e,t,r){var n,i,a,o,s,d,c,u=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),I=mr(t,u),m=function(e){return n&&Cd(n,"normal",e),new eI(!0,e)},v=function(e){return l?(Se(e),p?I(e[0],e[1],m):I(e[0],e[1])):p?I(e,m):I(e)};if(h)n=e.iterator;else if(f)n=e;else{if(!(i=Wa(e)))throw Zg(J(e)+" is not iterable");if(qd(i)){for(a=0,o=It(e);o>a;a++)if((s=v(e[a]))&&B(tI,s))return s;return new eI(!1)}n=Ga(e,i)}for(d=h?e.next:n.next;!(c=g(d,n)).done;){try{s=v(c.value)}catch(e){Cd(n,"throw",e)}if("object"==typeof s&&s&&B(tI,s))return s}return new eI(!1)},nI=Cg.CONSTRUCTOR||!xl((function(e){mg.all(e).then(void 0,(function(){}))}));Ut({target:"Promise",stat:!0,forced:nI},{all:function(e){var t=this,r=Og.f(t),n=r.resolve,i=r.reject,a=pg((function(){var r=X(t.resolve),a=[],o=0,s=1;rI(e,(function(e){var d=o++,c=!1;s++,g(r,t,e).then((function(e){c||(c=!0,a[d]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var iI=Cg.CONSTRUCTOR,aI=mg&&mg.prototype;if(Ut({target:"Promise",proto:!0,forced:iI,real:!0},{catch:function(e){return this.then(void 0,e)}}),_(mg)){var oI=U("Promise").prototype.catch;aI.catch!==oI&&ot(aI,"catch",oI,{unsafe:!0})}Ut({target:"Promise",stat:!0,forced:nI},{race:function(e){var t=this,r=Og.f(t),n=r.reject,i=pg((function(){var i=X(t.resolve);rI(e,(function(e){g(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Ut({target:"Promise",stat:!0,forced:Cg.CONSTRUCTOR},{reject:function(e){var t=Og.f(this);return g(t.reject,void 0,e),t.promise}});var sI=Cg.CONSTRUCTOR;function dI(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 cI(e){return function(e){if(Array.isArray(e))return dI(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 dI(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)?dI(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 uI(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 lI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?uI(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}U("Promise"),Ut({target:"Promise",stat:!0,forced:sI},{resolve:function(e){return function(e,t){if(Se(e),A(t)&&t.constructor===e)return t;var r=Og.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Ut({target:"Object",stat:!0},{fromEntries:function(e){var t={};return rI(e,(function(e,r){nr(t,e,r)}),{AS_ENTRIES:!0}),t}});var hI=Go?btoa:function(e){return Buffer.from(e).toString("base64")},fI=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}},pI=function(){return e=i.default(String(+new Date),{entropy:!0}),t.customRandom(t.urlAlphabet,128,(function(t){return new Uint8Array(t).map((function(){return 256*e()}))}))();var e},gI=function(){var e=hi(Wi.mark((function e(t){var r,n,i,a,o,s,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Go||!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,cI(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:d=e.sent,n=r(d.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 II(e,t,r){return mI.apply(this,arguments)}function mI(){return(mI=hi(Wi.mark((function e(t,r,n){var i,a,o,s,d,c,u,l,h,f=arguments;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=f.length>3&&void 0!==f[3]&&f[3],o={},a){e.next=6;break}return e.next=5,gI(r);case 5:o.codeChallenge=e.sent;case 6:return(s=new ll(t.clientConfig)).clientConfig.fetchOptions=lI(lI({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),d={parameters:lI(lI(lI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},o.codeChallenge&&{code_challenge:o.codeChallenge}),n.hint&&{hint:n.hint}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,response_type:"code"},n.usid&&{usid:n.usid})},e.next=11,s.authorizeCustomer(d,!0);case 11:if(c=e.sent,u=(null===(i=c.headers)||void 0===i?void 0:i.get("location"))||c.url,l=new URL(u),h=Object.fromEntries(l.searchParams.entries()),!(c.status>=400||h.error)){e.next=17;break}throw new zs(c);case 17:return e.abrupt("return",lI({url:u},fI(u)));case 18:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function vI(){return(vI=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c,u=arguments;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>2&&void 0!==u[2]&&u[2],i=pI(),a={},n){e.next=7;break}return e.next=6,gI(i);case 6:a.codeChallenge=e.sent;case 7:return o=ll.apiPaths.authorizeCustomer,s={organizationId:t.clientConfig.parameters.organizationId,shortCode:t.clientConfig.parameters.shortCode,version:t.clientConfig.parameters.version||"v1"},d=lI(lI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},a.codeChallenge&&{code_challenge:a.codeChallenge}),{},{hint:r.hint,redirect_uri:r.redirectURI,response_type:"code"},r.usid&&{usid:r.usid}),c=new lu(o,t.clientConfig.baseUri,{pathParams:s,queryParams:d,origin:t.clientConfig.proxy}),e.abrupt("return",{url:c.toString(),codeVerifier:i});case 12:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function bI(){return(bI=hi(Wi.mark((function e(t,r,n){var i,a,o,s;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!!r.clientSecret,a=lI(lI(lI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:n.code,organizationId:t.clientConfig.parameters.organizationId},!i&&r.codeVerifier&&{code_verifier:r.codeVerifier}),{},{grant_type:i?"authorization_code":"authorization_code_pkce",redirect_uri:n.redirectURI},void 0!==n.dnt&&{dnt:n.dnt.toString()}),n.usid&&{usid:n.usid}),!r.clientSecret){e.next=6;break}return o="Basic ".concat(hI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),s={headers:{Authorization:o},body:a},e.abrupt("return",t.getAccessToken(s));case 6:return e.abrupt("return",t.getAccessToken({body:a}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function kI(){return(kI=hi(Wi.mark((function e(t,r,n){var i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.clientConfig.parameters.siteId){e.next=2;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 2:return i="Basic ".concat(hI("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:lI(lI({grant_type:"client_credentials",channel_id:t.clientConfig.parameters.siteId},r.usid&&{usid:r.usid}),void 0!==r.dnt&&{dnt:r.dnt.toString()})},e.abrupt("return",t.getAccessToken(a));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function yI(){return(yI=hi(Wi.mark((function e(t,r){var n,i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=pI(),e.next=3,II(t,n,lI({redirectURI:r.redirectURI,hint:"guest"},r.usid&&{usid:r.usid}));case 3:return i=e.sent,a=lI({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},void 0!==r.dnt&&{dnt:r.dnt.toString()}),e.abrupt("return",t.getAccessToken({body:a}));case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xI(){return(xI=hi(Wi.mark((function e(t,r,n){var i,a,o,s,d,c,u,l,h,f,p,g,I,m;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=pI(),e.next=3,gI(a);case 3:return o=e.sent,(s=new ll(t.clientConfig)).clientConfig.fetchOptions=lI(lI({},t.clientConfig.fetchOptions),{},{redirect:Go?"follow":"manual"}),d="Basic ".concat(hI("".concat(r.username,":").concat(r.password))),c={headers:{Authorization:d},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:lI({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(c,!0);case 10:if(u=e.sent,l=(null===(i=u.headers)||void 0===i?void 0:i.get("location"))||u.url,h=new URL(l),f=Object.fromEntries(h.searchParams.entries()),!(u.status>=400||f.error)){e.next=16;break}throw new zs(u);case 16:if(p=fI(l),g=lI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:p.code,code_verifier:a,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:p.usid},void 0!==n.dnt&&{dnt:n.dnt.toString()}),!r.clientSecret){e.next=22;break}return I="Basic ".concat(hI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),m={headers:{Authorization:I},body:g},e.abrupt("return",t.getAccessToken(m));case 22:return e.abrupt("return",t.getAccessToken({body:g}));case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wI(){return(wI=hi(Wi.mark((function e(t,r,n){var i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.clientSecret){e.next=2;break}throw new Error("Required argument client secret is not provided");case 2:if(t.clientConfig.parameters.siteId){e.next=4;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 4:if(n.mode){e.next=6;break}throw new Error("Required argument mode is not provided through parameters");case 6:if(n.userid){e.next=8;break}throw new Error("Required argument userid is not provided through parameters");case 8:return i="Basic ".concat(hI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),a=lI(lI(lI({user_id:n.userid,mode:n.mode},n.locale&&{locale:n.locale}),n.usid&&{usid:n.usid}),{},{channel_id:t.clientConfig.parameters.siteId},n.callbackURI&&{callback_uri:n.callbackURI}),e.abrupt("return",t.authorizePasswordlessCustomer({headers:{Authorization:i},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:a},!0));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zI(){return(zI=hi(Wi.mark((function e(t,r,n){var i,a,o;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.clientSecret){e.next=2;break}throw new Error("Required argument client secret is not provided");case 2:if(t.clientConfig.parameters.organizationId){e.next=4;break}throw new Error("Required argument organizationId is not provided through clientConfig.parameters.organizationId");case 4:if(n.pwdlessLoginToken){e.next=6;break}throw new Error("Required argument pwdlessLoginToken is not provided through parameters");case 6:return i=pI(),a="Basic ".concat(hI("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),o=lI({grant_type:"client_credentials",hint:"pwdless_login",pwdless_login_token:n.pwdlessLoginToken,code_verifier:i},n.dnt&&{dnt:n.dnt}),e.abrupt("return",t.getPasswordLessAccessToken({headers:{Authorization:a},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:o}));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var CI=Mr.find,PI=!0;"find"in[]&&Array(1).find((function(){PI=!1})),Ut({target:"Array",proto:!0,forced:PI},{find:function(e){return CI(this,e,arguments.length>1?arguments[1]:void 0)}}),Ki("find");function OI(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 EI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?OI(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var qI=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},jI=function(){var e=hi(Wi.mark((function e(t){var r,n,i,a,o,s,d,c,u,l,h,f;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.options,a=t.clientConfig,o=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],d=EI(EI({},a.parameters),null==i?void 0:i.customApiPathParameters),s.forEach((function(e){if(!d[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),d.apiVersion||(d.apiVersion="v1"),c=a,a.baseUri||(c=EI(EI({},a),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),u=Boolean(!(null!==(r=i.parameters)&&void 0!==r&&r.siteId)&&(null==a||null===(n=a.parameters)||void 0===n?void 0:n.siteId)),l=qI(i.headers)||qI(c.headers),h=i,l&&!u||(h=EI(EI({},i),{},{headers:EI(EI({},i.headers),!l&&{"Content-Type":"application/json"}),parameters:EI(EI({},i.parameters),u&&{siteId:a.parameters.siteId})})),f=new lu("/organizations/{organizationId}/{endpointPath}",c.baseUri,{pathParams:d,queryParams:h.parameters,origin:c.proxy}),e.abrupt("return",qs(f.toString(),h,c,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),SI=Object.freeze({__proto__:null,isBrowser:Go,isNode:Ho,globalObject:Vo,hasFetchAvailable:$o,fetch:Yo,stringToBase64:hI,getCodeAndUsidFromUrl:fI,createCodeVerifier:pI,generateCodeChallenge:gI,authorize:II,authorizeIDP:function(e,t){return vI.apply(this,arguments)},loginIDPUser:function(e,t,r){return bI.apply(this,arguments)},loginGuestUserPrivate:function(e,t,r){return kI.apply(this,arguments)},loginGuestUser:function(e,t){return yI.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r){return xI.apply(this,arguments)},authorizePasswordless:function(e,t,r){return wI.apply(this,arguments)},getPasswordLessAccessToken:function(e,t,r){return zI.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n=lI({grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId},void 0!==t.dnt&&{dnt:t.dnt.toString()});if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(hI("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})},callCustomEndpoint:jI,doFetch:qs});e.ClientConfig=Wo,e.ShopperBaskets=gu,e.ShopperContexts=vu,e.ShopperCustomers=yu,e.ShopperDiscoverySearch=zu,e.ShopperExperience=Ou,e.ShopperGiftCertificates=ju,e.ShopperLogin=ll,e.ShopperOrders=Mu,e.ShopperProducts=Ru,e.ShopperPromotions=Lu,e.ShopperSearch=rl,e.ShopperSeo=al,e.ShopperStores=dl,e.TemplateURL=lu,e.helpers=SI,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("nanoid"),require("seedrandom")):"function"==typeof define&&define.amd?define(["exports","nanoid","seedrandom"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).CommerceSdk={},e.nanoid$1,e.seedrandom)}(this,(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r),a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(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 s,d,c=function(e){return e&&e.Math==Math&&e},u=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof a&&a)||function(){return this}()||Function("return this")(),l=function(e){try{return!!e()}catch(e){return!0}},h=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),f=!l((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),p=Function.prototype.call,g=f?p.bind(p):function(){return p.apply(p,arguments)},I={}.propertyIsEnumerable,m=Object.getOwnPropertyDescriptor,v={f:m&&!I.call({1:2},1)?function(e){var t=m(this,e);return!!t&&t.enumerable}:I},b=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},k=Function.prototype,y=k.bind,x=k.call,w=f&&y.bind(x,x),z=f?function(e){return e&&w(e)}:function(e){return e&&function(){return x.apply(e,arguments)}},C=z({}.toString),P=z("".slice),O=function(e){return P(C(e),8,-1)},E=Object,q=z("".split),j=l((function(){return!E("z").propertyIsEnumerable(0)}))?function(e){return"String"==O(e)?q(e,""):E(e)}:E,S=TypeError,T=function(e){if(null==e)throw S("Can't call method on "+e);return e},M=function(e){return j(T(e))},A=function(e){return"function"==typeof e},_=function(e){return"object"==typeof e?null!==e:A(e)},R=function(e){return A(e)?e:void 0},U=function(e,t){return arguments.length<2?R(u[e]):u[e]&&u[e][t]},B=z({}.isPrototypeOf),L=U("navigator","userAgent")||"",F=u.process,N=u.Deno,W=F&&F.versions||N&&N.version,D=W&&W.v8;D&&(d=(s=D.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!d&&L&&(!(s=L.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=L.match(/Chrome\/(\d+)/))&&(d=+s[1]);var G=d,H=!!Object.getOwnPropertySymbols&&!l((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&G&&G<41})),V=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,$=Object,Y=V?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return A(t)&&B(t.prototype,$(e))},K=String,J=function(e){try{return K(e)}catch(e){return"Object"}},Q=TypeError,X=function(e){if(A(e))return e;throw Q(J(e)+" is not a function")},Z=function(e,t){var r=e[t];return null==r?void 0:X(r)},ee=TypeError,te=Object.defineProperty,re=function(e,t){try{te(u,e,{value:t,configurable:!0,writable:!0})}catch(r){u[e]=t}return t},ne=u["__core-js_shared__"]||re("__core-js_shared__",{}),ie=o((function(e){(e.exports=function(e,t){return ne[e]||(ne[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"})})),ae=Object,oe=function(e){return ae(T(e))},se=z({}.hasOwnProperty),de=Object.hasOwn||function(e,t){return se(oe(e),t)},ce=0,ue=Math.random(),le=z(1..toString),he=function(e){return"Symbol("+(void 0===e?"":e)+")_"+le(++ce+ue,36)},fe=ie("wks"),pe=u.Symbol,ge=pe&&pe.for,Ie=V?pe:pe&&pe.withoutSetter||he,me=function(e){if(!de(fe,e)||!H&&"string"!=typeof fe[e]){var t="Symbol."+e;H&&de(pe,e)?fe[e]=pe[e]:fe[e]=V&&ge?ge(t):Ie(t)}return fe[e]},ve=TypeError,be=me("toPrimitive"),ke=function(e,t){if(!_(e)||Y(e))return e;var r,n=Z(e,be);if(n){if(void 0===t&&(t="default"),r=g(n,e,t),!_(r)||Y(r))return r;throw ve("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&A(r=e.toString)&&!_(n=g(r,e)))return n;if(A(r=e.valueOf)&&!_(n=g(r,e)))return n;if("string"!==t&&A(r=e.toString)&&!_(n=g(r,e)))return n;throw ee("Can't convert object to primitive value")}(e,t)},ye=function(e){var t=ke(e,"string");return Y(t)?t:t+""},xe=u.document,we=_(xe)&&_(xe.createElement),ze=function(e){return we?xe.createElement(e):{}},Ce=!h&&!l((function(){return 7!=Object.defineProperty(ze("div"),"a",{get:function(){return 7}}).a})),Pe=Object.getOwnPropertyDescriptor,Oe={f:h?Pe:function(e,t){if(e=M(e),t=ye(t),Ce)try{return Pe(e,t)}catch(e){}if(de(e,t))return b(!g(v.f,e,t),e[t])}},Ee=h&&l((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),qe=String,je=TypeError,Se=function(e){if(_(e))return e;throw je(qe(e)+" is not an object")},Te=TypeError,Me=Object.defineProperty,Ae=Object.getOwnPropertyDescriptor,_e={f:h?Ee?function(e,t,r){if(Se(e),t=ye(t),Se(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=Ae(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 Me(e,t,r)}:Me:function(e,t,r){if(Se(e),t=ye(t),Se(r),Ce)try{return Me(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Te("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},Re=h?function(e,t,r){return _e.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Ue=Function.prototype,Be=h&&Object.getOwnPropertyDescriptor,Le=de(Ue,"name"),Fe={EXISTS:Le,PROPER:Le&&"something"===function(){}.name,CONFIGURABLE:Le&&(!h||h&&Be(Ue,"name").configurable)},Ne=z(Function.toString);A(ne.inspectSource)||(ne.inspectSource=function(e){return Ne(e)});var We,De,Ge,He=ne.inspectSource,Ve=u.WeakMap,$e=A(Ve)&&/native code/.test(He(Ve)),Ye=ie("keys"),Ke=function(e){return Ye[e]||(Ye[e]=he(e))},Je={},Qe=u.TypeError,Xe=u.WeakMap;if($e||ne.state){var Ze=ne.state||(ne.state=new Xe),et=z(Ze.get),tt=z(Ze.has),rt=z(Ze.set);We=function(e,t){if(tt(Ze,e))throw new Qe("Object already initialized");return t.facade=e,rt(Ze,e,t),t},De=function(e){return et(Ze,e)||{}},Ge=function(e){return tt(Ze,e)}}else{var nt=Ke("state");Je[nt]=!0,We=function(e,t){if(de(e,nt))throw new Qe("Object already initialized");return t.facade=e,Re(e,nt,t),t},De=function(e){return de(e,nt)?e[nt]:{}},Ge=function(e){return de(e,nt)}}var it={set:We,get:De,has:Ge,enforce:function(e){return Ge(e)?De(e):We(e,{})},getterFor:function(e){return function(t){var r;if(!_(t)||(r=De(t)).type!==e)throw Qe("Incompatible receiver, "+e+" required");return r}}},at=o((function(e){var t=Fe.CONFIGURABLE,r=it.enforce,n=it.get,i=Object.defineProperty,a=h&&!l((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),(!de(e,"name")||t&&e.name!==n)&&(h?i(e,"name",{value:n,configurable:!0}):e.name=n),a&&s&&de(s,"arity")&&e.length!==s.arity&&i(e,"length",{value:s.arity});try{s&&de(s,"constructor")&&s.constructor?h&&i(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return de(d,"source")||(d.source=o.join("string"==typeof n?n:"")),e};Function.prototype.toString=s((function(){return A(this)&&n(this).source||He(this)}),"toString")})),ot=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(A(r)&&at(r,a,n),n.global)i?e[t]=r:re(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:_e.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},st=Math.ceil,dt=Math.floor,ct=Math.trunc||function(e){var t=+e;return(t>0?dt:st)(t)},ut=function(e){var t=+e;return t!=t||0===t?0:ct(t)},lt=Math.max,ht=Math.min,ft=function(e,t){var r=ut(e);return r<0?lt(r+t,0):ht(r,t)},pt=Math.min,gt=function(e){return e>0?pt(ut(e),9007199254740991):0},It=function(e){return gt(e.length)},mt=function(e){return function(t,r,n){var i,a=M(t),o=It(a),s=ft(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}},vt={includes:mt(!0),indexOf:mt(!1)},bt=vt.indexOf,kt=z([].push),yt=function(e,t){var r,n=M(e),i=0,a=[];for(r in n)!de(Je,r)&&de(n,r)&&kt(a,r);for(;t.length>i;)de(n,r=t[i++])&&(~bt(a,r)||kt(a,r));return a},xt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],wt=xt.concat("length","prototype"),zt={f:Object.getOwnPropertyNames||function(e){return yt(e,wt)}},Ct={f:Object.getOwnPropertySymbols},Pt=z([].concat),Ot=U("Reflect","ownKeys")||function(e){var t=zt.f(Se(e)),r=Ct.f;return r?Pt(t,r(e)):t},Et=function(e,t,r){for(var n=Ot(t),i=_e.f,a=Oe.f,o=0;o<n.length;o++){var s=n[o];de(e,s)||r&&de(r,s)||i(e,s,a(t,s))}},qt=/#|\.prototype\./,jt=function(e,t){var r=Tt[St(e)];return r==At||r!=Mt&&(A(t)?l(t):!!t)},St=jt.normalize=function(e){return String(e).replace(qt,".").toLowerCase()},Tt=jt.data={},Mt=jt.NATIVE="N",At=jt.POLYFILL="P",_t=jt,Rt=Oe.f,Ut=function(e,t){var r,n,i,a,o,s=e.target,d=e.global,c=e.stat;if(r=d?u:c?u[s]||re(s,{}):(u[s]||{}).prototype)for(n in t){if(a=t[n],i=e.dontCallGetSet?(o=Rt(r,n))&&o.value:r[n],!_t(d?n:s+(c?".":"#")+n,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Et(a,i)}(e.sham||i&&i.sham)&&Re(a,"sham",!0),ot(r,n,a,e)}},Bt=Object.keys||function(e){return yt(e,xt)},Lt=l((function(){Bt(1)}));Ut({target:"Object",stat:!0,forced:Lt},{keys:function(e){return Bt(oe(e))}});var Ft={};Ft[me("toStringTag")]="z";var Nt,Wt="[object z]"===String(Ft),Dt=me("toStringTag"),Gt=Object,Ht="Arguments"==O(function(){return arguments}()),Vt=Wt?O: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=Gt(e),Dt))?r:Ht?O(t):"Object"==(n=O(t))&&A(t.callee)?"Arguments":n},$t=String,Yt=function(e){if("Symbol"===Vt(e))throw TypeError("Cannot convert a Symbol value to a string");return $t(e)},Kt={f:h&&!Ee?Object.defineProperties:function(e,t){Se(e);for(var r,n=M(t),i=Bt(t),a=i.length,o=0;a>o;)_e.f(e,r=i[o++],n[r]);return e}},Jt=U("document","documentElement"),Qt=Ke("IE_PROTO"),Xt=function(){},Zt=function(e){return"<script>"+e+"<\/script>"},er=function(e){e.write(Zt("")),e.close();var t=e.parentWindow.Object;return e=null,t},tr=function(){try{Nt=new ActiveXObject("htmlfile")}catch(e){}var e,t;tr="undefined"!=typeof document?document.domain&&Nt?er(Nt):((t=ze("iframe")).style.display="none",Jt.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(Zt("document.F=Object")),e.close(),e.F):er(Nt);for(var r=xt.length;r--;)delete tr.prototype[xt[r]];return tr()};Je[Qt]=!0;var rr=Object.create||function(e,t){var r;return null!==e?(Xt.prototype=Se(e),r=new Xt,Xt.prototype=null,r[Qt]=e):r=tr(),void 0===t?r:Kt.f(r,t)},nr=function(e,t,r){var n=ye(t);n in e?_e.f(e,n,b(0,r)):e[n]=r},ir=Array,ar=Math.max,or=function(e,t,r){for(var n=It(e),i=ft(t,n),a=ft(void 0===r?n:r,n),o=ir(ar(a-i,0)),s=0;i<a;i++,s++)nr(o,s,e[i]);return o.length=s,o},sr=zt.f,dr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],cr={f:function(e){return dr&&"Window"==O(e)?function(e){try{return sr(e)}catch(e){return or(dr)}}(e):sr(M(e))}},ur={f:me},lr=u,hr=_e.f,fr=_e.f,pr=me("toStringTag"),gr=function(e,t,r){e&&!r&&(e=e.prototype),e&&!de(e,pr)&&fr(e,pr,{configurable:!0,value:t})},Ir=z(z.bind),mr=function(e,t){return X(e),void 0===t?e:f?Ir(e,t):function(){return e.apply(t,arguments)}},vr=Array.isArray||function(e){return"Array"==O(e)},br=function(){},kr=[],yr=U("Reflect","construct"),xr=/^\s*(?:class|function)\b/,wr=z(xr.exec),zr=!xr.exec(br),Cr=function(e){if(!A(e))return!1;try{return yr(br,kr,e),!0}catch(e){return!1}},Pr=function(e){if(!A(e))return!1;switch(Vt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return zr||!!wr(xr,He(e))}catch(e){return!0}};Pr.sham=!0;var Or=!yr||l((function(){var e;return Cr(Cr.call)||!Cr(Object)||!Cr((function(){e=!0}))||e}))?Pr:Cr,Er=me("species"),qr=Array,jr=function(e,t){return new(function(e){var t;return vr(e)&&(t=e.constructor,(Or(t)&&(t===qr||vr(t.prototype))||_(t)&&null===(t=t[Er]))&&(t=void 0)),void 0===t?qr:t}(e))(0===t?0:t)},Sr=z([].push),Tr=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(d,c,u,l){for(var h,f,p=oe(d),g=j(p),I=mr(c,u),m=It(g),v=0,b=l||jr,k=t?b(d,m):r||o?b(d,0):void 0;m>v;v++)if((s||v in g)&&(f=I(h=g[v],v,p),e))if(t)k[v]=f;else if(f)switch(e){case 3:return!0;case 5:return h;case 6:return v;case 2:Sr(k,h)}else switch(e){case 4:return!1;case 7:Sr(k,h)}return a?-1:n||i?i:k}},Mr={forEach:Tr(0),map:Tr(1),filter:Tr(2),some:Tr(3),every:Tr(4),find:Tr(5),findIndex:Tr(6),filterReject:Tr(7)},Ar=Mr.forEach,_r=Ke("hidden"),Rr=it.set,Ur=it.getterFor("Symbol"),Br=Object.prototype,Lr=u.Symbol,Fr=Lr&&Lr.prototype,Nr=u.TypeError,Wr=u.QObject,Dr=Oe.f,Gr=_e.f,Hr=cr.f,Vr=v.f,$r=z([].push),Yr=ie("symbols"),Kr=ie("op-symbols"),Jr=ie("wks"),Qr=!Wr||!Wr.prototype||!Wr.prototype.findChild,Xr=h&&l((function(){return 7!=rr(Gr({},"a",{get:function(){return Gr(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=Dr(Br,t);n&&delete Br[t],Gr(e,t,r),n&&e!==Br&&Gr(Br,t,n)}:Gr,Zr=function(e,t){var r=Yr[e]=rr(Fr);return Rr(r,{type:"Symbol",tag:e,description:t}),h||(r.description=t),r},en=function(e,t,r){e===Br&&en(Kr,t,r),Se(e);var n=ye(t);return Se(r),de(Yr,n)?(r.enumerable?(de(e,_r)&&e[_r][n]&&(e[_r][n]=!1),r=rr(r,{enumerable:b(0,!1)})):(de(e,_r)||Gr(e,_r,b(1,{})),e[_r][n]=!0),Xr(e,n,r)):Gr(e,n,r)},tn=function(e,t){Se(e);var r=M(t),n=Bt(r).concat(on(r));return Ar(n,(function(t){h&&!g(rn,r,t)||en(e,t,r[t])})),e},rn=function(e){var t=ye(e),r=g(Vr,this,t);return!(this===Br&&de(Yr,t)&&!de(Kr,t))&&(!(r||!de(this,t)||!de(Yr,t)||de(this,_r)&&this[_r][t])||r)},nn=function(e,t){var r=M(e),n=ye(t);if(r!==Br||!de(Yr,n)||de(Kr,n)){var i=Dr(r,n);return!i||!de(Yr,n)||de(r,_r)&&r[_r][n]||(i.enumerable=!0),i}},an=function(e){var t=Hr(M(e)),r=[];return Ar(t,(function(e){de(Yr,e)||de(Je,e)||$r(r,e)})),r},on=function(e){var t=e===Br,r=Hr(t?Kr:M(e)),n=[];return Ar(r,(function(e){!de(Yr,e)||t&&!de(Br,e)||$r(n,Yr[e])})),n};H||(Fr=(Lr=function(){if(B(Fr,this))throw Nr("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?Yt(arguments[0]):void 0,t=he(e),r=function(e){this===Br&&g(r,Kr,e),de(this,_r)&&de(this[_r],t)&&(this[_r][t]=!1),Xr(this,t,b(1,e))};return h&&Qr&&Xr(Br,t,{configurable:!0,set:r}),Zr(t,e)}).prototype,ot(Fr,"toString",(function(){return Ur(this).tag})),ot(Lr,"withoutSetter",(function(e){return Zr(he(e),e)})),v.f=rn,_e.f=en,Kt.f=tn,Oe.f=nn,zt.f=cr.f=an,Ct.f=on,ur.f=function(e){return Zr(me(e),e)},h&&(Gr(Fr,"description",{configurable:!0,get:function(){return Ur(this).description}}),ot(Br,"propertyIsEnumerable",rn,{unsafe:!0}))),Ut({global:!0,constructor:!0,wrap:!0,forced:!H,sham:!H},{Symbol:Lr}),Ar(Bt(Jr),(function(e){!function(e){var t=lr.Symbol||(lr.Symbol={});de(t,e)||hr(t,e,{value:ur.f(e)})}(e)})),Ut({target:"Symbol",stat:!0,forced:!H},{useSetter:function(){Qr=!0},useSimple:function(){Qr=!1}}),Ut({target:"Object",stat:!0,forced:!H,sham:!h},{create:function(e,t){return void 0===t?rr(e):tn(rr(e),t)},defineProperty:en,defineProperties:tn,getOwnPropertyDescriptor:nn}),Ut({target:"Object",stat:!0,forced:!H},{getOwnPropertyNames:an}),function(){var e=U("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=me("toPrimitive");t&&!t[n]&&ot(t,n,(function(e){return g(r,this)}),{arity:1})}(),gr(Lr,"Symbol"),Je[_r]=!0;var sn=H&&!!Symbol.for&&!!Symbol.keyFor,dn=ie("string-to-symbol-registry"),cn=ie("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!sn},{for:function(e){var t=Yt(e);if(de(dn,t))return dn[t];var r=U("Symbol")(t);return dn[t]=r,cn[r]=t,r}});var un=ie("symbol-to-string-registry");Ut({target:"Symbol",stat:!0,forced:!sn},{keyFor:function(e){if(!Y(e))throw TypeError(J(e)+" is not a symbol");if(de(un,e))return un[e]}});var ln=Function.prototype,hn=ln.apply,fn=ln.call,pn="object"==typeof Reflect&&Reflect.apply||(f?fn.bind(hn):function(){return fn.apply(hn,arguments)}),gn=z([].slice),In=U("JSON","stringify"),mn=z(/./.exec),vn=z("".charAt),bn=z("".charCodeAt),kn=z("".replace),yn=z(1..toString),xn=/[\uD800-\uDFFF]/g,wn=/^[\uD800-\uDBFF]$/,zn=/^[\uDC00-\uDFFF]$/,Cn=!H||l((function(){var e=U("Symbol")();return"[null]"!=In([e])||"{}"!=In({a:e})||"{}"!=In(Object(e))})),Pn=l((function(){return'"\\udf06\\ud834"'!==In("\udf06\ud834")||'"\\udead"'!==In("\udead")})),On=function(e,t){var r=gn(arguments),n=t;if((_(t)||void 0!==e)&&!Y(e))return vr(t)||(t=function(e,t){if(A(n)&&(t=g(n,this,e,t)),!Y(t))return t}),r[1]=t,pn(In,null,r)},En=function(e,t,r){var n=vn(r,t-1),i=vn(r,t+1);return mn(wn,e)&&!mn(zn,i)||mn(zn,e)&&!mn(wn,n)?"\\u"+yn(bn(e,0),16):e};In&&Ut({target:"JSON",stat:!0,arity:3,forced:Cn||Pn},{stringify:function(e,t,r){var n=gn(arguments),i=pn(Cn?On:In,null,n);return Pn&&"string"==typeof i?kn(i,xn,En):i}});var qn=!H||l((function(){Ct.f(1)}));Ut({target:"Object",stat:!0,forced:qn},{getOwnPropertySymbols:function(e){var t=Ct.f;return t?t(oe(e)):[]}});var jn=me("species"),Sn=function(e){return G>=51||!l((function(){var t=[];return(t.constructor={})[jn]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Tn=Mr.filter,Mn=Sn("filter");Ut({target:"Array",proto:!0,forced:!Mn},{filter:function(e){return Tn(this,e,arguments.length>1?arguments[1]:void 0)}});var An=Wt?{}.toString:function(){return"[object "+Vt(this)+"]"};Wt||ot(Object.prototype,"toString",An,{unsafe:!0});var _n=Oe.f,Rn=l((function(){_n(1)}));Ut({target:"Object",stat:!0,forced:!h||Rn,sham:!h},{getOwnPropertyDescriptor:function(e,t){return _n(M(e),t)}});var Un={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},Bn=ze("span").classList,Ln=Bn&&Bn.constructor&&Bn.constructor.prototype,Fn=Ln===Object.prototype?void 0:Ln,Nn=function(e,t){var r=[][e];return!!r&&l((function(){r.call(null,t||function(){return 1},1)}))},Wn=Mr.forEach,Dn=Nn("forEach")?[].forEach:function(e){return Wn(this,e,arguments.length>1?arguments[1]:void 0)},Gn=function(e){if(e&&e.forEach!==Dn)try{Re(e,"forEach",Dn)}catch(t){e.forEach=Dn}};for(var Hn in Un)Un[Hn]&&Gn(u[Hn]&&u[Hn].prototype);Gn(Fn),Ut({target:"Object",stat:!0,sham:!h},{getOwnPropertyDescriptors:function(e){for(var t,r,n=M(e),i=Oe.f,a=Ot(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&nr(o,t,r);return o}});var Vn=Kt.f;Ut({target:"Object",stat:!0,forced:Object.defineProperties!==Vn,sham:!h},{defineProperties:Vn});var $n=_e.f;Ut({target:"Object",stat:!0,forced:Object.defineProperty!==$n,sham:!h},{defineProperty:$n});var Yn,Kn=me("match"),Jn=TypeError,Qn=function(e){if(function(e){var t;return _(e)&&(void 0!==(t=e[Kn])?!!t:"RegExp"==O(e))}(e))throw Jn("The method doesn't accept regular expressions");return e},Xn=me("match"),Zn=Oe.f,ei=z("".startsWith),ti=z("".slice),ri=Math.min,ni=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Xn]=!1,"/./"[e](t)}catch(e){}}return!1}("startsWith"),ii=!(ni||(Yn=Zn(String.prototype,"startsWith"),!Yn||Yn.writable));Ut({target:"String",proto:!0,forced:!ii&&!ni},{startsWith:function(e){var t=Yt(T(this));Qn(e);var r=gt(ri(arguments.length>1?arguments[1]:void 0,t.length)),n=Yt(e);return ei?ei(t,n,r):ti(t,r,r+n.length)===n}});var ai=function(){var e=Se(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},oi=RegExp.prototype,si=Fe.PROPER,di=RegExp.prototype.toString,ci=l((function(){return"/a/b"!=di.call({source:"a",flags:"b"})})),ui=si&&"toString"!=di.name;function li(e,t,r,n,i,a,o){try{var s=e[a](o),d=s.value}catch(e){return void r(e)}s.done?t(d):Promise.resolve(d).then(n,i)}function hi(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var a=e.apply(t,r);function o(e){li(a,n,i,o,s,"next",e)}function s(e){li(a,n,i,o,s,"throw",e)}o(void 0)}))}}function fi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pi(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 gi(e,t,r){return t&&pi(e.prototype,t),r&&pi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ii(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}(ci||ui)&&ot(RegExp.prototype,"toString",(function(){var e=Se(this);return"/"+Yt(e.source)+"/"+Yt(function(e){var t=e.flags;return void 0!==t||"flags"in oi||de(e,"flags")||!B(oi,e)?t:g(ai,e)}(e))}),{unsafe:!0});var mi=Object.prototype,vi=mi.hasOwnProperty,bi="function"==typeof Symbol?Symbol:{},ki=bi.iterator||"@@iterator",yi=bi.asyncIterator||"@@asyncIterator",xi=bi.toStringTag||"@@toStringTag";function wi(e,t,r,n){var i=t&&t.prototype instanceof Pi?t:Pi,a=Object.create(i.prototype),o=new Li(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 Ni()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=Ri(o,r);if(s){if(s===Ci)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 d=zi(e,t,r);if("normal"===d.type){if(n=r.done?"completed":"suspendedYield",d.arg===Ci)continue;return{value:d.arg,done:r.done}}"throw"===d.type&&(n="completed",r.method="throw",r.arg=d.arg)}}}(e,r,o),a}function zi(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}var Ci={};function Pi(){}function Oi(){}function Ei(){}var qi={};qi[ki]=function(){return this};var ji=Object.getPrototypeOf,Si=ji&&ji(ji(Fi([])));Si&&Si!==mi&&vi.call(Si,ki)&&(qi=Si);var Ti=Ei.prototype=Pi.prototype=Object.create(qi);function Mi(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function Ai(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===Oi||"GeneratorFunction"===(t.displayName||t.name))}function _i(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=zi(e[n],e,i);if("throw"!==s.type){var d=s.arg,c=d.value;return c&&"object"==typeof c&&vi.call(c,"__await")?t.resolve(c.__await).then((function(e){r("next",e,a,o)}),(function(e){r("throw",e,a,o)})):t.resolve(c).then((function(e){d.value=e,a(d)}),(function(e){return r("throw",e,a,o)}))}o(s.arg)}(n,i,r,a)}))}return r=r?r.then(a,a):a()}}function Ri(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,Ri(e,t),"throw"===t.method))return Ci;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return Ci}var n=zi(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,Ci;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,Ci):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,Ci)}function Ui(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 Bi(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Li(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(Ui,this),this.reset(!0)}function Fi(e){if(e){var t=e[ki];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(vi.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:Ni}}function Ni(){return{value:void 0,done:!0}}Oi.prototype=Ti.constructor=Ei,Ei.constructor=Oi,Ei[xi]=Oi.displayName="GeneratorFunction",Mi(_i.prototype),_i.prototype[yi]=function(){return this},Mi(Ti),Ti[xi]="Generator",Ti[ki]=function(){return this},Ti.toString=function(){return"[object Generator]"},Li.prototype={constructor:Li,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(Bi),!e)for(var t in this)"t"===t.charAt(0)&&vi.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=vi.call(i,"catchLoc"),s=vi.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&&vi.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,Ci):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),Ci},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),Bi(r),Ci}},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;Bi(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Fi(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),Ci}};var Wi={wrap:wi,isGeneratorFunction:Ai,AsyncIterator:_i,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,Ei):(e.__proto__=Ei,xi in e||(e[xi]="GeneratorFunction")),e.prototype=Object.create(Ti),e},awrap:function(e){return{__await:e}},async:function(e,t,r,n,i){void 0===i&&(i=Promise);var a=new _i(wi(e,t,r,n),i);return Ai(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:Fi},Di=_e.f,Gi=me("unscopables"),Hi=Array.prototype;null==Hi[Gi]&&Di(Hi,Gi,{configurable:!0,value:rr(null)});var Vi,$i,Yi,Ki=function(e){Hi[Gi][e]=!0},Ji={},Qi=!l((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Xi=Ke("IE_PROTO"),Zi=Object,ea=Zi.prototype,ta=Qi?Zi.getPrototypeOf:function(e){var t=oe(e);if(de(t,Xi))return t[Xi];var r=t.constructor;return A(r)&&t instanceof r?r.prototype:t instanceof Zi?ea:null},ra=me("iterator"),na=!1;[].keys&&("next"in(Yi=[].keys())?($i=ta(ta(Yi)))!==Object.prototype&&(Vi=$i):na=!0),(null==Vi||l((function(){var e={};return Vi[ra].call(e)!==e})))&&(Vi={}),A(Vi[ra])||ot(Vi,ra,(function(){return this}));var ia={IteratorPrototype:Vi,BUGGY_SAFARI_ITERATORS:na},aa=ia.IteratorPrototype,oa=function(){return this},sa=function(e,t,r,n){var i=t+" Iterator";return e.prototype=rr(aa,{next:b(+!n,r)}),gr(e,i,!1),Ji[i]=oa,e},da=String,ca=TypeError,ua=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,r={};try{(e=z(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),t=r instanceof Array}catch(e){}return function(r,n){return Se(r),function(e){if("object"==typeof e||A(e))return e;throw ca("Can't set "+da(e)+" as a prototype")}(n),t?e(r,n):r.__proto__=n,r}}():void 0),la=Fe.PROPER,ha=Fe.CONFIGURABLE,fa=ia.IteratorPrototype,pa=ia.BUGGY_SAFARI_ITERATORS,ga=me("iterator"),Ia=function(){return this},ma=function(e,t,r,n,i,a,o){sa(r,t,n);var s,d,c,u=function(e){if(e===i&&I)return I;if(!pa&&e in f)return f[e];switch(e){case"keys":case"values":case"entries":return function(){return new r(this,e)}}return function(){return new r(this)}},l=t+" Iterator",h=!1,f=e.prototype,p=f[ga]||f["@@iterator"]||i&&f[i],I=!pa&&p||u(i),m="Array"==t&&f.entries||p;if(m&&(s=ta(m.call(new e)))!==Object.prototype&&s.next&&(ta(s)!==fa&&(ua?ua(s,fa):A(s[ga])||ot(s,ga,Ia)),gr(s,l,!0)),la&&"values"==i&&p&&"values"!==p.name&&(ha?Re(f,"name","values"):(h=!0,I=function(){return g(p,this)})),i)if(d={values:u("values"),keys:a?I:u("keys"),entries:u("entries")},o)for(c in d)(pa||h||!(c in f))&&ot(f,c,d[c]);else Ut({target:t,proto:!0,forced:pa||h},d);return f[ga]!==I&&ot(f,ga,I,{name:i}),Ji[t]=I,d},va=_e.f,ba=it.set,ka=it.getterFor("Array Iterator"),ya=ma(Array,"Array",(function(e,t){ba(this,{type:"Array Iterator",target:M(e),index:0,kind:t})}),(function(){var e=ka(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"),xa=Ji.Arguments=Ji.Array;if(Ki("keys"),Ki("values"),Ki("entries"),h&&"values"!==xa.name)try{va(xa,"name",{value:"values"})}catch(e){}var wa=z("".charAt),za=z("".charCodeAt),Ca=z("".slice),Pa=function(e){return function(t,r){var n,i,a=Yt(T(t)),o=ut(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=za(a,o))<55296||n>56319||o+1===s||(i=za(a,o+1))<56320||i>57343?e?wa(a,o):n:e?Ca(a,o,o+2):i-56320+(n-55296<<10)+65536}},Oa={codeAt:Pa(!1),charAt:Pa(!0)},Ea=Oa.charAt,qa=it.set,ja=it.getterFor("String Iterator");ma(String,"String",(function(e){qa(this,{type:"String Iterator",string:Yt(e),index:0})}),(function(){var e,t=ja(this),r=t.string,n=t.index;return n>=r.length?{value:void 0,done:!0}:(e=Ea(r,n),t.index+=e.length,{value:e,done:!1})}));var Sa=me("iterator"),Ta=me("toStringTag"),Ma=ya.values,Aa=function(e,t){if(e){if(e[Sa]!==Ma)try{Re(e,Sa,Ma)}catch(t){e[Sa]=Ma}if(e[Ta]||Re(e,Ta,t),Un[t])for(var r in ya)if(e[r]!==ya[r])try{Re(e,r,ya[r])}catch(t){e[r]=ya[r]}}};for(var _a in Un)Aa(u[_a]&&u[_a].prototype,_a);Aa(Fn,"DOMTokenList");var Ra=me("iterator"),Ua=!l((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[Ra]||"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})),Ba=function(e,t,r){for(var n in t)ot(e,n,t[n],r);return e},La=TypeError,Fa=function(e,t){if(B(t,e))return e;throw La("Incorrect invocation")},Na=me("iterator"),Wa=function(e){if(null!=e)return Z(e,Na)||Z(e,"@@iterator")||Ji[Vt(e)]},Da=TypeError,Ga=function(e,t){var r=arguments.length<2?Wa(e):t;if(X(r))return Se(g(r,e));throw Da(J(e)+" is not iterable")},Ha=TypeError,Va=function(e,t){if(e<t)throw Ha("Not enough arguments");return e},$a=Math.floor,Ya=function(e,t){var r=e.length,n=$a(r/2);return r<8?Ka(e,t):Ja(e,Ya(or(e,0,n),t),Ya(or(e,n),t),t)},Ka=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},Ja=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},Qa=Ya,Xa=me("iterator"),Za=it.set,eo=it.getterFor("URLSearchParams"),to=it.getterFor("URLSearchParamsIterator"),ro=Object.getOwnPropertyDescriptor,no=function(e){if(!h)return u[e];var t=ro(u,e);return t&&t.value},io=no("fetch"),ao=no("Request"),oo=no("Headers"),so=ao&&ao.prototype,co=oo&&oo.prototype,uo=u.RegExp,lo=u.TypeError,ho=u.decodeURIComponent,fo=u.encodeURIComponent,po=z("".charAt),go=z([].join),Io=z([].push),mo=z("".replace),vo=z([].shift),bo=z([].splice),ko=z("".split),yo=z("".slice),xo=/\+/g,wo=Array(4),zo=function(e){return wo[e-1]||(wo[e-1]=uo("((?:%[\\da-f]{2}){"+e+"})","gi"))},Co=function(e){try{return ho(e)}catch(t){return e}},Po=function(e){var t=mo(e,xo," "),r=4;try{return ho(t)}catch(e){for(;r;)t=mo(t,zo(r--),Co);return t}},Oo=/[!'()~]|%20/g,Eo={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},qo=function(e){return Eo[e]},jo=function(e){return mo(fo(e),Oo,qo)},So=sa((function(e,t){Za(this,{type:"URLSearchParamsIterator",iterator:Ga(eo(e).entries),kind:t})}),"Iterator",(function(){var e=to(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),To=function(e){this.entries=[],this.url=null,void 0!==e&&(_(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===po(e,0)?yo(e,1):e:Yt(e)))};To.prototype={type:"URLSearchParams",bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,d=Wa(e);if(d)for(r=(t=Ga(e,d)).next;!(n=g(r,t)).done;){if(a=(i=Ga(Se(n.value))).next,(o=g(a,i)).done||(s=g(a,i)).done||!g(a,i).done)throw lo("Expected sequence with length 2");Io(this.entries,{key:Yt(o.value),value:Yt(s.value)})}else for(var c in e)de(e,c)&&Io(this.entries,{key:c,value:Yt(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=ko(e,"&"),i=0;i<n.length;)(t=n[i++]).length&&(r=ko(t,"="),Io(this.entries,{key:Po(vo(r)),value:Po(go(r,"="))}))},serialize:function(){for(var e,t=this.entries,r=[],n=0;n<t.length;)e=t[n++],Io(r,jo(e.key)+"="+jo(e.value));return go(r,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Mo=function(){Fa(this,Ao);var e=arguments.length>0?arguments[0]:void 0;Za(this,new To(e))},Ao=Mo.prototype;if(Ba(Ao,{append:function(e,t){Va(arguments.length,2);var r=eo(this);Io(r.entries,{key:Yt(e),value:Yt(t)}),r.updateURL()},delete:function(e){Va(arguments.length,1);for(var t=eo(this),r=t.entries,n=Yt(e),i=0;i<r.length;)r[i].key===n?bo(r,i,1):i++;t.updateURL()},get:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=0;n<t.length;n++)if(t[n].key===r)return t[n].value;return null},getAll:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=[],i=0;i<t.length;i++)t[i].key===r&&Io(n,t[i].value);return n},has:function(e){Va(arguments.length,1);for(var t=eo(this).entries,r=Yt(e),n=0;n<t.length;)if(t[n++].key===r)return!0;return!1},set:function(e,t){Va(arguments.length,1);for(var r,n=eo(this),i=n.entries,a=!1,o=Yt(e),s=Yt(t),d=0;d<i.length;d++)(r=i[d]).key===o&&(a?bo(i,d--,1):(a=!0,r.value=s));a||Io(i,{key:o,value:s}),n.updateURL()},sort:function(){var e=eo(this);Qa(e.entries,(function(e,t){return e.key>t.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=eo(this).entries,n=mr(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 So(this,"keys")},values:function(){return new So(this,"values")},entries:function(){return new So(this,"entries")}},{enumerable:!0}),ot(Ao,Xa,Ao.entries,{name:"entries"}),ot(Ao,"toString",(function(){return eo(this).serialize()}),{enumerable:!0}),gr(Mo,"URLSearchParams"),Ut({global:!0,constructor:!0,forced:!Ua},{URLSearchParams:Mo}),!Ua&&A(oo)){var _o=z(co.has),Ro=z(co.set),Uo=function(e){if(_(e)){var t,r=e.body;if("URLSearchParams"===Vt(r))return t=e.headers?new oo(e.headers):new oo,_o(t,"content-type")||Ro(t,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),rr(e,{body:b(0,Yt(r)),headers:b(0,t)})}return e};if(A(io)&&Ut({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(e){return io(e,arguments.length>1?Uo(arguments[1]):{})}}),A(ao)){var Bo=function(e){return Fa(this,so),new ao(e,arguments.length>1?Uo(arguments[1]):{})};so.constructor=Bo,Bo.prototype=so,Ut({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Bo})}}var Lo={URLSearchParams:Mo,getState:eo};function Fo(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 No(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fo(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fo(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wo=gi((function e(t){if(fi(this,e),Ii(this,"baseUri",void 0),Ii(this,"proxy",void 0),Ii(this,"headers",void 0),Ii(this,"parameters",void 0),Ii(this,"fetchOptions",void 0),Ii(this,"transformRequest",void 0),Ii(this,"throwOnBadResponse",void 0),this.headers=No({},t.headers),this.parameters=No({},t.parameters),!this.parameters.shortCode)throw new Error("Missing required parameter: shortCode");this.fetchOptions=No({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 Do(e){return(Do="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)}Ii(Wo,"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}}}),Ut({global:!0},{globalThis:u});var Go,Ho,Vo="object"===("undefined"==typeof window?"undefined":Do(window))&&"object"===Do(window.document),$o="object"===("undefined"==typeof process?"undefined":Do(process))&&"object"===Do(process.versions)&&"string"==typeof process.versions.node,Yo=Vo?window:globalThis,Ko="function"==typeof Yo.fetch,Jo=function(){if($o)return require("node-fetch").default;if(!Ko)throw new Error("Bad environment: it is not a node environment but fetch is not defined");return Yo.fetch}(),Qo=u.RegExp,Xo=l((function(){var e=Qo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Zo=Xo||l((function(){return!Qo("a","y").sticky})),es={BROKEN_CARET:Xo||l((function(){var e=Qo("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),MISSED_STICKY:Zo,UNSUPPORTED_Y:Xo},ts=u.RegExp,rs=l((function(){var e=ts(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),ns=u.RegExp,is=l((function(){var e=ns("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),as=it.get,os=ie("native-string-replace",String.prototype.replace),ss=RegExp.prototype.exec,ds=ss,cs=z("".charAt),us=z("".indexOf),ls=z("".replace),hs=z("".slice),fs=(Ho=/b*/g,g(ss,Go=/a/,"a"),g(ss,Ho,"a"),0!==Go.lastIndex||0!==Ho.lastIndex),ps=es.BROKEN_CARET,gs=void 0!==/()??/.exec("")[1];(fs||gs||ps||rs||is)&&(ds=function(e){var t,r,n,i,a,o,s,d=this,c=as(d),u=Yt(e),l=c.raw;if(l)return l.lastIndex=d.lastIndex,t=g(ds,l,u),d.lastIndex=l.lastIndex,t;var h=c.groups,f=ps&&d.sticky,p=g(ai,d),I=d.source,m=0,v=u;if(f&&(p=ls(p,"y",""),-1===us(p,"g")&&(p+="g"),v=hs(u,d.lastIndex),d.lastIndex>0&&(!d.multiline||d.multiline&&"\n"!==cs(u,d.lastIndex-1))&&(I="(?: "+I+")",v=" "+v,m++),r=new RegExp("^(?:"+I+")",p)),gs&&(r=new RegExp("^"+I+"$(?!\\s)",p)),fs&&(n=d.lastIndex),i=g(ss,f?r:d,v),f?i?(i.input=hs(i.input,m),i[0]=hs(i[0],m),i.index=d.lastIndex,d.lastIndex+=i[0].length):d.lastIndex=0:fs&&i&&(d.lastIndex=d.global?i.index+i[0].length:n),gs&&i&&i.length>1&&g(os,i[0],r,(function(){for(a=1;a<arguments.length-2;a++)void 0===arguments[a]&&(i[a]=void 0)})),i&&h)for(i.groups=o=rr(null),a=0;a<h.length;a++)o[(s=h[a])[0]]=i[s[1]];return i});var Is=ds;Ut({target:"RegExp",proto:!0,forced:/./.exec!==Is},{exec:Is});var ms=me("species"),vs=RegExp.prototype,bs=function(e,t,r,n){var i=me(e),a=!l((function(){var t={};return t[i]=function(){return 7},7!=""[e](t)})),o=a&&!l((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=z(/./[i]),d=t(i,""[e],(function(e,t,r,n,i){var o=z(e),d=t.exec;return d===Is||d===vs.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));ot(String.prototype,e,d[0]),ot(vs,i,d[1])}n&&Re(vs[i],"sham",!0)},ks=Oa.charAt,ys=function(e,t,r){return t+(r?ks(e,t).length:1)},xs=Math.floor,ws=z("".charAt),zs=z("".replace),Cs=z("".slice),Ps=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Os=/\$([$&'`]|\d{1,2})/g,Es=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,d=Os;return void 0!==i&&(i=oe(i),d=Ps),zs(a,d,(function(a,d){var c;switch(ws(d,0)){case"$":return"$";case"&":return e;case"`":return Cs(t,0,r);case"'":return Cs(t,o);case"<":c=i[Cs(d,1,-1)];break;default:var u=+d;if(0===u)return a;if(u>s){var l=xs(u/10);return 0===l?a:l<=s?void 0===n[l-1]?ws(d,1):n[l-1]+ws(d,1):a}c=n[u-1]}return void 0===c?"":c}))},qs=TypeError,js=function(e,t){var r=e.exec;if(A(r)){var n=g(r,e,t);return null!==n&&Se(n),n}if("RegExp"===O(e))return g(Is,e,t);throw qs("RegExp#exec called on incompatible receiver")},Ss=me("replace"),Ts=Math.max,Ms=Math.min,As=z([].concat),_s=z([].push),Rs=z("".indexOf),Us=z("".slice),Bs="$0"==="a".replace(/./,"$0"),Ls=!!/./[Ss]&&""===/./[Ss]("a","$0");bs("replace",(function(e,t,r){var n=Ls?"$":"$0";return[function(e,r){var n=T(this),i=null==e?void 0:Z(e,Ss);return i?g(i,e,n,r):g(t,Yt(n),e,r)},function(e,i){var a=Se(this),o=Yt(e);if("string"==typeof i&&-1===Rs(i,n)&&-1===Rs(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var d=A(i);d||(i=Yt(i));var c=a.global;if(c){var u=a.unicode;a.lastIndex=0}for(var l=[];;){var h=js(a,o);if(null===h)break;if(_s(l,h),!c)break;""===Yt(h[0])&&(a.lastIndex=ys(o,gt(a.lastIndex),u))}for(var f,p="",g=0,I=0;I<l.length;I++){for(var m=Yt((h=l[I])[0]),v=Ts(Ms(ut(h.index),o.length),0),b=[],k=1;k<h.length;k++)_s(b,void 0===(f=h[k])?f:String(f));var y=h.groups;if(d){var x=As([m],b,v,o);void 0!==y&&_s(x,y);var w=Yt(pn(i,void 0,x))}else w=Es(m,o,v,b,y,i);v>=g&&(p+=Us(o,g,v)+w,g=v+m.length)}return p+Us(o,g)}]}),!!l((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}))||!Bs||Ls);var Fs=Function,Ns=z([].concat),Ws=z([].join),Ds={},Gs=function(e,t,r){if(!de(Ds,t)){for(var n=[],i=0;i<t;i++)n[i]="a["+i+"]";Ds[t]=Fs("C,a","return new C("+Ws(n,",")+")")}return Ds[t](e,r)},Hs=f?Fs.bind:function(e){var t=X(this),r=t.prototype,n=gn(arguments,1),i=function(){var r=Ns(n,gn(arguments));return this instanceof i?Gs(t,r.length,r):t.apply(e,r)};return _(r)&&(i.prototype=r),i},Vs=TypeError,$s=function(e){if(Or(e))return e;throw Vs(J(e)+" is not a constructor")},Ys=U("Reflect","construct"),Ks=Object.prototype,Js=[].push,Qs=l((function(){function e(){}return!(Ys((function(){}),[],e)instanceof e)})),Xs=!l((function(){Ys((function(){}))})),Zs=Qs||Xs;Ut({target:"Reflect",stat:!0,forced:Zs,sham:Zs},{construct:function(e,t){$s(e),Se(t);var r=arguments.length<3?e:$s(arguments[2]);if(Xs&&!Qs)return Ys(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 pn(Js,n,t),new(pn(Hs,e,n))}var i=r.prototype,a=rr(_(i)?i:Ks),o=pn(e,a,t);return _(o)?o:a}});var ed=TypeError,td=function(e){if(e>9007199254740991)throw ed("Maximum allowed index exceeded");return e},rd=me("isConcatSpreadable"),nd=G>=51||!l((function(){var e=[];return e[rd]=!1,e.concat()[0]!==e})),id=Sn("concat"),ad=function(e){if(!_(e))return!1;var t=e[rd];return void 0!==t?!!t:vr(e)};function od(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sd(e,t){return(sd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dd(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&&sd(e,t)}function cd(e,t){if(t&&("object"===Do(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return od(e)}function ud(e){return(ud=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ld(){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 hd(e,t,r){return(hd=ld()?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&&sd(i,r.prototype),i}).apply(null,arguments)}function fd(e){var t="function"==typeof Map?new Map:void 0;return(fd=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 hd(e,arguments,ud(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),sd(n,e)})(e)}function pd(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=ud(e);if(t){var i=ud(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cd(this,r)}}Ut({target:"Array",proto:!0,arity:1,forced:!nd||!id},{concat:function(e){var t,r,n,i,a,o=oe(this),s=jr(o,0),d=0;for(t=-1,n=arguments.length;t<n;t++)if(ad(a=-1===t?o:arguments[t]))for(i=It(a),td(d+i),r=0;r<i;r++,d++)r in a&&nr(s,d,a[r]);else td(d+1),nr(s,d++,a);return s.length=d,s}});var gd=function(e){dd(r,e);var t=pd(r);function r(e){var n;return fi(this,r),Ii(od(n=t.call(this,"".concat(e.status," ").concat(e.statusText))),"response",void 0),n.response=e,n}return gi(r)}(fd(Error));function Id(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 md(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Id(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Id(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var vd,bd=function(){var e=hi(Wi.mark((function e(t,r,n,i){var a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=md(md({},null==n?void 0:n.headers),null==r?void 0:r.headers),s=md(md({},null==n?void 0:n.fetchOptions),{},{headers:o,body:null==r?void 0:r.body,method:null!==(a=null==r?void 0:r.method)&&void 0!==a?a:"GET"}),e.next=4,Jo(t,s);case 4:if(d=e.sent,!i){e.next=7;break}return e.abrupt("return",d);case 7:if(null==n||!n.throwOnBadResponse||d.ok||304===d.status){e.next=11;break}throw new gd(d);case 11:return e.next=13,d.text();case 13:return c=e.sent,e.abrupt("return",c?JSON.parse(c):{});case 15:case"end":return e.stop()}}),e)})));return function(t,r,n,i){return e.apply(this,arguments)}}(),kd=function(e,t,r){return r.get&&at(r.get,t,{getter:!0}),r.set&&at(r.set,t,{setter:!0}),_e.f(e,t,r)},yd=Object.assign,xd=Object.defineProperty,wd=z([].concat),zd=!yd||l((function(){if(h&&1!==yd({b:1},yd(xd({},"a",{enumerable:!0,get:function(){xd(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!=yd({},e)[r]||"abcdefghijklmnopqrst"!=Bt(yd({},t)).join("")}))?function(e,t){for(var r=oe(e),n=arguments.length,i=1,a=Ct.f,o=v.f;n>i;)for(var s,d=j(arguments[i++]),c=a?wd(Bt(d),a(d)):Bt(d),u=c.length,l=0;u>l;)s=c[l++],h&&!g(o,d,s)||(r[s]=d[s]);return r}:yd,Cd=function(e,t,r){var n,i;Se(e);try{if(!(n=Z(e,"return"))){if("throw"===t)throw r;return r}n=g(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Se(n),r},Pd=function(e,t,r,n){try{return n?t(Se(r)[0],r[1]):t(r)}catch(t){Cd(e,"throw",t)}},Od=me("iterator"),Ed=Array.prototype,qd=function(e){return void 0!==e&&(Ji.Array===e||Ed[Od]===e)},jd=Array,Sd=function(e){var t=oe(e),r=Or(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=mr(i,n>2?arguments[2]:void 0));var o,s,d,c,u,l,h=Wa(t),f=0;if(!h||this===jd&&qd(h))for(o=It(t),s=r?new this(o):jd(o);o>f;f++)l=a?i(t[f],f):t[f],nr(s,f,l);else for(u=(c=Ga(t,h)).next,s=r?new this:[];!(d=g(u,c)).done;f++)l=a?Pd(c,i,[d.value,f],!0):d.value,nr(s,f,l);return s.length=f,s},Td=/[^\0-\u007E]/,Md=/[.\u3002\uFF0E\uFF61]/g,Ad="Overflow: input needs wider integers to process",_d=RangeError,Rd=z(Md.exec),Ud=Math.floor,Bd=String.fromCharCode,Ld=z("".charCodeAt),Fd=z([].join),Nd=z([].push),Wd=z("".replace),Dd=z("".split),Gd=z("".toLowerCase),Hd=function(e){return e+22+75*(e<26)},Vd=function(e,t,r){var n=0;for(e=r?Ud(e/700):e>>1,e+=Ud(e/t);e>455;)e=Ud(e/35),n+=36;return Ud(n+36*e/(e+38))},$d=function(e){var t,r,n=[],i=(e=function(e){for(var t=[],r=0,n=e.length;r<n;){var i=Ld(e,r++);if(i>=55296&&i<=56319&&r<n){var a=Ld(e,r++);56320==(64512&a)?Nd(t,((1023&i)<<10)+(1023&a)+65536):(Nd(t,i),r--)}else Nd(t,i)}return t}(e)).length,a=128,o=0,s=72;for(t=0;t<e.length;t++)(r=e[t])<128&&Nd(n,Bd(r));var d=n.length,c=d;for(d&&Nd(n,"-");c<i;){var u=2147483647;for(t=0;t<e.length;t++)(r=e[t])>=a&&r<u&&(u=r);var l=c+1;if(u-a>Ud((2147483647-o)/l))throw _d(Ad);for(o+=(u-a)*l,a=u,t=0;t<e.length;t++){if((r=e[t])<a&&++o>2147483647)throw _d(Ad);if(r==a){for(var h=o,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(h<p)break;var g=h-p,I=36-p;Nd(n,Bd(Hd(p+g%I))),h=Ud(g/I),f+=36}Nd(n,Bd(Hd(h))),s=Vd(o,l,c==d),o=0,c++}}o++,a++}return Fd(n,"")},Yd=Oa.codeAt,Kd=it.set,Jd=it.getterFor("URL"),Qd=Lo.URLSearchParams,Xd=Lo.getState,Zd=u.URL,ec=u.TypeError,tc=u.parseInt,rc=Math.floor,nc=Math.pow,ic=z("".charAt),ac=z(/./.exec),oc=z([].join),sc=z(1..toString),dc=z([].pop),cc=z([].push),uc=z("".replace),lc=z([].shift),hc=z("".split),fc=z("".slice),pc=z("".toLowerCase),gc=z([].unshift),Ic=/[a-z]/i,mc=/[\d+-.a-z]/i,vc=/\d/,bc=/^0x/i,kc=/^[0-7]+$/,yc=/^\d+$/,xc=/^[\da-f]+$/i,wc=/[\0\t\n\r #%/:<>?@[\\\]^|]/,zc=/[\0\t\n\r #/:<>?@[\\\]^|]/,Cc=/^[\u0000-\u0020]+|[\u0000-\u0020]+$/g,Pc=/[\t\n\r]/g,Oc=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)gc(t,e%256),e=rc(e/256);return oc(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+=sc(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},Ec={},qc=zd({},Ec,{" ":1,'"':1,"<":1,">":1,"`":1}),jc=zd({},qc,{"#":1,"?":1,"{":1,"}":1}),Sc=zd({},jc,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Tc=function(e,t){var r=Yd(e,0);return r>32&&r<127&&!de(t,e)?e:encodeURIComponent(e)},Mc={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Ac=function(e,t){var r;return 2==e.length&&ac(Ic,ic(e,0))&&(":"==(r=ic(e,1))||!t&&"|"==r)},_c=function(e){var t;return e.length>1&&Ac(fc(e,0,2))&&(2==e.length||"/"===(t=ic(e,2))||"\\"===t||"?"===t||"#"===t)},Rc=function(e){return"."===e||"%2e"===pc(e)},Uc={},Bc={},Lc={},Fc={},Nc={},Wc={},Dc={},Gc={},Hc={},Vc={},$c={},Yc={},Kc={},Jc={},Qc={},Xc={},Zc={},eu={},tu={},ru={},nu={},iu=function(e,t,r){var n,i,a,o=Yt(e);if(t){if(i=this.parse(o))throw ec(i);this.searchParams=null}else{if(void 0!==r&&(n=new iu(r,!0)),i=this.parse(o,null,n))throw ec(i);(a=Xd(new Qd)).bindURL(this),this.searchParams=a}};iu.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,d=this,c=t||Uc,u=0,l="",h=!1,f=!1,p=!1;for(e=Yt(e),t||(d.scheme="",d.username="",d.password="",d.host=null,d.port=null,d.path=[],d.query=null,d.fragment=null,d.cannotBeABaseURL=!1,e=uc(e,Cc,"")),e=uc(e,Pc,""),n=Sd(e);u<=n.length;){switch(i=n[u],c){case Uc:if(!i||!ac(Ic,i)){if(t)return"Invalid scheme";c=Lc;continue}l+=pc(i),c=Bc;break;case Bc:if(i&&(ac(mc,i)||"+"==i||"-"==i||"."==i))l+=pc(i);else{if(":"!=i){if(t)return"Invalid scheme";l="",c=Lc,u=0;continue}if(t&&(d.isSpecial()!=de(Mc,l)||"file"==l&&(d.includesCredentials()||null!==d.port)||"file"==d.scheme&&!d.host))return;if(d.scheme=l,t)return void(d.isSpecial()&&Mc[d.scheme]==d.port&&(d.port=null));l="","file"==d.scheme?c=Jc:d.isSpecial()&&r&&r.scheme==d.scheme?c=Fc:d.isSpecial()?c=Gc:"/"==n[u+1]?(c=Nc,u++):(d.cannotBeABaseURL=!0,cc(d.path,""),c=tu)}break;case Lc:if(!r||r.cannotBeABaseURL&&"#"!=i)return"Invalid scheme";if(r.cannotBeABaseURL&&"#"==i){d.scheme=r.scheme,d.path=or(r.path),d.query=r.query,d.fragment="",d.cannotBeABaseURL=!0,c=nu;break}c="file"==r.scheme?Jc:Wc;continue;case Fc:if("/"!=i||"/"!=n[u+1]){c=Wc;continue}c=Hc,u++;break;case Nc:if("/"==i){c=Vc;break}c=eu;continue;case Wc:if(d.scheme=r.scheme,i==vd)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.query=r.query;else if("/"==i||"\\"==i&&d.isSpecial())c=Dc;else if("?"==i)d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.query="",c=ru;else{if("#"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.path.length--,c=eu;continue}d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,d.path=or(r.path),d.query=r.query,d.fragment="",c=nu}break;case Dc:if(!d.isSpecial()||"/"!=i&&"\\"!=i){if("/"!=i){d.username=r.username,d.password=r.password,d.host=r.host,d.port=r.port,c=eu;continue}c=Vc}else c=Hc;break;case Gc:if(c=Hc,"/"!=i||"/"!=ic(l,u+1))continue;u++;break;case Hc:if("/"!=i&&"\\"!=i){c=Vc;continue}break;case Vc:if("@"==i){h&&(l="%40"+l),h=!0,a=Sd(l);for(var g=0;g<a.length;g++){var I=a[g];if(":"!=I||p){var m=Tc(I,Sc);p?d.password+=m:d.username+=m}else p=!0}l=""}else if(i==vd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(h&&""==l)return"Invalid authority";u-=Sd(l).length+1,l="",c=$c}else l+=i;break;case $c:case Yc:if(t&&"file"==d.scheme){c=Xc;continue}if(":"!=i||f){if(i==vd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()){if(d.isSpecial()&&""==l)return"Invalid host";if(t&&""==l&&(d.includesCredentials()||null!==d.port))return;if(o=d.parseHost(l))return o;if(l="",c=Zc,t)return;continue}"["==i?f=!0:"]"==i&&(f=!1),l+=i}else{if(""==l)return"Invalid host";if(o=d.parseHost(l))return o;if(l="",c=Kc,t==Yc)return}break;case Kc:if(!ac(vc,i)){if(i==vd||"/"==i||"?"==i||"#"==i||"\\"==i&&d.isSpecial()||t){if(""!=l){var v=tc(l,10);if(v>65535)return"Invalid port";d.port=d.isSpecial()&&v===Mc[d.scheme]?null:v,l=""}if(t)return;c=Zc;continue}return"Invalid port"}l+=i;break;case Jc:if(d.scheme="file","/"==i||"\\"==i)c=Qc;else{if(!r||"file"!=r.scheme){c=eu;continue}if(i==vd)d.host=r.host,d.path=or(r.path),d.query=r.query;else if("?"==i)d.host=r.host,d.path=or(r.path),d.query="",c=ru;else{if("#"!=i){_c(oc(or(n,u),""))||(d.host=r.host,d.path=or(r.path),d.shortenPath()),c=eu;continue}d.host=r.host,d.path=or(r.path),d.query=r.query,d.fragment="",c=nu}}break;case Qc:if("/"==i||"\\"==i){c=Xc;break}r&&"file"==r.scheme&&!_c(oc(or(n,u),""))&&(Ac(r.path[0],!0)?cc(d.path,r.path[0]):d.host=r.host),c=eu;continue;case Xc:if(i==vd||"/"==i||"\\"==i||"?"==i||"#"==i){if(!t&&Ac(l))c=eu;else if(""==l){if(d.host="",t)return;c=Zc}else{if(o=d.parseHost(l))return o;if("localhost"==d.host&&(d.host=""),t)return;l="",c=Zc}continue}l+=i;break;case Zc:if(d.isSpecial()){if(c=eu,"/"!=i&&"\\"!=i)continue}else if(t||"?"!=i)if(t||"#"!=i){if(i!=vd&&(c=eu,"/"!=i))continue}else d.fragment="",c=nu;else d.query="",c=ru;break;case eu:if(i==vd||"/"==i||"\\"==i&&d.isSpecial()||!t&&("?"==i||"#"==i)){if(".."===(s=pc(s=l))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(d.shortenPath(),"/"==i||"\\"==i&&d.isSpecial()||cc(d.path,"")):Rc(l)?"/"==i||"\\"==i&&d.isSpecial()||cc(d.path,""):("file"==d.scheme&&!d.path.length&&Ac(l)&&(d.host&&(d.host=""),l=ic(l,0)+":"),cc(d.path,l)),l="","file"==d.scheme&&(i==vd||"?"==i||"#"==i))for(;d.path.length>1&&""===d.path[0];)lc(d.path);"?"==i?(d.query="",c=ru):"#"==i&&(d.fragment="",c=nu)}else l+=Tc(i,jc);break;case tu:"?"==i?(d.query="",c=ru):"#"==i?(d.fragment="",c=nu):i!=vd&&(d.path[0]+=Tc(i,Ec));break;case ru:t||"#"!=i?i!=vd&&("'"==i&&d.isSpecial()?d.query+="%27":d.query+="#"==i?"%23":Tc(i,Ec)):(d.fragment="",c=nu);break;case nu:i!=vd&&(d.fragment+=Tc(i,qc))}u++}},parseHost:function(e){var t,r,n;if("["==ic(e,0)){if("]"!=ic(e,e.length-1))return"Invalid host";if(!(t=function(e){var t,r,n,i,a,o,s,d=[0,0,0,0,0,0,0,0],c=0,u=null,l=0,h=function(){return ic(e,l)};if(":"==h()){if(":"!=ic(e,1))return;l+=2,u=++c}for(;h();){if(8==c)return;if(":"!=h()){for(t=r=0;r<4&&ac(xc,h());)t=16*t+tc(h(),16),l++,r++;if("."==h()){if(0==r)return;if(l-=r,c>6)return;for(n=0;h();){if(i=null,n>0){if(!("."==h()&&n<4))return;l++}if(!ac(vc,h()))return;for(;ac(vc,h());){if(a=tc(h(),10),null===i)i=a;else{if(0==i)return;i=10*i+a}if(i>255)return;l++}d[c]=256*d[c]+i,2!=++n&&4!=n||c++}if(4!=n)return;break}if(":"==h()){if(l++,!h())return}else if(h())return;d[c++]=t}else{if(null!==u)return;l++,u=++c}}if(null!==u)for(o=c-u,c=7;0!=c&&o>0;)s=d[c],d[c--]=d[u+o-1],d[u+--o]=s;else if(8!=c)return;return d}(fc(e,1,-1))))return"Invalid host";this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=Dd(Wd(Gd(e),Md,"."),".");for(t=0;t<i.length;t++)r=i[t],Nd(n,Rd(Td,r)?"xn--"+$d(r):r);return Fd(n,".")}(e),ac(wc,e))return"Invalid host";if(null===(t=function(e){var t,r,n,i,a,o,s,d=hc(e,".");if(d.length&&""==d[d.length-1]&&d.length--,(t=d.length)>4)return e;for(r=[],n=0;n<t;n++){if(""==(i=d[n]))return e;if(a=10,i.length>1&&"0"==ic(i,0)&&(a=ac(bc,i)?16:8,i=fc(i,8==a?1:2)),""===i)o=0;else{if(!ac(10==a?yc:8==a?kc:xc,i))return e;o=tc(i,a)}cc(r,o)}for(n=0;n<t;n++)if(o=r[n],n==t-1){if(o>=nc(256,5-t))return null}else if(o>255)return null;for(s=dc(r),n=0;n<r.length;n++)s+=r[n]*nc(256,3-n);return s}(e)))return"Invalid host";this.host=t}else{if(ac(zc,e))return"Invalid host";for(t="",r=Sd(e),n=0;n<r.length;n++)t+=Tc(r[n],Ec);this.host=t}},cannotHaveUsernamePasswordPort:function(){return!this.host||this.cannotBeABaseURL||"file"==this.scheme},includesCredentials:function(){return""!=this.username||""!=this.password},isSpecial:function(){return de(Mc,this.scheme)},shortenPath:function(){var e=this.path,t=e.length;!t||"file"==this.scheme&&1==t&&Ac(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,d=e.fragment,c=t+":";return null!==i?(c+="//",e.includesCredentials()&&(c+=r+(n?":"+n:"")+"@"),c+=Oc(i),null!==a&&(c+=":"+a)):"file"==t&&(c+="//"),c+=e.cannotBeABaseURL?o[0]:o.length?"/"+oc(o,"/"):"",null!==s&&(c+="?"+s),null!==d&&(c+="#"+d),c},setHref:function(e){var t=this.parse(e);if(t)throw ec(t);this.searchParams.update()},getOrigin:function(){var e=this.scheme,t=this.port;if("blob"==e)try{return new au(e.path[0]).origin}catch(e){return"null"}return"file"!=e&&this.isSpecial()?e+"://"+Oc(this.host)+(null!==t?":"+t:""):"null"},getProtocol:function(){return this.scheme+":"},setProtocol:function(e){this.parse(Yt(e)+":",Uc)},getUsername:function(){return this.username},setUsername:function(e){var t=Sd(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var r=0;r<t.length;r++)this.username+=Tc(t[r],Sc)}},getPassword:function(){return this.password},setPassword:function(e){var t=Sd(Yt(e));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var r=0;r<t.length;r++)this.password+=Tc(t[r],Sc)}},getHost:function(){var e=this.host,t=this.port;return null===e?"":null===t?Oc(e):Oc(e)+":"+t},setHost:function(e){this.cannotBeABaseURL||this.parse(e,$c)},getHostname:function(){var e=this.host;return null===e?"":Oc(e)},setHostname:function(e){this.cannotBeABaseURL||this.parse(e,Yc)},getPort:function(){var e=this.port;return null===e?"":Yt(e)},setPort:function(e){this.cannotHaveUsernamePasswordPort()||(""==(e=Yt(e))?this.port=null:this.parse(e,Kc))},getPathname:function(){var e=this.path;return this.cannotBeABaseURL?e[0]:e.length?"/"+oc(e,"/"):""},setPathname:function(e){this.cannotBeABaseURL||(this.path=[],this.parse(e,Zc))},getSearch:function(){var e=this.query;return e?"?"+e:""},setSearch:function(e){""==(e=Yt(e))?this.query=null:("?"==ic(e,0)&&(e=fc(e,1)),this.query="",this.parse(e,ru)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var e=this.fragment;return e?"#"+e:""},setHash:function(e){""!=(e=Yt(e))?("#"==ic(e,0)&&(e=fc(e,1)),this.fragment="",this.parse(e,nu)):this.fragment=null},update:function(){this.query=this.searchParams.serialize()||null}};var au=function(e){var t=Fa(this,ou),r=Va(arguments.length,1)>1?arguments[1]:void 0,n=Kd(t,new iu(e,!1,r));h||(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())},ou=au.prototype,su=function(e,t){return{get:function(){return Jd(this)[e]()},set:t&&function(e){return Jd(this)[t](e)},configurable:!0,enumerable:!0}};if(h&&(kd(ou,"href",su("serialize","setHref")),kd(ou,"origin",su("getOrigin")),kd(ou,"protocol",su("getProtocol","setProtocol")),kd(ou,"username",su("getUsername","setUsername")),kd(ou,"password",su("getPassword","setPassword")),kd(ou,"host",su("getHost","setHost")),kd(ou,"hostname",su("getHostname","setHostname")),kd(ou,"port",su("getPort","setPort")),kd(ou,"pathname",su("getPathname","setPathname")),kd(ou,"search",su("getSearch","setSearch")),kd(ou,"searchParams",su("getSearchParams")),kd(ou,"hash",su("getHash","setHash"))),ot(ou,"toJSON",(function(){return Jd(this).serialize()}),{enumerable:!0}),ot(ou,"toString",(function(){return Jd(this).serialize()}),{enumerable:!0}),Zd){var du=Zd.createObjectURL,cu=Zd.revokeObjectURL;du&&ot(au,"createObjectURL",mr(du,Zd)),cu&&ot(au,"revokeObjectURL",mr(cu,Zd))}function uu(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=ud(e);if(t){var i=ud(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return cd(this,r)}}gr(au,"URL"),Ut({global:!0,constructor:!0,forced:!Ua,sham:!h},{URL:au}),bs("match",(function(e,t,r){return[function(t){var r=T(this),n=null==t?void 0:Z(t,e);return n?g(n,t,r):new RegExp(t)[e](Yt(r))},function(e){var n=Se(this),i=Yt(e),a=r(t,n,i);if(a.done)return a.value;if(!n.global)return js(n,i);var o=n.unicode;n.lastIndex=0;for(var s,d=[],c=0;null!==(s=js(n,i));){var u=Yt(s[0]);d[c]=u,""===u&&(n.lastIndex=ys(i,gt(n.lastIndex),o)),c++}return 0===c?null:d}]}));var lu=function(e){dd(r,e);var t=uu(r);function r(e,n,i){var a;return fi(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 gi(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){var r=t?e.replace(/\{([^\}]+)\}/g,(function(e,r){return String(t[r])})):e,n=/(\.|%2e|%2E|%252e|%252E)+(\/|%2f|%2F|%252f|%252F)+/g;return r.match(n)&&(console.warn("Path traversal attempt detected. Normalizing url"),r=r.replace(n,"")),r}}]),r}(fd(URL)),hu="commerce-sdk-isomorphic@3.4.0";function fu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fu(Object(r),!0).forEach((function(t){Ii(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}var gu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y,x,w,z,C,P,O,E,q,j,S,T,M,A,_,R,U;return gi(e,[{key:"createBasket",value:(U=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.taxMode?o.taxMode=n.taxMode:void 0!==i.taxMode&&(o.taxMode=i.taxMode),void 0!==n.temporary?o.temporary=n.temporary:void 0!==i.temporary&&(o.temporary=i.temporary),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=31,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"transferBasket",value:(R=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.overrideExisting?o.overrideExisting=n.overrideExisting:void 0!==i.overrideExisting&&(o.overrideExisting=i.overrideExisting),void 0===n.siteId){e.next=18;break}o.siteId=n.siteId,e.next=23;break;case 18:if(void 0===i.siteId){e.next=22;break}o.siteId=i.siteId,e.next=23;break;case 22:throw new Error("Missing required query parameter: siteId");case 23:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for transferBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/actions/transfer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=30,bd(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return R.apply(this,arguments)})},{key:"mergeBasket",value:(_=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.createDestinationBasket?o.createDestinationBasket=n.createDestinationBasket:void 0!==i.createDestinationBasket&&(o.createDestinationBasket=i.createDestinationBasket),void 0!==n.productItemMergeMode?o.productItemMergeMode=n.productItemMergeMode:void 0!==i.productItemMergeMode&&(o.productItemMergeMode=i.productItemMergeMode),void 0===n.siteId){e.next=19;break}o.siteId=n.siteId,e.next=24;break;case 19:if(void 0===i.siteId){e.next=23;break}o.siteId=i.siteId,e.next=24;break;case 23:throw new Error("Missing required query parameter: siteId");case 24:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for mergeBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/actions/merge",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=31,bd(s.toString(),{method:"POST",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return _.apply(this,arguments)})},{key:"deleteBasket",value:(A=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return A.apply(this,arguments)})},{key:"getBasket",value:(M=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return M.apply(this,arguments)})},{key:"updateBasket",value:(T=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return T.apply(this,arguments)})},{key:"updateAsAgentBasket",value:(S=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsAgentBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/agent",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return S.apply(this,arguments)})},{key:"updateBillingAddressForBasket",value:(j=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.useAsShipping?o.useAsShipping=n.useAsShipping:void 0!==i.useAsShipping&&(o.useAsShipping=i.useAsShipping),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateBillingAddressForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/billing-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,t){return j.apply(this,arguments)})},{key:"addCouponToBasket",value:(q=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addCouponToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/coupons",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"removeCouponFromBasket",value:(E=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.couponItemId){e.next=25;break}a.couponItemId=n.couponItemId,e.next=30;break;case 25:if(void 0===i.couponItemId){e.next=29;break}a.couponItemId=i.couponItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: couponItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCouponFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"updateCustomerForBasket",value:(O=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/customer",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"addGiftCertificateItemToBasket",value:(P=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addGiftCertificateItemToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"removeGiftCertificateItemFromBasket",value:(C=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeGiftCertificateItemFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"updateGiftCertificateItemInBasket",value:(z=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.giftCertificateItemId){e.next=25;break}a.giftCertificateItemId=n.giftCertificateItemId,e.next=30;break;case 25:if(void 0===i.giftCertificateItemId){e.next=29;break}a.giftCertificateItemId=i.giftCertificateItemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: giftCertificateItemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateGiftCertificateItemInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"addItemToBasket",value:(w=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addItemToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"updateItemsInBasket",value:(x=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemsInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"removeItemFromBasket",value:(y=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeItemFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"updateItemInBasket",value:(k=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateItemInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=48,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"addTaxesForBasketItem",value:(b=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasketItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"addPaymentInstrumentToBasket",value:(v=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPaymentInstrumentToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"removePaymentInstrumentFromBasket",value:(m=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updatePaymentInstrumentInBasket",value:(I=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=36;break}o.siteId=n.siteId,e.next=41;break;case 36:if(void 0===i.siteId){e.next=40;break}o.siteId=i.siteId,e.next=41;break;case 40:throw new Error("Missing required query parameter: siteId");case 41:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=48,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 48:return c=e.sent,e.abrupt("return",c);case 50:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"getPaymentMethodsForBasket",value:(g=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"addPriceAdjustmentToBasket",value:(p=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceAdjustmentToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"removePriceAdjustmentFromBasket",value:(f=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePriceAdjustmentFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"updatePriceAdjustmentInBasket",value:(h=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.priceAdjustmentId){e.next=25;break}a.priceAdjustmentId=n.priceAdjustmentId,e.next=30;break;case 25:if(void 0===i.priceAdjustmentId){e.next=29;break}a.priceAdjustmentId=i.priceAdjustmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: priceAdjustmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePriceAdjustmentInBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getPriceBooksForBasket",value:(l=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPriceBooksForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"addPriceBooksToBasket",value:(u=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addPriceBooksToBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/price-books",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"createShipmentForBasket",value:(c=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShipmentForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"removeShipmentFromBasket",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeShipmentFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"updateShipmentForBasket",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShipmentForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"updateShippingAddressForShipment",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0!==n.useAsBilling?o.useAsBilling=n.useAsBilling:void 0!==i.useAsBilling&&(o.useAsBilling=i.useAsBilling),void 0!==n.removeExternalTax?o.removeExternalTax=n.removeExternalTax:void 0!==i.removeExternalTax&&(o.removeExternalTax=i.removeExternalTax),void 0===n.siteId){e.next=37;break}o.siteId=n.siteId,e.next=42;break;case 37:if(void 0===i.siteId){e.next=41;break}o.siteId=i.siteId,e.next=42;break;case 41:throw new Error("Missing required query parameter: siteId");case 42:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingAddressForShipment: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=49,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 49:return c=e.sent,e.abrupt("return",c);case 51:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"updateShippingMethodForShipment",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShippingMethodForShipment: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"getShippingMethodsForShipment",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(void 0===n.shipmentId){e.next=25;break}a.shipmentId=n.shipmentId,e.next=30;break;case 25:if(void 0===i.shipmentId){e.next=29;break}a.shipmentId=i.shipmentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: shipmentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShippingMethodsForShipment: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updateAsStorefrontBasket",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0!==n.exchange?o.exchange=n.exchange:void 0!==i.exchange&&(o.exchange=i.exchange),void 0===n.siteId){e.next=27;break}o.siteId=n.siteId,e.next=32;break;case 27:if(void 0===i.siteId){e.next=31;break}o.siteId=i.siteId,e.next=32;break;case 31:throw new Error("Missing required query parameter: siteId");case 32:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateAsStorefrontBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/storefront",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,bd(s.toString(),{method:"PUT",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getTaxesFromBasket",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"addTaxesForBasket",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.basketId){e.next=16;break}a.basketId=n.basketId,e.next=21;break;case 16:if(void 0===i.basketId){e.next=20;break}a.basketId=i.basketId,e.next=21;break;case 20:throw new Error("Missing required path parameter: basketId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for addTaxesForBasket: ".concat(e))})),s=new lu("/organizations/{organizationId}/baskets/{basketId}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=pu(pu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Iu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Iu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Iu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(gu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-baskets/{version}"),Ii(gu,"apiPaths",{createBasket:"/organizations/{organizationId}/baskets",transferBasket:"/organizations/{organizationId}/baskets/actions/transfer",mergeBasket:"/organizations/{organizationId}/baskets/actions/merge",deleteBasket:"/organizations/{organizationId}/baskets/{basketId}",getBasket:"/organizations/{organizationId}/baskets/{basketId}",updateBasket:"/organizations/{organizationId}/baskets/{basketId}",updateAsAgentBasket:"/organizations/{organizationId}/baskets/{basketId}/agent",updateBillingAddressForBasket:"/organizations/{organizationId}/baskets/{basketId}/billing-address",addCouponToBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons",removeCouponFromBasket:"/organizations/{organizationId}/baskets/{basketId}/coupons/{couponItemId}",updateCustomerForBasket:"/organizations/{organizationId}/baskets/{basketId}/customer",addGiftCertificateItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items",removeGiftCertificateItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",updateGiftCertificateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/gift-certificate-items/{giftCertificateItemId}",addItemToBasket:"/organizations/{organizationId}/baskets/{basketId}/items",updateItemsInBasket:"/organizations/{organizationId}/baskets/{basketId}/items",removeItemFromBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",updateItemInBasket:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}",addTaxesForBasketItem:"/organizations/{organizationId}/baskets/{basketId}/items/{itemId}/taxes",addPaymentInstrumentToBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments",removePaymentInstrumentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",updatePaymentInstrumentInBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-instruments/{paymentInstrumentId}",getPaymentMethodsForBasket:"/organizations/{organizationId}/baskets/{basketId}/payment-methods",addPriceAdjustmentToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments",removePriceAdjustmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",updatePriceAdjustmentInBasket:"/organizations/{organizationId}/baskets/{basketId}/price-adjustments/{priceAdjustmentId}",getPriceBooksForBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",addPriceBooksToBasket:"/organizations/{organizationId}/baskets/{basketId}/price-books",createShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments",removeShipmentFromBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShipmentForBasket:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}",updateShippingAddressForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-address",updateShippingMethodForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-method",getShippingMethodsForShipment:"/organizations/{organizationId}/baskets/{basketId}/shipments/{shipmentId}/shipping-methods",updateAsStorefrontBasket:"/organizations/{organizationId}/baskets/{basketId}/storefront",getTaxesFromBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes",addTaxesForBasket:"/organizations/{organizationId}/baskets/{basketId}/taxes"}),Ii(gu,"paramKeys",{createBasket:["organizationId","taxMode","temporary","siteId","locale"],createBasketRequired:["organizationId","siteId"],transferBasket:["organizationId","overrideExisting","siteId","locale"],transferBasketRequired:["organizationId","siteId"],mergeBasket:["organizationId","createDestinationBasket","productItemMergeMode","siteId","locale"],mergeBasketRequired:["organizationId","siteId"],deleteBasket:["organizationId","basketId","siteId"],deleteBasketRequired:["organizationId","basketId","siteId"],getBasket:["organizationId","basketId","siteId","locale"],getBasketRequired:["organizationId","basketId","siteId"],updateBasket:["organizationId","basketId","removeExternalTax","siteId","locale"],updateBasketRequired:["organizationId","basketId","siteId"],updateAsAgentBasket:["organizationId","basketId","siteId","locale"],updateAsAgentBasketRequired:["organizationId","basketId","siteId"],updateBillingAddressForBasket:["organizationId","basketId","useAsShipping","removeExternalTax","siteId","locale"],updateBillingAddressForBasketRequired:["organizationId","basketId","siteId"],addCouponToBasket:["organizationId","basketId","siteId","locale"],addCouponToBasketRequired:["organizationId","basketId","siteId"],removeCouponFromBasket:["organizationId","basketId","couponItemId","siteId","locale"],removeCouponFromBasketRequired:["organizationId","basketId","couponItemId","siteId"],updateCustomerForBasket:["organizationId","basketId","siteId","locale"],updateCustomerForBasketRequired:["organizationId","basketId","siteId"],addGiftCertificateItemToBasket:["organizationId","basketId","siteId","locale"],addGiftCertificateItemToBasketRequired:["organizationId","basketId","siteId"],removeGiftCertificateItemFromBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],removeGiftCertificateItemFromBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],updateGiftCertificateItemInBasket:["organizationId","basketId","giftCertificateItemId","siteId","locale"],updateGiftCertificateItemInBasketRequired:["organizationId","basketId","giftCertificateItemId","siteId"],addItemToBasket:["organizationId","basketId","siteId","locale"],addItemToBasketRequired:["organizationId","basketId","siteId"],updateItemsInBasket:["organizationId","basketId","removeExternalTax","siteId","locale"],updateItemsInBasketRequired:["organizationId","basketId","siteId"],removeItemFromBasket:["organizationId","basketId","itemId","siteId","locale"],removeItemFromBasketRequired:["organizationId","basketId","itemId","siteId"],updateItemInBasket:["organizationId","basketId","itemId","removeExternalTax","siteId","locale"],updateItemInBasketRequired:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItem:["organizationId","basketId","itemId","siteId"],addTaxesForBasketItemRequired:["organizationId","basketId","itemId","siteId"],addPaymentInstrumentToBasket:["organizationId","basketId","siteId","locale"],addPaymentInstrumentToBasketRequired:["organizationId","basketId","siteId"],removePaymentInstrumentFromBasket:["organizationId","basketId","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],updatePaymentInstrumentInBasket:["organizationId","basketId","paymentInstrumentId","removeExternalTax","siteId","locale"],updatePaymentInstrumentInBasketRequired:["organizationId","basketId","paymentInstrumentId","siteId"],getPaymentMethodsForBasket:["organizationId","basketId","siteId","locale"],getPaymentMethodsForBasketRequired:["organizationId","basketId","siteId"],addPriceAdjustmentToBasket:["organizationId","basketId","siteId","locale"],addPriceAdjustmentToBasketRequired:["organizationId","basketId","siteId"],removePriceAdjustmentFromBasket:["organizationId","basketId","priceAdjustmentId","siteId","locale"],removePriceAdjustmentFromBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasket:["organizationId","basketId","priceAdjustmentId","siteId"],updatePriceAdjustmentInBasketRequired:["organizationId","basketId","priceAdjustmentId","siteId"],getPriceBooksForBasket:["organizationId","basketId","siteId"],getPriceBooksForBasketRequired:["organizationId","basketId","siteId"],addPriceBooksToBasket:["organizationId","basketId","siteId"],addPriceBooksToBasketRequired:["organizationId","basketId","siteId"],createShipmentForBasket:["organizationId","basketId","siteId","locale"],createShipmentForBasketRequired:["organizationId","basketId","siteId"],removeShipmentFromBasket:["organizationId","basketId","shipmentId","siteId","locale"],removeShipmentFromBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShipmentForBasket:["organizationId","basketId","shipmentId","siteId","locale"],updateShipmentForBasketRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingAddressForShipment:["organizationId","basketId","shipmentId","useAsBilling","removeExternalTax","siteId","locale"],updateShippingAddressForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateShippingMethodForShipment:["organizationId","basketId","shipmentId","siteId","locale"],updateShippingMethodForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],getShippingMethodsForShipment:["organizationId","basketId","shipmentId","siteId","locale"],getShippingMethodsForShipmentRequired:["organizationId","basketId","shipmentId","siteId"],updateAsStorefrontBasket:["organizationId","basketId","exchange","siteId","locale"],updateAsStorefrontBasketRequired:["organizationId","basketId","siteId"],getTaxesFromBasket:["organizationId","basketId","siteId"],getTaxesFromBasketRequired:["organizationId","basketId","siteId"],addTaxesForBasket:["organizationId","basketId","siteId"],addTaxesForBasketRequired:["organizationId","basketId","siteId"]});var vu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=mu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i;return gi(e,[{key:"getShopperContext",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=29,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"createShopperContext",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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),void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==i.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=i.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=30,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"deleteShopperContext",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.usid){e.next=16;break}a.usid=n.usid,e.next=21;break;case 16:if(void 0===i.usid){e.next=20;break}a.usid=i.usid,e.next=21;break;case 20:throw new Error("Missing required path parameter: usid");case 21:return o={},void 0!==n.siteId?o.siteId=n.siteId:void 0!==i.siteId&&(o.siteId=i.siteId),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=29,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 29:if(c=e.sent,!r){e.next=32;break}return e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"updateShopperContext",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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),void 0!==n.evaluateContextWithClientIp?o.evaluateContextWithClientIp=n.evaluateContextWithClientIp:void 0!==i.evaluateContextWithClientIp&&(o.evaluateContextWithClientIp=i.evaluateContextWithClientIp),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateShopperContext: ".concat(e))})),s=new lu("/organizations/{organizationId}/shopper-context/{usid}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=mu(mu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=30,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 30:return c=e.sent,e.abrupt("return",c);case 32:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function bu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ku(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?bu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):bu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(vu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/shopper-context/{version}"),Ii(vu,"apiPaths",{getShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",createShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",deleteShopperContext:"/organizations/{organizationId}/shopper-context/{usid}",updateShopperContext:"/organizations/{organizationId}/shopper-context/{usid}"}),Ii(vu,"paramKeys",{getShopperContext:["organizationId","usid","siteId"],getShopperContextRequired:["organizationId","usid"],createShopperContext:["organizationId","usid","siteId","evaluateContextWithClientIp"],createShopperContextRequired:["organizationId","usid"],deleteShopperContext:["organizationId","usid","siteId"],deleteShopperContextRequired:["organizationId","usid"],updateShopperContext:["organizationId","usid","siteId","evaluateContextWithClientIp"],updateShopperContextRequired:["organizationId","usid"]});var yu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=ku({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y,x,w,z,C,P,O,E,q;return gi(e,[{key:"registerCustomer",value:(q=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return q.apply(this,arguments)})},{key:"resetPassword",value:(E=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/password/actions/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:if(c=e.sent,!r){e.next=31;break}return e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return E.apply(this,arguments)})},{key:"getResetPasswordToken",value:(O=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getResetPasswordToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/password/actions/create-reset-token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"registerExternalProfile",value:(P=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for registerExternalProfile: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,t){return P.apply(this,arguments)})},{key:"getExternalProfile",value:(C=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.externalId){e.next=17;break}o.externalId=n.externalId,e.next=22;break;case 17:if(void 0===i.externalId){e.next=21;break}o.externalId=i.externalId,e.next=22;break;case 21:throw new Error("Missing required query parameter: externalId");case 22:if(void 0===n.authenticationProviderId){e.next=26;break}o.authenticationProviderId=n.authenticationProviderId,e.next=31;break;case 26:if(void 0===i.authenticationProviderId){e.next=30;break}o.authenticationProviderId=i.authenticationProviderId,e.next=31;break;case 30:throw new Error("Missing required query parameter: authenticationProviderId");case 31:if(void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getExternalProfile: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/external-profile",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return C.apply(this,arguments)})},{key:"getCustomer",value:(z=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return z.apply(this,arguments)})},{key:"updateCustomer",value:(w=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return w.apply(this,arguments)})},{key:"createCustomerAddress",value:(x=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return x.apply(this,arguments)})},{key:"getCustomerAddress",value:(y=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return y.apply(this,arguments)})},{key:"removeCustomerAddress",value:(k=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removeCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return k.apply(this,arguments)})},{key:"updateCustomerAddress",value:(b=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.addressName){e.next=25;break}a.addressName=n.addressName,e.next=30;break;case 25:if(void 0===i.addressName){e.next=29;break}a.addressName=i.addressName,e.next=30;break;case 29:throw new Error("Missing required path parameter: addressName");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerAddress: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return b.apply(this,arguments)})},{key:"getCustomerBaskets",value:(v=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerBaskets: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/baskets",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return v.apply(this,arguments)})},{key:"getCustomerOrders",value:(m=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0!==n.crossSites?o.crossSites=n.crossSites:void 0!==i.crossSites&&(o.crossSites=i.crossSites),void 0!==n.from?o.from=n.from:void 0!==i.from&&(o.from=i.from),void 0!==n.until?o.until=n.until:void 0!==i.until&&(o.until=i.until),void 0!==n.status?o.status=n.status:void 0!==i.status&&(o.status=i.status),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerOrders: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=43,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 43:return c=e.sent,e.abrupt("return",c);case 45:case"end":return e.stop()}}),e,this)}))),function(e,t){return m.apply(this,arguments)})},{key:"updateCustomerPassword",value:(I=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerPassword: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/password",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"PUT",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:if(c=e.sent,!r){e.next=40;break}return e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"createCustomerPaymentInstrument",value:(g=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerPaymentInstrument: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"deleteCustomerPaymentInstrument",value:(p=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerPaymentInstrument: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"getCustomerPaymentInstrument",value:(f=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerPaymentInstrument: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getCustomerProductLists",value:(h=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductLists: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"createCustomerProductList",value:(l=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"deleteCustomerProductList",value:(u=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 46:if(c=e.sent,!r){e.next=49;break}return e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getCustomerProductList",value:(c=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"updateCustomerProductList",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"createCustomerProductListItem",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"deleteCustomerProductListItem",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for deleteCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=55,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 55:if(c=e.sent,!r){e.next=58;break}return e.abrupt("return",c);case 58:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getCustomerProductListItem",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=55,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"updateCustomerProductListItem",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.customerId){e.next=16;break}a.customerId=n.customerId,e.next=21;break;case 16:if(void 0===i.customerId){e.next=20;break}a.customerId=i.customerId,e.next=21;break;case 20:throw new Error("Missing required path parameter: customerId");case 21:if(void 0===n.listId){e.next=25;break}a.listId=n.listId,e.next=30;break;case 25:if(void 0===i.listId){e.next=29;break}a.listId=i.listId,e.next=30;break;case 29:throw new Error("Missing required path parameter: listId");case 30:if(void 0===n.itemId){e.next=34;break}a.itemId=n.itemId,e.next=39;break;case 34:if(void 0===i.itemId){e.next=38;break}a.itemId=i.itemId,e.next=39;break;case 38:throw new Error("Missing required path parameter: itemId");case 39:if(o={},void 0===n.siteId){e.next=44;break}o.siteId=n.siteId,e.next=49;break;case 44:if(void 0===i.siteId){e.next=48;break}o.siteId=i.siteId,e.next=49;break;case 48:throw new Error("Missing required query parameter: siteId");case 49:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updateCustomerProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=55,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 55:return c=e.sent,e.abrupt("return",c);case 57:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getPublicProductListsBySearchTerm",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.email?o.email=n.email:void 0!==i.email&&(o.email=i.email),void 0!==n.firstName?o.firstName=n.firstName:void 0!==i.firstName&&(o.firstName=i.firstName),void 0!==n.lastName?o.lastName=n.lastName:void 0!==i.lastName&&(o.lastName=i.lastName),void 0===n.siteId){e.next=20;break}o.siteId=n.siteId,e.next=25;break;case 20:if(void 0===i.siteId){e.next=24;break}o.siteId=i.siteId,e.next=25;break;case 24:throw new Error("Missing required query parameter: siteId");case 25:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductListsBySearchTerm: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-lists",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=31,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 31:return c=e.sent,e.abrupt("return",c);case 33:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPublicProductList",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPublicProductList: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-lists/{listId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getProductListItem",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.listId){e.next=16;break}a.listId=n.listId,e.next=21;break;case 16:if(void 0===i.listId){e.next=20;break}a.listId=i.listId,e.next=21;break;case 20:throw new Error("Missing required path parameter: listId");case 21:if(void 0===n.itemId){e.next=25;break}a.itemId=n.itemId,e.next=30;break;case 25:if(void 0===i.itemId){e.next=29;break}a.itemId=i.itemId,e.next=30;break;case 29:throw new Error("Missing required path parameter: itemId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProductListItem: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-lists/{listId}/items/{itemId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ku(ku({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=46,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 46:return c=e.sent,e.abrupt("return",c);case 48:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function xu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?xu(Object(r),!0).forEach((function(t){Ii(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}Ii(yu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/customer/shopper-customers/{version}"),Ii(yu,"apiPaths",{registerCustomer:"/organizations/{organizationId}/customers",resetPassword:"/organizations/{organizationId}/customers/password/actions/reset",getResetPasswordToken:"/organizations/{organizationId}/customers/password/actions/create-reset-token",registerExternalProfile:"/organizations/{organizationId}/customers/external-profile",getExternalProfile:"/organizations/{organizationId}/customers/external-profile",getCustomer:"/organizations/{organizationId}/customers/{customerId}",updateCustomer:"/organizations/{organizationId}/customers/{customerId}",createCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses",getCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",removeCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",updateCustomerAddress:"/organizations/{organizationId}/customers/{customerId}/addresses/{addressName}",getCustomerBaskets:"/organizations/{organizationId}/customers/{customerId}/baskets",getCustomerOrders:"/organizations/{organizationId}/customers/{customerId}/orders",updateCustomerPassword:"/organizations/{organizationId}/customers/{customerId}/password",createCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments",deleteCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",getCustomerPaymentInstrument:"/organizations/{organizationId}/customers/{customerId}/payment-instruments/{paymentInstrumentId}",getCustomerProductLists:"/organizations/{organizationId}/customers/{customerId}/product-lists",createCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists",deleteCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",getCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",updateCustomerProductList:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}",createCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items",deleteCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",updateCustomerProductListItem:"/organizations/{organizationId}/customers/{customerId}/product-lists/{listId}/items/{itemId}",getPublicProductListsBySearchTerm:"/organizations/{organizationId}/product-lists",getPublicProductList:"/organizations/{organizationId}/product-lists/{listId}",getProductListItem:"/organizations/{organizationId}/product-lists/{listId}/items/{itemId}"}),Ii(yu,"paramKeys",{registerCustomer:["organizationId","siteId"],registerCustomerRequired:["organizationId","siteId"],resetPassword:["organizationId","siteId"],resetPasswordRequired:["organizationId","siteId"],getResetPasswordToken:["organizationId","siteId"],getResetPasswordTokenRequired:["organizationId","siteId"],registerExternalProfile:["organizationId","siteId"],registerExternalProfileRequired:["organizationId","siteId"],getExternalProfile:["organizationId","externalId","authenticationProviderId","siteId"],getExternalProfileRequired:["organizationId","externalId","authenticationProviderId","siteId"],getCustomer:["organizationId","customerId","siteId"],getCustomerRequired:["organizationId","customerId","siteId"],updateCustomer:["organizationId","customerId","siteId"],updateCustomerRequired:["organizationId","customerId","siteId"],createCustomerAddress:["organizationId","customerId","siteId"],createCustomerAddressRequired:["organizationId","customerId","siteId"],getCustomerAddress:["organizationId","customerId","addressName","siteId"],getCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],removeCustomerAddress:["organizationId","customerId","addressName","siteId"],removeCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],updateCustomerAddress:["organizationId","customerId","addressName","siteId"],updateCustomerAddressRequired:["organizationId","customerId","addressName","siteId"],getCustomerBaskets:["organizationId","customerId","siteId"],getCustomerBasketsRequired:["organizationId","customerId","siteId"],getCustomerOrders:["organizationId","customerId","crossSites","from","until","status","siteId","offset","limit"],getCustomerOrdersRequired:["organizationId","customerId","siteId"],updateCustomerPassword:["organizationId","customerId","siteId"],updateCustomerPasswordRequired:["organizationId","customerId","siteId"],createCustomerPaymentInstrument:["organizationId","customerId","siteId"],createCustomerPaymentInstrumentRequired:["organizationId","customerId","siteId"],deleteCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],deleteCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrument:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerPaymentInstrumentRequired:["organizationId","customerId","paymentInstrumentId","siteId"],getCustomerProductLists:["organizationId","customerId","siteId"],getCustomerProductListsRequired:["organizationId","customerId","siteId"],createCustomerProductList:["organizationId","customerId","siteId"],createCustomerProductListRequired:["organizationId","customerId","siteId"],deleteCustomerProductList:["organizationId","customerId","listId","siteId"],deleteCustomerProductListRequired:["organizationId","customerId","listId","siteId"],getCustomerProductList:["organizationId","customerId","listId","siteId"],getCustomerProductListRequired:["organizationId","customerId","listId","siteId"],updateCustomerProductList:["organizationId","customerId","listId","siteId"],updateCustomerProductListRequired:["organizationId","customerId","listId","siteId"],createCustomerProductListItem:["organizationId","customerId","listId","siteId"],createCustomerProductListItemRequired:["organizationId","customerId","listId","siteId"],deleteCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],deleteCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],getCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItem:["organizationId","customerId","listId","itemId","siteId"],updateCustomerProductListItemRequired:["organizationId","customerId","listId","itemId","siteId"],getPublicProductListsBySearchTerm:["organizationId","email","firstName","lastName","siteId"],getPublicProductListsBySearchTermRequired:["organizationId","siteId"],getPublicProductList:["organizationId","listId","siteId"],getPublicProductListRequired:["organizationId","listId","siteId"],getProductListItem:["organizationId","listId","itemId","siteId"],getProductListItemRequired:["organizationId","listId","itemId","siteId"]});var zu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=wu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"retrieveResults",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.locale){e.next=26;break}o.locale=n.locale,e.next=31;break;case 26:if(void 0===i.locale){e.next=30;break}o.locale=i.locale,e.next=31;break;case 30:throw new Error("Missing required query parameter: locale");case 31:return void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for retrieveResults: ".concat(e))})),s=new lu("/organizations/{organizationId}/channels/{channelId}/results",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=wu(wu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSuggestions",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.channelId){e.next=16;break}a.channelId=n.channelId,e.next=21;break;case 16:if(void 0===i.channelId){e.next=20;break}a.channelId=i.channelId,e.next=21;break;case 20:throw new Error("Missing required path parameter: channelId");case 21:if(o={},void 0===n.suggestionTypes){e.next=26;break}o.suggestionTypes=n.suggestionTypes,e.next=31;break;case 26:if(void 0===i.suggestionTypes){e.next=30;break}o.suggestionTypes=i.suggestionTypes,e.next=31;break;case 30:throw new Error("Missing required query parameter: suggestionTypes");case 31:if(void 0!==n.searchText?o.searchText=n.searchText:void 0!==i.searchText&&(o.searchText=i.searchText),void 0===n.locale){e.next=36;break}o.locale=n.locale,e.next=41;break;case 36:if(void 0===i.locale){e.next=40;break}o.locale=i.locale,e.next=41;break;case 40:throw new Error("Missing required query parameter: locale");case 41:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSuggestions: ".concat(e))})),s=new lu("/organizations/{organizationId}/channels/{channelId}/suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=wu(wu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49: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 Pu(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){Ii(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}Ii(zu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/discovery/query/{version}"),Ii(zu,"apiPaths",{retrieveResults:"/organizations/{organizationId}/channels/{channelId}/results",getSuggestions:"/organizations/{organizationId}/channels/{channelId}/suggestions"}),Ii(zu,"paramKeys",{retrieveResults:["organizationId","channelId","locale","offset","limit"],retrieveResultsRequired:["organizationId","channelId","locale"],getSuggestions:["organizationId","channelId","suggestionTypes","searchText","locale"],getSuggestionsRequired:["organizationId","channelId","suggestionTypes","locale"]});var Ou=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Pu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"getPages",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.categoryId?o.categoryId=n.categoryId:void 0!==i.categoryId&&(o.categoryId=i.categoryId),void 0!==n.productId?o.productId=n.productId:void 0!==i.productId&&(o.productId=i.productId),void 0===n.aspectTypeId){e.next=19;break}o.aspectTypeId=n.aspectTypeId,e.next=24;break;case 19:if(void 0===i.aspectTypeId){e.next=23;break}o.aspectTypeId=i.aspectTypeId,e.next=24;break;case 23:throw new Error("Missing required query parameter: aspectTypeId");case 24:if(void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=30;break}o.siteId=n.siteId,e.next=35;break;case 30:if(void 0===i.siteId){e.next=34;break}o.siteId=i.siteId,e.next=35;break;case 34:throw new Error("Missing required query parameter: siteId");case 35:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPages: ".concat(e))})),s=new lu("/organizations/{organizationId}/pages",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Pu(Pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=42,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 42:return c=e.sent,e.abrupt("return",c);case 44:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPage",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.pageId){e.next=16;break}a.pageId=n.pageId,e.next=21;break;case 16:if(void 0===i.pageId){e.next=20;break}a.pageId=i.pageId,e.next=21;break;case 20:throw new Error("Missing required path parameter: pageId");case 21:if(o={},void 0!==n.aspectAttributes?o.aspectAttributes=n.aspectAttributes:void 0!==i.aspectAttributes&&(o.aspectAttributes=i.aspectAttributes),void 0!==n.parameters?o.parameters=n.parameters:void 0!==i.parameters&&(o.parameters=i.parameters),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPage: ".concat(e))})),s=new lu("/organizations/{organizationId}/pages/{pageId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Pu(Pu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Eu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Eu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(Ou,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/experience/shopper-experience/{version}"),Ii(Ou,"apiPaths",{getPages:"/organizations/{organizationId}/pages",getPage:"/organizations/{organizationId}/pages/{pageId}"}),Ii(Ou,"paramKeys",{getPages:["organizationId","categoryId","productId","aspectTypeId","aspectAttributes","parameters","siteId","locale"],getPagesRequired:["organizationId","aspectTypeId","siteId"],getPage:["organizationId","pageId","aspectAttributes","parameters","siteId","locale"],getPageRequired:["organizationId","pageId","siteId"]});var ju=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=qu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return gi(e,[{key:"getGiftCertificate",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getGiftCertificate: ".concat(e))})),s=new lu("/organizations/{organizationId}/gift-certificate",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=qu(qu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=28,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 28:return c=e.sent,e.abrupt("return",c);case 30:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Su(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 Tu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Su(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Su(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(ju,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-gift-certificates/{version}"),Ii(ju,"apiPaths",{getGiftCertificate:"/organizations/{organizationId}/gift-certificate"}),Ii(ju,"paramKeys",{getGiftCertificate:["organizationId","siteId"],getGiftCertificateRequired:["organizationId","siteId"]});var Mu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Tu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d;return gi(e,[{key:"createOrder",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=29,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 29:return c=e.sent,e.abrupt("return",c);case 31:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getOrder",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"guestOrderLookup",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for guestOrderLookup: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/lookup",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"createPaymentInstrumentForOrder",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for createPaymentInstrumentForOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"removePaymentInstrumentFromOrder",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for removePaymentInstrumentFromOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"DELETE",headers:d},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"updatePaymentInstrumentForOrder",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(void 0===n.paymentInstrumentId){e.next=25;break}a.paymentInstrumentId=n.paymentInstrumentId,e.next=30;break;case 25:if(void 0===i.paymentInstrumentId){e.next=29;break}a.paymentInstrumentId=i.paymentInstrumentId,e.next=30;break;case 29:throw new Error("Missing required path parameter: paymentInstrumentId");case 30:if(o={},void 0===n.siteId){e.next=35;break}o.siteId=n.siteId,e.next=40;break;case 35:if(void 0===i.siteId){e.next=39;break}o.siteId=i.siteId,e.next=40;break;case 39:throw new Error("Missing required query parameter: siteId");case 40:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for updatePaymentInstrumentForOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({"Content-Type":"application/json"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=47,bd(s.toString(),{method:"PATCH",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 47:return c=e.sent,e.abrupt("return",c);case 49:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getPaymentMethodsForOrder",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPaymentMethodsForOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/payment-methods",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getTaxesFromOrder",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.orderNo){e.next=16;break}a.orderNo=n.orderNo,e.next=21;break;case 16:if(void 0===i.orderNo){e.next=20;break}a.orderNo=i.orderNo,e.next=21;break;case 20:throw new Error("Missing required path parameter: orderNo");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTaxesFromOrder: ".concat(e))})),s=new lu("/organizations/{organizationId}/orders/{orderNo}/taxes",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Tu(Tu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39: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 _u(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){Ii(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}Ii(Mu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/checkout/shopper-orders/{version}"),Ii(Mu,"apiPaths",{createOrder:"/organizations/{organizationId}/orders",getOrder:"/organizations/{organizationId}/orders/{orderNo}",guestOrderLookup:"/organizations/{organizationId}/orders/{orderNo}/lookup",createPaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments",removePaymentInstrumentFromOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",updatePaymentInstrumentForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-instruments/{paymentInstrumentId}",getPaymentMethodsForOrder:"/organizations/{organizationId}/orders/{orderNo}/payment-methods",getTaxesFromOrder:"/organizations/{organizationId}/orders/{orderNo}/taxes"}),Ii(Mu,"paramKeys",{createOrder:["organizationId","siteId","locale"],createOrderRequired:["organizationId","siteId"],getOrder:["organizationId","orderNo","siteId","locale"],getOrderRequired:["organizationId","orderNo","siteId"],guestOrderLookup:["organizationId","orderNo","siteId","locale"],guestOrderLookupRequired:["organizationId","orderNo","siteId"],createPaymentInstrumentForOrder:["organizationId","orderNo","siteId","locale"],createPaymentInstrumentForOrderRequired:["organizationId","orderNo","siteId"],removePaymentInstrumentFromOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],removePaymentInstrumentFromOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],updatePaymentInstrumentForOrder:["organizationId","orderNo","paymentInstrumentId","siteId","locale"],updatePaymentInstrumentForOrderRequired:["organizationId","orderNo","paymentInstrumentId","siteId"],getPaymentMethodsForOrder:["organizationId","orderNo","siteId","locale"],getPaymentMethodsForOrderRequired:["organizationId","orderNo","siteId"],getTaxesFromOrder:["organizationId","orderNo","siteId"],getTaxesFromOrderRequired:["organizationId","orderNo","siteId"]});var Ru=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=_u({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i;return gi(e,[{key:"getProducts",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0===n.ids){e.next=18;break}o.ids=n.ids,e.next=23;break;case 18:if(void 0===i.ids){e.next=22;break}o.ids=i.ids,e.next=23;break;case 22:throw new Error("Missing required query parameter: ids");case 23:if(void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProducts: ".concat(e))})),s=new lu("/organizations/{organizationId}/products",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=44,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getProduct",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.select?o.select=n.select:void 0!==i.select&&(o.select=i.select),void 0!==n.inventoryIds?o.inventoryIds=n.inventoryIds:void 0!==i.inventoryIds&&(o.inventoryIds=i.inventoryIds),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.allImages?o.allImages=n.allImages:void 0!==i.allImages&&(o.allImages=i.allImages),void 0!==n.perPricebook?o.perPricebook=n.perPricebook:void 0!==i.perPricebook&&(o.perPricebook=i.perPricebook),void 0===n.siteId){e.next=33;break}o.siteId=n.siteId,e.next=38;break;case 33:if(void 0===i.siteId){e.next=37;break}o.siteId=i.siteId,e.next=38;break;case 37:throw new Error("Missing required query parameter: siteId");case 38:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getProduct: ".concat(e))})),s=new lu("/organizations/{organizationId}/products/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=44,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 44:return c=e.sent,e.abrupt("return",c);case 46:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getCategories",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.ids){e.next=17;break}o.ids=n.ids,e.next=22;break;case 17:if(void 0===i.ids){e.next=21;break}o.ids=i.ids,e.next=22;break;case 21:throw new Error("Missing required query parameter: ids");case 22:if(void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategories: ".concat(e))})),s=new lu("/organizations/{organizationId}/categories",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getCategory",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.id){e.next=16;break}a.id=n.id,e.next=21;break;case 16:if(void 0===i.id){e.next=20;break}a.id=i.id,e.next=21;break;case 20:throw new Error("Missing required path parameter: id");case 21:if(o={},void 0!==n.levels?o.levels=n.levels:void 0!==i.levels&&(o.levels=i.levels),void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0===n.siteId){e.next=28;break}o.siteId=n.siteId,e.next=33;break;case 28:if(void 0===i.siteId){e.next=32;break}o.siteId=i.siteId,e.next=33;break;case 32:throw new Error("Missing required query parameter: siteId");case 33:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getCategory: ".concat(e))})),s=new lu("/organizations/{organizationId}/categories/{id}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=_u(_u({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function Uu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Bu(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Uu(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uu(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(Ru,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/product/shopper-products/{version}"),Ii(Ru,"apiPaths",{getProducts:"/organizations/{organizationId}/products",getProduct:"/organizations/{organizationId}/products/{id}",getCategories:"/organizations/{organizationId}/categories",getCategory:"/organizations/{organizationId}/categories/{id}"}),Ii(Ru,"paramKeys",{getProducts:["organizationId","select","ids","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductsRequired:["organizationId","ids","siteId"],getProduct:["organizationId","id","select","inventoryIds","currency","expand","locale","allImages","perPricebook","siteId"],getProductRequired:["organizationId","id","siteId"],getCategories:["organizationId","ids","levels","locale","siteId"],getCategoriesRequired:["organizationId","ids","siteId"],getCategory:["organizationId","id","levels","locale","siteId"],getCategoryRequired:["organizationId","id","siteId"]});var Lu=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=Bu({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"getPromotions",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotions: ".concat(e))})),s=new lu("/organizations/{organizationId}/promotions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getPromotionsForCampaign",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(void 0===n.campaignId){e.next=16;break}a.campaignId=n.campaignId,e.next=21;break;case 16:if(void 0===i.campaignId){e.next=20;break}a.campaignId=i.campaignId,e.next=21;break;case 20:throw new Error("Missing required path parameter: campaignId");case 21:if(o={},void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.startDate?o.startDate=n.startDate:void 0!==i.startDate&&(o.startDate=i.startDate),void 0!==n.endDate?o.endDate=n.endDate:void 0!==i.endDate&&(o.endDate=i.endDate),void 0!==n.currency?o.currency=n.currency:void 0!==i.currency&&(o.currency=i.currency),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPromotionsForCampaign: ".concat(e))})),s=new lu("/organizations/{organizationId}/promotions/campaigns/{campaignId}",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=Bu(Bu({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=40,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 40:return c=e.sent,e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();Ii(Lu,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/pricing/shopper-promotions/{version}"),Ii(Lu,"apiPaths",{getPromotions:"/organizations/{organizationId}/promotions",getPromotionsForCampaign:"/organizations/{organizationId}/promotions/campaigns/{campaignId}"}),Ii(Lu,"paramKeys",{getPromotions:["organizationId","siteId","ids","locale"],getPromotionsRequired:["organizationId","siteId","ids"],getPromotionsForCampaign:["organizationId","campaignId","siteId","startDate","endDate","currency"],getPromotionsForCampaignRequired:["organizationId","campaignId","siteId"]});var Fu=TypeError,Nu=function(e,t){if(!delete e[t])throw Fu("Cannot delete property "+J(t)+" of "+J(e))},Wu=L.match(/firefox\/(\d+)/i),Du=!!Wu&&+Wu[1],Gu=/MSIE|Trident/.test(L),Hu=L.match(/AppleWebKit\/(\d+)\./),Vu=!!Hu&&+Hu[1],$u=[],Yu=z($u.sort),Ku=z($u.push),Ju=l((function(){$u.sort(void 0)})),Qu=l((function(){$u.sort(null)})),Xu=Nn("sort"),Zu=!l((function(){if(G)return G<70;if(!(Du&&Du>3)){if(Gu)return!0;if(Vu)return Vu<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++)$u.push({k:t+n,v:r})}for($u.sort((function(e,t){return t.v-e.v})),n=0;n<$u.length;n++)t=$u[n].k.charAt(0),i.charAt(i.length-1)!==t&&(i+=t);return"DGBEFHACIJK"!==i}}));function el(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 tl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?el(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):el(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ut({target:"Array",proto:!0,forced:Ju||!Qu||!Xu||!Zu},{sort:function(e){void 0!==e&&X(e);var t=oe(this);if(Zu)return void 0===e?Yu(t):Yu(t,e);var r,n,i=[],a=It(t);for(n=0;n<a;n++)n in t&&Ku(i,t[n]);for(Qa(i,function(e){return function(t,r){return void 0===r?-1:void 0===t?1:void 0!==e?+e(t,r)||0:Yt(t)>Yt(r)?1:-1}}(e)),r=i.length,n=0;n<r;)t[n]=i[n++];for(;n<a;)Nu(t,n++);return t}});var rl=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=tl({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"productSearch",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.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.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.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.allVariationProperties?o.allVariationProperties=n.allVariationProperties:void 0!==i.allVariationProperties&&(o.allVariationProperties=i.allVariationProperties),void 0!==n.includedCustomVariationProperties?o.includedCustomVariationProperties=n.includedCustomVariationProperties:void 0!==i.includedCustomVariationProperties&&(o.includedCustomVariationProperties=i.includedCustomVariationProperties),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for productSearch: ".concat(e))})),s=new lu("/organizations/{organizationId}/product-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=tl(tl({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=41,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 41:return c=e.sent,e.abrupt("return",c);case 43:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getSearchSuggestions",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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),void 0!==n.expand?o.expand=n.expand:void 0!==i.expand&&(o.expand=i.expand),void 0!==n.includedCustomProductProperties?o.includedCustomProductProperties=n.includedCustomProductProperties:void 0!==i.includedCustomProductProperties&&(o.includedCustomProductProperties=i.includedCustomProductProperties),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSearchSuggestions: ".concat(e))})),s=new lu("/organizations/{organizationId}/search-suggestions",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=tl(tl({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=42,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 42:return c=e.sent,e.abrupt("return",c);case 44:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function nl(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 il(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?nl(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(rl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/search/shopper-search/{version}/"),Ii(rl,"apiPaths",{productSearch:"/organizations/{organizationId}/product-search",getSearchSuggestions:"/organizations/{organizationId}/search-suggestions"}),Ii(rl,"paramKeys",{productSearch:["organizationId","select","siteId","q","refine","sort","currency","locale","expand","allImages","perPricebook","allVariationProperties","includedCustomVariationProperties","offset","limit"],productSearchRequired:["organizationId","siteId"],getSearchSuggestions:["organizationId","siteId","q","limit","currency","locale","expand","includedCustomProductProperties"],getSearchSuggestionsRequired:["organizationId","siteId","q"]});var al=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=il({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t;return gi(e,[{key:"getUrlMapping",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.urlSegment){e.next=17;break}o.urlSegment=n.urlSegment,e.next=22;break;case 17:if(void 0===i.urlSegment){e.next=21;break}o.urlSegment=i.urlSegment,e.next=22;break;case 21:throw new Error("Missing required query parameter: urlSegment");case 22:if(void 0===n.siteId){e.next=26;break}o.siteId=n.siteId,e.next=31;break;case 26:if(void 0===i.siteId){e.next=30;break}o.siteId=i.siteId,e.next=31;break;case 30:throw new Error("Missing required query parameter: siteId");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUrlMapping: ".concat(e))})),s=new lu("/organizations/{organizationId}/url-mapping",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=il(il({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function ol(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 sl(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ol(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ol(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(al,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/site/shopper-seo/{version}"),Ii(al,"apiPaths",{getUrlMapping:"/organizations/{organizationId}/url-mapping"}),Ii(al,"paramKeys",{getUrlMapping:["organizationId","urlSegment","siteId","locale"],getUrlMappingRequired:["organizationId","urlSegment","siteId"]});var dl=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=sl({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r;return gi(e,[{key:"searchStores",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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.countryCode?o.countryCode=n.countryCode:void 0!==i.countryCode&&(o.countryCode=i.countryCode),void 0!==n.distanceUnit?o.distanceUnit=n.distanceUnit:void 0!==i.distanceUnit&&(o.distanceUnit=i.distanceUnit),void 0!==n.latitude?o.latitude=n.latitude:void 0!==i.latitude&&(o.latitude=i.latitude),void 0!==n.longitude?o.longitude=n.longitude:void 0!==i.longitude&&(o.longitude=i.longitude),void 0!==n.maxDistance?o.maxDistance=n.maxDistance:void 0!==i.maxDistance&&(o.maxDistance=i.maxDistance),void 0!==n.postalCode?o.postalCode=n.postalCode:void 0!==i.postalCode&&(o.postalCode=i.postalCode),void 0===n.siteId){e.next=23;break}o.siteId=n.siteId,e.next=28;break;case 23:if(void 0===i.siteId){e.next=27;break}o.siteId=i.siteId,e.next=28;break;case 27:throw new Error("Missing required query parameter: siteId");case 28:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),void 0!==n.offset?o.offset=n.offset:void 0!==i.offset&&(o.offset=i.offset),void 0!==n.limit?o.limit=n.limit:void 0!==i.limit&&(o.limit=i.limit),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for searchStores: ".concat(e))})),s=new lu("/organizations/{organizationId}/store-search",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=sl(sl({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=37,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 37:return c=e.sent,e.abrupt("return",c);case 39:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getStores",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.siteId){e.next=17;break}o.siteId=n.siteId,e.next=22;break;case 17:if(void 0===i.siteId){e.next=21;break}o.siteId=i.siteId,e.next=22;break;case 21:throw new Error("Missing required query parameter: siteId");case 22:if(void 0===n.ids){e.next=26;break}o.ids=n.ids,e.next=31;break;case 26:if(void 0===i.ids){e.next=30;break}o.ids=i.ids,e.next=31;break;case 30:throw new Error("Missing required query parameter: ids");case 31:return void 0!==n.locale?o.locale=n.locale:void 0!==i.locale&&(o.locale=i.locale),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getStores: ".concat(e))})),s=new lu("/organizations/{organizationId}/stores",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=sl(sl({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=38,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 38:return c=e.sent,e.abrupt("return",c);case 40:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();function cl(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 ul(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?cl(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):cl(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}Ii(dl,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/store/shopper-stores/{version}"),Ii(dl,"apiPaths",{searchStores:"/organizations/{organizationId}/store-search",getStores:"/organizations/{organizationId}/stores"}),Ii(dl,"paramKeys",{searchStores:["organizationId","countryCode","distanceUnit","latitude","longitude","maxDistance","postalCode","siteId","locale","offset","limit"],searchStoresRequired:["organizationId","siteId"],getStores:["organizationId","siteId","ids","locale"],getStoresRequired:["organizationId","siteId","ids"]});var ll=function(){function e(t){fi(this,e),Ii(this,"clientConfig",void 0);var r=ul({},t);r.baseUri||(r.baseUri=(this instanceof e?this.constructor:void 0).defaultBaseUri),this.clientConfig=new Wo(r)}var t,r,n,i,a,o,s,d,c,u,l,h,f,p,g,I;return gi(e,[{key:"authenticateCustomer",value:(I=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authenticateCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return I.apply(this,arguments)})},{key:"authorizePasswordlessCustomer",value:(g=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizePasswordlessCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/passwordless/login",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return g.apply(this,arguments)})},{key:"logoutCustomer",value:(p=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.refresh_token){e.next=26;break}o.refresh_token=n.refresh_token,e.next=31;break;case 26:if(void 0===i.refresh_token){e.next=30;break}o.refresh_token=i.refresh_token,e.next=31;break;case 30:throw new Error("Missing required query parameter: refresh_token");case 31:return void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),void 0!==n.hint?o.hint=n.hint:void 0!==i.hint&&(o.hint=i.hint),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for logoutCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/logout",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=39,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 39:return c=e.sent,e.abrupt("return",c);case 41:case"end":return e.stop()}}),e,this)}))),function(e,t){return p.apply(this,arguments)})},{key:"authorizeCustomer",value:(f=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.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:return 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?o.code_challenge=n.code_challenge:void 0!==i.code_challenge&&(o.code_challenge=i.code_challenge),void 0!==n.ui_locales?o.ui_locales=n.ui_locales:void 0!==i.ui_locales&&(o.ui_locales=i.ui_locales),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for authorizeCustomer: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=53,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 53:if(c=e.sent,!r){e.next=56;break}return e.abrupt("return",c);case 56:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getAccessToken",value:(h=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return h.apply(this,arguments)})},{key:"getSessionBridgeAccessToken",value:(l=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getSessionBridgeAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/session-bridge/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"getTrustedSystemAccessToken",value:(u=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedSystemAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/trusted-system/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"getTrustedAgentAuthorizationToken",value:(c=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:if(o={},void 0===n.client_id){e.next=17;break}o.client_id=n.client_id,e.next=22;break;case 17:if(void 0===i.client_id){e.next=21;break}o.client_id=i.client_id,e.next=22;break;case 21:throw new Error("Missing required query parameter: client_id");case 22:if(void 0===n.channel_id){e.next=26;break}o.channel_id=n.channel_id,e.next=31;break;case 26:if(void 0===i.channel_id){e.next=30;break}o.channel_id=i.channel_id,e.next=31;break;case 30:throw new Error("Missing required query parameter: channel_id");case 31:if(void 0===n.code_challenge){e.next=35;break}o.code_challenge=n.code_challenge,e.next=40;break;case 35:if(void 0===i.code_challenge){e.next=39;break}o.code_challenge=i.code_challenge,e.next=40;break;case 39:throw new Error("Missing required query parameter: code_challenge");case 40:if(void 0===n.login_id){e.next=44;break}o.login_id=n.login_id,e.next=49;break;case 44:if(void 0===i.login_id){e.next=48;break}o.login_id=i.login_id,e.next=49;break;case 48:throw new Error("Missing required query parameter: login_id");case 49:if(void 0===n.idp_origin){e.next=53;break}o.idp_origin=n.idp_origin,e.next=58;break;case 53:if(void 0===i.idp_origin){e.next=57;break}o.idp_origin=i.idp_origin,e.next=58;break;case 57:throw new Error("Missing required query parameter: idp_origin");case 58:if(void 0===n.redirect_uri){e.next=62;break}o.redirect_uri=n.redirect_uri,e.next=67;break;case 62:if(void 0===i.redirect_uri){e.next=66;break}o.redirect_uri=i.redirect_uri,e.next=67;break;case 66:throw new Error("Missing required query parameter: redirect_uri");case 67:if(void 0===n.response_type){e.next=71;break}o.response_type=n.response_type,e.next=76;break;case 71:if(void 0===i.response_type){e.next=75;break}o.response_type=i.response_type,e.next=76;break;case 75:throw new Error("Missing required query parameter: response_type");case 76:return Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAuthorizationToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/trusted-agent/authorize",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=82,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 82:if(c=e.sent,!r){e.next=85;break}return e.abrupt("return",c);case 85:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"getTrustedAgentAccessToken",value:(d=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getTrustedAgentAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/trusted-agent/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return d.apply(this,arguments)})},{key:"getPasswordResetToken",value:(s=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordResetToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/password/reset",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"resetPassword",value:(o=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for resetPassword: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/password/action",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:if(c=e.sent,!r){e.next=22;break}return e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})},{key:"getPasswordLessAccessToken",value:function(){var e=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getPasswordLessAccessToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/passwordless/token",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)})));return function(t,r){return e.apply(this,arguments)}}()},{key:"revokeToken",value:(a=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for revokeToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/revoke",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"introspectToken",value:(i=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for introspectToken: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/introspect",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({"Content-Type":"application/x-www-form-urlencoded"},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"POST",headers:d,body:this.clientConfig.transformRequest(t.body,d)},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"getUserInfo",value:(n=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},void 0!==n.channel_id?o.channel_id=n.channel_id:void 0!==i.channel_id&&(o.channel_id=i.channel_id),Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getUserInfo: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/userinfo",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=20,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 20:return c=e.sent,e.abrupt("return",c);case 22:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"getWellknownOpenidConfiguration",value:(r=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getWellknownOpenidConfiguration: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/.well-known/openid-configuration",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"getJwksUri",value:(t=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(null==t?void 0:t.parameters)||{},i=this.clientConfig.parameters,a={shortCode:i.shortCode,version:i.version||"v1"},void 0===n.organizationId){e.next=7;break}a.organizationId=n.organizationId,e.next=12;break;case 7:if(void 0===i.organizationId){e.next=11;break}a.organizationId=i.organizationId,e.next=12;break;case 11:throw new Error("Missing required path parameter: organizationId");case 12:return o={},Object.keys(n).forEach((function(e){e.startsWith("c_")&&void 0!==n[e]?o[e]=n[e]:o.hasOwnProperty(e)||a.hasOwnProperty(e)||console.warn("Invalid Parameter for getJwksUri: ".concat(e))})),s=new lu("/organizations/{organizationId}/oauth2/jwks",this.clientConfig.baseUri,{pathParams:a,queryParams:o,origin:this.clientConfig.proxy}),d=ul(ul({},this.clientConfig.headers),null==t?void 0:t.headers),Vo||(d["user-agent"]=[d["user-agent"],hu].join(" ")),e.next=19,bd(s.toString(),{method:"GET",headers:d},this.clientConfig,r);case 19:return c=e.sent,e.abrupt("return",c);case 21:case"end":return e.stop()}}),e,this)}))),function(e,r){return t.apply(this,arguments)})}]),e}();Ii(ll,"defaultBaseUri","https://{shortCode}.api.commercecloud.salesforce.com/shopper/auth/{version}"),Ii(ll,"apiPaths",{authenticateCustomer:"/organizations/{organizationId}/oauth2/login",authorizePasswordlessCustomer:"/organizations/{organizationId}/oauth2/passwordless/login",logoutCustomer:"/organizations/{organizationId}/oauth2/logout",authorizeCustomer:"/organizations/{organizationId}/oauth2/authorize",getAccessToken:"/organizations/{organizationId}/oauth2/token",getSessionBridgeAccessToken:"/organizations/{organizationId}/oauth2/session-bridge/token",getTrustedSystemAccessToken:"/organizations/{organizationId}/oauth2/trusted-system/token",getTrustedAgentAuthorizationToken:"/organizations/{organizationId}/oauth2/trusted-agent/authorize",getTrustedAgentAccessToken:"/organizations/{organizationId}/oauth2/trusted-agent/token",getPasswordResetToken:"/organizations/{organizationId}/oauth2/password/reset",resetPassword:"/organizations/{organizationId}/oauth2/password/action",getPasswordLessAccessToken:"/organizations/{organizationId}/oauth2/passwordless/token",revokeToken:"/organizations/{organizationId}/oauth2/revoke",introspectToken:"/organizations/{organizationId}/oauth2/introspect",getUserInfo:"/organizations/{organizationId}/oauth2/userinfo",getWellknownOpenidConfiguration:"/organizations/{organizationId}/oauth2/.well-known/openid-configuration",getJwksUri:"/organizations/{organizationId}/oauth2/jwks"}),Ii(ll,"paramKeys",{authenticateCustomer:["organizationId"],authenticateCustomerRequired:["organizationId"],authorizePasswordlessCustomer:["organizationId"],authorizePasswordlessCustomerRequired:["organizationId"],logoutCustomer:["organizationId","client_id","refresh_token","channel_id","hint"],logoutCustomerRequired:["organizationId","client_id","refresh_token"],authorizeCustomer:["organizationId","redirect_uri","response_type","client_id","scope","state","usid","hint","channel_id","code_challenge","ui_locales"],authorizeCustomerRequired:["organizationId","redirect_uri","response_type","client_id"],getAccessToken:["organizationId"],getAccessTokenRequired:["organizationId"],getSessionBridgeAccessToken:["organizationId"],getSessionBridgeAccessTokenRequired:["organizationId"],getTrustedSystemAccessToken:["organizationId"],getTrustedSystemAccessTokenRequired:["organizationId"],getTrustedAgentAuthorizationToken:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAuthorizationTokenRequired:["organizationId","client_id","channel_id","code_challenge","login_id","idp_origin","redirect_uri","response_type"],getTrustedAgentAccessToken:["organizationId"],getTrustedAgentAccessTokenRequired:["organizationId"],getPasswordResetToken:["organizationId"],getPasswordResetTokenRequired:["organizationId"],resetPassword:["organizationId"],resetPasswordRequired:["organizationId"],getPasswordLessAccessToken:["organizationId"],getPasswordLessAccessTokenRequired:["organizationId"],revokeToken:["organizationId"],revokeTokenRequired:["organizationId"],introspectToken:["organizationId"],introspectTokenRequired:["organizationId"],getUserInfo:["organizationId","channel_id"],getUserInfoRequired:["organizationId"],getWellknownOpenidConfiguration:["organizationId"],getWellknownOpenidConfigurationRequired:["organizationId"],getJwksUri:["organizationId"],getJwksUriRequired:["organizationId"]});var hl=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};bs("search",(function(e,t,r){return[function(t){var r=T(this),n=null==t?void 0:Z(t,e);return n?g(n,t,r):new RegExp(t)[e](Yt(r))},function(e){var n=Se(this),i=Yt(e),a=r(t,n,i);if(a.done)return a.value;var o=n.lastIndex;hl(o,0)||(n.lastIndex=0);var s=js(n,i);return hl(n.lastIndex,o)||(n.lastIndex=o),null===s?-1:s.index}]}));var fl=Mr.map,pl=Sn("map");Ut({target:"Array",proto:!0,forced:!pl},{map:function(e){return fl(this,e,arguments.length>1?arguments[1]:void 0)}});var gl=me("iterator"),Il=!1;try{var ml=0,vl={next:function(){return{done:!!ml++}},return:function(){Il=!0}};vl[gl]=function(){return this},Array.from(vl,(function(){throw 2}))}catch(e){}var bl,kl,yl,xl=function(e,t){if(!t&&!Il)return!1;var r=!1;try{var n={};n[gl]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},wl="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,zl=_e.f,Cl=it.enforce,Pl=it.get,Ol=u.Int8Array,El=Ol&&Ol.prototype,ql=u.Uint8ClampedArray,jl=ql&&ql.prototype,Sl=Ol&&ta(Ol),Tl=El&&ta(El),Ml=Object.prototype,Al=u.TypeError,_l=me("toStringTag"),Rl=he("TYPED_ARRAY_TAG"),Ul=wl&&!!ua&&"Opera"!==Vt(u.opera),Bl=!1,Ll={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Fl={BigInt64Array:8,BigUint64Array:8},Nl=function(e){var t=ta(e);if(_(t)){var r=Pl(t);return r&&de(r,"TypedArrayConstructor")?r.TypedArrayConstructor:Nl(t)}},Wl=function(e){if(!_(e))return!1;var t=Vt(e);return de(Ll,t)||de(Fl,t)};for(bl in Ll)(yl=(kl=u[bl])&&kl.prototype)?Cl(yl).TypedArrayConstructor=kl:Ul=!1;for(bl in Fl)(yl=(kl=u[bl])&&kl.prototype)&&(Cl(yl).TypedArrayConstructor=kl);if((!Ul||!A(Sl)||Sl===Function.prototype)&&(Sl=function(){throw Al("Incorrect invocation")},Ul))for(bl in Ll)u[bl]&&ua(u[bl],Sl);if((!Ul||!Tl||Tl===Ml)&&(Tl=Sl.prototype,Ul))for(bl in Ll)u[bl]&&ua(u[bl].prototype,Tl);if(Ul&&ta(jl)!==Tl&&ua(jl,Tl),h&&!de(Tl,_l))for(bl in Bl=!0,zl(Tl,_l,{get:function(){return _(this)?this[Rl]:void 0}}),Ll)u[bl]&&Re(u[bl],Rl,bl);var Dl={NATIVE_ARRAY_BUFFER_VIEWS:Ul,TYPED_ARRAY_TAG:Bl&&Rl,aTypedArray:function(e){if(Wl(e))return e;throw Al("Target is not a typed array")},aTypedArrayConstructor:function(e){if(A(e)&&(!ua||B(Sl,e)))return e;throw Al(J(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(h){if(r)for(var i in Ll){var a=u[i];if(a&&de(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}Tl[e]&&!r||ot(Tl,e,r?t:Ul&&El[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(h){if(ua){if(r)for(n in Ll)if((i=u[n])&&de(i,e))try{delete i[e]}catch(e){}if(Sl[e]&&!r)return;try{return ot(Sl,e,r?t:Ul&&Sl[e]||t)}catch(e){}}for(n in Ll)!(i=u[n])||i[e]&&!r||ot(i,e,t)}},getTypedArrayConstructor:Nl,isView:function(e){if(!_(e))return!1;var t=Vt(e);return"DataView"===t||de(Ll,t)||de(Fl,t)},isTypedArray:Wl,TypedArray:Sl,TypedArrayPrototype:Tl},Gl=Dl.NATIVE_ARRAY_BUFFER_VIEWS,Hl=u.ArrayBuffer,Vl=u.Int8Array,$l=!Gl||!l((function(){Vl(1)}))||!l((function(){new Vl(-1)}))||!xl((function(e){new Vl,new Vl(null),new Vl(1.5),new Vl(e)}),!0)||l((function(){return 1!==new Vl(new Hl(2),1,void 0).length})),Yl=RangeError,Kl=function(e){if(void 0===e)return 0;var t=ut(e),r=gt(t);if(t!==r)throw Yl("Wrong length or index");return r},Jl=Array,Ql=Math.abs,Xl=Math.pow,Zl=Math.floor,eh=Math.log,th=Math.LN2,rh=function(e,t,r){var n,i,a,o=Jl(r),s=8*r-t-1,d=(1<<s)-1,c=d>>1,u=23===t?Xl(2,-24)-Xl(2,-77):0,l=e<0||0===e&&1/e<0?1:0,h=0;for((e=Ql(e))!=e||e===1/0?(i=e!=e?1:0,n=d):(n=Zl(eh(e)/th),e*(a=Xl(2,-n))<1&&(n--,a*=2),(e+=n+c>=1?u/a:u*Xl(2,1-c))*a>=2&&(n++,a/=2),n+c>=d?(i=0,n=d):n+c>=1?(i=(e*a-1)*Xl(2,t),n+=c):(i=e*Xl(2,c-1)*Xl(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*l,o},nh=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,d=n-1,c=e[d--],u=127&c;for(c>>=7;s>0;)u=256*u+e[d--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[d--],s-=8;if(0===u)u=1-o;else{if(u===a)return r?NaN:c?-1/0:1/0;r+=Xl(2,t),u-=o}return(c?-1:1)*r*Xl(2,u-t)},ih=function(e){for(var t=oe(this),r=It(t),n=arguments.length,i=ft(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:ft(a,r);o>i;)t[i++]=e;return t},ah=zt.f,oh=_e.f,sh=Fe.PROPER,dh=Fe.CONFIGURABLE,ch=it.get,uh=it.set,lh=u.ArrayBuffer,hh=lh,fh=hh&&hh.prototype,ph=u.DataView,gh=ph&&ph.prototype,Ih=Object.prototype,mh=u.Array,vh=u.RangeError,bh=z(ih),kh=z([].reverse),yh=rh,xh=nh,wh=function(e){return[255&e]},zh=function(e){return[255&e,e>>8&255]},Ch=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Ph=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Oh=function(e){return yh(e,23,4)},Eh=function(e){return yh(e,52,8)},qh=function(e,t){oh(e.prototype,t,{get:function(){return ch(this)[t]}})},jh=function(e,t,r,n){var i=Kl(r),a=ch(e);if(i+t>a.byteLength)throw vh("Wrong index");var o=ch(a.buffer).bytes,s=i+a.byteOffset,d=or(o,s,s+t);return n?d:kh(d)},Sh=function(e,t,r,n,i,a){var o=Kl(r),s=ch(e);if(o+t>s.byteLength)throw vh("Wrong index");for(var d=ch(s.buffer).bytes,c=o+s.byteOffset,u=n(+i),l=0;l<t;l++)d[c+l]=u[a?l:t-l-1]};if(wl){var Th=sh&&"ArrayBuffer"!==lh.name;if(l((function(){lh(1)}))&&l((function(){new lh(-1)}))&&!l((function(){return new lh,new lh(1.5),new lh(NaN),Th&&!dh})))Th&&dh&&Re(lh,"name","ArrayBuffer");else{(hh=function(e){return Fa(this,fh),new lh(Kl(e))}).prototype=fh;for(var Mh,Ah=ah(lh),_h=0;Ah.length>_h;)(Mh=Ah[_h++])in hh||Re(hh,Mh,lh[Mh]);fh.constructor=hh}ua&&ta(gh)!==Ih&&ua(gh,Ih);var Rh=new ph(new hh(2)),Uh=z(gh.setInt8);Rh.setInt8(0,2147483648),Rh.setInt8(1,2147483649),!Rh.getInt8(0)&&Rh.getInt8(1)||Ba(gh,{setInt8:function(e,t){Uh(this,e,t<<24>>24)},setUint8:function(e,t){Uh(this,e,t<<24>>24)}},{unsafe:!0})}else fh=(hh=function(e){Fa(this,fh);var t=Kl(e);uh(this,{bytes:bh(mh(t),0),byteLength:t}),h||(this.byteLength=t)}).prototype,gh=(ph=function(e,t,r){Fa(this,gh),Fa(e,fh);var n=ch(e).byteLength,i=ut(t);if(i<0||i>n)throw vh("Wrong offset");if(i+(r=void 0===r?n-i:gt(r))>n)throw vh("Wrong length");uh(this,{buffer:e,byteLength:r,byteOffset:i}),h||(this.buffer=e,this.byteLength=r,this.byteOffset=i)}).prototype,h&&(qh(hh,"byteLength"),qh(ph,"buffer"),qh(ph,"byteLength"),qh(ph,"byteOffset")),Ba(gh,{getInt8:function(e){return jh(this,1,e)[0]<<24>>24},getUint8:function(e){return jh(this,1,e)[0]},getInt16:function(e){var t=jh(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=jh(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return Ph(jh(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return Ph(jh(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return xh(jh(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return xh(jh(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){Sh(this,1,e,wh,t)},setUint8:function(e,t){Sh(this,1,e,wh,t)},setInt16:function(e,t){Sh(this,2,e,zh,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){Sh(this,2,e,zh,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){Sh(this,4,e,Ch,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){Sh(this,4,e,Ch,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){Sh(this,4,e,Oh,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){Sh(this,8,e,Eh,t,arguments.length>2?arguments[2]:void 0)}});gr(hh,"ArrayBuffer"),gr(ph,"DataView");var Bh={ArrayBuffer:hh,DataView:ph},Lh=Math.floor,Fh=Number.isInteger||function(e){return!_(e)&&isFinite(e)&&Lh(e)===e},Nh=RangeError,Wh=RangeError,Dh=function(e,t){var r=function(e){var t=ut(e);if(t<0)throw Nh("The argument can't be less than 0");return t}(e);if(r%t)throw Wh("Wrong offset");return r},Gh=Dl.aTypedArrayConstructor,Hh=function(e){var t,r,n,i,a,o,s=$s(this),d=oe(e),c=arguments.length,u=c>1?arguments[1]:void 0,l=void 0!==u,h=Wa(d);if(h&&!qd(h))for(o=(a=Ga(d,h)).next,d=[];!(i=g(o,a)).done;)d.push(i.value);for(l&&c>2&&(u=mr(u,arguments[2])),r=It(d),n=new(Gh(s))(r),t=0;r>t;t++)n[t]=l?u(d[t],t):d[t];return n},Vh=me("species"),$h=function(e){var t=U(e),r=_e.f;h&&t&&!t[Vh]&&r(t,Vh,{configurable:!0,get:function(){return this}})};o((function(e){var t=zt.f,r=Mr.forEach,n=it.get,i=it.set,a=it.enforce,o=_e.f,s=Oe.f,d=Math.round,c=u.RangeError,l=Bh.ArrayBuffer,f=l.prototype,p=Bh.DataView,I=Dl.NATIVE_ARRAY_BUFFER_VIEWS,m=Dl.TYPED_ARRAY_TAG,v=Dl.TypedArray,k=Dl.TypedArrayPrototype,y=Dl.aTypedArrayConstructor,x=Dl.isTypedArray,w=function(e,t){y(e);for(var r=0,n=t.length,i=new e(n);n>r;)i[r]=t[r++];return i},z=function(e,t){o(e,t,{get:function(){return n(this)[t]}})},C=function(e){var t;return B(f,e)||"ArrayBuffer"==(t=Vt(e))||"SharedArrayBuffer"==t},P=function(e,t){return x(e)&&!Y(t)&&t in e&&Fh(+t)&&t>=0},O=function(e,t){return t=ye(t),P(e,t)?b(2,e[t]):s(e,t)},E=function(e,t,r){return t=ye(t),!(P(e,t)&&_(r)&&de(r,"value"))||de(r,"get")||de(r,"set")||r.configurable||de(r,"writable")&&!r.writable||de(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};h?(I||(Oe.f=O,_e.f=E,z(k,"buffer"),z(k,"byteOffset"),z(k,"byteLength"),z(k,"length")),Ut({target:"Object",stat:!0,forced:!I},{getOwnPropertyDescriptor:O,defineProperty:E}),e.exports=function(e,s,h){var f=e.match(/\d+$/)[0]/8,b=e+(h?"Clamped":"")+"Array",y="get"+e,z="set"+e,P=u[b],O=P,E=O&&O.prototype,q={},j=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[y](t*f+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);h&&(r=(r=d(r))<0?0:r>255?255:255&r),i.view[z](t*f+i.byteOffset,r,!0)}(this,t,e)},enumerable:!0})};I?$l&&(O=s((function(e,t,r,n){return Fa(e,E),function(e,t,r){var n,i;return ua&&A(n=t.constructor)&&n!==r&&_(i=n.prototype)&&i!==r.prototype&&ua(e,i),e}(_(t)?C(t)?void 0!==n?new P(t,Dh(r,f),n):void 0!==r?new P(t,Dh(r,f)):new P(t):x(t)?w(O,t):g(Hh,O,t):new P(Kl(t)),e,O)})),ua&&ua(O,v),r(t(P),(function(e){e in O||Re(O,e,P[e])})),O.prototype=E):(O=s((function(e,t,r,n){Fa(e,E);var a,o,s,d=0,u=0;if(_(t)){if(!C(t))return x(t)?w(O,t):g(Hh,O,t);a=t,u=Dh(r,f);var h=t.byteLength;if(void 0===n){if(h%f)throw c("Wrong length");if((o=h-u)<0)throw c("Wrong length")}else if((o=gt(n)*f)+u>h)throw c("Wrong length");s=o/f}else s=Kl(t),a=new l(o=s*f);for(i(e,{buffer:a,byteOffset:u,byteLength:o,length:s,view:new p(a)});d<s;)j(e,d++)})),ua&&ua(O,v),E=O.prototype=rr(k)),E.constructor!==O&&Re(E,"constructor",O),a(E).TypedArrayConstructor=O,m&&Re(E,m,b);var S=O!=P;q[b]=O,Ut({global:!0,constructor:!0,forced:S,sham:!I},q),"BYTES_PER_ELEMENT"in O||Re(O,"BYTES_PER_ELEMENT",f),"BYTES_PER_ELEMENT"in E||Re(E,"BYTES_PER_ELEMENT",f),$h(b)}):e.exports=function(){}}))("Uint8",(function(e){return function(t,r,n){return e(this,t,r,n)}}));var Yh=Math.min,Kh=z([].copyWithin||function(e,t){var r=oe(this),n=It(r),i=ft(e,n),a=ft(t,n),o=arguments.length>2?arguments[2]:void 0,s=Yh((void 0===o?n:ft(o,n))-a,n-i),d=1;for(a<i&&i<a+s&&(d=-1,a+=s-1,i+=s-1);s-- >0;)a in r?r[i]=r[a]:Nu(r,i),i+=d,a+=d;return r}),Jh=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("copyWithin",(function(e,t){return Kh(Jh(this),e,t,arguments.length>2?arguments[2]:void 0)}));var Qh=Mr.every,Xh=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("every",(function(e){return Qh(Xh(this),e,arguments.length>1?arguments[1]:void 0)}));var Zh=TypeError,ef=function(e){var t=ke(e,"number");if("number"==typeof t)throw Zh("Can't convert number to bigint");return BigInt(t)},tf=Dl.aTypedArray,rf=Dl.exportTypedArrayMethod,nf=z("".slice);rf("fill",(function(e){var t=arguments.length;tf(this);var r="Big"===nf(Vt(this),0,3)?ef(e):+e;return g(ih,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),l((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var af=me("species"),of=function(e,t){var r,n=Se(e).constructor;return void 0===n||null==(r=Se(n)[af])?t:$s(r)},sf=Dl.aTypedArrayConstructor,df=Dl.getTypedArrayConstructor,cf=function(e){return sf(of(e,df(e)))},uf=function(e,t){return function(e,t){for(var r=0,n=It(t),i=new e(n);n>r;)i[r]=t[r++];return i}(cf(e),t)},lf=Mr.filter,hf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("filter",(function(e){var t=lf(hf(this),e,arguments.length>1?arguments[1]:void 0);return uf(this,t)}));var ff=Mr.find,pf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("find",(function(e){return ff(pf(this),e,arguments.length>1?arguments[1]:void 0)}));var gf=Mr.findIndex,If=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("findIndex",(function(e){return gf(If(this),e,arguments.length>1?arguments[1]:void 0)}));var mf=Mr.forEach,vf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("forEach",(function(e){mf(vf(this),e,arguments.length>1?arguments[1]:void 0)}));var bf=vt.includes,kf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("includes",(function(e){return bf(kf(this),e,arguments.length>1?arguments[1]:void 0)}));var yf=vt.indexOf,xf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("indexOf",(function(e){return yf(xf(this),e,arguments.length>1?arguments[1]:void 0)}));var wf=me("iterator"),zf=u.Uint8Array,Cf=z(ya.values),Pf=z(ya.keys),Of=z(ya.entries),Ef=Dl.aTypedArray,qf=Dl.exportTypedArrayMethod,jf=zf&&zf.prototype,Sf=!l((function(){jf[wf].call([1])})),Tf=!!jf&&jf.values&&jf[wf]===jf.values&&"values"===jf.values.name,Mf=function(){return Cf(Ef(this))};qf("entries",(function(){return Of(Ef(this))}),Sf),qf("keys",(function(){return Pf(Ef(this))}),Sf),qf("values",Mf,Sf||!Tf,{name:"values"}),qf(wf,Mf,Sf||!Tf,{name:"values"});var Af=Dl.aTypedArray,_f=Dl.exportTypedArrayMethod,Rf=z([].join);_f("join",(function(e){return Rf(Af(this),e)}));var Uf=Math.min,Bf=[].lastIndexOf,Lf=!!Bf&&1/[1].lastIndexOf(1,-0)<0,Ff=Nn("lastIndexOf"),Nf=Lf||!Ff?function(e){if(Lf)return pn(Bf,this,arguments)||0;var t=M(this),r=It(t),n=r-1;for(arguments.length>1&&(n=Uf(n,ut(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Bf,Wf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return pn(Nf,Wf(this),t>1?[e,arguments[1]]:[e])}));var Df=Mr.map,Gf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("map",(function(e){return Df(Gf(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(cf(e))(t)}))}));var Hf=TypeError,Vf=function(e){return function(t,r,n,i){X(r);var a=oe(t),o=j(a),s=It(a),d=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(d in o){i=o[d],d+=c;break}if(d+=c,e?d<0:s<=d)throw Hf("Reduce of empty array with no initial value")}for(;e?d>=0:s>d;d+=c)d in o&&(i=r(i,o[d],d,a));return i}},$f={left:Vf(!1),right:Vf(!0)},Yf=$f.left,Kf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Yf(Kf(this),e,t,t>1?arguments[1]:void 0)}));var Jf=$f.right,Qf=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Jf(Qf(this),e,t,t>1?arguments[1]:void 0)}));var Xf=Dl.aTypedArray,Zf=Dl.exportTypedArrayMethod,ep=Math.floor;Zf("reverse",(function(){for(var e,t=Xf(this).length,r=ep(t/2),n=0;n<r;)e=this[n],this[n++]=this[--t],this[t]=e;return this}));var tp=u.RangeError,rp=u.Int8Array,np=rp&&rp.prototype,ip=np&&np.set,ap=Dl.aTypedArray,op=Dl.exportTypedArrayMethod,sp=!l((function(){var e=new Uint8ClampedArray(2);return g(ip,e,{length:1,0:3},1),3!==e[1]})),dp=sp&&Dl.NATIVE_ARRAY_BUFFER_VIEWS&&l((function(){var e=new rp(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));op("set",(function(e){ap(this);var t=Dh(arguments.length>1?arguments[1]:void 0,1),r=oe(e);if(sp)return g(ip,this,r,t);var n=this.length,i=It(r),a=0;if(i+t>n)throw tp("Wrong length");for(;a<i;)this[t+a]=r[a++]}),!sp||dp);var cp=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("slice",(function(e,t){for(var r=gn(cp(this),e,t),n=cf(this),i=0,a=r.length,o=new n(a);a>i;)o[i]=r[i++];return o}),l((function(){new Int8Array(1).slice()})));var up=Mr.some,lp=Dl.aTypedArray;(0,Dl.exportTypedArrayMethod)("some",(function(e){return up(lp(this),e,arguments.length>1?arguments[1]:void 0)}));var hp=Dl.aTypedArray,fp=Dl.exportTypedArrayMethod,pp=u.Uint16Array,gp=pp&&z(pp.prototype.sort),Ip=!(!gp||l((function(){gp(new pp(2),null)}))&&l((function(){gp(new pp(2),{})}))),mp=!!gp&&!l((function(){if(G)return G<74;if(Du)return Du<67;if(Gu)return!0;if(Vu)return Vu<602;var e,t,r=new pp(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}));fp("sort",(function(e){return void 0!==e&&X(e),mp?gp(this,e):Qa(hp(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))}),!mp||Ip);var vp=u.Int8Array,bp=Dl.aTypedArray,kp=Dl.exportTypedArrayMethod,yp=[].toLocaleString,xp=!!vp&&l((function(){yp.call(new vp(1))}));kp("toLocaleString",(function(){return pn(yp,xp?gn(bp(this)):bp(this),gn(arguments))}),l((function(){return[1,2].toLocaleString()!=new vp([1,2]).toLocaleString()}))||!l((function(){vp.prototype.toLocaleString.call([1,2])})));var wp=Dl.exportTypedArrayMethod,zp=u.Uint8Array,Cp=zp&&zp.prototype||{},Pp=[].toString,Op=z([].join);l((function(){Pp.call({})}))&&(Pp=function(){return Op(this)});var Ep=Cp.toString!=Pp;wp("toString",Pp,Ep);var qp,jp,Sp,Tp,Mp="process"==O(u.process),Ap=/(?:ipad|iphone|ipod).*applewebkit/i.test(L),_p=u.setImmediate,Rp=u.clearImmediate,Up=u.process,Bp=u.Dispatch,Lp=u.Function,Fp=u.MessageChannel,Np=u.String,Wp=0,Dp={};try{qp=u.location}catch(e){}var Gp=function(e){if(de(Dp,e)){var t=Dp[e];delete Dp[e],t()}},Hp=function(e){return function(){Gp(e)}},Vp=function(e){Gp(e.data)},$p=function(e){u.postMessage(Np(e),qp.protocol+"//"+qp.host)};_p&&Rp||(_p=function(e){Va(arguments.length,1);var t=A(e)?e:Lp(e),r=gn(arguments,1);return Dp[++Wp]=function(){pn(t,void 0,r)},jp(Wp),Wp},Rp=function(e){delete Dp[e]},Mp?jp=function(e){Up.nextTick(Hp(e))}:Bp&&Bp.now?jp=function(e){Bp.now(Hp(e))}:Fp&&!Ap?(Tp=(Sp=new Fp).port2,Sp.port1.onmessage=Vp,jp=mr(Tp.postMessage,Tp)):u.addEventListener&&A(u.postMessage)&&!u.importScripts&&qp&&"file:"!==qp.protocol&&!l($p)?(jp=$p,u.addEventListener("message",Vp,!1)):jp="onreadystatechange"in ze("script")?function(e){Jt.appendChild(ze("script")).onreadystatechange=function(){Jt.removeChild(this),Gp(e)}}:function(e){setTimeout(Hp(e),0)});var Yp,Kp,Jp,Qp,Xp,Zp,eg,tg,rg={set:_p,clear:Rp},ng=/ipad|iphone|ipod/i.test(L)&&void 0!==u.Pebble,ig=/web0s(?!.*chrome)/i.test(L),ag=Oe.f,og=rg.set,sg=u.MutationObserver||u.WebKitMutationObserver,dg=u.document,cg=u.process,ug=u.Promise,lg=ag(u,"queueMicrotask"),hg=lg&&lg.value;hg||(Yp=function(){var e,t;for(Mp&&(e=cg.domain)&&e.exit();Kp;){t=Kp.fn,Kp=Kp.next;try{t()}catch(e){throw Kp?Qp():Jp=void 0,e}}Jp=void 0,e&&e.enter()},Ap||Mp||ig||!sg||!dg?!ng&&ug&&ug.resolve?((eg=ug.resolve(void 0)).constructor=ug,tg=mr(eg.then,eg),Qp=function(){tg(Yp)}):Mp?Qp=function(){cg.nextTick(Yp)}:(og=mr(og,u),Qp=function(){og(Yp)}):(Xp=!0,Zp=dg.createTextNode(""),new sg(Yp).observe(Zp,{characterData:!0}),Qp=function(){Zp.data=Xp=!Xp}));var fg=hg||function(e){var t={fn:e,next:void 0};Jp&&(Jp.next=t),Kp||(Kp=t,Qp()),Jp=t},pg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},gg=function(){this.head=null,this.tail=null};gg.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 Ig=gg,mg=u.Promise,vg="object"==typeof window&&"object"!=typeof Deno;mg&&mg.prototype;var bg,kg,yg,xg=me("species"),wg=!1,zg=A(u.PromiseRejectionEvent),Cg={CONSTRUCTOR:_t("Promise",(function(){var e=He(mg),t=e!==String(mg);if(!t&&66===G)return!0;if(G>=51&&/native code/.test(e))return!1;var r=new mg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[xg]=n,!(wg=r.then((function(){}))instanceof n)||!t&&vg&&!zg})),REJECTION_EVENT:zg,SUBCLASSING:wg},Pg=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=X(t),this.reject=X(r)},Og={f:function(e){return new Pg(e)}},Eg=rg.set,qg=Cg.CONSTRUCTOR,jg=Cg.REJECTION_EVENT,Sg=Cg.SUBCLASSING,Tg=it.getterFor("Promise"),Mg=it.set,Ag=mg&&mg.prototype,_g=mg,Rg=Ag,Ug=u.TypeError,Bg=u.document,Lg=u.process,Fg=Og.f,Ng=Fg,Wg=!!(Bg&&Bg.createEvent&&u.dispatchEvent),Dg=function(e){var t;return!(!_(e)||!A(t=e.then))&&t},Gg=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,d=e.resolve,c=e.reject,u=e.domain;try{s?(o||(2===t.rejection&&Kg(t),t.rejection=1),!0===s?r=a:(u&&u.enter(),r=s(a),u&&(u.exit(),i=!0)),r===e.promise?c(Ug("Promise-chain cycle")):(n=Dg(r))?g(n,r,d,c):d(r)):c(a)}catch(e){u&&!i&&u.exit(),c(e)}},Hg=function(e,t){e.notified||(e.notified=!0,fg((function(){for(var r,n=e.reactions;r=n.get();)Gg(r,e);e.notified=!1,t&&!e.rejection&&$g(e)})))},Vg=function(e,t,r){var n,i;Wg?((n=Bg.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),u.dispatchEvent(n)):n={promise:t,reason:r},!jg&&(i=u["on"+e])?i(n):"unhandledrejection"===e&&function(e,t){var r=u.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},$g=function(e){g(Eg,u,(function(){var t,r=e.facade,n=e.value;if(Yg(e)&&(t=pg((function(){Mp?Lg.emit("unhandledRejection",n,r):Vg("unhandledrejection",r,n)})),e.rejection=Mp||Yg(e)?2:1,t.error))throw t.value}))},Yg=function(e){return 1!==e.rejection&&!e.parent},Kg=function(e){g(Eg,u,(function(){var t=e.facade;Mp?Lg.emit("rejectionHandled",t):Vg("rejectionhandled",t,e.value)}))},Jg=function(e,t,r){return function(n){e(t,n,r)}},Qg=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Hg(e,!0))},Xg=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Ug("Promise can't be resolved itself");var n=Dg(t);n?fg((function(){var r={done:!1};try{g(n,t,Jg(Xg,r,e),Jg(Qg,r,e))}catch(t){Qg(r,t,e)}})):(e.value=t,e.state=1,Hg(e,!1))}catch(t){Qg({done:!1},t,e)}}};if(qg&&(Rg=(_g=function(e){Fa(this,Rg),X(e),g(bg,this);var t=Tg(this);try{e(Jg(Xg,t),Jg(Qg,t))}catch(e){Qg(t,e)}}).prototype,(bg=function(e){Mg(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new Ig,rejection:!1,state:0,value:void 0})}).prototype=ot(Rg,"then",(function(e,t){var r=Tg(this),n=Fg(of(this,_g));return r.parent=!0,n.ok=!A(e)||e,n.fail=A(t)&&t,n.domain=Mp?Lg.domain:void 0,0==r.state?r.reactions.add(n):fg((function(){Gg(n,r)})),n.promise})),kg=function(){var e=new bg,t=Tg(e);this.promise=e,this.resolve=Jg(Xg,t),this.reject=Jg(Qg,t)},Og.f=Fg=function(e){return e===_g||void 0===e?new kg(e):Ng(e)},A(mg)&&Ag!==Object.prototype)){yg=Ag.then,Sg||ot(Ag,"then",(function(e,t){var r=this;return new _g((function(e,t){g(yg,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Ag.constructor}catch(e){}ua&&ua(Ag,Rg)}Ut({global:!0,constructor:!0,wrap:!0,forced:qg},{Promise:_g}),gr(_g,"Promise",!1),$h("Promise");var Zg=TypeError,eI=function(e,t){this.stopped=e,this.result=t},tI=eI.prototype,rI=function(e,t,r){var n,i,a,o,s,d,c,u=r&&r.that,l=!(!r||!r.AS_ENTRIES),h=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),I=mr(t,u),m=function(e){return n&&Cd(n,"normal",e),new eI(!0,e)},v=function(e){return l?(Se(e),p?I(e[0],e[1],m):I(e[0],e[1])):p?I(e,m):I(e)};if(h)n=e.iterator;else if(f)n=e;else{if(!(i=Wa(e)))throw Zg(J(e)+" is not iterable");if(qd(i)){for(a=0,o=It(e);o>a;a++)if((s=v(e[a]))&&B(tI,s))return s;return new eI(!1)}n=Ga(e,i)}for(d=h?e.next:n.next;!(c=g(d,n)).done;){try{s=v(c.value)}catch(e){Cd(n,"throw",e)}if("object"==typeof s&&s&&B(tI,s))return s}return new eI(!1)},nI=Cg.CONSTRUCTOR||!xl((function(e){mg.all(e).then(void 0,(function(){}))}));Ut({target:"Promise",stat:!0,forced:nI},{all:function(e){var t=this,r=Og.f(t),n=r.resolve,i=r.reject,a=pg((function(){var r=X(t.resolve),a=[],o=0,s=1;rI(e,(function(e){var d=o++,c=!1;s++,g(r,t,e).then((function(e){c||(c=!0,a[d]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise}});var iI=Cg.CONSTRUCTOR,aI=mg&&mg.prototype;if(Ut({target:"Promise",proto:!0,forced:iI,real:!0},{catch:function(e){return this.then(void 0,e)}}),A(mg)){var oI=U("Promise").prototype.catch;aI.catch!==oI&&ot(aI,"catch",oI,{unsafe:!0})}Ut({target:"Promise",stat:!0,forced:nI},{race:function(e){var t=this,r=Og.f(t),n=r.reject,i=pg((function(){var i=X(t.resolve);rI(e,(function(e){g(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}}),Ut({target:"Promise",stat:!0,forced:Cg.CONSTRUCTOR},{reject:function(e){var t=Og.f(this);return g(t.reject,void 0,e),t.promise}});var sI=Cg.CONSTRUCTOR;function dI(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function cI(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 uI(e){return function(e){if(Array.isArray(e))return cI(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 cI(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)?cI(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.")}()}U("Promise"),Ut({target:"Promise",stat:!0,forced:sI},{resolve:function(e){return function(e,t){if(Se(e),_(t)&&t.constructor===e)return t;var r=Og.f(e);return(0,r.resolve)(t),r.promise}(this,e)}}),Ut({target:"Object",stat:!0},{fromEntries:function(e){var t={};return rI(e,(function(e,r){nr(t,e,r)}),{AS_ENTRIES:!0}),t}});var lI=["hint","redirectURI","usid"],hI=["hint","redirectURI","usid"],fI=["dnt","redirectURI","usid"];function pI(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 gI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pI(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var II=Vo?btoa:function(e){return Buffer.from(e).toString("base64")},mI=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}},vI=function(){return e=i.default(String(+new Date),{entropy:!0}),t.customRandom(t.urlAlphabet,128,(function(t){return new Uint8Array(t).map((function(){return 256*e()}))}))();var e},bI=function(){var e=hi(Wi.mark((function e(t){var r,n,i,a,o,s,d;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")},n="",!Vo||!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,uI(new Uint8Array(o)))),n=r(s),e.next=16;break;case 12:return e.next=14,import("crypto");case 14:d=e.sent,n=r(d.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 kI(e,t,r){return yI.apply(this,arguments)}function yI(){return(yI=hi(Wi.mark((function e(t,r,n){var i,a,o,s,d,c,u,l,h,f,p,g,I,m=arguments;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=m.length>3&&void 0!==m[3]&&m[3],o={},a){e.next=6;break}return e.next=5,bI(r);case 5:o.codeChallenge=e.sent;case 6:return(s=new ll(t.clientConfig)).clientConfig.fetchOptions=gI(gI({},t.clientConfig.fetchOptions),{},{redirect:Vo?"follow":"manual"}),d=n.hint,c=n.redirectURI,u=n.usid,l=dI(n,lI),h={parameters:gI(gI(gI(gI({},l),{},{client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},o.codeChallenge&&{code_challenge:o.codeChallenge}),d&&{hint:d}),{},{organizationId:t.clientConfig.parameters.organizationId,redirect_uri:c,response_type:"code"},u&&{usid:u})},e.next=12,s.authorizeCustomer(h,!0);case 12:if(f=e.sent,p=(null===(i=f.headers)||void 0===i?void 0:i.get("location"))||f.url,g=new URL(p),I=Object.fromEntries(g.searchParams.entries()),!(f.status>=400||I.error)){e.next=18;break}throw new gd(f);case 18:return e.abrupt("return",gI({url:p},mI(p)));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xI(){return(xI=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c,u,l,h,f,p=arguments;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=p.length>2&&void 0!==p[2]&&p[2],i=r.hint,a=r.redirectURI,o=r.usid,s=dI(r,hI),d=vI(),c={},n){e.next=8;break}return e.next=7,bI(d);case 7:c.codeChallenge=e.sent;case 8:return u=ll.apiPaths.authorizeCustomer,l={organizationId:t.clientConfig.parameters.organizationId,shortCode:t.clientConfig.parameters.shortCode,version:t.clientConfig.parameters.version||"v1"},h=gI(gI(gI({},s),{},{client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId},c.codeChallenge&&{code_challenge:c.codeChallenge}),{},{hint:i,redirect_uri:a,response_type:"code"},o&&{usid:o}),f=new lu(u,t.clientConfig.baseUri,{pathParams:l,queryParams:h,origin:t.clientConfig.proxy}),e.abrupt("return",{url:f.toString(),codeVerifier:d});case 13:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function wI(){return(wI=hi(Wi.mark((function e(t,r,n){var i,a,o,s;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=!!r.clientSecret,a=gI(gI(gI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:n.code,organizationId:t.clientConfig.parameters.organizationId},!i&&r.codeVerifier&&{code_verifier:r.codeVerifier}),{},{grant_type:i?"authorization_code":"authorization_code_pkce",redirect_uri:n.redirectURI},void 0!==n.dnt&&{dnt:n.dnt.toString()}),n.usid&&{usid:n.usid}),!r.clientSecret){e.next=6;break}return o="Basic ".concat(II("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),s={headers:{Authorization:o},body:a},e.abrupt("return",t.getAccessToken(s));case 6:return e.abrupt("return",t.getAccessToken({body:a}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function zI(){return(zI=hi(Wi.mark((function e(t,r,n){var i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.clientConfig.parameters.siteId){e.next=2;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 2:return i="Basic ".concat(II("".concat(t.clientConfig.parameters.clientId,":").concat(n.clientSecret))),a={headers:{Authorization:i},body:gI(gI({grant_type:"client_credentials",channel_id:t.clientConfig.parameters.siteId},r.usid&&{usid:r.usid}),void 0!==r.dnt&&{dnt:r.dnt.toString()})},e.abrupt("return",t.getAccessToken(a));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function CI(){return(CI=hi(Wi.mark((function e(t,r){var n,i,a,o,s,d,c;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=vI(),i=r.dnt,a=r.redirectURI,o=r.usid,s=dI(r,fI),e.next=4,kI(t,n,gI(gI({},s),{},{redirectURI:a,hint:"guest"},o&&{usid:o}),!1);case 4:return d=e.sent,c=gI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:d.code,code_verifier:n,grant_type:"authorization_code_pkce",redirect_uri:a,usid:d.usid},void 0!==i&&{dnt:i.toString()}),e.abrupt("return",t.getAccessToken({body:c}));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function PI(){return(PI=hi(Wi.mark((function e(t,r,n,i){var a,o,s,d,c,u,l,h,f,p,g,I,m,v,b,k,y;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=vI(),e.next=3,bI(o);case 3:return s=e.sent,(d=new ll(t.clientConfig)).clientConfig.fetchOptions=gI(gI({},t.clientConfig.fetchOptions),{},{redirect:Vo?"follow":"manual"}),c="Basic ".concat(II("".concat(r.username,":").concat(r.password))),u=n.dnt,l=n.usid,h=n.redirectURI,f={headers:{Authorization:c},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:gI(gI({},(null==i?void 0:i.body)||{}),{},{redirect_uri:h,client_id:t.clientConfig.parameters.clientId,code_challenge:s,channel_id:t.clientConfig.parameters.siteId},l&&{usid:l})},e.next=11,d.authenticateCustomer(f,!0);case 11:if(p=e.sent,g=(null===(a=p.headers)||void 0===a?void 0:a.get("location"))||p.url,I=new URL(g),m=Object.fromEntries(I.searchParams.entries()),!(p.status>=400||m.error)){e.next=17;break}throw new gd(p);case 17:if(v=mI(g),b=gI({client_id:t.clientConfig.parameters.clientId,channel_id:t.clientConfig.parameters.siteId,code:v.code,code_verifier:o,grant_type:"authorization_code_pkce",organizationId:t.clientConfig.parameters.organizationId,redirect_uri:n.redirectURI,usid:v.usid},void 0!==u&&{dnt:u.toString()}),!r.clientSecret){e.next=23;break}return k="Basic ".concat(II("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),y={headers:{Authorization:k},body:b},e.abrupt("return",t.getAccessToken(y));case 23:return e.abrupt("return",t.getAccessToken({body:b}));case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function OI(){return(OI=hi(Wi.mark((function e(t,r,n){var i,a;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.clientSecret){e.next=2;break}throw new Error("Required argument client secret is not provided");case 2:if(t.clientConfig.parameters.siteId){e.next=4;break}throw new Error("Required argument channel_id is not provided through clientConfig.parameters.siteId");case 4:if(n.mode){e.next=6;break}throw new Error("Required argument mode is not provided through parameters");case 6:if(n.userid){e.next=8;break}throw new Error("Required argument userid is not provided through parameters");case 8:return i="Basic ".concat(II("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),a=gI(gI(gI({user_id:n.userid,mode:n.mode},n.locale&&{locale:n.locale}),n.usid&&{usid:n.usid}),{},{channel_id:t.clientConfig.parameters.siteId},n.callbackURI&&{callback_uri:n.callbackURI}),e.abrupt("return",t.authorizePasswordlessCustomer({headers:{Authorization:i},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:a},!0));case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function EI(){return(EI=hi(Wi.mark((function e(t,r,n){var i,a,o;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r.clientSecret){e.next=2;break}throw new Error("Required argument client secret is not provided");case 2:if(t.clientConfig.parameters.organizationId){e.next=4;break}throw new Error("Required argument organizationId is not provided through clientConfig.parameters.organizationId");case 4:if(n.pwdlessLoginToken){e.next=6;break}throw new Error("Required argument pwdlessLoginToken is not provided through parameters");case 6:return i=vI(),a="Basic ".concat(II("".concat(t.clientConfig.parameters.clientId,":").concat(r.clientSecret))),o=gI({grant_type:"client_credentials",hint:"pwdless_login",pwdless_login_token:n.pwdlessLoginToken,code_verifier:i},n.dnt&&{dnt:n.dnt}),e.abrupt("return",t.getPasswordLessAccessToken({headers:{Authorization:a},parameters:{organizationId:t.clientConfig.parameters.organizationId},body:o}));case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var qI=Mr.find,jI=!0;"find"in[]&&Array(1).find((function(){jI=!1})),Ut({target:"Array",proto:!0,forced:jI},{find:function(e){return qI(this,e,arguments.length>1?arguments[1]:void 0)}}),Ki("find");function SI(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 TI(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?SI(Object(r),!0).forEach((function(t){Ii(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SI(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var MI=function(e){var t=!1;return e&&(t=Boolean(Object.keys(e).find((function(e){return"content-type"===e.toLowerCase()})))),t},AI=function(){var e=hi(Wi.mark((function e(t){var r,n,i,a,o,s,d,c,u,l,h,f;return Wi.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.options,a=t.clientConfig,o=t.rawResponse,s=["apiName","endpointPath","organizationId","shortCode"],d=TI(TI({},a.parameters),null==i?void 0:i.customApiPathParameters),s.forEach((function(e){if(!d[e])throw new Error("Missing required property needed in options.customApiPathParameters or clientConfig.parameters: ".concat(e))})),d.apiVersion||(d.apiVersion="v1"),c=a,a.baseUri||(c=TI(TI({},a),{},{baseUri:"https://{shortCode}.api.commercecloud.salesforce.com/custom/{apiName}/{apiVersion}"})),u=Boolean(!(null!==(r=i.parameters)&&void 0!==r&&r.siteId)&&(null==a||null===(n=a.parameters)||void 0===n?void 0:n.siteId)),l=MI(i.headers)||MI(c.headers),h=i,l&&!u||(h=TI(TI({},i),{},{headers:TI(TI({},i.headers),!l&&{"Content-Type":"application/json"}),parameters:TI(TI({},i.parameters),u&&{siteId:a.parameters.siteId})})),f=new lu("/organizations/{organizationId}/{endpointPath}",c.baseUri,{pathParams:d,queryParams:h.parameters,origin:c.proxy}),e.abrupt("return",bd(f.toString(),h,c,o));case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),_I=Object.freeze({__proto__:null,isBrowser:Vo,isNode:$o,globalObject:Yo,hasFetchAvailable:Ko,fetch:Jo,stringToBase64:II,getCodeAndUsidFromUrl:mI,createCodeVerifier:vI,generateCodeChallenge:bI,authorize:kI,authorizeIDP:function(e,t){return xI.apply(this,arguments)},loginIDPUser:function(e,t,r){return wI.apply(this,arguments)},loginGuestUserPrivate:function(e,t,r){return zI.apply(this,arguments)},loginGuestUser:function(e,t){return CI.apply(this,arguments)},loginRegisteredUserB2C:function(e,t,r,n){return PI.apply(this,arguments)},authorizePasswordless:function(e,t,r){return OI.apply(this,arguments)},getPasswordLessAccessToken:function(e,t,r){return EI.apply(this,arguments)},refreshAccessToken:function(e,t,r){var n=gI({grant_type:"refresh_token",refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId},void 0!==t.dnt&&{dnt:t.dnt.toString()});if(r&&r.clientSecret){var i={headers:{Authorization:"Basic ".concat(II("".concat(e.clientConfig.parameters.clientId,":").concat(r.clientSecret)))},body:n};return e.getAccessToken(i)}return e.getAccessToken({body:n})},logout:function(e,t){return e.logoutCustomer({headers:{Authorization:"Bearer ".concat(t.accessToken)},parameters:{refresh_token:t.refreshToken,client_id:e.clientConfig.parameters.clientId,channel_id:e.clientConfig.parameters.siteId}})},callCustomEndpoint:AI,doFetch:bd,encodeSCAPISpecialCharacters:function(e){return e.replace(/%/g,"%25").replace(/,/g,"%2C")}});e.ClientConfig=Wo,e.ShopperBaskets=gu,e.ShopperContexts=vu,e.ShopperCustomers=yu,e.ShopperDiscoverySearch=zu,e.ShopperExperience=Ou,e.ShopperGiftCertificates=ju,e.ShopperLogin=ll,e.ShopperOrders=Mu,e.ShopperProducts=Ru,e.ShopperPromotions=Lu,e.ShopperSearch=rl,e.ShopperSeo=al,e.ShopperStores=dl,e.TemplateURL=lu,e.helpers=_I,Object.defineProperty(e,"__esModule",{value:!0})}));